Formalising sentence into predicate logic check

128 Views Asked by At

Have been working on some predicate logic examples and was hoping someone could have a check-over to make sure it's correct. Here are the questions and my attempts;

  1. Only pink pigs like sleeping and drinking.

     ∃ X • (pink(X) ∧ pigs( X ) ⇒ sleeping( X ) ∧ drinking( X ))
    
  2. The child of a pink and a purple pig is red.

     ∀x∀y[(pinkPig(x) ∧ purplePig(y)) ⇒ ∀z(childOf(z,x,y) ⇒ red(z))]
    

Would really appreciate any help to check to see if these are correct.

Thanks.

Update

Have made amendments to the 1st answer as per below;

      ∀ X • (sleeping(X) ∧ drinking( X ) ⇒ pink( X ) ∧ pigs( X ))

Would really appreciate it if someone could take the time to review what I've managed so far!

Thanks.