York University Faculties of Science and Engineering, Arts, Atkinson MATH 1090. Problem Set #3 Solutions Section M 1. Use Resolution (possibly in combination with the Deduction Theorem, Implication as Disjunction, and/or Double Negation, but NOT Post s Theorem) to prove (A B C) (A B) (C B) ANSWER:By the Deduction Theorem, what we want to prove is equivalent to (A B C) (A B) (C B). Using implication as disjunction these become (A B C) ( A B) ( C B), which is the same as (A B C), ( A B), ( C B) false By De Morgan and Double Negation, ( C B) is the same as (C B), so what we want finally is (A B C), ( A B), C, B false Now we apply resolution as follows: A B C A B C B B C B false Page 1
NOTE TO MARKER: Show some leniency based on the fact that I forgot to explicitly mention De Morgan s laws as an allowed technique; similarly on prob 2. Also, on prob 1, on the step that combines A B C with A B to get B C, idempotency of is implicitly used; that is, what you would really get is B B C. If anyone did everything up to that point correctly, but got stuck on that point, please give him or her full credit. 2. Use Resolution (possibly in combination with the other allowed tools from Problem 1) to prove A ( B C) (B A) ANSWER: As before we transform to A ( B C) (B A), note that B A is the same as B A, transform to A ( B C), ( B A) false, use De Morgan and Double Negation to make it A ( B C), B A false, which is the same as A ( B C), B, A false We now proceed to prove this by Resolution: A ( B C) B A false B C B C 3. This problem is to be done in the context of Boolean Logic, not Predicate Logic. Suppose Γ is a set of assumptions, and A, B are (Boolean) WFFs. We know that A B is equivalent to A B. Suppose Γ A B. Is it necessarily the case that either Γ A, or Γ B? Page 2
If so, prove it (remember that your proof must work for any Γ, A, B as above). If not, find Γ, A, B that give a counterexample (remember the Soundness Theorem). ANSWER: No. Let Γ be the empty set, and let A and B both equal p. Then certainly p p (for example, by Post s theorem). However neither p nor p is true, because neither p nor p is a tautology, and if (say) p were true, then p would have to be a tautology by the Soundness Theorem. (Same for p.) 4. Find the results of the following substitutions. For item (a), work it out according to the inductive definition; for the others, just give the answer and explain the reasons for anything unexpected-looking): (a) g(f(x), f(y))[x := 7] (where f is a unary function symbol, g is a binary function symbol, and 7 is a non-logical constant symbol. Note that in the style of the notes, this should technically be written gfxfy[x := 7], but we re ignoring that.) ANSWER: g(f(x), f(y))[x := 7] = g(f(x)[x := 7], f(y)[x := 7)) = g(f(x[x := 7]), f(y[x := 7])) = g(f(7), f(y)) (b) (f(x) < 7)[x := 7] (as above, plus we have a non-logical binary predicate symbol <, which again we should technically put before its arguments, but we won t.) ANSWER: (f(7) < 7). (c) (( x)(f(x) < 7))[x := 7] ANSWER: (( x)(f(x) < 7)). COMMENT: x is not a free variable, so substituting for it has no effect. (d) (( y)(f(x) < 7))[x := 7] ANSWER: (( y)(f(7) < 7)). COMMENT: we substitute for the free variable x; the quantifier ( y) does not interfere. (e) (( x)( y)(f(7) < g(x, y))[z := g(y, 7)] ANSWER:( x)( y)(f(7) < g(x, y)) COMMENT: z does not occur free; substituting for it has no effect. (f) (( x)( y)(f(z) < g(x, y))[z := g(y, 7)] ANSWER: illegal. COMMENT: z occurs free, but substituting for it causes the variable y in g(y, 7) to be captured by the quantifier ( y). Page 3
(g) (( x)( y)( z)(f(z) < g(x, y))[z := g(y, 7)] ANSWER: (( x)( y)( z)(f(z) < g(x, y)). COMMENT: z does not occur free; substituting for it has no effect. 5. Prove by induction on the complexity of A that if x does not occur free in A, then A[x := t] equals A, for any term t. ANSWER: The base case is when A has complexity 0; that is, A is an atomic formula. In that case A is one of four things: A Boolean variable, say p. Then clearly p[x := t] = p. A Boolean constant, either true or false. Same as above. s 1 = s 2, where s 1 and s 2 are terms not containing x (since otherwise x would occur free in A). Then (s 1 = s 2 )[x := t] equals s 1 [x := t] = s 2 [x := t] equals s 1 = s 2 (since s 1 and s 2 do not contain x). φ(s 1,..., s n ), where φ is an n-ary predicate symbol, and s 1,..., s n are terms not containing x (since otherwise x would occur free). As in the previous case. Now suppose A has complexity n > 0, and the result holds for all formulae of lesser complexity. Then A is one of the following: B, where x does not occur free in B (otherwise, it would occur free in A). Then A[x := t] = (B[x := t]) = B( by induction hypothesis ) = A B C, where is one of,,,, and x does not occur free in B or C (same reason as above). Then A[x := t] = B[x := t] C[x := t] = B C (induction hyp) = A ( y)b, where y is some variable different from x, and x does not occur free in B (same reason). Then A[x := t] = (( y)b)[x := t] = ( y)(b[x := t]) = ( y)b (ind hyp) = A ( x)b, where this time it is possible that x occurs free in B (any free occurrences of x in B will become bound when you add the ( x) quantifier). Then Page 4
A[x := t] = (( x)b)[x := t] = ( x)b (by defn of substitution, not the induction hypothesis) = A 6. Consider the following formula, in a language with a non-logical constant symbol 5: ( x)(x = 5) (( x)(x = 5)) (a) What is the abstraction of this formula into Boolean logic? ANSWER: p p. (b) Is the abstraction a tautology? Why? ANSWER: Yes (one-line proof; A A is an axiom). (c) Whether or not the abstraction is a tautology, can you prove the original formula ( x)(x = 5) (( x)(x = 5)), in predicate logic? ANSWER: Yes. All axioms of Boolean logic are axioms of predicate logic, so again it s a one-line proof. 7. Consider the following formula, in a language with a non-logical function symbol S: ( x) ((x = Sx) (Sx = SSx)) (a) What is the abstraction of this formula into Boolean logic? ANSWER: p. Everything is inside the scope of a quantifier, so all we can do is assign a Boolean variable to it. (b) Is the abstraction a tautology? Why? ANSWER: No. Given a state in which v(p) = f, obviously p is false in that state, so not every state makes p true. (c) Whether or not the abstraction is a tautology, can you prove the original formula ( x) ((x = Sx) (Sx = SSx)), in predicate logic? ANSWER: Yes. I will give two proofs, both using techniques not discussed in class in time to use them for the assignment. (NOTE TO MARKER: It is possible to give a direct proof from the axioms, but I did not realize at the time I assigned the problem how difficult that was. Therefore, please accept any answer that makes a good guess as to the form of Axiom 6 to be used, or otherwise makes meaningful progress to a solution.) Page 5
FIRST PROOF, using Generalisation: (1) x = Sx (x = Sx Sx = SSx) < Ax. 6, where t = x, s = Sx, A = (x = Sx) > (2) x = Sx Sx = SSx < Post s theorem: A (A B) = A B, so A (A B) A B where A = (x = Sx), B = (Sx = SSx) > (3) ( x)(x = Sx Sx = SSx) < Generalisation > SECOND PROOF, using the Deduction Theorem and Generalisation: First we show x = Sx Sx = SSx. Assume x = Sx. Now: (1) x = Sx < Assumption > (2) x = Sx (x = Sx Sx = SSx) < Ax. 6, where t = x, s = Sx, A = (x = Sx) > (3) x = Sx Sx = SSx < Modus Ponens, (1), (2) > (4) Sx = SSx < Eqn, (1), (3) > Thus x = Sx Sx = SSx, so (x = Sx) (Sx = SSx), by the Deduction Theorem. Now ( x)((x = Sx) (Sx = SSx)), by Generalisation. Page 6