Logical Foundations of Cyber-Physical Systems Andr Platzer Andr - - PowerPoint PPT Presentation

logical foundations of cyber physical systems
SMART_READER_LITE
LIVE PREVIEW

Logical Foundations of Cyber-Physical Systems Andr Platzer Andr - - PowerPoint PPT Presentation

06: Truth & Proof Logical Foundations of Cyber-Physical Systems Andr Platzer Logical Foundations of Cyber-Physical Systems Andr Platzer Andr Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 1 / 23 Outline Learning Objectives


slide-1
SLIDE 1

06: Truth & Proof

Logical Foundations of Cyber-Physical Systems

Logical Foundations of Cyber-Physical Systems

André Platzer

André Platzer

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 1 / 23

slide-2
SLIDE 2

Outline

1

Learning Objectives

2

Sequent Calculus Propositional Proof Rules Soundness of Proof Rules Proofs with Dynamics Contextual Equivalence Quantifier Proof Rules A Sequent Proof for Single-hop Bouncing Balls

3

Real Arithmetic Real Quantifier Elimination Instantiating Real-Arithmetic Quantifiers Weakening by Removing Assumptions Abbreviating Terms to Reduce Complexity Substituting Equations into Formulas Creatively Cutting to Transform Questions

4

Summary

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 2 / 23

slide-3
SLIDE 3

Outline

1

Learning Objectives

2

Sequent Calculus Propositional Proof Rules Soundness of Proof Rules Proofs with Dynamics Contextual Equivalence Quantifier Proof Rules A Sequent Proof for Single-hop Bouncing Balls

3

Real Arithmetic Real Quantifier Elimination Instantiating Real-Arithmetic Quantifiers Weakening by Removing Assumptions Abbreviating Terms to Reduce Complexity Substituting Equations into Formulas Creatively Cutting to Transform Questions

4

Summary

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 2 / 23

slide-4
SLIDE 4

Learning Objectives

Truth & Proof

CT M&C CPS systematic reasoning for CPS verifying CPS models at scale pragmatics: how to use axiomatics to justify truth structure of proofs and their arithmetic discrete+continuous relation with evolution domains analytic skills for CPS

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 3 / 23

slide-5
SLIDE 5

Logical Trinity with Extra Leg

Pragmatics Axiomatics Syntax Semantics Syntax defines the notation What problems are we allowed to write down? Semantics what carries meaning. What real or mathematical objects does the syntax stand for? Axiomatics internalizes semantic relations into universal syntactic transformations. Pragmatics how to use axiomatics to justify syntactic rendition of semantical concepts. How to do a proof?

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 4 / 23

slide-6
SLIDE 6

Outline

1

Learning Objectives

2

Sequent Calculus Propositional Proof Rules Soundness of Proof Rules Proofs with Dynamics Contextual Equivalence Quantifier Proof Rules A Sequent Proof for Single-hop Bouncing Balls

3

Real Arithmetic Real Quantifier Elimination Instantiating Real-Arithmetic Quantifiers Weakening by Removing Assumptions Abbreviating Terms to Reduce Complexity Substituting Equations into Formulas Creatively Cutting to Transform Questions

4

Summary

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 4 / 23

slide-7
SLIDE 7

Sequent Calculus

Definition (Sequent) Γ ⊢ ∆

has the same meaning as

P∈Γ P → Q∈∆ Q.

The antecedent Γ and succedent ∆ are finite sets of dL formulas.

Definition (Soundness of sequent calculus proof rules) Γ1 ⊢ ∆1 ... Γn ⊢ ∆n Γ ⊢ ∆

is sound iff validity of all premises implies validity of conclusion: If (Γ1 ⊢ ∆1) and ... and (Γn ⊢ ∆n) then (Γ ⊢ ∆)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 5 / 23

slide-8
SLIDE 8

Sequent Calculus

Definition (Sequent) Γ ⊢ ∆

has the same meaning as

P∈Γ P → Q∈∆ Q.

The antecedent Γ and succedent ∆ are finite sets of dL formulas.

Definition (Soundness of sequent calculus proof rules)

construct proofs up

    Γ1 ⊢ ∆1 ... Γn ⊢ ∆n Γ ⊢ ∆

is sound iff validity of all premises implies validity of conclusion: If (Γ1 ⊢ ∆1) and ... and (Γn ⊢ ∆n) then (Γ ⊢ ∆)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 5 / 23

slide-9
SLIDE 9

Sequent Calculus

Definition (Sequent) Γ ⊢ ∆

has the same meaning as

P∈Γ P → Q∈∆ Q.

The antecedent Γ and succedent ∆ are finite sets of dL formulas.

Definition (Soundness of sequent calculus proof rules)

construct proofs up

    Γ1 ⊢ ∆1 ... Γn ⊢ ∆n Γ ⊢ ∆     

  • validity transfers down

is sound iff validity of all premises implies validity of conclusion: If (Γ1 ⊢ ∆1) and ... and (Γn ⊢ ∆n) then (Γ ⊢ ∆)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 5 / 23

slide-10
SLIDE 10

Propositional Proof Rules of Sequent Calculus

∧L Γ,P ∧ Q ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-11
SLIDE 11

Propositional Proof Rules of Sequent Calculus

∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-12
SLIDE 12

Propositional Proof Rules of Sequent Calculus

∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∧L: assume conjuncts separately

It successively handles all top-level ∧ in assumptions but not nested in A∨(B ∧ C) ⊢ C which needs rules for other propositional operators

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-13
SLIDE 13

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-14
SLIDE 14

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-15
SLIDE 15

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∧R: prove conjuncts separately

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-16
SLIDE 16

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P ∨ Q,∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-17
SLIDE 17

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-18
SLIDE 18

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨R: split disjunctions in succedent where comma has a disjunctive meaning

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-19
SLIDE 19

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ∨ Q ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-20
SLIDE 20

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-21
SLIDE 21

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ∨L: handle disjunctive assumption by one proof for each assumed disjunct

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-22
SLIDE 22

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ →R Γ ⊢ P → Q,∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-23
SLIDE 23

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-24
SLIDE 24

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →R: prove implication by assuming LHS when proving RHS

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-25
SLIDE 25

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ,P → Q ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-26
SLIDE 26

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-27
SLIDE 27

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ 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

slide-28
SLIDE 28

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ ⊢ ¬P,∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-29
SLIDE 29

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-30
SLIDE 30

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ →R Γ,P ⊢ Q,∆ Γ ⊢ 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

slide-31
SLIDE 31

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-32
SLIDE 32

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-33
SLIDE 33

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ 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

slide-34
SLIDE 34

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-35
SLIDE 35

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆ id: proof done (marked ∗) when succedent to prove is in antecedent

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-36
SLIDE 36

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆ id: only way to finish a proof (in propositional logic!)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-37
SLIDE 37

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆ cut

Γ ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-38
SLIDE 38

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆ cut Γ ⊢ C,∆

Γ,C ⊢ ∆ Γ ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-39
SLIDE 39

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆ cut Γ ⊢ C,∆

Γ,C ⊢ ∆ Γ ⊢ ∆

cut: Show lemma C and then assume lemma C

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-40
SLIDE 40

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆ cut Γ ⊢ C,∆

Γ,C ⊢ ∆ Γ ⊢ ∆ ⊤R Γ ⊢ true,∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-41
SLIDE 41

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆ cut Γ ⊢ C,∆

Γ,C ⊢ ∆ Γ ⊢ ∆ ⊤R Γ ⊢ true,∆ ⊤R: proof done (marked ∗) when proving trivial true (used rarely)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-42
SLIDE 42

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆ cut Γ ⊢ C,∆

