MTH 225 Lecture-Module #04:
Basics of Symbolic Proofs


intent of a proof is to show that some logical expression is always true
significant in computer science
e.g.:
The Association for Computing Machinery (ACM) is world's main organization for computer science
"Journal of the ACM" (JACM) is 'flagship' journal of ACM
""
http://www.acm.org/jacm/
articles have 

actually what you see are English proofs
but there's always the assumption that everything could be done very formally
as we will be doing here

initially in this course proving just small propositional formulas
could do  for such
but consider even the following formula which isn't really long
(Manna Waldinger p.16):
    (
        ((P1 → (P2 ∨ P3) ∧ (¬P1 → (P3 ∨ P4))))
        ∧
        ((P3 → ¬ P6) ∧ (¬P3 → (P4 → P1)))
        ∧
        ( ¬(P2 ∧ P5) ∧ (P2 → P3) )
        )
    →
    ¬(P3 → P6)
that formula is valid a.k.a. tautology i.e. always true
but wouldn't want to do truth-table for this
rows, lots of columns — would be excessive work
(also likely to make a mistake  ;-/

one possibility for proving is simplification
(you're going to think this is obvious):
when formula includes "t"s and "f"s
    e.g.  (f ∧ Q) → P
can simplify e.g.  f ∧ Q  to 
because no matter what value of Q is (t or f), the value of  f ∧ Q  is 
so  (f ∧ Q) → P  simplifies to  () → P
but then  f → P  further simplifies to 
similarly because no matter what value of P is (t or f),
the value of  f → P  is t
summarizing:
    (f ∧ Q) → P
    simplifies  to
    f → P
    which simplifies  to
    t
if can thus simplify a formula to t, then clearly it's always true

tables of simplifications are as follows:
(from pages 39-41 of book by Manna Waldinger)
and rem. "φ" stands for any propositional formula
  name              simplification
  --------------    --------------
  not-true          ¬t   simplifies to   f      
  not-false         ¬f   simplifies to   t      

  and-true          φ ∧ t   simplifies to   φ      
  true-and          t ∧ φ   simplifies to   φ      
  and-false         φ ∧ f   simplifies to   f      
  false-and         f ∧ φ   simplifies to   f      

  or-true           φ ∨ t   simplifies to   t      
  true-or           t ∨ φ   simplifies to   t      
  or-false          φ ∨ f   simplifies to   φ      
  false-or          f ∨ φ   simplifies to   φ      

  if-true           t → φ   simplifies to   φ      
  if-false          f → φ   simplifies to   t      
  then-true         φ → t   simplifies to   t      
  then-false        φ → f   simplifies to   ¬φ     

  iff-true          φ ↔ t   simplifies to   φ      
  true-iff          t ↔ φ   simplifies to   φ      
  iff-false         φ ↔ f   simplifies to   ¬φ     
  false-iff         f ↔ φ   simplifies to   ¬φ     

  not-not           ¬ ¬ φ   simplifies to   φ          
  not-and-not       ¬(¬φ1 ∧ ¬φ2)  simplifies to   φ1 ∨ φ2    
  not-or-not        ¬(¬φ1 ∨ ¬φ2)  simplifies to   φ1 ∧ φ2    
  not-if            ¬(φ1 → ¬φ2)  simplifies to   φ1 ∧ φ2    
  not-iff-left      ¬(¬φ1 ↔ φ2)  simplifies to   φ1 ↔ φ2    
  not-iff-right     ¬(φ1 ↔ ¬φ2)  simplifies to   φ1 ↔ φ2    

  and-two           φ ∧ φ   simplifies to   φ      
  and-not           φ ∧ ¬φ  simplifies to   f      
  not-and           ¬φ ∧ φ  simplifies to   f      

  or-two            φ ∨ φ   simplifies to   φ      
  or-not            φ ∨ ¬φ  simplifies to   t      
  not-or            ¬φ ∨ φ  simplifies to   t      

  if-two            φ → φ   simplifies to   t      
  if-not            ¬φ → φ  simplifies to   φ      
  then-not          φ → ¬φ  simplifies to   ¬φ     
  contrapositive    ¬φ2 → ¬φ1  simplifies to   φ1 → φ2    

  or-two            φ ↔ φ   simplifies to   t      
  or-not            φ ↔ ¬φ  simplifies to   f      
  not-or            ¬φ ↔ φ  simplifies to   f      

you would only change the left-hand side to right-hand side
(going the other way not worthwhile)
apply simplification to formula or any subformula
as above

further examples:
  [(P ∧ Q) → t] ∧ [R ↔ f]
                              ≡    // by the "then-true" simplification
  [       t    ] ∧ [R ↔ f]
                              ≡    // by the "iff-false" simplification
          t      ∧ [ ¬R  ]
                              ≡    // by the "true-and" simplification
                 ¬R        
another e.g.:
  (P ∧ ¬¬P) → (Q ∨ f)
                          ≡    // by the "not-not" simplification
  (P  ∧ P ) → (Q ∨ f)
                          ≡    // by the "and-two" simplification
  (    P   ) → (Q ∨ f)
                          ≡    // by the "or-false" simplification
  (    P   ) → (  Q  )
another e.g.:
  ¬(¬Q → ¬P) ∧ (P → Q)
                          ≡    // by the "contrapositive" simplification
  ¬( P → Q ) ∧ (P → Q)
                          ≡    // by the "not-and" simplification
              f

but simplifications don't apply to all formulas
e.g. formula might not contain any "t"s or "f"s
nor any other expressions which could be simplified
e.g. formula:  (P ∧ Q) → P

so further work to prove formula always true i.e. establish validity
is  using equivalences
table/catalog of rewriting-equivalences pages 68-69 in MannaWaldinger
and pages 24-25 in our textbook
e.g. some of them:
  ¬ (φ1 ∧ φ2)    ≡  ¬φ1 ∨ ¬φ2            // DeMorgan's Law not-and
  ¬ (φ1 ∨ φ2)    ≡  ¬φ1 ∧ ¬φ2            // DeMorgan's Law not-or
  φ1 → φ2        ≡  ¬φ1 ∨ φ2             // if-or
  φ1 ∧ φ2        ≡  φ2 ∧ φ1              // commut. and
  (φ1 ∨ φ2) ∨ φ3 ≡  φ1 ∨ (φ2 ∨ φ3)        // assoc. or
  φ1 ∧ (φ2 ∨ φ3) ≡  (φ1 ∧ φ2) ∨ (φ1 ∧ φ3)  // distrib. and-or
  φ1 ∨ (φ2 ∧ φ3) ≡  (φ1 ∨ φ2) ∧ (φ1 ∨ φ3)  // distrib. or-and
  ·
  ·
  ·
where "≡" means l.h.s. can be rewritten as r.h.s.
    or vice-versa
apply rewriting to formula or any sub-formula

e.g. starting with the formula  (P ∧ Q) → P,
can apply rewriting-equivalences and simplifications as follows:
  (P ∧ Q) → P
                  ≡    // by if-or rewriting
  ¬(P ∧ Q) ∨ P
                  ≡    // by DeMorgan's
  (¬P ∨ ¬Q) ∨ P
                  ≡    // by commutativity
  P ∨ (¬P ∨ ¬Q)
                  ≡    // by associativity
  (P ∨ ¬P) ∨ ¬Q
                  ≡    // by the "or-not" simplification
     t      ∨ ¬Q
                  ≡    // by the "true-or" simplification
            t
another e.g.:
  (P → Q) ↔ (¬Q → ¬P)
                            ≡  // by if-or rewriting
  (P → Q) ↔ ( ¬(¬Q) ∨ ¬P )
                            ≡  // by the "not-not" simplification
  (P → Q) ↔ (   Q   ∨ ¬P )
                            ≡  // by commutativity
  (P → Q) ↔ (¬P ∨ Q)
                            ≡  // by if-or-rewriting right-to-left
  (P → Q) ↔ (P → Q)
                            ⇒  // by the "iff two" simplification
  t


(Copyright © 2009 by Hugh McGuire   — for thoughts about this, see   http://www.cis.gvsu.edu/~mcguire/teaching/copyright_thoughts.html .)