SE 500 (Math for SE)   Fall 2022
HW #2: The Leibniz Inference Rule; Boolean Functions;
Modeling English Propositions;
Proofs Involving Equality, Negation, true, and false
Due: 2pm, Friday, Sept. 16

The exercises referred to by number come from pages 21-23 of the Gries & Schneider textbook.

1. Do Exercise 1.7, parts (b) through (e). Each answer should show an instantiation of Leibniz, together with a statement telling to what each of X, Y, E, and z was instantiated in order to arrive at it. For example, the answer to part (a) is

x = x+2

4*x+y = 4*(x+2)+y

at which one arrives by the instantiation X:x, Y:x+2, E:4*z+y, z:z.

2. Do Exercise 1.8, parts (b) through (e). The solution to (a) is b+c+y+w.
(Note: Depending upon which printing of the book you have, you may or may not have to swap the two sides of X=Y in parts (b) and (e).)

3. Do Exercise 1.9, parts (b) through (e). The solution to (a) is E:(x+y)*z, X:x+y, Y:y+x.

4. Let f : bool × bool → bool be a two-argument boolean function. We say that f is irreflexive if f(p,p) is false for both possible values of p (true and false). We say that f is symmetric if f(p,q) = f(q,p) for all possible combinations of values of p and q (of which there are four, of course).

Exactly two among the sixteen two-argument boolean functions (see this or page 26 of Gries & Schneider) are irreflexive and symmetric. Identify them.


The next two problems involve exercises from pages 38-39 of the Gries & Schneider text.

5. Do parts (e) through (h) of Exercise 2.2.

6. Do Exercise 2.5. Remember that the first step is to assign "names" (boolean variables) to the atomic sub-propositions (e.g., "It's raining.").


7. In each step in the proof below, Leibniz (often with an assist from Substitution) is applied. That is, in going from each line to the next, some subexpression E is replaced by an expression F such that E = F (or possibly F = E) is an instantiation of (i.e., the conclusion of applying Substitution to) one of the theorems in our arsenal. (That is, E = F (or else F = E) is P[r:=Q], where P is a theorem in our arsenal, r is a list of variables, and Q is a list (of length equal to r) of expressions.)

Here, the only theorems used are axioms (3.1), (3.2), and (3.3). Fill in each "hint" so as to inform the reader which theorem (and which instantiation of it) was used. The first hint is filled in for you. Also, somehow highlight the subexpressions E and F in each step. In the first step below, the former is underlined and the latter is in boldface.

      (p ≡ q) ≡ (true ≡ (q ≡ r))

   =      < (3.3), with q:=p >

      (p ≡ q) ≡ ((p ≡ p) ≡ (q ≡ r))

   =      <                                                 >

      (p ≡ q) ≡ (p ≡ (p ≡ (q ≡ r)))

   =      <                                                 >

      (p ≡ q) ≡ (p ≡ ((p ≡ q) ≡ r))

   =      <                                                 >

      (p ≡ q) ≡ (((p ≡ q) ≡ r) ≡ p)

   =      <                                                 >

      (p ≡ q) ≡ ((p ≡ q) ≡ (r ≡ p))

   =      <                                                 >

      ((p ≡ q) ≡ (p ≡ q)) ≡ (r ≡ p)

   =      <                                                 >

      true ≡ (r ≡ p)

   =      <                                                 >

      r ≡ p

The remaining problems ask you to prove a theorem. In each case, you are to use only lower-numbered theorems than the one being proved. (For example, to prove Theorem (3.12), you may use only theorems up to (3.11).) Here are the theorems.

8. Do Exercise 3.8, which is to prove Double Negation: (3.12) ¬¬p ≡ p

9. Do Exercise 3.9, which is to prove Negation of false: (3.13) ¬false ≡ true

10. Do an augmented version of Exercise 3.11, which is to prove Theorem (3.15) ¬p ≡ p ≡ false

Prove it in two different ways. As the textbook suggests, one proof should transform ¬p ≡ p ≡ false to true with the help of Theorem (3.11). A second proof should transform ¬p ≡ p to false.