De Morgan with quantifiers
De Morgan
val x P : Q x P : Q not for all = at least for one not val x P : Q x P : Q not exists = for all not
Hence: and
It holds further that:
x x x
x x x holds also for quantified formulas! Substitution meta rule
Simple Sequential
Simultaneous EVERY occurrence of P is substituted! holds also for quantified formulas! The rule of Leibniz
meta rule Leibniz
formula that has single occurrence is replaced! as a sub formula Other equivalences with quantifiers
Exchange trick No wonder as
Term splitting Other equivalences with quantifiers Monotonicity of quantifiers
tautologies Lemma E1: iff is a tautology. still hold (in Lemma W4: iff is a tautology. predicate logic)
Lemma W5: If then . Derivations / Reasoning Limitations of proofs by calculation
Proofs by calculation are formal and well-structured, but often undirected and not particularly intuitive. Example
val P ∧ (P∨Q) = (P∨F) ∧(P∨Q) val = P∨(F ∧Q) val we can prove this = P ∨ F if y is not free in P andmore Q intuitively by val = P reasoning
Conclusions P ∧ (P∨Q) =val P P ∧ (P∨Q) ⇔ P =val T An example of a mathematical proof
Theorem If x2 is even, then x is even (x ∊ Z). (sub)goal
Proof Let x∊ Z be such that x2 is even. generating hypothesis We need to prove that x is even too. pure hypothesis Assume that x is odd, towards a contradiction. conclusion If x is odd than x = 2y+1if fory is some not y free∊ Z. in P and Q Then x2 = (2y+1)2 = 4y2 + 4y + 1 = 2(2y2 + 2y) + 1 and 2y2 + 2y ∊ Z.
So, x2 is odd too, and we have a contradiction.
Thanks to Bas Luttik Exposing logical structure
(sub)goal Theorem If x2 is even, then x is even (x ∊ Z). generating hypothesis Proof Let x∊ Z Assume x2 is even. pure hypothesis Assume that x is odd. conclusion Then x = 2y+1 for some y ∊ Z. Then x2 = if(2y+1) y is 2not = 4y 2free + 4y +in 1 P= and Q 2(2y2 + 2y) + 1 and 2y2 + 2y ∊ Z.
So, x2 is odd
a contradiction. So, x is even Thanks to Bas Luttik Single inference rule
Q is a correct conclusion from n premises P1, .. , P n iff val (P1∧ P2 ∧…∧ Pn) ⊨ Q
val If n=0, then P1 ∧ P2 ∧… ∧ Pn = T val Note that T ⊨ Q means that Q = T Q holds unconditionally Derivation
a formal system based on the single Q is a correct conclusion from n premises P1, .. , P n inference rule iff val for proofs that closely (P1∧ P2 ∧…∧ Pn) ⊨ Q follow our intuitive reasoning
Two types of inference rules: for drawing (particularly useful) elimination rules conclusions out of instances of the single premises inference rule introduction rules and one new for simplifying goals special rule! Conjunction elimination
How do we use a conjunction in a proof? P∧Q ⊨val P
val ∧-elimination P∧Q ⊨ Q
|| || || ||
(k) P∧Q (k) P∧Q
|| || || ||
{∧-elim on (k)} {∧-elim on (k)} (m) P (m) Q
(k < m) (k < m) Implication elimination
How do we use an implication in a proof? P⇒Q ⊨val ???
⇒-elimination ⇒ val || || (P Q) ∧ P ⊨ Q
(k) P⇒Q || ||
(l) P
|| || {⇒-elim on (k) and (l)} (m) Q (k < m, l < m) Conjunction introduction
How do we prove a conjunction? val P∧Q ⊨ P∧Q ∧-introduction …
(k) P …
(l) Q
… {∧-intro on (k) and (l)} (m) P∧Q
(k < m, l < m) Implication introduction
truly new How do we prove an implication? and necessary for reasoning with ⇒-introduction hypothesis … {Assume} (k) P flag shows the validity of a … hypothesis
(l-1) Q {⇒-intro on (k) and (l-1)} (l) P⇒Q time for an example! Negation introduction
How do we prove a negation? val ¬ P = P ⇒ F
¬-introduction … {Assume} (k) P
… ⇒-intro (l-1) F {¬-intro on (k) and (l-1)} (l) ¬P Negation elimination
How do we use a negation in a proof? P ∧ ¬P ⊨val F ¬-elimination || ||
(k) P || ||
(l) ¬P
|| || {¬-elim on (k) and (l)} time for an (m) F example!
(k < m, l < m) F introduction
How do we prove F? P ∧ ¬P ⊨val F F-introduction …
(k) P … the same as ¬-elim (l) ¬P only intended bottom-up
… {F-intro on (k) and (l)} (m) F
(k < m, l < m) F elimination
How do we use F in a proof? it’s very useful!
val F-elimination F ⊨ P
|| ||
(k) F
|| ||
{F-elim on (k)} (m) P
(k < m) Double negation introduction
How do we prove ¬¬? P ⊨val ¬¬P ¬¬-introduction
…
(k) P … {¬¬-intro on (k)} (m) ¬¬P
(k < m) Double negation elimination
How do we use ¬¬ in a proof? ¬¬P ⊨val P ¬¬-elimination
|| ||
(k) ¬¬P
|| ||
{¬¬-elim on (k)} (m) P
(k < m) Proof by contradiction
(sub)goal Theorem If x2 is even, then x is even (x ∊ Z). generating hypothesis Proof Let x∊ Z Assume x2 is even. pure hypothesis Assume that x is odd. conclusion Then x = 2y+1 for some y ∊ Z. Then x2 = if(2y+1) y is 2not = 4y 2free + 4y +in 1 P= and Q 2(2y2 + 2y) + 1 and 2y2 + 2y ∊ Z.
So, x2 is odd
a contradiction. So, x is even Thanks to Bas Luttik Proof by contradiction
How do we prove P by a contradiction? ¬P ⇒ F ⊨val ¬¬P ⊨val P proof by contradiction {Assume} (k) ¬P
… ¬-intro (l-1) F {¬-intro on (k) and (l-1)} ¬¬-elim (l) ¬¬P {¬¬-elim on (l)} (l+1) P time for an example! (k < m)