-- Nov 9 In-Class Exercise Thread
∀x [∀y Animal(y) ⇒ Loves(x,y)] ⇒ [∃y Loves(y,x)] (Starting statement)
∀x ¬[∀y ¬Animal(y)∨Loves(x,y)]∨[∃y Loves(y,x)] (Eliminate implication)
∀x [∃y ¬(¬Animal(y)∨Loves(x,y))]∨[∃y Loves(y,x)] (Moving negation inward)
∀x [∃y ¬¬Animal(y)∧ ¬Loves(x,y)]∨[∃y Loves(y,x)] (De Morgan's Law)
∀x [∃y Animal(y)∧ ¬Loves(x,y)]∨[∃y Loves(y,x)] (Double Negation equivalence)
∀x [∃y Animal(y)∧ ¬Loves(x,y)]∨[∃z Loves(z,x)] (Standardize variables)
∀x [Animal(F(x))∧ ¬Loves(x,F(x))]∨Loves(G(x),x) (Skolemization)
Animal(F(x))∧ ¬Loves(x,F(x))]∨Loves(G(x),x) (Remove universal quantifiers)
[Animal(F(x))∨Loves(G(x),x)]∧[¬Loves(x,F(x))∨Loves(G(x),x)] (Distributivity of ∨ and ∧)
A1. Animal(F(x))∨Loves(G(x),x)
A2. ¬Loves(x,F(x))∨Loves(G(x),x)
E. Cat(Tuna)
F. ¬Cat(x) ∨ Animal(x)
Both E and F are terms. Therefore
we return
Unify(Tuna, x, Unify(Cat(a), Cat(a), ()) )
The second Unify would return the empty list.
Going back to the first Unify, y is a var, we call
Unify-var(x, Tuna, ())
This would append x with Tuna, so we have x | -> Tuna in S, giving us (x |-> Tuna)
(
Edited: 2022-11-09)
∀x [∀y Animal(y) ⇒ Loves(x,y)] ⇒ [∃y Loves(y,x)] (Starting statement)
∀x ¬[∀y ¬Animal(y)∨Loves(x,y)]∨[∃y Loves(y,x)] (Eliminate implication)
∀x [∃y ¬(¬Animal(y)∨Loves(x,y))]∨[∃y Loves(y,x)] (Moving negation inward)
∀x [∃y ¬¬Animal(y)∧ ¬Loves(x,y)]∨[∃y Loves(y,x)] (De Morgan's Law)
∀x [∃y Animal(y)∧ ¬Loves(x,y)]∨[∃y Loves(y,x)] (Double Negation equivalence)
∀x [∃y Animal(y)∧ ¬Loves(x,y)]∨[∃z Loves(z,x)] (Standardize variables)
∀x [Animal(F(x))∧ ¬Loves(x,F(x))]∨Loves(G(x),x) (Skolemization)
Animal(F(x))∧ ¬Loves(x,F(x))]∨Loves(G(x),x) (Remove universal quantifiers)
[Animal(F(x))∨Loves(G(x),x)]∧[¬Loves(x,F(x))∨Loves(G(x),x)] (Distributivity of ∨ and ∧)
A1. Animal(F(x))∨Loves(G(x),x)
A2. ¬Loves(x,F(x))∨Loves(G(x),x)
E. Cat(Tuna)
F. ¬Cat(x) ∨ Animal(x)
Both E and F are terms. Therefore
we return
Unify(Tuna, x, Unify(Cat(a), Cat(a), ()) )
The second Unify would return the empty list.
Going back to the first Unify, y is a var, we call
Unify-var(x, Tuna, ())
This would append x with Tuna, so we have x | -> Tuna in S, giving us (x |-> Tuna)