11/9/2020 Grok | COMP30026 Practice Exam
Ques on 3
Ques on 3 Part B (2 marks)
For parts A, B, and C, consider these closed first-order predicate logic formulas and :
: :
Part B (2 marks)
Show that is not valid.
Show this by giving an interpreta on involving the finite domain of three objects
. That is, give a defini on of the two-place predicate which, along with
this domain, is a countermodel for .
Note: This part asks about (the previous part asks about ).
Instruc ons
Define asaHaskellfunc onpredicateP :: Domain -> Domain -> Bool. Format
You can use any available Haskell syntax to define your func on. You should make sure that:
predicateP x yevaluatesto ,and
predicateP x yisdefinedforallvaluesofxandyfromthedomain.
The objects in the domain have type Domain, which derives familiar typeclasses such as Ord and Eq, so you can even use ==, <, and other standard opera ons to compare elements.
For example, either of the following two snippets define the predicate :
predicateP x y = not (x == y)
predicateP A A = False
predicateP B B = False
di l
https://groklearning.com/learn/unimelb-comp30026-2020-s2/prac-exam/6/ 1/1
Cheng
F
G∧F G∨F G∨F
P
}C ,B ,A{ G∨F
)y,x(P
))x,y(P⇒)y,x(P(y∀x∀ G )x,x(Px∀ F
)y ≠ x( : )y,x(P
P
G