Download presentation
Presentation is loading. Please wait.
Published byChloe Cori Goodman Modified over 5 years ago
1
Section 8.1 Equality A first-order theory is first-order predicate calculus applied to the formalization of some subject (i.e., decide on some axioms to define basic properties of the objects). How can we describe the idea of equality of expressions in a first-order theory? One way to start is to say the following wff is valid: x (x = x). The = symbol is just the infix form of an equality predicate. e.g., we could pick a predicate, say e, and let e(x, y) mean x equals y. To reason with equality we need some properties. Properties of Equality. The following properties hold for all terms t, u, and v. Equality Axiom (EA) t = t. Symmetric (t = u) (u = t). Transitive (t = u) (u = v) (t = v). Equals for Equals (EE) (t = u) ƒ(…, t, …) = ƒ(…, u, …). Extended Equals for Equals (EE) (t = u) W(t) W(u), where t and u are free to replace x in W(x), W(t) is obtained from W(x) by replacing one or more free occurrences of x by t and W(u) is obtained from W(x) by replacing one or more free occurrences of x that were used to obtain W(t) by u. Example/Quiz (Arrays). Prove x ((a[x] = s) (x = b[t])) (a[b[t]] = s). Proof: 1. x ((a[x] = s) (x = b[t])) P 2. (a[c] = s) (c = b[t]) 1, EI 3. (c = b[t]) (a[c] = s) 2, T 4. (c = b[t]) (a[c] = s) (a[b[t]] = s) EE, where W(c) is (a[c] = s) 5. a[b[t]] = s 3, 4, MP QED 1–5, CP.
2
Example/Quiz (Arrays). Prove the following wff is valid.
(a[b[k]] = a[j]) x ((x = b[k]) (a[x] = a[j])). 1. a[b[k]] = a[j] P 2. x ((x ≠ b[k]) (a[x] ≠ a[j])) P [for IP], T 3. (b[k] ≠ b[k]) (a[b[k]] ≠ a[j])) 2, UI 4. b[k] ≠ b[k] 1, 3, DS 5. b[k] = b[k] EA 6. False 4, 5, Contr 7. x ((x = b[k]) (a[x] = a[j])) 2–6, IP QED 1, 7, CP. Example (odd and even). Let odd(x) = y (x = 2y + 1) and even(x) = y (x = 2y). Prove that x (odd(x) even(x + 1)). 1. odd(x) P [for odd(x) even(x + 1)] 2. y (x = 2y + 1) 1, T 3. x = 2c , EI 4. (x = 2c + 1) (x + 1 = 2c ) EE, where ƒ(t) = t + 1 and t = x + 1 5. x + 1 = 2c , 4, MP 6. x + 1 = 2(c + 1 ) 5, T 7. y (x + 1= 2y) 6, EG, where t = c + 1 8. even(x + 1) 7, T 9. odd(x) even(x + 1) 1–8, CP 10. x (odd(x) even(x + 1)) 9, UG QED.
3
Quiz (On your own time). Give an IP proof of
x (odd(x) even(x + 1)) where the P for IP should be the negation of the entire wff. Example/Quiz. Recall that a fixed point for a function ƒ is an element x such that ƒ(x) = x. Formalize the sentence, “ƒ has a unique fixed point.” Answer: x ((ƒ(x) = x) y (ƒ(y) = y) (y = x)). Quiz. Prove that the preceding wff is invalid. Answer: For a countermodel, let the domain be {a, b} and let ƒ(x) = x for x {a, b}. Example. Prove informally that if ƒ º g has a fixed point, then g º ƒ has a fixed point. Proof: Assume ƒ º g has a fixed point x. Then ƒ(g(x)) = x. Apply g to both sides to get g(ƒ(g(x)) = g(x). So g(x) is a fixed point of g º ƒ. QED. Quiz. Formalize the sentence, “If ƒ º g has a fixed point, then g º ƒ has a fixed point.” Answer: x (ƒ(g(x)) = x) y (g(ƒ(y)) = y). Quiz. Give a direct (CP) formal proof of x (ƒ(g(x)) = x) y (g(ƒ(y)) = y). Proof: 1. x (ƒ(g(x)) = x) P 2. ƒ(g(c)) = c 1, EI 3. (ƒ(g(c)) = c) g(ƒ(g(c)) = g(c) EE, where t = ƒ(g(c)) 4. g(ƒ(g(c)) = g(c) 2, 3, MP 5. y (g(ƒ(y)) = y) 4, EG, where t = g(c) QED 1–5, CP. Quiz (On your own time). Give an IP proof of x (ƒ(g(x)) = x) y (g(ƒ(y)) = y).
4
Example. Give a formal proof of the following formalization of “if ƒ and g are surjective,
then ƒ º g is surjective.” x y (ƒ(y) = x) x y (g(y) = x) x y (ƒ(g(y)) = x). Proof: 1. x y (ƒ(y) = x) P 2. x y (g(y) = x) P 3. ƒ(c) = x 1, UI, EI 4. g(d) = c 2, UI, EI 5. ƒ(g(d)) = x 4, 3, EE: u = t W(t) W(u) 6. y (ƒ(g(y)) = x) 5, EG 7. Line1 line 2 y (ƒ(g(y)) = x) 1– 6, CP 8. x (Line1 line 2 y (ƒ(g(y)) = x) 7, UG: OK, since line 7 is CP 9. Wff to be proved 8, T: x (C A(x)) (C x A(x))) QED. Example/Quiz. Give a direct (CP) formal proof of the following formalization of “if ƒ and g are injective, then ƒ º g is injective.” x y (ƒ(x) = ƒ(y) x = y) x y (g(x) = g(y) x = y) x y (ƒ(g(x)) = ƒ(g(y)) x = y) Proof: 1. x y (ƒ(x) = ƒ(y) x = y) P 2. x y (g(x) = g(y) x = y) P 3. ƒ(g(x)) = ƒ(g(y) g(x) = g(y) 1, UI, UI 4. g(x) = g(y) x = y 2, UI, UI 5. ƒ(g(x)) = ƒ(g(y)) x = y 3, 4, HS 6. x y (ƒ(g(x)) = ƒ(g(y)) x = y) 5, UG, UG QED 1– 6, CP.
5
Quiz (On your own time). Give formal indirect proofs (IP) of the two statements on the
previous slide. Example/Quiz. Show that the following wff is invalid. x (ƒ(ƒ(x)) = t) x ( (x = ƒ(a)) (ƒ(x) = t)). Solution: Let I be the interpretation with domain D = {0, 1}, t = 0, a = 1, and ƒ(x) = x. Then the wff becomes x (x = 0) x ((x = 1) (x = 0)), which is false. So I is a countermodel for the wff. Example/Quiz. Show that the following wff is valid. x (ƒ(ƒ(x)) = t) x y ((y = ƒ(x)) (ƒ(y) = t)). Proof: 1. x (ƒ(ƒ(x)) = t) P 2. x y ((y ≠ ƒ(x)) (ƒ(y) ≠ t)) P [for IP], T 3. ƒ(ƒ(x)) = t 1, UI 4. y ((y ≠ ƒ(x)) (ƒ(y) ≠ t)) 2, UI 5. (ƒ(x) ≠ ƒ(x)) (ƒ(ƒ(x)) ≠ t) 4, UI 6. ƒ(x) ≠ ƒ(x) 3, 5, DS 7. ƒ(x) = ƒ(x) EA 8. False 6, 7, Contr 9. x y ((y = ƒ(x)) (ƒ(y) = t) 2–8, IP QED 1, 9, CP.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.