


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



What would Prolog return given these queries:
(a) ?instructor(chan,math273) (b) ?instructor(patel,cs301) (c) ?enrolled(X,cs301) (d) ?enrolled(kiko,Y) (e) ?teaches(grossman,Y)
(a) P (Orange) (b) P (Lemon)
(a) ∀x(R(x) → H(x)) (b) ∀x(R(x) ∧ H(x))
(a) some student in your class has a cat and a ferret, but not a dog. (b) No student in your class has a cat, dog and ferret.
(a) ∃xP (x) (b) ∀xP (x)
(a) ∀n(n^2 ≥ n) (b) ∃n(n^2 < 0)
(a) ∀xP (x) (b) ¬∃xP (x) (c) ∀x((x 6 = 3) → P (x)) ∨ ∃x¬P (x)
(a) All students in your class can solve quadratic equations. (b) Somebody in your class has seen a foreign movie.
(a) All tools are in correct place and are in excellent condition. (b) One of your tools is not in in the correct place, but it is in excellent condition.
Equivalence name p ∧ T ≡ p p ∨ F ≡ p Identity Laws p ∨ T ≡ T p ∧ F ≡ F Domination Laws p ∧ p ≡ p p ∨ p ≡ p Idempotent Laws ¬(¬p) ≡ p double negation Law p ∧ q ≡ q ∧ p p ∨ q ≡ q ∨ p commutative laws ¬(p ∧ q) ≡ ¬p ∨ ¬q ¬(p ∨ q) ≡ ¬p ∧ ¬q De Morgan’s laws (p ∧ q) ∧ r ≡ p ∧ (q ∧ r) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r) Associative Laws p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r) Distributive Laws p ∨ (p ∧ q) ≡ p p ∧ (p ∨ q) ≡ p Absorption Laws p ∨ ¬p ≡ T p ∧ ¬p ≡ F negation Laws p → q ≡ ¬p ∨ q p → q ≡ ¬q → ¬p (p → q) ∧ (p → r) ≡ p → (q ∧ r) (p → r) ∧ (q → r) ≡ (p ∨ q) → r (p → q) ∨ (p → r) ≡ p → (q ∨ r) (p → r) ∨ (q → r) ≡ (p ∧ q) → r p ↔ q ≡ (p → q) ∧ (q → p) p ↔ q ≡ (p ∧ q) ∨ (¬p ∧ ¬q) ¬(p ↔ q) ≡ p ↔ ¬q