Γ,C ⊢ ∆ Γ ⊢ ∆ ⊤R Γ ⊢ true,∆ ⊤R: what rule to use when true in antecedent?

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-43
SLIDE 43

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆ cut Γ ⊢ C,∆

Γ,C ⊢ ∆ Γ ⊢ ∆ ⊤R Γ ⊢ true,∆ ⊥L Γ,false ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-44
SLIDE 44

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆ cut Γ ⊢ C,∆

Γ,C ⊢ ∆ Γ ⊢ ∆ ⊤R Γ ⊢ true,∆ ⊥L Γ,false ⊢ ∆ ⊥L: proof done (marked ∗) when assuming trivial false (used rarely)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-45
SLIDE 45

Propositional Proof Rules of Sequent Calculus

∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ ¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆ cut Γ ⊢ C,∆

Γ,C ⊢ ∆ Γ ⊢ ∆ ⊤R Γ ⊢ true,∆ ⊥L Γ,false ⊢ ∆ ⊥L: what rule to use when false in succedent?

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 6 / 23

slide-46
SLIDE 46

Sequent Proof Example (Simple)

⊢ v2≤10∧ b>0 → b>0∧(¬(v≥0)∨ v2≤10)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23

slide-47
SLIDE 47

Sequent Proof Example (Simple)

→R

v2≤10∧ b>0 ⊢ b>0∧(¬(v≥0)∨ v2≤10)

⊢ v2≤10∧ b>0 → b>0∧(¬(v≥0)∨ v2≤10)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23

slide-48
SLIDE 48

Sequent Proof Example (Simple)

→R ∧R v2≤10∧ b>0 ⊢ b>0

v2≤10∧ b>0 ⊢ ¬(v≥0)∨ v2≤10 v2≤10∧ b>0 ⊢ b>0∧(¬(v≥0)∨ v2≤10)

⊢ v2≤10∧ b>0 → b>0∧(¬(v≥0)∨ v2≤10)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23

slide-49
SLIDE 49

Sequent Proof Example (Simple)

→R ∧R ∧L v2≤10,b>0 ⊢ b>0

v2≤10∧ b>0 ⊢ b>0 v2≤10∧ b>0 ⊢ ¬(v≥0)∨ v2≤10 v2≤10∧ b>0 ⊢ b>0∧(¬(v≥0)∨ v2≤10)

⊢ v2≤10∧ b>0 → b>0∧(¬(v≥0)∨ v2≤10)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23

slide-50
SLIDE 50

Sequent Proof Example (Simple)

→R ∧R ∧L

id

v2≤10,b>0 ⊢ b>0 v2≤10∧ b>0 ⊢ b>0 v2≤10∧ b>0 ⊢ ¬(v≥0)∨ v2≤10 v2≤10∧ b>0 ⊢ b>0∧(¬(v≥0)∨ v2≤10)

⊢ v2≤10∧ b>0 → b>0∧(¬(v≥0)∨ v2≤10)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23

slide-51
SLIDE 51

Sequent Proof Example (Simple)

→R ∧R ∧L

id

v2≤10,b>0 ⊢ b>0 v2≤10∧ b>0 ⊢ b>0

∨R v2≤10∧ b>0 ⊢ ¬(v≥0),v2≤10

v2≤10∧ b>0 ⊢ ¬(v≥0)∨ v2≤10 v2≤10∧ b>0 ⊢ b>0∧(¬(v≥0)∨ v2≤10)

⊢ v2≤10∧ b>0 → b>0∧(¬(v≥0)∨ v2≤10)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23

slide-52
SLIDE 52

Sequent Proof Example (Simple)

→R ∧R ∧L

id

v2≤10,b>0 ⊢ b>0 v2≤10∧ b>0 ⊢ b>0

∨R ∧L v2≤10,b>0 ⊢ ¬(v≥0),v2≤10

v2≤10∧ b>0 ⊢ ¬(v≥0),v2≤10 v2≤10∧ b>0 ⊢ ¬(v≥0)∨ v2≤10 v2≤10∧ b>0 ⊢ b>0∧(¬(v≥0)∨ v2≤10)

⊢ v2≤10∧ b>0 → b>0∧(¬(v≥0)∨ v2≤10)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23

slide-53
SLIDE 53

Sequent Proof Example (Simple)

→R ∧R ∧L

id

v2≤10,b>0 ⊢ b>0 v2≤10∧ b>0 ⊢ b>0

∨R ∧L

id

v2≤10,b>0 ⊢ ¬(v≥0),v2≤10 v2≤10∧ b>0 ⊢ ¬(v≥0),v2≤10 v2≤10∧ b>0 ⊢ ¬(v≥0)∨ v2≤10 v2≤10∧ b>0 ⊢ b>0∧(¬(v≥0)∨ v2≤10)

⊢ v2≤10∧ b>0 → b>0∧(¬(v≥0)∨ v2≤10)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 7 / 23

slide-54
SLIDE 54

Soundness of Proof Rules

Lemma ∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆

is sound

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 8 / 23

slide-55
SLIDE 55

Soundness of Proof Rules

Lemma ∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆

is sound: conclusion valid if all premises valid.

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 8 / 23

slide-56
SLIDE 56

Soundness of Proof Rules

Lemma ∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆

is sound: conclusion valid if all premises valid.

Proof using [

[P ∧ Q] ] = [ [P] ]∩[ [Q] ].

WLOG:

ω ∈ [ [G] ] for all G ∈ Γ and ω ∈ [ [D] ] for all D ∈ ∆

(why?) By premise:

ω ∈ [ [Γ ⊢ P,∆] ] and ω ∈ [ [Γ ⊢ Q,∆] ]

By WLOG:

ω ∈ [ [P] ] and ω ∈ [ [Q] ]

By semantics: ω ∈ [

[P ∧ Q] ]

By definition: ω ∈ [

[Γ ⊢ P ∧ Q,∆] ]

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 8 / 23

slide-57
SLIDE 57

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

slide-58
SLIDE 58

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

slide-59
SLIDE 59

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.

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 9 / 23

slide-60
SLIDE 60

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.

1

Sequent proof ends with some proof step:

Γ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

slide-61
SLIDE 61

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.

1

Sequent proof ends with some proof step:

Γ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

slide-62
SLIDE 62

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

slide-63
SLIDE 63

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

slide-64
SLIDE 64

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

slide-65
SLIDE 65

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

slide-66
SLIDE 66

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 ⊢ ∆

Boring! Already follow from the axiom

[∪] [α ∪β]P ↔ [α]P ∧[β]P

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 10 / 23

slide-67
SLIDE 67

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 ⊢ ∆

Boring! Already follow from the axiom

[∪] [α ∪β]P ↔ [α]P ∧[β]P

Rules [∪]R,[∪]L would only apply top-level, not in any other logical context such as

[x′′ = −g]_

[∪]

A ⊢ [x′′ = −g][?x = 0;v :=−cv ∪?x ≥ 0]B(x,v)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 10 / 23

slide-68
SLIDE 68

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 ⊢ ∆

Boring! Already follow from the axiom

[∪] [α ∪β]P ↔ [α]P ∧[β]P

Rules [∪]R,[∪]L would only apply top-level, not in any other logical context such as

[x′′ = −g]_ Contextual Equivalence: substituting equals for equals

CER Γ ⊢ C(Q),∆

⊢ P ↔ Q Γ ⊢ C(P),∆

CEL Γ,C(Q) ⊢ ∆

⊢ P ↔ Q Γ,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

slide-69
SLIDE 69

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 ⊢ ∆

Boring! Already follow from the axiom

