程序代写代做代考 C Haskell 11/9/2020 Grok | COMP30026 Practice Exam

11/9/2020 Grok | COMP30026 Practice Exam
Queson 3
Queson 3 Part A (1 mark)
For parts A, B, and C, consider these closed first-order predicate logic formulas and :
: :
Part A (1 mark)
Show that is sasfiable.
Show this by giving an interpretaon involving the finite domain of three objects
. That is, give a definion of the two-place predicate which, along with
this domain, is a model for . Instrucons
Define asaHaskellfunconpredicateP :: Domain -> Domain -> Bool.  Format
You can use any available Haskell syntax to define your funcon. 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 operaons 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 predicateP C C = False predicateP _ _ = True https://groklearning.com/learn/unimelb-comp30026-2020-s2/prac-exam/5/ 1/1 Cheng F P }C ,B ,A{ G∧F )y,x(P G∧F ))x,y(P⇒)y,x(P(y∀x∀ G )x,x(Px∀ F )y ≠ x( : )y,x(P P G