Date: Sat, 28 Feb 2004 13:43:27 -0500 (EST) From: Michael Bloodgood To: Dave Saunders Subject: 603 hw1 model solutions I have attached a file (hw1.txt) containing model solutions for the problems that had relatively frequent errors. Mike This document contains model solutions for the problems from hw1 that were frequently done incorrectly. 2.4 ~f = ~f v f (or-simp) = t (excluded middle) 4.2.4 (N i: 0 <= i < n : b[i]=x) = (N j: 0 <= j < m: c[j]=x) 4.2.5 (A x (N i: 0 <= i < n: b[i]=x) = (N i: 0 <= i < n: c[i]=x)) 4.4.3 E^i_j = E is valid E^n_k = (A i: 1 <= i < k: (E j: b[j] = i)) is valid For the third one, I accepted two answers. 1: you could say it was invalid on account of the i being captured. 2: you could say it is valid as long as the original i was changed to an unused var first to avoid conflict and then the substitution was performed. e.g. a k could be substituted for the original i yielding E^n_(n*i) = (A k: 1 <= k < n*i: (E j: b[j] = k)) is valid. Extra Credit (2.10): Prove: if e is a tautology, then e=T can be proved to be an equivalence using only the laws 1-12 and the rules of Substitution and Transitivity. (1) Suppose e taut. (2) By 2.8, e = e1 where e1 is in CNF. (3) e=e1 is arrived at from e by using only laws 1-12, Sub, and Trans. This is justified by the proof of 2.8. (4) e and e1 have the same truth value in every state (by (2), Def. of '=' (meaning)) (5) e1 and e have the same identifiers (by proof of 2.8) (6) e,e1 are well-defined in the same set of states (by (5)) (7) e1 taut (by (1),(4), and (6) (8) Recall e1 is of the form e_0^...^e_n where each e_i has the form g_0v...vg_m where each g_j is an id, ~id,t, or f and the ids in each e_i are distinct. Therefore, the truth values of e_0,...,e_n are independent of each other by the fact that the ids in each e_i are distinct. By (7) and truth tables for ^, we know that each of e_0,...,e_n must always evaluate to t when well-defined. So each e_i must be of the form g_0v...vg_m where at least one of the following two cases holds: Case A: at least one of the g_i=t Case B: there exists g_i and g_j (i != j) s.t (such that) g_i = id_x and g_j= ~id_x. Now it is clear that from e1 by a suitable number of applications of Excluded Middle (for the B cases) and Or-Simplification (for the A cases) we can prove e1 = T ^ ... ^ T. Then we can apply And-Simplification next to arrive at e1=T (with an implicit uses of Sub and Trans as many times as needed throughout this proof of e1=t). (9) In conclusion, by (8),(2),and (3), we have shown that e=T can be proved to be an equivalence using only the laws 1-12, Sub, and Trans. (10) BY (1) and (9), the proof is now complete.