[∪] [α ∪β]P ↔ [α]P ∧[β]P

Rules [∪]R,[∪]L would only apply top-level, not in any other logical context such as

[x′′ = −g]_ Contextual Equivalence: substituting equals for equals

CER Γ ⊢ C(Q),∆

⊢ P ↔ Q Γ ⊢ C(P),∆

CEL Γ,C(Q) ⊢ ∆

⊢ P ↔ Q Γ,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

slide-70
SLIDE 70

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 ⊢ ∆

Boring! Already follow from the axiom

[∪] [α ∪β]P ↔ [α]P ∧[β]P

Rules [∪]R,[∪]L would only apply top-level, not in any other logical context such as

[x′′ = −g]_ Contextual Equivalence: substituting equals for equals

CER Γ ⊢ C(Q),∆

⊢ P ↔ Q Γ ⊢ C(P),∆

CEL Γ,C(Q) ⊢ ∆

⊢ P ↔ Q Γ,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

slide-71
SLIDE 71

Simple Example Proof Dynamics in Sequent Calculus

[;] ⊢ [a:=−b;c := 10]

  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • André Platzer (CMU)

LFCPS/06: Truth & Proof LFCPS/06 12 / 23

slide-72
SLIDE 72

Simple Example Proof Dynamics in Sequent Calculus

[:=] ⊢ [a:=−b][c := 10]

  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • [;] ⊢ [a:=−b;c := 10]
  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • [a:=−b;c := 10]
  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤c)

[a:=−b][c := 10]

  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • by [;]

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 12 / 23

slide-73
SLIDE 73

Simple Example Proof Dynamics in Sequent Calculus

[:=] ⊢ [c := 10]

  • v2≤10∧−(− b)>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • [:=] ⊢ [a:=−b][c := 10]
  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • [;] ⊢ [a:=−b;c := 10]
  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • [a:=−b][c := 10]
  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤c)

[c := 10]

  • v2≤10∧−(−b)>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • by [:=]

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 12 / 23

slide-74
SLIDE 74

Simple Example Proof Dynamics in Sequent Calculus

⊢ v2≤10∧ −(−b)>0 → b>0∧(¬(v≥0)∨ v2≤10)

[:=] ⊢ [c := 10]

  • v2≤10∧−(− b)>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • [:=] ⊢ [a:=−b][c := 10]
  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • [;] ⊢ [a:=−b;c := 10]
  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • [c := 10]
  • v2≤10∧−(−b)>0 → b>0∧(¬(v≥0)∨ v2≤c)

v2≤10∧−(−b)>0 → b>0∧(¬(v≥0)∨ v2≤10) by [:=]

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 12 / 23

slide-75
SLIDE 75

Simple Example Proof Dynamics in Sequent Calculus

id v2≤10,b>0 ⊢ b>0

∧Lv2≤10∧ b>0 ⊢ b>0

id

v2≤10,b>0 ⊢ ¬(v≥0),v2≤10

∧Lv2≤10∧ b>0 ⊢ ¬(v≥0),v2≤10 ∨Rv2≤10∧ b>0 ⊢ ¬(v≥0)∨ v2≤10 ∧R

v2≤10∧ b>0 ⊢ b>0∧(¬(v≥0)∨ v2≤10)

→R

⊢ v2≤10∧ b>0 → b>0∧(¬(v≥0)∨ v2≤10) ⊢ v2≤10∧ −(−b)>0 → b>0∧(¬(v≥0)∨ v2≤10)

[:=] ⊢ [c := 10]

  • v2≤10∧−(− b)>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • [:=] ⊢ [a:=−b][c := 10]
  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • [;] ⊢ [a:=−b;c := 10]
  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • André Platzer (CMU)

LFCPS/06: Truth & Proof LFCPS/06 12 / 23

slide-76
SLIDE 76

Simple Example Proof Dynamics in Sequent Calculus

id v2≤10,b>0 ⊢ b>0

∧Lv2≤10∧ b>0 ⊢ b>0

id

v2≤10,b>0 ⊢ ¬(v≥0),v2≤10

∧Lv2≤10∧ b>0 ⊢ ¬(v≥0),v2≤10 ∨Rv2≤10∧ b>0 ⊢ ¬(v≥0)∨ v2≤10 ∧R

v2≤10∧ b>0 ⊢ b>0∧(¬(v≥0)∨ v2≤10)

→R

⊢ v2≤10∧ b>0 → b>0∧(¬(v≥0)∨ v2≤10) ⊢ v2≤10∧ −(−b)>0 → b>0∧(¬(v≥0)∨ v2≤10)

