Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , P ⊢ Q , ∆ → R Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ Γ , P → Q ⊢ ∆ → L: assume RHS of an assumed implication after proving its LHS André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ ¬ R Γ ⊢ ¬ P , ∆ Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , P ⊢ Q , ∆ → R Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ Γ , P → Q ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , P ⊢ Q , ∆ → R Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ Γ , P → Q ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , P ⊢ Q , ∆ → R Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ Γ , P → Q ⊢ ∆ ¬ R: prove ¬ P by proving contradiction (or ∆ options) from assumption P André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ ¬ L Γ , ¬ P ⊢ ∆ Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , P ⊢ Q , ∆ → R Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ Γ , P → Q ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ Γ , P → Q ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ Γ , P → Q ⊢ ∆ ¬ L: assume ¬ P by proving its opposite P André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R id Γ , P ⊢ P , ∆ Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ Γ , P → Q ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R id Γ , P ⊢ P , ∆ Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ Γ , P → Q ⊢ ∆ id: proof done (marked ∗ ) when succedent to prove is in antecedent André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R id Γ , P ⊢ P , ∆ Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ Γ , P → Q ⊢ ∆ id: only way to finish a proof (in propositional logic!) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R id Γ , P ⊢ P , ∆ Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ cut Γ , P → Q ⊢ ∆ Γ ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R id Γ , P ⊢ P , ∆ Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ cut Γ ⊢ C , ∆ Γ , C ⊢ ∆ Γ , P → Q ⊢ ∆ Γ ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R id Γ , P ⊢ P , ∆ Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ cut Γ ⊢ C , ∆ Γ , C ⊢ ∆ Γ , P → Q ⊢ ∆ Γ ⊢ ∆ cut: Show lemma C and then assume lemma C André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R id Γ , P ⊢ P , ∆ ⊤ R Γ ⊢ true , ∆ Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ cut Γ ⊢ C , ∆ Γ , C ⊢ ∆ Γ , P → Q ⊢ ∆ Γ ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R id Γ , P ⊢ P , ∆ ⊤ R Γ ⊢ true , ∆ Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ cut Γ ⊢ C , ∆ Γ , C ⊢ ∆ Γ , P → Q ⊢ ∆ Γ ⊢ ∆ ⊤ R: proof done (marked ∗ ) when proving trivial true (used rarely) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R id Γ , P ⊢ P , ∆ ⊤ R Γ ⊢ true , ∆ Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ cut Γ ⊢ C , ∆ Γ , C ⊢ ∆ Γ , P → Q ⊢ ∆ Γ ⊢ ∆ ⊤ R: what rule to use when true in antecedent? André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R id Γ , P ⊢ P , ∆ ⊤ R Γ ⊢ true , ∆ Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ cut Γ ⊢ C , ∆ Γ , C ⊢ ∆ ⊥ L Γ , false ⊢ ∆ Γ , P → Q ⊢ ∆ Γ ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R id Γ , P ⊢ P , ∆ ⊤ R Γ ⊢ true , ∆ Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ cut Γ ⊢ C , ∆ Γ , C ⊢ ∆ ⊥ L Γ , false ⊢ ∆ Γ , P → Q ⊢ ∆ Γ ⊢ ∆ ⊥ L: proof done (marked ∗ ) when assuming trivial false (used rarely) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Propositional Proof Rules of Sequent Calculus ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ ∨ R Γ ⊢ P , Q , ∆ Γ , P ⊢ ∆ ¬ R Γ ⊢ P ∧ Q , ∆ Γ ⊢ P ∨ Q , ∆ Γ ⊢ ¬ P , ∆ ∧ L Γ , P , Q ⊢ ∆ ∨ L Γ , P ⊢ ∆ Γ , Q ⊢ ∆ Γ ⊢ P , ∆ ¬ L Γ , P ∧ Q ⊢ ∆ Γ , P ∨ Q ⊢ ∆ Γ , ¬ P ⊢ ∆ Γ , P ⊢ Q , ∆ → R id Γ , P ⊢ P , ∆ ⊤ R Γ ⊢ true , ∆ Γ ⊢ P → Q , ∆ → L Γ ⊢ P , ∆ Γ , Q ⊢ ∆ cut Γ ⊢ C , ∆ Γ , C ⊢ ∆ ⊥ L Γ , false ⊢ ∆ Γ , P → Q ⊢ ∆ Γ ⊢ ∆ ⊥ L: what rule to use when false in succedent? André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23
Sequent Proof Example (Simple) ⊢ v 2 ≤ 10 ∧ b > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23
Sequent Proof Example (Simple) v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) → R ⊢ v 2 ≤ 10 ∧ b > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23
Sequent Proof Example (Simple) ∧ R v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 v 2 ≤ 10 ∧ b > 0 ⊢ ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) → R ⊢ v 2 ≤ 10 ∧ b > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23
Sequent Proof Example (Simple) ∧ L v 2 ≤ 10 , b > 0 ⊢ b > 0 v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 v 2 ≤ 10 ∧ b > 0 ⊢ ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ∧ R v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) → R ⊢ v 2 ≤ 10 ∧ b > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23
Sequent Proof Example (Simple) ∗ id v 2 ≤ 10 , b > 0 ⊢ b > 0 ∧ L v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 v 2 ≤ 10 ∧ b > 0 ⊢ ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ∧ R v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) → R ⊢ v 2 ≤ 10 ∧ b > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23
Sequent Proof Example (Simple) ∗ id ∨ R v 2 ≤ 10 ∧ b > 0 ⊢ ¬ ( v ≥ 0 ) , v 2 ≤ 10 v 2 ≤ 10 , b > 0 ⊢ b > 0 ∧ L v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 v 2 ≤ 10 ∧ b > 0 ⊢ ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ∧ R v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) → R ⊢ v 2 ≤ 10 ∧ b > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23
Sequent Proof Example (Simple) ∗ ∧ L v 2 ≤ 10 , b > 0 ⊢ ¬ ( v ≥ 0 ) , v 2 ≤ 10 id v 2 ≤ 10 ∧ b > 0 ⊢ ¬ ( v ≥ 0 ) , v 2 ≤ 10 v 2 ≤ 10 , b > 0 ⊢ b > 0 ∧ L ∨ R v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 v 2 ≤ 10 ∧ b > 0 ⊢ ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ∧ R v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) → R ⊢ v 2 ≤ 10 ∧ b > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23
Sequent Proof Example (Simple) ∗ id ∗ v 2 ≤ 10 , b > 0 ⊢ ¬ ( v ≥ 0 ) , v 2 ≤ 10 ∧ L id v 2 ≤ 10 ∧ b > 0 ⊢ ¬ ( v ≥ 0 ) , v 2 ≤ 10 v 2 ≤ 10 , b > 0 ⊢ b > 0 ∧ L ∨ R v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 v 2 ≤ 10 ∧ b > 0 ⊢ ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ∧ R v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) → R ⊢ v 2 ≤ 10 ∧ b > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23
Soundness of Proof Rules Lemma ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ is sound Γ ⊢ P ∧ Q , ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 8 / 23
Soundness of Proof Rules Lemma ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ is sound: conclusion valid if all premises valid. Γ ⊢ P ∧ Q , ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 8 / 23
Soundness of Proof Rules Lemma ∧ R Γ ⊢ P , ∆ Γ ⊢ Q , ∆ is sound: conclusion valid if all premises valid. Γ ⊢ P ∧ Q , ∆ using [ [ P ∧ Q ] ] = [ [ P ] ] ∩ [ [ Q ] ] . Proof ω ∈ [ [ G ] ] for all G ∈ Γ and ω �∈ [ [ D ] ] for all D ∈ ∆ WLOG: (why?) By premise: ω ∈ [ [Γ ⊢ P , ∆] ] and ω ∈ [ [Γ ⊢ Q , ∆] ] ω ∈ [ [ P ] ] and ω ∈ [ [ Q ] ] By WLOG: By semantics: ω ∈ [ [ P ∧ Q ] ] By definition: ω ∈ [ [Γ ⊢ P ∧ Q , ∆] ] André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 8 / 23
Soundness of dL Theorem dL sequent calculus is sound: every dL formula with a proof is valid. André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 9 / 23
Soundness of dL Theorem dL sequent calculus is sound: every dL sequent with a proof is valid. Proof (by induction on structure of sequent calculus proof). André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 9 / 23
Soundness of dL Theorem dL sequent calculus is sound: every dL sequent with a proof is valid. Proof (by induction on structure of sequent calculus proof). Proofs without rule uses only prove dL axioms, which are sound. 0 André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 9 / 23
Soundness of dL Theorem dL sequent calculus is sound: every dL sequent with a proof is valid. Proof (by induction on structure of sequent calculus proof). Proofs without rule uses only prove dL axioms, which are sound. 0 Sequent proof ends with some proof step: 1 Γ 1 ⊢ ∆ 1 Γ n ⊢ ∆ n ... Γ ⊢ ∆ The subproof of each premise Γ i ⊢ ∆ i is smaller, so � Γ i ⊢ ∆ i by IH. All dL proof rules are proved sound, also the one used above, i.e.: If � (Γ 1 ⊢ ∆ 1 ) and ... and � (Γ n ⊢ ∆ n ) then � (Γ ⊢ ∆) Thus, � (Γ ⊢ ∆) . André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 9 / 23
Soundness of dL Theorem dL sequent calculus is sound: every dL sequent with a proof is valid. Proof (by induction on structure of sequent calculus proof). Proofs without rule uses only prove dL axioms, which are sound. 0 Sequent proof ends with some proof step: 1 Γ 1 ⊢ ∆ 1 Γ n ⊢ ∆ n ... Γ ⊢ ∆ The subproof of each premise Γ i ⊢ ∆ i is smaller, so � Γ i ⊢ ∆ i by IH. All dL proof rules are proved sound, also the one used above, i.e.: If � (Γ 1 ⊢ ∆ 1 ) and ... and � (Γ n ⊢ ∆ n ) then � (Γ ⊢ ∆) Thus, � (Γ ⊢ ∆) . Todo Always make sure every axiom and proof rule we adopt is sound! André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 9 / 23
Dynamics Proof Rules of Sequent Calculus Have: Left and right proof rule for all propositional connectives Need: Left and right proof rule for all top-level operators in all modalities? André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 10 / 23
Dynamics Proof Rules of Sequent Calculus Have: Left and right proof rule for all propositional connectives Need: Left and right proof rule for all top-level operators in all modalities? [ ∪ ] R Γ ⊢ [ α ∪ β ] P , ∆ [ ∪ ] L Γ , [ α ∪ β ] P ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 10 / 23
Dynamics Proof Rules of Sequent Calculus Have: Left and right proof rule for all propositional connectives Need: Left and right proof rule for all top-level operators in all modalities? [ ∪ ] R Γ ⊢ [ α ] P ∧ [ β ] P , ∆ Γ ⊢ [ α ∪ β ] P , ∆ [ ∪ ] L Γ , [ α ∪ β ] P ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 10 / 23
Dynamics Proof Rules of Sequent Calculus Have: Left and right proof rule for all propositional connectives Need: Left and right proof rule for all top-level operators in all modalities? [ ∪ ] R Γ ⊢ [ α ] P ∧ [ β ] P , ∆ Γ ⊢ [ α ∪ β ] P , ∆ [ ∪ ] L Γ , [ α ] P ∧ [ β ] P ⊢ ∆ Γ , [ α ∪ β ] P ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 10 / 23
Dynamics Proof Rules of Sequent Calculus Have: Left and right proof rule for all propositional connectives Need: Left and right proof rule for all top-level operators in all modalities? [ ∪ ] R Γ ⊢ [ α ] P ∧ [ β ] P , ∆ Boring! Already follow from the axiom [ ∪ ] [ α ∪ β ] P ↔ [ α ] P ∧ [ β ] P Γ ⊢ [ α ∪ β ] P , ∆ [ ∪ ] L Γ , [ α ] P ∧ [ β ] P ⊢ ∆ Γ , [ α ∪ β ] P ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 10 / 23
Dynamics Proof Rules of Sequent Calculus Have: Left and right proof rule for all propositional connectives Need: Left and right proof rule for all top-level operators in all modalities? [ ∪ ] R Γ ⊢ [ α ] P ∧ [ β ] P , ∆ Boring! Already follow from the axiom [ ∪ ] [ α ∪ β ] P ↔ [ α ] P ∧ [ β ] P Γ ⊢ [ α ∪ β ] P , ∆ Rules [ ∪ ] R , [ ∪ ] L would only apply top-level, [ ∪ ] L Γ , [ α ] P ∧ [ β ] P ⊢ ∆ not in any other logical context such as [ x ′′ = − g ] _ Γ , [ α ∪ β ] P ⊢ ∆ [ ∪ ] A ⊢ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 10 / 23
Dynamics Proof Rules of Sequent Calculus Have: Left and right proof rule for all propositional connectives Need: Left and right proof rule for all top-level operators in all modalities? [ ∪ ] R Γ ⊢ [ α ] P ∧ [ β ] P , ∆ Boring! Already follow from the axiom [ ∪ ] [ α ∪ β ] P ↔ [ α ] P ∧ [ β ] P Γ ⊢ [ α ∪ β ] P , ∆ Rules [ ∪ ] R , [ ∪ ] L would only apply top-level, [ ∪ ] L Γ , [ α ] P ∧ [ β ] P ⊢ ∆ not in any other logical context such as [ x ′′ = − g ] _ Γ , [ α ∪ β ] P ⊢ ∆ Contextual Equivalence: substituting equals for equals CER Γ ⊢ C ( Q ) , ∆ ⊢ P ↔ Q CEL Γ , C ( Q ) ⊢ ∆ ⊢ P ↔ Q Γ ⊢ C ( P ) , ∆ Γ , C ( P ) ⊢ ∆ [ ∪ ] A ⊢ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 11 / 23
Dynamics Proof Rules of Sequent Calculus Have: Left and right proof rule for all propositional connectives Need: Left and right proof rule for all top-level operators in all modalities? [ ∪ ] R Γ ⊢ [ α ] P ∧ [ β ] P , ∆ Boring! Already follow from the axiom [ ∪ ] [ α ∪ β ] P ↔ [ α ] P ∧ [ β ] P Γ ⊢ [ α ∪ β ] P , ∆ Rules [ ∪ ] R , [ ∪ ] L would only apply top-level, [ ∪ ] L Γ , [ α ] P ∧ [ β ] P ⊢ ∆ not in any other logical context such as [ x ′′ = − g ] _ Γ , [ α ∪ β ] P ⊢ ∆ Contextual Equivalence: substituting equals for equals CER Γ ⊢ C ( Q ) , ∆ ⊢ P ↔ Q CEL Γ , C ( Q ) ⊢ ∆ ⊢ P ↔ Q Γ ⊢ C ( P ) , ∆ Γ , C ( P ) ⊢ ∆ [? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) ↔ [? x = 0 ; v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [ ∪ ] A ⊢ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 11 / 23
Dynamics Proof Rules of Sequent Calculus Have: Left and right proof rule for all propositional connectives Need: Left and right proof rule for all top-level operators in all modalities? [ ∪ ] R Γ ⊢ [ α ] P ∧ [ β ] P , ∆ Boring! Already follow from the axiom [ ∪ ] [ α ∪ β ] P ↔ [ α ] P ∧ [ β ] P Γ ⊢ [ α ∪ β ] P , ∆ Rules [ ∪ ] R , [ ∪ ] L would only apply top-level, [ ∪ ] L Γ , [ α ] P ∧ [ β ] P ⊢ ∆ not in any other logical context such as [ x ′′ = − g ] _ Γ , [ α ∪ β ] P ⊢ ∆ Contextual Equivalence: substituting equals for equals CER Γ ⊢ C ( Q ) , ∆ ⊢ P ↔ Q CEL Γ , C ( Q ) ⊢ ∆ ⊢ P ↔ Q Γ ⊢ C ( P ) , ∆ Γ , C ( P ) ⊢ ∆ [? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) ↔ [? x = 0 ; v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) A ⊢ [ x ′′ = − g ] � � [? x = 0 ; v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [ ∪ ] A ⊢ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 11 / 23
Simple Example Proof Dynamics in Sequent Calculus [;] ⊢ [ a := − b ; c := 10 ] � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 12 / 23
Simple Example Proof Dynamics in Sequent Calculus � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [ a := − b ; c := 10 ] ↔ � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [ a := − b ][ c := 10 ] by [;] [:=] ⊢ [ a := − b ][ c := 10 ] � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [;] ⊢ [ a := − b ; c := 10 ] � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 12 / 23
Simple Example Proof Dynamics in Sequent Calculus � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [ a := − b ][ c := 10 ] ↔ � � v 2 ≤ 10 ∧− ( − b ) > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [ c := 10 ] by [:=] [:=] ⊢ [ c := 10 ] � � v 2 ≤ 10 ∧− ( − b ) > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [:=] ⊢ [ a := − b ][ c := 10 ] � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [;] ⊢ [ a := − b ; c := 10 ] � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 12 / 23
Simple Example Proof Dynamics in Sequent Calculus � � v 2 ≤ 10 ∧− ( − b ) > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [ c := 10 ] ↔ v 2 ≤ 10 ∧− ( − b ) > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) by [:=] ⊢ v 2 ≤ 10 ∧ − ( − b ) > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) [:=] ⊢ [ c := 10 ] � � v 2 ≤ 10 ∧− ( − b ) > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [:=] ⊢ [ a := − b ][ c := 10 ] � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [;] ⊢ [ a := − b ; c := 10 ] � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 12 / 23
Simple Example Proof Dynamics in Sequent Calculus ∗ id v 2 ≤ 10 , b > 0 ⊢ ¬ ( v ≥ 0 ) , v 2 ≤ 10 ∗ id v 2 ≤ 10 , b > 0 ⊢ b > 0 ∧ L v 2 ≤ 10 ∧ b > 0 ⊢ ¬ ( v ≥ 0 ) , v 2 ≤ 10 ∧ L v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 ∨ R v 2 ≤ 10 ∧ b > 0 ⊢ ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ∧ R v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) → R ⊢ v 2 ≤ 10 ∧ b > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) ⊢ v 2 ≤ 10 ∧ − ( − b ) > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) [:=] ⊢ [ c := 10 ] � � v 2 ≤ 10 ∧− ( − b ) > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [:=] ⊢ [ a := − b ][ c := 10 ] � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [;] ⊢ [ a := − b ; c := 10 ] � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 12 / 23
Simple Example Proof Dynamics in Sequent Calculus ∗ id v 2 ≤ 10 , b > 0 ⊢ ¬ ( v ≥ 0 ) , v 2 ≤ 10 ∗ id v 2 ≤ 10 , b > 0 ⊢ b > 0 ∧ L v 2 ≤ 10 ∧ b > 0 ⊢ ¬ ( v ≥ 0 ) , v 2 ≤ 10 ∧ L v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 ∨ R v 2 ≤ 10 ∧ b > 0 ⊢ ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ∧ R v 2 ≤ 10 ∧ b > 0 ⊢ b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) → R ⊢ v 2 ≤ 10 ∧ b > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) ⊢ v 2 ≤ 10 ∧ − ( − b ) > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ 10 ) [:=] ⊢ [ c := 10 ] � � v 2 ≤ 10 ∧− ( − b ) > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [:=] ⊢ [ a := − b ][ c := 10 ] � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) [;] ⊢ [ a := − b ; c := 10 ] � � v 2 ≤ 10 ∧− a > 0 → b > 0 ∧ ( ¬ ( v ≥ 0 ) ∨ v 2 ≤ c ) Need to reason about real arithmetic Here: to glue previous propositional proof with this dynamic proof André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 12 / 23
Quantifier Proof Rules ∀ R Γ ⊢ ∀ x p ( x ) , ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23
Quantifier Proof Rules Γ ⊢ p ( y ) , ∆ ∀ R Γ ⊢ ∀ x p ( x ) , ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23
Quantifier Proof Rules Γ ⊢ p ( y ) , ∆ ∀ R ( y �∈ Γ , ∆ , ∀ x p ( x )) Γ ⊢ ∀ x p ( x ) , ∆ ∀ R: show for fresh variable y about which we can’t know anything André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23
Quantifier Proof Rules Γ ⊢ p ( y ) , ∆ ∀ R ( y �∈ Γ , ∆ , ∀ x p ( x )) Γ ⊢ ∀ x p ( x ) , ∆ ∃ R Γ ⊢ ∃ x p ( x ) , ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23
Quantifier Proof Rules Γ ⊢ p ( y ) , ∆ ∀ R ( y �∈ Γ , ∆ , ∀ x p ( x )) Γ ⊢ ∀ x p ( x ) , ∆ Γ ⊢ p ( e ) , ∆ ∃ R Γ ⊢ ∃ x p ( x ) , ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23
Quantifier Proof Rules Γ ⊢ p ( y ) , ∆ ∀ R ( y �∈ Γ , ∆ , ∀ x p ( x )) Γ ⊢ ∀ x p ( x ) , ∆ Γ ⊢ p ( e ) , ∆ ∃ R Γ ⊢ ∃ x p ( x ) , ∆ ( arbitrary term e ) ∃ R: enough to show for any witness term e André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23
Quantifier Proof Rules Γ ⊢ p ( y ) , ∆ ∀ R ( y �∈ Γ , ∆ , ∀ x p ( x )) Γ ⊢ ∀ x p ( x ) , ∆ ∀ L Γ , ∀ x p ( x ) ⊢ ∆ Γ ⊢ p ( e ) , ∆ ∃ R Γ ⊢ ∃ x p ( x ) , ∆ ( arbitrary term e ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23
Quantifier Proof Rules Γ ⊢ p ( y ) , ∆ ∀ R ( y �∈ Γ , ∆ , ∀ x p ( x )) Γ ⊢ ∀ x p ( x ) , ∆ Γ , p ( e ) ⊢ ∆ ∀ L Γ , ∀ x p ( x ) ⊢ ∆ Γ ⊢ p ( e ) , ∆ ∃ R Γ ⊢ ∃ x p ( x ) , ∆ ( arbitrary term e ) André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23
Quantifier Proof Rules Γ ⊢ p ( y ) , ∆ ∀ R ( y �∈ Γ , ∆ , ∀ x p ( x )) Γ ⊢ ∀ x p ( x ) , ∆ Γ , p ( e ) ⊢ ∆ ∀ L ( arbitrary term e ) Γ , ∀ x p ( x ) ⊢ ∆ Γ ⊢ p ( e ) , ∆ ∃ R Γ ⊢ ∃ x p ( x ) , ∆ ( arbitrary term e ) ∀ L: even holds for arbitrary term e André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23
Quantifier Proof Rules Γ ⊢ p ( y ) , ∆ ∀ R ( y �∈ Γ , ∆ , ∀ x p ( x )) Γ ⊢ ∀ x p ( x ) , ∆ Γ , p ( e ) ⊢ ∆ ∀ L ( arbitrary term e ) Γ , ∀ x p ( x ) ⊢ ∆ Γ ⊢ p ( e ) , ∆ ∃ R Γ ⊢ ∃ x p ( x ) , ∆ ( arbitrary term e ) ∃ L Γ , ∃ x p ( x ) ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23
Quantifier Proof Rules Γ ⊢ p ( y ) , ∆ ∀ R ( y �∈ Γ , ∆ , ∀ x p ( x )) Γ ⊢ ∀ x p ( x ) , ∆ Γ , p ( e ) ⊢ ∆ ∀ L ( arbitrary term e ) Γ , ∀ x p ( x ) ⊢ ∆ Γ ⊢ p ( e ) , ∆ ∃ R Γ ⊢ ∃ x p ( x ) , ∆ ( arbitrary term e ) Γ , p ( y ) ⊢ ∆ ∃ L Γ , ∃ x p ( x ) ⊢ ∆ André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23
Quantifier Proof Rules Γ ⊢ p ( y ) , ∆ ∀ R ( y �∈ Γ , ∆ , ∀ x p ( x )) Γ ⊢ ∀ x p ( x ) , ∆ Γ , p ( e ) ⊢ ∆ ∀ L ( arbitrary term e ) Γ , ∀ x p ( x ) ⊢ ∆ Γ ⊢ p ( e ) , ∆ ∃ R Γ ⊢ ∃ x p ( x ) , ∆ ( arbitrary term e ) Γ , p ( y ) ⊢ ∆ ∃ L ( y �∈ Γ , ∆ , ∃ x p ( x )) Γ , ∃ x p ( x ) ⊢ ∆ ∃ L: assume for fresh variable y about which we can’t know anything André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23
Quantifier Proof Rules Γ ⊢ p ( y ) , ∆ ∀ R ( y �∈ Γ , ∆ , ∀ x p ( x )) Γ ⊢ ∀ x p ( x ) , ∆ Γ , p ( e ) ⊢ ∆ ∀ L ( arbitrary term e ) Γ , ∀ x p ( x ) ⊢ ∆ Γ ⊢ p ( e ) , ∆ ∃ R Γ ⊢ ∃ x p ( x ) , ∆ ( arbitrary term e ) Γ , p ( y ) ⊢ ∆ ∃ L ( y �∈ Γ , ∆ , ∃ x p ( x )) Γ , ∃ x p ( x ) ⊢ ∆ Important: soundness means that conclusion valid if all premises valid. André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23
A Sequent Proof of a Single-hop Bouncing Ball ⊢ A → [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) → R def A ≡ 0 ≤ x ∧ x = H ∧ v = 0 ∧ g > 0 ∧ 1 ≥ c ≥ 0 def B ( x , v ) ≡ 0 ≤ x ∧ x ≤ H { x ′′ = − g } def ≡ { x ′ = v , v ′ = − g } André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 14 / 23
A Sequent Proof of a Single-hop Bouncing Ball [;] A ⊢ [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) ⊢ A → [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) → R def A ≡ 0 ≤ x ∧ x = H ∧ v = 0 ∧ g > 0 ∧ 1 ≥ c ≥ 0 def B ( x , v ) ≡ 0 ≤ x ∧ x ≤ H { x ′′ = − g } def ≡ { x ′ = v , v ′ = − g } André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 14 / 23
A Sequent Proof of a Single-hop Bouncing Ball � ( H − g 2 t 2 = 0 → B ( H − g 2 t 2 , − c ( − gt ))) ∧ ( H − g 2 t 2 ≥ 0 → B ( H − g 2 t 2 , − gt A ⊢ ∀ t ≥ 0 � � [:=] A ⊢ ∀ t ≥ 0 [ x := H − g 2 t 2 ] ( x = 0 → B ( x , − c ( − gt ))) ∧ ( x ≥ 0 → B ( x , − gt )) � � [:=] A ⊢ ∀ t ≥ 0 [ x := H − g 2 t 2 ][ v := − gt ] ( x = 0 → B ( x , − cv )) ∧ ( x ≥ 0 → B ( x , v )) [;] A ⊢ ∀ t ≥ 0 [ x := H − g � � 2 t 2 ; v := − gt ] ( x = 0 → B ( x , − cv )) ∧ ( x ≥ 0 → B ( x , v )) [ ′ ] A ⊢ [ x ′′ = − g ] � � ( x = 0 → B ( x , − cv )) ∧ ( x ≥ 0 → B ( x , v )) � � [:=] A ⊢ [ x ′′ = − g ] ( x = 0 → [ v := − cv ] B ( x , v )) ∧ ( x ≥ 0 → B ( x , v )) [?] A ⊢ [ x ′′ = − g ] � � [? x = 0 ][ v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ] � � [? x = 0 ; v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [ ∪ ] A ⊢ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) ⊢ A → [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) → R def A ≡ 0 ≤ x ∧ x = H ∧ v = 0 ∧ g > 0 ∧ 1 ≥ c ≥ 0 def B ( x , v ) ≡ 0 ≤ x ∧ x ≤ H { x ′′ = − g } def ≡ { x ′ = v , v ′ = − g } André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 14 / 23
A Sequent Proof of a Single-hop Bouncing Ball [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) ↔ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) by [;] [ ∪ ] A ⊢ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) ⊢ A → [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) → R def A ≡ 0 ≤ x ∧ x = H ∧ v = 0 ∧ g > 0 ∧ 1 ≥ c ≥ 0 def B ( x , v ) ≡ 0 ≤ x ∧ x ≤ H { x ′′ = − g } def ≡ { x ′ = v , v ′ = − g } André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23
A Sequent Proof of a Single-hop Bouncing Ball [? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) ↔ � � [? x = 0 ; v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) by [ ∪ ] [;] A ⊢ [ x ′′ = − g ] � � [? x = 0 ; v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [ ∪ ] A ⊢ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) ⊢ A → [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) → R def A ≡ 0 ≤ x ∧ x = H ∧ v = 0 ∧ g > 0 ∧ 1 ≥ c ≥ 0 def B ( x , v ) ≡ 0 ≤ x ∧ x ≤ H { x ′′ = − g } def ≡ { x ′ = v , v ′ = − g } André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23
A Sequent Proof of a Single-hop Bouncing Ball [? x = 0 ; v := − cv ] B ( x , v ) ↔ [? x = 0 ][ v := − cv ] B ( x , v ) by [;] [?] A ⊢ [ x ′′ = − g ] � � [? x = 0 ][ v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ] � � [? x = 0 ; v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [ ∪ ] A ⊢ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) ⊢ A → [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) → R def A ≡ 0 ≤ x ∧ x = H ∧ v = 0 ∧ g > 0 ∧ 1 ≥ c ≥ 0 def B ( x , v ) ≡ 0 ≤ x ∧ x ≤ H { x ′′ = − g } def ≡ { x ′ = v , v ′ = − g } André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23
A Sequent Proof of a Single-hop Bouncing Ball [? x = 0 ][ v := − cv ] B ( x , v ) ↔ x = 0 → [ v := − cv ] B ( x , v ) by [?] � � [:=] A ⊢ [ x ′′ = − g ] ( x = 0 → [ v := − cv ] B ( x , v )) ∧ ( x ≥ 0 → B ( x , v )) [?] A ⊢ [ x ′′ = − g ] � � [? x = 0 ][ v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ] � � [? x = 0 ; v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [ ∪ ] A ⊢ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) ⊢ A → [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) → R def A ≡ 0 ≤ x ∧ x = H ∧ v = 0 ∧ g > 0 ∧ 1 ≥ c ≥ 0 def B ( x , v ) ≡ 0 ≤ x ∧ x ≤ H { x ′′ = − g } def ≡ { x ′ = v , v ′ = − g } André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23
A Sequent Proof of a Single-hop Bouncing Ball [ v := − cv ] B ( x , v ) ↔ x = 0 → B ( x , − cv ) by [:=] [ ′ ] A ⊢ [ x ′′ = − g ] � � ( x = 0 → B ( x , − cv )) ∧ ( x ≥ 0 → B ( x , v )) � � [:=] A ⊢ [ x ′′ = − g ] ( x = 0 → [ v := − cv ] B ( x , v )) ∧ ( x ≥ 0 → B ( x , v )) [?] A ⊢ [ x ′′ = − g ] � � [? x = 0 ][ v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ] � � [? x = 0 ; v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [ ∪ ] A ⊢ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) ⊢ A → [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) → R def A ≡ 0 ≤ x ∧ x = H ∧ v = 0 ∧ g > 0 ∧ 1 ≥ c ≥ 0 def B ( x , v ) ≡ 0 ≤ x ∧ x ≤ H { x ′′ = − g } def ≡ { x ′ = v , v ′ = − g } André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23
A Sequent Proof of a Single-hop Bouncing Ball [ ′ ] [ x ′ = f ( x )] p ( x ) ↔ ∀ t ≥ 0 [ x := y ( t )] p ( x ) [;] A ⊢ ∀ t ≥ 0 [ x := H − g � � 2 t 2 ; v := − gt ] ( x = 0 → B ( x , − cv )) ∧ ( x ≥ 0 → B ( x , v )) [ ′ ] A ⊢ [ x ′′ = − g ] � � ( x = 0 → B ( x , − cv )) ∧ ( x ≥ 0 → B ( x , v )) � � [:=] A ⊢ [ x ′′ = − g ] ( x = 0 → [ v := − cv ] B ( x , v )) ∧ ( x ≥ 0 → B ( x , v )) [?] A ⊢ [ x ′′ = − g ] � � [? x = 0 ][ v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ] � � [? x = 0 ; v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [ ∪ ] A ⊢ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) ⊢ A → [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) → R def A ≡ 0 ≤ x ∧ x = H ∧ v = 0 ∧ g > 0 ∧ 1 ≥ c ≥ 0 def B ( x , v ) ≡ 0 ≤ x ∧ x ≤ H { x ′′ = − g } def ≡ { x ′ = v , v ′ = − g } André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23
A Sequent Proof of a Single-hop Bouncing Ball � � [:=] A ⊢ ∀ t ≥ 0 [ x := H − g 2 t 2 ][ v := − gt ] ( x = 0 → B ( x , − cv )) ∧ ( x ≥ 0 → B ( x , v )) [;] A ⊢ ∀ t ≥ 0 [ x := H − g � � 2 t 2 ; v := − gt ] ( x = 0 → B ( x , − cv )) ∧ ( x ≥ 0 → B ( x , v )) [ ′ ] A ⊢ [ x ′′ = − g ] � � ( x = 0 → B ( x , − cv )) ∧ ( x ≥ 0 → B ( x , v )) � � [:=] A ⊢ [ x ′′ = − g ] ( x = 0 → [ v := − cv ] B ( x , v )) ∧ ( x ≥ 0 → B ( x , v )) [?] A ⊢ [ x ′′ = − g ] � � [? x = 0 ][ v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ] � � [? x = 0 ; v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [ ∪ ] A ⊢ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) ⊢ A → [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) → R def A ≡ 0 ≤ x ∧ x = H ∧ v = 0 ∧ g > 0 ∧ 1 ≥ c ≥ 0 def B ( x , v ) ≡ 0 ≤ x ∧ x ≤ H { x ′′ = − g } def ≡ { x ′ = v , v ′ = − g } André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23
A Sequent Proof of a Single-hop Bouncing Ball � � [:=] A ⊢ ∀ t ≥ 0 [ x := H − g 2 t 2 ] ( x = 0 → B ( x , − c ( − gt ))) ∧ ( x ≥ 0 → B ( x , − gt )) � � [:=] A ⊢ ∀ t ≥ 0 [ x := H − g 2 t 2 ][ v := − gt ] ( x = 0 → B ( x , − cv )) ∧ ( x ≥ 0 → B ( x , v )) [;] A ⊢ ∀ t ≥ 0 [ x := H − g � � 2 t 2 ; v := − gt ] ( x = 0 → B ( x , − cv )) ∧ ( x ≥ 0 → B ( x , v )) [ ′ ] A ⊢ [ x ′′ = − g ] � � ( x = 0 → B ( x , − cv )) ∧ ( x ≥ 0 → B ( x , v )) � � [:=] A ⊢ [ x ′′ = − g ] ( x = 0 → [ v := − cv ] B ( x , v )) ∧ ( x ≥ 0 → B ( x , v )) [?] A ⊢ [ x ′′ = − g ] � � [? x = 0 ][ v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ] � � [? x = 0 ; v := − cv ] B ( x , v ) ∧ [? x ≥ 0 ] B ( x , v ) [ ∪ ] A ⊢ [ x ′′ = − g ][? x = 0 ; v := − cv ∪ ? x ≥ 0 ] B ( x , v ) [;] A ⊢ [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) ⊢ A → [ x ′′ = − g ;(? x = 0 ; v := − cv ∪ ? x ≥ 0 )] B ( x , v ) → R def A ≡ 0 ≤ x ∧ x = H ∧ v = 0 ∧ g > 0 ∧ 1 ≥ c ≥ 0 def B ( x , v ) ≡ 0 ≤ x ∧ x ≤ H { x ′′ = − g } def ≡ { x ′ = v , v ′ = − g } André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23
Recommend
More recommend