[:=] ⊢ [c := 10]

  • v2≤10∧−(− b)>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • [:=] ⊢ [a:=−b][c := 10]
  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤c)
  • [;] ⊢ [a:=−b;c := 10]
  • v2≤10∧−a>0 → b>0∧(¬(v≥0)∨ v2≤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

slide-77
SLIDE 77

Quantifier Proof Rules

∀R Γ ⊢ ∀x p(x),∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23

slide-78
SLIDE 78

Quantifier Proof Rules

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23

slide-79
SLIDE 79

Quantifier Proof Rules

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆ (y ∈ Γ,∆,∀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

slide-80
SLIDE 80

Quantifier Proof Rules

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆ (y ∈ Γ,∆,∀x p(x)) ∃R Γ ⊢ ∃x p(x),∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23

slide-81
SLIDE 81

Quantifier Proof Rules

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆ (y ∈ Γ,∆,∀x p(x)) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23

slide-82
SLIDE 82

Quantifier Proof Rules

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆ (y ∈ Γ,∆,∀x p(x)) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃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

slide-83
SLIDE 83

Quantifier Proof Rules

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆ (y ∈ Γ,∆,∀x p(x)) ∀L Γ,∀x p(x) ⊢ ∆ ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆ (arbitrary term e)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23

slide-84
SLIDE 84

Quantifier Proof Rules

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆ (y ∈ Γ,∆,∀x p(x)) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆ ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆ (arbitrary term e)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23

slide-85
SLIDE 85

Quantifier Proof Rules

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆ (y ∈ Γ,∆,∀x p(x)) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆ (arbitrary term e) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆ (arbitrary term e) ∀L: even holds for arbitrary term e

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23

slide-86
SLIDE 86

Quantifier Proof Rules

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆ (y ∈ Γ,∆,∀x p(x)) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆ (arbitrary term e) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆ (arbitrary term e) ∃L Γ,∃x p(x) ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23

slide-87
SLIDE 87

Quantifier Proof Rules

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆ (y ∈ Γ,∆,∀x p(x)) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆ (arbitrary term e) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆ (arbitrary term e) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23

slide-88
SLIDE 88

Quantifier Proof Rules

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆ (y ∈ Γ,∆,∀x p(x)) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆ (arbitrary term e) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆ (arbitrary term e) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆ (y ∈ Γ,∆,∃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

slide-89
SLIDE 89

Quantifier Proof Rules

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆ (y ∈ Γ,∆,∀x p(x)) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆ (arbitrary term e) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆ (arbitrary term e) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆ (y ∈ Γ,∆,∃x p(x))

Important: soundness means that conclusion valid if all premises valid.

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 13 / 23

slide-90
SLIDE 90

A Sequent Proof of a Single-hop Bouncing Ball

→R

⊢ A → [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v)

A

def

≡ 0≤x ∧ x=H ∧ v=0∧ g>0∧ 1≥c≥0

B(x,v)

def

≡ 0 ≤ x ∧ x ≤ H {x′′ = −g}

def

≡ {x′ = v,v′ = −g}

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 14 / 23

slide-91
SLIDE 91

A Sequent Proof of a Single-hop Bouncing Ball

[;] A ⊢ [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v) →R

⊢ A → [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v)

A

def

≡ 0≤x ∧ x=H ∧ v=0∧ g>0∧ 1≥c≥0

B(x,v)

def

≡ 0 ≤ x ∧ x ≤ H {x′′ = −g}

def

≡ {x′ = v,v′ = −g}

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 14 / 23

slide-92
SLIDE 92

A Sequent Proof of a Single-hop Bouncing Ball

A ⊢ ∀t≥0

  • (H− g

2t2=0→B(H− g 2t2,−c(−gt)))∧(H− g 2t2≥0→B(H− g 2t2,−gt

[:=]A ⊢ ∀t≥0[x := H− g

2t2]

  • (x=0→B(x,−c(−gt)))∧(x≥0→B(x,−gt))
  • [:=]A ⊢ ∀t≥0[x := H− g

2t2][v :=−gt]

  • (x=0→B(x,−cv))∧(x≥0→B(x,v))
  • [;] A ⊢ ∀t≥0[x := H− g

2t2;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) →R

⊢ A → [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v)

A

def

≡ 0≤x ∧ x=H ∧ v=0∧ g>0∧ 1≥c≥0

B(x,v)

def

≡ 0 ≤ x ∧ x ≤ H {x′′ = −g}

def

≡ {x′ = v,v′ = −g}

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 14 / 23

slide-93
SLIDE 93

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

⊢ A → [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v)

A

def

≡ 0≤x ∧ x=H ∧ v=0∧ g>0∧ 1≥c≥0

B(x,v)

def

≡ 0 ≤ x ∧ x ≤ H {x′′ = −g}

def

≡ {x′ = v,v′ = −g} [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v) ↔ [x′′ = −g][?x = 0;v :=−cv ∪?x ≥ 0]B(x,v) by [;]

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23

slide-94
SLIDE 94

A Sequent Proof of a Single-hop Bouncing Ball

[;] 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) →R

⊢ A → [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v)

A

def

≡ 0≤x ∧ x=H ∧ v=0∧ g>0∧ 1≥c≥0

B(x,v)

def

≡ 0 ≤ x ∧ x ≤ H {x′′ = −g}

def

≡ {x′ = v,v′ = −g} [?x = 0;v :=−cv ∪?x ≥ 0]B(x,v) ↔

  • [?x = 0;v :=−cv]B(x,v)∧[?x ≥ 0]B(x,v)
  • by [∪]

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23

slide-95
SLIDE 95

A Sequent Proof of a Single-hop Bouncing Ball

[?] 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) →R

⊢ A → [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v)

A

def

≡ 0≤x ∧ x=H ∧ v=0∧ g>0∧ 1≥c≥0

B(x,v)

def

≡ 0 ≤ x ∧ x ≤ H {x′′ = −g}

def

≡ {x′ = v,v′ = −g} [?x = 0;v :=−cv]B(x,v) ↔ [?x = 0][v :=−cv]B(x,v) by [;]

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23

slide-96
SLIDE 96

A Sequent Proof of a Single-hop Bouncing Ball

[:=]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) →R

⊢ A → [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v)

A

def

≡ 0≤x ∧ x=H ∧ v=0∧ g>0∧ 1≥c≥0

B(x,v)

def

≡ 0 ≤ x ∧ x ≤ H {x′′ = −g}

def

≡ {x′ = v,v′ = −g} [?x = 0][v :=−cv]B(x,v) ↔

x = 0 → [v :=−cv]B(x,v) by [?]

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23

slide-97
SLIDE 97

A Sequent Proof of a Single-hop Bouncing Ball

[′] 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) →R

⊢ A → [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v)

A

def

≡ 0≤x ∧ x=H ∧ v=0∧ g>0∧ 1≥c≥0

B(x,v)

def

≡ 0 ≤ x ∧ x ≤ H {x′′ = −g}

def

≡ {x′ = v,v′ = −g} [v :=−cv]B(x,v) ↔

x = 0 → B(x,−cv) by [:=]

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23

slide-98
SLIDE 98

A Sequent Proof of a Single-hop Bouncing Ball

[;] A ⊢ ∀t≥0[x := H− g

2t2;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) →R

⊢ A → [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v)

A

def

≡ 0≤x ∧ x=H ∧ v=0∧ g>0∧ 1≥c≥0

B(x,v)

def

≡ 0 ≤ x ∧ x ≤ H {x′′ = −g}

def

≡ {x′ = v,v′ = −g} [′] [x′ = f(x)]p(x) ↔ ∀t≥0[x := y(t)]p(x)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23

slide-99
SLIDE 99

A Sequent Proof of a Single-hop Bouncing Ball

[:=]A ⊢ ∀t≥0[x := H− g

2t2][v :=−gt]

  • (x=0→B(x,−cv))∧(x≥0→B(x,v))
  • [;] A ⊢ ∀t≥0[x := H− g

2t2;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) →R

⊢ A → [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v)

A

def

≡ 0≤x ∧ x=H ∧ v=0∧ g>0∧ 1≥c≥0

B(x,v)

def

≡ 0 ≤ x ∧ x ≤ H {x′′ = −g}

def

≡ {x′ = v,v′ = −g}

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23

slide-100
SLIDE 100

A Sequent Proof of a Single-hop Bouncing Ball

[:=]A ⊢ ∀t≥0[x := H− g

2t2]

  • (x=0→B(x,−c(−gt)))∧(x≥0→B(x,−gt))
  • [:=]A ⊢ ∀t≥0[x := H− g

2t2][v :=−gt]

  • (x=0→B(x,−cv))∧(x≥0→B(x,v))
  • [;] A ⊢ ∀t≥0[x := H− g

2t2;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) →R

⊢ A → [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v)

A

def

≡ 0≤x ∧ x=H ∧ v=0∧ g>0∧ 1≥c≥0

B(x,v)

def

≡ 0 ≤ x ∧ x ≤ H {x′′ = −g}

def

≡ {x′ = v,v′ = −g}

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23

slide-101
SLIDE 101

A Sequent Proof of a Single-hop Bouncing Ball

A ⊢ ∀t≥0

  • (H− g

2t2=0→B(H− g 2t2,−c(−gt)))∧(H− g 2t2≥0→B(H− g 2t2,−gt

[:=]A ⊢ ∀t≥0[x := H− g

2t2]

  • (x=0→B(x,−c(−gt)))∧(x≥0→B(x,−gt))
  • [:=]A ⊢ ∀t≥0[x := H− g

2t2][v :=−gt]

  • (x=0→B(x,−cv))∧(x≥0→B(x,v))
  • [;] A ⊢ ∀t≥0[x := H− g

2t2;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) →R

⊢ A → [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v)

A

def

≡ 0≤x ∧ x=H ∧ v=0∧ g>0∧ 1≥c≥0

B(x,v)

def

≡ 0 ≤ x ∧ x ≤ H {x′′ = −g}

def

≡ {x′ = v,v′ = −g}

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23

slide-102
SLIDE 102

A Sequent Proof of a Single-hop Bouncing Ball

A ⊢ ∀t≥0

  • (H− g

2t2=0→B(H− g 2t2,−c(−gt)))∧(H− g 2t2≥0→B(H− g 2t2,−gt

[:=]A ⊢ ∀t≥0[x := H− g

2t2]

  • (x=0→B(x,−c(−gt)))∧(x≥0→B(x,−gt))
  • [:=]A ⊢ ∀t≥0[x := H− g

2t2][v :=−gt]

  • (x=0→B(x,−cv))∧(x≥0→B(x,v))
  • [;] A ⊢ ∀t≥0[x := H− g

2t2;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) →R

⊢ A → [x′′ = −g;(?x = 0;v :=−cv ∪?x ≥ 0)]B(x,v)

A

def

≡ 0≤x ∧ x=H ∧ v=0∧ g>0∧ 1≥c≥0

B(x,v)

def

≡ 0 ≤ x ∧ x ≤ H {x′′ = −g}

def

≡ {x′ = v,v′ = −g}

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 15 / 23

slide-103
SLIDE 103

Outline

1

Learning Objectives

2

Sequent Calculus Propositional Proof Rules Soundness of Proof Rules Proofs with Dynamics Contextual Equivalence Quantifier Proof Rules A Sequent Proof for Single-hop Bouncing Balls

3

Real Arithmetic Real Quantifier Elimination Instantiating Real-Arithmetic Quantifiers Weakening by Removing Assumptions Abbreviating Terms to Reduce Complexity Substituting Equations into Formulas Creatively Cutting to Transform Questions

4

Summary

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 16 / 23

slide-104
SLIDE 104

Real Arithmetic

Lemma (R real arithmetic)

FOLR decidable, so side condition implementable:

R Γ ⊢ ∆

(if

  • P∈Γ

P →

  • Q∈∆

Q is valid in FOLR)

Ra > 0,b > 0 ⊢ y ≥ 0 → ax2 + by ≥ 0 Rx2 > 0 ⊢ x > 0

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 17 / 23

slide-105
SLIDE 105

Real Arithmetic

Lemma (R real arithmetic)

FOLR decidable, so side condition implementable:

R Γ ⊢ ∆

(if

  • P∈Γ

P →

  • Q∈∆

Q is valid in FOLR)

Ra > 0,b > 0 ⊢ y ≥ 0 → ax2 + by ≥ 0 Rx2 > 0 ⊢ x > 0

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 17 / 23

slide-106
SLIDE 106

Real Arithmetic

Lemma (R real arithmetic)

FOLR decidable, so side condition implementable:

R Γ ⊢ ∆

(if

  • P∈Γ

P →

  • Q∈∆

Q is valid in FOLR)

Ra > 0,b > 0 ⊢ y ≥ 0 → ax2 + by ≥ 0

false

Rx2 > 0 ⊢ x > 0

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 17 / 23

slide-107
SLIDE 107

Real Arithmetic

Lemma (R real arithmetic)

FOLR decidable, so side condition implementable:

R Γ ⊢ ∆

(if

  • P∈Γ

P →

  • Q∈∆

Q is valid in FOLR)

Ra > 0,b > 0 ⊢ y ≥ 0 → ax2 + by ≥ 0

false

Rx2 > 0 ⊢ x > 0

Theorem (Tarski’s quantifier elimination)

FOLR admits quantifier elimination: there is an algorithm that computes a quantifier-free formula QE(P), for each first-order real arithmetic formula P, that is equivalent, i.e., P ↔ QE(P) is valid.

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 17 / 23

slide-108
SLIDE 108

Real Arithmetic

Lemma (R real arithmetic)

FOLR decidable, so side condition implementable:

R Γ ⊢ ∆

(if

  • P∈Γ

P →

  • Q∈∆

Q is valid in FOLR)

Ra > 0,b > 0 ⊢ y ≥ 0 → ax2 + by ≥ 0

false

Rx2 > 0 ⊢ x > 0

Theorem (Tarski’s quantifier elimination)

FOLR admits quantifier elimination: there is an algorithm that computes a quantifier-free formula QE(P), for each first-order real arithmetic formula P, that is equivalent, i.e., P ↔ QE(P) is valid. What if there are no quantifiers?

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 17 / 23

slide-109
SLIDE 109

Real Arithmetic

Lemma (R real arithmetic)

FOLR decidable, so side condition implementable:

R Γ ⊢ ∆

(if

  • P∈Γ

P →

  • Q∈∆

Q is valid in FOLR)

Ra > 0,b > 0 ⊢ y ≥ 0 → ax2 + by ≥ 0

false

Rx2 > 0 ⊢ x > 0

Theorem (Tarski’s quantifier elimination)

FOLR admits quantifier elimination: there is an algorithm that computes a quantifier-free formula QE(P), for each first-order real arithmetic formula P, that is equivalent, i.e., P ↔ QE(P) is valid. What if there are no quantifiers? Universal closure with i∀ Γ ⊢ ∀x P,∆

Γ ⊢ P,∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 17 / 23

slide-110
SLIDE 110

Quantifier Elimination After Universal Closure

∀R ⊢ ∀d

  • d ≥ −x → [x := 0∪ x := x + d]x ≥ 0
  • André Platzer (CMU)

LFCPS/06: Truth & Proof LFCPS/06 18 / 23

slide-111
SLIDE 111

Quantifier Elimination After Universal Closure

∀R ⊢ ∀d

  • d ≥ −x → [x := 0∪ x := x + d]x ≥ 0
  • Not a FOLR formula so Tarski’s quantifier elimination not applicable.

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 18 / 23

slide-112
SLIDE 112

Quantifier Elimination After Universal Closure

[∪] ⊢ d ≥ −x → [x := 0∪ x := x + d]x ≥ 0 ∀R ⊢ ∀d

  • d ≥ −x → [x := 0∪ x := x + d]x ≥ 0
  • André Platzer (CMU)

LFCPS/06: Truth & Proof LFCPS/06 18 / 23

slide-113
SLIDE 113

Quantifier Elimination After Universal Closure

[:=] ⊢ d ≥ −x → [x := 0]x ≥ 0∧[x := x + d]x ≥ 0 [∪] ⊢ d ≥ −x → [x := 0∪ x := x + d]x ≥ 0 ∀R ⊢ ∀d

  • d ≥ −x → [x := 0∪ x := x + d]x ≥ 0
  • André Platzer (CMU)

LFCPS/06: Truth & Proof LFCPS/06 18 / 23

slide-114
SLIDE 114

Quantifier Elimination After Universal Closure

[:=] ⊢ d ≥ −x → 0 ≥ 0∧[x := x + d]x ≥ 0 [:=] ⊢ d ≥ −x → [x := 0]x ≥ 0∧[x := x + d]x ≥ 0 [∪] ⊢ d ≥ −x → [x := 0∪ x := x + d]x ≥ 0 ∀R ⊢ ∀d

  • d ≥ −x → [x := 0∪ x := x + d]x ≥ 0
  • André Platzer (CMU)

LFCPS/06: Truth & Proof LFCPS/06 18 / 23

slide-115
SLIDE 115

Quantifier Elimination After Universal Closure

i∀ ⊢ d ≥ −x → 0 ≥ 0∧ x + d ≥ 0

[:=] ⊢ d ≥ −x → 0 ≥ 0∧[x := x + d]x ≥ 0 [:=] ⊢ d ≥ −x → [x := 0]x ≥ 0∧[x := x + d]x ≥ 0 [∪] ⊢ d ≥ −x → [x := 0∪ x := x + d]x ≥ 0 ∀R ⊢ ∀d

  • d ≥ −x → [x := 0∪ x := x + d]x ≥ 0
  • André Platzer (CMU)

LFCPS/06: Truth & Proof LFCPS/06 18 / 23

slide-116
SLIDE 116

Quantifier Elimination After Universal Closure

i∀ ⊢ ∀d

  • d ≥ −x → 0 ≥ 0∧ x + d ≥ 0
  • i∀ ⊢ d ≥ −x → 0 ≥ 0∧ x + d ≥ 0

[:=] ⊢ d ≥ −x → 0 ≥ 0∧[x := x + d]x ≥ 0 [:=] ⊢ d ≥ −x → [x := 0]x ≥ 0∧[x := x + d]x ≥ 0 [∪] ⊢ d ≥ −x → [x := 0∪ x := x + d]x ≥ 0 ∀R ⊢ ∀d

  • d ≥ −x → [x := 0∪ x := x + d]x ≥ 0
  • André Platzer (CMU)

LFCPS/06: Truth & Proof LFCPS/06 18 / 23

slide-117
SLIDE 117

Quantifier Elimination After Universal Closure

R ⊢ ∀x ∀d

  • d ≥ −x → 0 ≥ 0∧ x + d ≥ 0
  • i∀ ⊢ ∀d
  • d ≥ −x → 0 ≥ 0∧ x + d ≥ 0
  • i∀ ⊢ d ≥ −x → 0 ≥ 0∧ x + d ≥ 0

[:=] ⊢ d ≥ −x → 0 ≥ 0∧[x := x + d]x ≥ 0 [:=] ⊢ d ≥ −x → [x := 0]x ≥ 0∧[x := x + d]x ≥ 0 [∪] ⊢ d ≥ −x → [x := 0∪ x := x + d]x ≥ 0 ∀R ⊢ ∀d

  • d ≥ −x → [x := 0∪ x := x + d]x ≥ 0
  • André Platzer (CMU)

LFCPS/06: Truth & Proof LFCPS/06 18 / 23

slide-118
SLIDE 118

Quantifier Elimination After Universal Closure

R ⊢ ∀x ∀d

  • d ≥ −x → 0 ≥ 0∧ x + d ≥ 0
  • i∀ ⊢ ∀d
  • d ≥ −x → 0 ≥ 0∧ x + d ≥ 0
  • i∀ ⊢ d ≥ −x → 0 ≥ 0∧ x + d ≥ 0

[:=] ⊢ d ≥ −x → 0 ≥ 0∧[x := x + d]x ≥ 0 [:=] ⊢ d ≥ −x → [x := 0]x ≥ 0∧[x := x + d]x ≥ 0 [∪] ⊢ d ≥ −x → [x := 0∪ x := x + d]x ≥ 0 ∀R ⊢ ∀d

  • d ≥ −x → [x := 0∪ x := x + d]x ≥ 0
  • André Platzer (CMU)

LFCPS/06: Truth & Proof LFCPS/06 18 / 23

slide-119
SLIDE 119

Quantifier Elimination After Universal Closure

R ⊢ ∀x ∀d

  • d ≥ −x → 0 ≥ 0∧ x + d ≥ 0
  • i∀ ⊢ ∀d
  • d ≥ −x → 0 ≥ 0∧ x + d ≥ 0
  • i∀ ⊢ d ≥ −x → 0 ≥ 0∧ x + d ≥ 0

[:=] ⊢ d ≥ −x → 0 ≥ 0∧[x := x + d]x ≥ 0 [:=] ⊢ d ≥ −x → [x := 0]x ≥ 0∧[x := x + d]x ≥ 0 [∪] ⊢ d ≥ −x → [x := 0∪ x := x + d]x ≥ 0 ∀R ⊢ ∀d

  • d ≥ −x → [x := 0∪ x := x + d]x ≥ 0
  • We could also leave ∀d alone and use axioms in the middle of the formula.

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 18 / 23

slide-120
SLIDE 120

Quantifier Elimination After Universal Closure

R ⊢ ∀x ∀d

  • d ≥ −x → 0 ≥ 0∧ x + d ≥ 0
  • i∀ ⊢ ∀d
  • d ≥ −x → 0 ≥ 0∧ x + d ≥ 0
  • i∀ ⊢ d ≥ −x → 0 ≥ 0∧ x + d ≥ 0

[:=] ⊢ d ≥ −x → 0 ≥ 0∧[x := x + d]x ≥ 0 [:=] ⊢ d ≥ −x → [x := 0]x ≥ 0∧[x := x + d]x ≥ 0 [∪] ⊢ d ≥ −x → [x := 0∪ x := x + d]x ≥ 0 ∀R ⊢ ∀d

  • d ≥ −x → [x := 0∪ x := x + d]x ≥ 0
  • Already use rule R for valid FOLR formulas with free variables before i∀

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 18 / 23

slide-121
SLIDE 121

Instantiating Real-Arithmetic Quantifiers

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆(. . . ) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆(. . . ) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆(. . . ) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆(. . . ) Γ ⊢ [x′ = f(x)&q(x)]P

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 19 / 23

slide-122
SLIDE 122

Instantiating Real-Arithmetic Quantifiers

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆(. . . ) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆(. . . ) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆(. . . ) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆(. . . )

[′]

Γ ⊢ ∀t≥0

  • (∀0≤s≤t q(y(s)))→[x := y(t)]P
  • Γ ⊢ [x′ = f(x)&q(x)]P

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 19 / 23

slide-123
SLIDE 123

Instantiating Real-Arithmetic Quantifiers

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆(. . . ) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆(. . . ) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆(. . . ) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆(. . . )

[′] ∀R

Γ ⊢ t≥0→

  • (∀0≤s≤t Q(y(s)))→[x := y(t)]P
  • Γ ⊢ ∀t≥0
  • (∀0≤s≤t q(y(s)))→[x := y(t)]P
  • Γ ⊢ [x′ = f(x)&q(x)]P

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 19 / 23

slide-124
SLIDE 124

Instantiating Real-Arithmetic Quantifiers

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆(. . . ) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆(. . . ) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆(. . . ) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆(. . . )

[′] ∀R →R

Γ,t≥0 ⊢ (∀0≤s≤t q(y(s)))→[x := y(t)]P Γ ⊢ t≥0→

  • (∀0≤s≤t Q(y(s)))→[x := y(t)]P
  • Γ ⊢ ∀t≥0
  • (∀0≤s≤t q(y(s)))→[x := y(t)]P
  • Γ ⊢ [x′ = f(x)&q(x)]P

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 19 / 23

slide-125
SLIDE 125

Instantiating Real-Arithmetic Quantifiers

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆(. . . ) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆(. . . ) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆(. . . ) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆(. . . )

[′] ∀R →R →R

Γ,t≥0,∀0≤s≤t q(y(s)) ⊢ [x := y(t)]P Γ,t≥0 ⊢ (∀0≤s≤t q(y(s)))→[x := y(t)]P Γ ⊢ t≥0→

  • (∀0≤s≤t Q(y(s)))→[x := y(t)]P
  • Γ ⊢ ∀t≥0
  • (∀0≤s≤t q(y(s)))→[x := y(t)]P
  • Γ ⊢ [x′ = f(x)&q(x)]P

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 19 / 23

slide-126
SLIDE 126

Instantiating Real-Arithmetic Quantifiers

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆(. . . ) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆(. . . ) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆(. . . ) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆(. . . )

[′] ∀R →R →R ∀L

Γ,t≥0,0≤t≤t→q(y(t)) ⊢ [x := y(t)]P Γ,t≥0,∀0≤s≤t q(y(s)) ⊢ [x := y(t)]P Γ,t≥0 ⊢ (∀0≤s≤t q(y(s)))→[x := y(t)]P Γ ⊢ t≥0→

  • (∀0≤s≤t Q(y(s)))→[x := y(t)]P
  • Γ ⊢ ∀t≥0
  • (∀0≤s≤t q(y(s)))→[x := y(t)]P
  • Γ ⊢ [x′ = f(x)&q(x)]P

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 19 / 23

slide-127
SLIDE 127

Instantiating Real-Arithmetic Quantifiers

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆(. . . ) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆(. . . ) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆(. . . ) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆(. . . )

[′] ∀R →R →R ∀L →L t≥0 ⊢ 0≤t≤t,[x := y(t)]P

Γ,t≥0,q(y(t)) ⊢ [x := y(t)]P Γ,t≥0,0≤t≤t→q(y(t)) ⊢ [x := y(t)]P Γ,t≥0,∀0≤s≤t q(y(s)) ⊢ [x := y(t)]P Γ,t≥0 ⊢ (∀0≤s≤t q(y(s)))→[x := y(t)]P Γ ⊢ t≥0→

  • (∀0≤s≤t Q(y(s)))→[x := y(t)]P
  • Γ ⊢ ∀t≥0
  • (∀0≤s≤t q(y(s)))→[x := y(t)]P
  • Γ ⊢ [x′ = f(x)&q(x)]P

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 19 / 23

slide-128
SLIDE 128

Instantiating Real-Arithmetic Quantifiers

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆(. . . ) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆(. . . ) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆(. . . ) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆(. . . )

[′] ∀R →R →R ∀L →L R

t≥0 ⊢ 0≤t≤t,[x := y(t)]P

Γ,t≥0,q(y(t)) ⊢ [x := y(t)]P Γ,t≥0,0≤t≤t→q(y(t)) ⊢ [x := y(t)]P Γ,t≥0,∀0≤s≤t q(y(s)) ⊢ [x := y(t)]P Γ,t≥0 ⊢ (∀0≤s≤t q(y(s)))→[x := y(t)]P Γ ⊢ t≥0→

  • (∀0≤s≤t Q(y(s)))→[x := y(t)]P
  • Γ ⊢ ∀t≥0
  • (∀0≤s≤t q(y(s)))→[x := y(t)]P
  • Γ ⊢ [x′ = f(x)&q(x)]P

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 19 / 23

slide-129
SLIDE 129

Instantiating Real-Arithmetic Quantifiers

∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆(. . . ) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆(. . . ) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆(. . . ) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆(. . . )

[′] ∀R →R →R ∀L →L R

t≥0 ⊢ 0≤t≤t,[x := y(t)]P

... Γ,t≥0,q(y(t)) ⊢ [x := y(t)]P Γ,t≥0,0≤t≤t→q(y(t)) ⊢ [x := y(t)]P Γ,t≥0,∀0≤s≤t q(y(s)) ⊢ [x := y(t)]P Γ,t≥0 ⊢ (∀0≤s≤t q(y(s)))→[x := y(t)]P Γ ⊢ t≥0→

  • (∀0≤s≤t Q(y(s)))→[x := y(t)]P
  • Γ ⊢ ∀t≥0
  • (∀0≤s≤t q(y(s)))→[x := y(t)]P
  • Γ ⊢ [x′ = f(x)&q(x)]P

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 19 / 23

slide-130
SLIDE 130

Instantiating Real-Arithmetic Quantifiers

Derived Rule

Γ,t≥0,q(y(t)) ⊢ [x := y(t)]P Γ ⊢ [x′ = f(x)&q(x)]P

(y′(t) = f(y))

[′] ∀R →R →R ∀L →L R

t≥0 ⊢ 0≤t≤t,[x := y(t)]P

... Γ,t≥0,q(y(t)) ⊢ [x := y(t)]P Γ,t≥0,0≤t≤t→q(y(t)) ⊢ [x := y(t)]P Γ,t≥0,∀0≤s≤t q(y(s)) ⊢ [x := y(t)]P Γ,t≥0 ⊢ (∀0≤s≤t q(y(s)))→[x := y(t)]P Γ ⊢ t≥0→

  • (∀0≤s≤t Q(y(s)))→[x := y(t)]P
  • Γ ⊢ ∀t≥0
  • (∀0≤s≤t q(y(s)))→[x := y(t)]P
  • Γ ⊢ [x′ = f(x)&q(x)]P

Derived rule: rule that can be proved using other proof rules.

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 19 / 23

slide-131
SLIDE 131

Weakening by Removing Assumptions

WR

Γ ⊢ ∆ Γ ⊢ P,∆

WL

Γ ⊢ ∆ Γ,P ⊢ ∆

r≥0 ⊢ 0≤r≤r

WLA,r≥0 ⊢ 0≤r≤r

Throw big arithmetic distraction A away by weakening since the proof is independent of formula A. Occam’s assumption razor Think how hard it would be to prove a theorem with all the facts in all books

  • f mathematics as assumptions.

Compared to a proof from just the two facts that matter.

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 20 / 23

slide-132
SLIDE 132

Abbreviating Terms to Reduce Complexity

a≥0,t≥0,0 ≤ a 2t2 + vt + x

  • z

, a

2t2 + vt + x

  • z

≤ d,d≤8 ⊢ a

2t2 + vt + x

  • z

≤ 8

Abbreviate fancy term a

2t2 + vt + x by new variable z makes it easy:

a ≥ 0,t ≥ 0,0 ≤ z,z ≤ d,d ≤ 8 ⊢ z ≤ 8

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 21 / 23

slide-133
SLIDE 133

Abbreviating Terms to Reduce Complexity

a≥0,t≥0,0 ≤ a 2t2 + vt + x

  • z

, a

2t2 + vt + x

  • z

≤ d,d≤8 ⊢ a

2t2 + vt + x

  • z

≤ 8

Abbreviate fancy term a

2t2 + vt + x by new variable z makes it easy:

a ≥ 0,t ≥ 0,0 ≤ z,z ≤ d,d ≤ 8 ⊢ z ≤ 8 Proof rules introducing such new variables will be studied in

Chapter 12 André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 21 / 23

slide-134
SLIDE 134

Abbreviating Terms to Reduce Complexity

a≥0,t≥0,0 ≤ a 2t2 + vt + x

  • z

, a

2t2 + vt + x

  • z

≤ d,d≤8 ⊢ a

2t2 + vt + x

  • z

≤ 8

Abbreviate fancy term a

2t2 + vt + x by new variable z makes it easy:

a ≥ 0,t ≥ 0,0 ≤ z,z ≤ d,d ≤ 8 ⊢ z ≤ 8 Proof rules introducing such new variables will be studied in

Chapter 12

Inverse of a derived rule that turns assignments into equations:

[:=]= Γ,y = e ⊢ p(y),∆ Γ ⊢ [x := e]p(x),∆

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 21 / 23

slide-135
SLIDE 135

Abbreviating Terms to Reduce Complexity

a≥0,t≥0,0 ≤ a 2t2 + vt + x

  • z

, a

2t2 + vt + x

  • z

≤ d,d≤8 ⊢ a

2t2 + vt + x

  • z

≤ 8

Abbreviate fancy term a

2t2 + vt + x by new variable z makes it easy:

a ≥ 0,t ≥ 0,0 ≤ z,z ≤ d,d ≤ 8 ⊢ z ≤ 8 Proof rules introducing such new variables will be studied in

Chapter 12

Inverse of a derived rule that turns assignments into equations:

[:=]= Γ,y = e ⊢ p(y),∆ Γ ⊢ [x := e]p(x),∆ (y new)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 21 / 23

slide-136
SLIDE 136

Creatively Cutting to Transform Questions

=R Γ,x = e ⊢ p(e),∆

Γ,x = e ⊢ p(x),∆

=L Γ,x = e,p(e) ⊢ ∆

Γ,x = e,p(x) ⊢ ∆

cut

(x−y)2≤0,p(y) ⊢ p(x)

∧L

(x−y)2≤0∧ p(y) ⊢ p(x)

→R

⊢ (x−y)2≤0∧ p(y) → p(x)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 22 / 23

slide-137
SLIDE 137

Creatively Cutting to Transform Questions

=R Γ,x = e ⊢ p(e),∆

Γ,x = e ⊢ p(x),∆

=L Γ,x = e,p(e) ⊢ ∆

Γ,x = e,p(x) ⊢ ∆

WL(x−y)2≤0,p(y) ⊢ x = y,p(x) WL(x−y)2≤0,p(y),x = y ⊢ p(x) cut

(x−y)2≤0,p(y) ⊢ p(x)

∧L

(x−y)2≤0∧ p(y) ⊢ p(x)

→R

⊢ (x−y)2≤0∧ p(y) → p(x)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 22 / 23

slide-138
SLIDE 138

Creatively Cutting to Transform Questions

=R Γ,x = e ⊢ p(e),∆

Γ,x = e ⊢ p(x),∆

=L Γ,x = e,p(e) ⊢ ∆

Γ,x = e,p(x) ⊢ ∆ ∗

R

(x−y)2≤0 ⊢ x = y

WR

(x−y)2≤0 ⊢ x = y,p(x)

WL(x−y)2≤0,p(y) ⊢ x = y,p(x) WL(x−y)2≤0,p(y),x = y ⊢ p(x) cut

(x−y)2≤0,p(y) ⊢ p(x)

∧L

(x−y)2≤0∧ p(y) ⊢ p(x)

→R

⊢ (x−y)2≤0∧ p(y) → p(x)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 22 / 23

slide-139
SLIDE 139

Creatively Cutting to Transform Questions

=R Γ,x = e ⊢ p(e),∆

Γ,x = e ⊢ p(x),∆

=L Γ,x = e,p(e) ⊢ ∆

Γ,x = e,p(x) ⊢ ∆ ∗

R

(x−y)2≤0 ⊢ x = y

WR

(x−y)2≤0 ⊢ x = y,p(x)

WL(x−y)2≤0,p(y) ⊢ x = y,p(x) =R

p(y),x = y ⊢ p(x)

WL(x−y)2≤0,p(y),x = y ⊢ p(x) cut

(x−y)2≤0,p(y) ⊢ p(x)

∧L

(x−y)2≤0∧ p(y) ⊢ p(x)

→R

⊢ (x−y)2≤0∧ p(y) → p(x)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 22 / 23

slide-140
SLIDE 140

Creatively Cutting to Transform Questions

=R Γ,x = e ⊢ p(e),∆

Γ,x = e ⊢ p(x),∆

=L Γ,x = e,p(e) ⊢ ∆

Γ,x = e,p(x) ⊢ ∆ ∗

R

(x−y)2≤0 ⊢ x = y

WR

(x−y)2≤0 ⊢ x = y,p(x)

WL(x−y)2≤0,p(y) ⊢ x = y,p(x) id

p(y),x = y ⊢ p(y)

=R

p(y),x = y ⊢ p(x)

WL(x−y)2≤0,p(y),x = y ⊢ p(x) cut

(x−y)2≤0,p(y) ⊢ p(x)

∧L

(x−y)2≤0∧ p(y) ⊢ p(x)

→R

⊢ (x−y)2≤0∧ p(y) → p(x)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 22 / 23

slide-141
SLIDE 141

Creatively Cutting to Transform Questions

=R Γ,x = e ⊢ p(e),∆

Γ,x = e ⊢ p(x),∆

=L Γ,x = e,p(e) ⊢ ∆

Γ,x = e,p(x) ⊢ ∆ ∗

R

(x−y)2≤0 ⊢ x = y

WR

(x−y)2≤0 ⊢ x = y,p(x)

WL(x−y)2≤0,p(y) ⊢ x = y,p(x)

id

p(y),x = y ⊢ p(y)

=R

p(y),x = y ⊢ p(x)

WL(x−y)2≤0,p(y),x = y ⊢ p(x) cut

(x−y)2≤0,p(y) ⊢ p(x)

∧L

(x−y)2≤0∧ p(y) ⊢ p(x)

→R

⊢ (x−y)2≤0∧ p(y) → p(x)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 22 / 23

slide-142
SLIDE 142

Outline

1

Learning Objectives

2

Sequent Calculus Propositional Proof Rules Soundness of Proof Rules Proofs with Dynamics Contextual Equivalence Quantifier Proof Rules A Sequent Proof for Single-hop Bouncing Balls

3

Real Arithmetic Real Quantifier Elimination Instantiating Real-Arithmetic Quantifiers Weakening by Removing Assumptions Abbreviating Terms to Reduce Complexity Substituting Equations into Formulas Creatively Cutting to Transform Questions

4

Summary

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 22 / 23

slide-143
SLIDE 143

Summary: Proof Rules of Sequent Calculus

¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ ∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆ cut Γ ⊢ C,∆

Γ,C ⊢ ∆ Γ ⊢ ∆ ⊤R Γ ⊢ true,∆ ⊥L Γ,false ⊢ ∆ ∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆(y ∈ Γ,∆,∀x p(x)) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆ (arbitrary term e) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆ (arbitrary term e) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆(y ∈ Γ,∆,∃x p(x))

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 23 / 23

slide-144
SLIDE 144

Summary: Proof Rules of Sequent Calculus

¬R Γ,P ⊢ ∆ Γ ⊢ ¬P,∆ ¬L Γ ⊢ P,∆ Γ,¬P ⊢ ∆ ∧R Γ ⊢ P,∆ Γ ⊢ Q,∆ Γ ⊢ P ∧ Q,∆ ∧L Γ,P,Q ⊢ ∆ Γ,P ∧ Q ⊢ ∆ ∨R Γ ⊢ P,Q,∆ Γ ⊢ P ∨ Q,∆ ∨L Γ,P ⊢ ∆ Γ,Q ⊢ ∆ Γ,P ∨ Q ⊢ ∆ →R Γ,P ⊢ Q,∆ Γ ⊢ P → Q,∆ →L Γ ⊢ P,∆ Γ,Q ⊢ ∆ Γ,P → Q ⊢ ∆

id Γ,P ⊢ P,∆ cut Γ ⊢ C,∆

Γ,C ⊢ ∆ Γ ⊢ ∆ ⊤R Γ ⊢ true,∆ ⊥L Γ,false ⊢ ∆ ∀R Γ ⊢ p(y),∆ Γ ⊢ ∀x p(x),∆(y ∈ Γ,∆,∀x p(x)) ∀L Γ,p(e) ⊢ ∆ Γ,∀x p(x) ⊢ ∆ (arbitrary term e) ∃R Γ ⊢ p(e),∆ Γ ⊢ ∃x p(x),∆ (arbitrary term e) ∃L Γ,p(y) ⊢ ∆ Γ,∃x p(x) ⊢ ∆(y ∈ Γ,∆,∃x p(x))

R Γ ⊢ ∆

(if

  • P∈Γ

P →

  • Q∈∆

Q is valid in FOLR)

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 23 / 23

slide-145
SLIDE 145

André Platzer. Logical Foundations of Cyber-Physical Systems. Springer, Switzerland, 2018. URL: http://www.springer.com/978-3-319-63587-3,

doi:10.1007/978-3-319-63588-0.

André Platzer. Logical Analysis of Hybrid Systems: Proving Theorems for Complex Dynamics. Springer, Heidelberg, 2010.

doi:10.1007/978-3-642-14509-4.

André Platzer. Differential dynamic logic for hybrid systems.

  • J. Autom. Reas., 41(2):143–189, 2008.

doi:10.1007/s10817-008-9103-8.

André Platzer (CMU) LFCPS/06: Truth & Proof LFCPS/06 23 / 23