Reading
F. Pfenning: Automated Theorem Proving, Course at Carnegie Mellon University. Draft. 1999. Introduction to Deduction Systems: A.S. Troelstra and H. Schwichtenberg: Basic Proof From Natural Deduction to Theory. Cambridge. 2nd Edition 2000. John Byrnes: Proof Search and Normal Forms in Natural Sequent Calculus Deduction. PhD Thesis. Carnegie Mellon University. 1999. (and back) . . . many more books on Proof Theory . . . Christoph Benzmüller
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002
Natural Deduction: Motivation Sequent Calculus: Motivation
Frege, Russel, Hilbert Predicate calculus and type Gentzen had a pure technical motivation for sequent calculus theory as formal basis for mathematics Same theorems as natural deduction
Gentzen ND as intuitive formulation of predicate calculus; Prove of the Hauptsatz (all sequent proofs can be found introduction and elimination rules for each logical connective with a simple strategy) Corollary: Consistency of formal system(s) The formalization of logical deduction, especially as it has been developed by The Hauptsatz says that every purely logical proof can be reduced to a defi- Frege, Russel, and Hilbert, is rather far removed from the forms of deduction nite, though not unique, normal form. Perhaps we may express the essential used in practice in mathematical proofs. . . . In contrast I intended first to set properties of such a normal proof by saying: it is not roundabout. . . . up a formal system which comes as close as possible to actual reasoning. In order to be able to prove the Hauptsatz in a convenient form, I had to The result was a calculus of natural deduction (NJ for intuitionist, NK for provide a logical calculus especially for the purpose. For this the natural classical predicate logic). [Gentzen: Investigations into logical deduction] calculus proved unsuitable. [Gentzen: Investigations into logical deduction]
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002 Sequent Calculus: Introduction Natural Deduction
Sequent calculus exposes many details of fine Natural deduction rules operate on proof trees. structure of proofs in a very clear manner. Therefore it is well Example: ¢¡ ¢¡ suited to serve as a basic representation formalism for ¢¡¤£ ¢¥§¦ £ £ ¦ ¦ ¨ ¨
© ¨ ¨ ¨ £ £ ¦ ¦ many automation oriented search procedures ¨ Conjunction:
Backward: tableaux, connection methods, matrix methods, some forms of resolution The presentation on the next slides treats the proof tree Forward: classical resolution, inverse method aspects implicit. Example: £ £ £ ¦ ¦ Don’t be afraid of the many variants of sequent calculi. ¦ ¨ ¨ © ¨ ¨ ¨ £ £ ¦ ¦ Choose the one that is most suited for you. Conjunction: ¨
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002
Natural Deduction Rules Ia Natural Deduction Rules IIa £ £ £ ¦ ¦ ¦ £ ¨ ¨ ¡ © ¨ ¨ ¨ £ £ ¦ ¦ ¨ . Conjunction: . £ £
. ¡
© £ Disjunction: £ ¦ Negation: ¥ ¡ £ £ . . ! . . !
! . . © £ £ ! £ £ ¦ ¦
. . " ¡ ¥ © ©
Universal Quantif.:
£ £ ¦ ¦
£ £ ¡ .
. £ . " £ . # .
. # © #
£ £ ¦ . ¦ £ # ¡
© £ ¦ ¦ Existential Quantif.: Implication: ©
*: parameter a must be new in context Truth and Falsehood:
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002 Natural Deduction Rules IIIa Natural Deduction
For classical logic choose one of the following Structural properties
$% Exchange hypotheses order is irrelevant £ £ Excluded Middle Weakening hypothesis need not be used £ & £ Contraction hypotheses can be used more than once Double Negation £ . .
. ' Proof by Contradiction £
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002
Natural Deduction Proofs Natural Deduction with Contexts
Localizing hypotheses; explicit representation of the
Idea: £ £ ¡ ¥ © ¨
£ £ available assumptions for each formula occurrence in a ND ¨ ¥ © ( ) £ £ £ ¨ proof: ¡ © £ + * ( ( ) ) £ £ £ £ ¨
* is a multiset of the (uncanceled) assumptions on which £ formula depends. * is called context. £ ¦ ¨ ¡
¨ £ ¦ ¨ Example proof in context notation: £ ¡ © ¨
£ ¦ £ £ £ £ + + © ¨ ¡ ¥ ( ) © £ ¦ ¨ ¨ £ £ £ £ + ¨ ¡ © ¡-, ¥ © ( ) ) ) ( ( £ £ ¦ ¦ ¨ ¨ ¥ ( ) £ £ £ £ + ¨ ¡ © ¡ ( ( ) ) £ £ £ £ + ¨
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002 Natural Deduction with Contexts Natural Deduction with Contexts
Another Idea: Consider sets of assumptions instead of Structural properties to ensure multisets. Exchange (hypotheses order is irrelevant) £ + * £ + ¦ * , , £ ¦ + * , , * is now a set of (uncanceled) assumptions on which formula £ depends. Weakening (hypothesis need not be used) + * £ + *
Example proof: , £ £ £ £ + + Contraction (hypotheses can be used more than once) © ¨ £ £ £ + £ £ + * ¨ © , , ( ) £ £ £ £ + ¨ £ + * , © ( ( ) ) £ £ £ £ + ¨
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002
Natural Deduction Rules Ib Natural Deduction Rules IIb + * . £ £ + * © , , + + * * Hypotheses: Truth and Falsehood: £ + * £ £ + + * * ,
Conjunction: © £ + + * * £ £ £ ¦ ¦ + + ¦ + + * * * * ¨ ¨ © ¨ ¨ ¨ Negation: £ £ ¦ + + + ¦ * * * ¨ £ + * £ + ! * !
! © £ + + ¦ * * £ £ + ! + * * " © ©
£ £ ¦ ¦ + + * * Universal Quantif.: Disjunction: Existential Quantif.: £ £ + + + ¦ ¦ * * * , , £ £ £ + + # + * * * " + * , # #
© £ + # + * * £ + ¦ * £ £ ¦ + + * * ,
© £ + + ¦ ¦ * * Implication: *: parameter a must be new in context
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002 Natural Deduction Rules IIIb Intercalation
For classical logic add: Idea (Prawitz, Sieg & Scheines, Byrnes & Sieg): £ + * , ' Detour free proofs: strictly use introduction rules bottom up £ + * Proof by Contradiction: (from proposed theorem to hypothesis) and elimination rules top down (from assumptions to proposed theorem). When they meet in the middle we have found a proof in normal form.
Assumptions 0 1 143 145 . " 2 3 / . . . . .
. 6 £ . . ¦ © ¨ £ ¦ ¨ 7
meet ¨ £ 9;: 143 1 . " " . 8 5 < 5 3 . . Goal .
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002
Intercalating Natural Deductions ND Intercalation Rules I . £ £ + 6 New annotations: * Hypotheses: , , ic £ £ 7 : is obtained by an introduction derivation Conjunction: £ £ 6 £ £ £ ¦ ¦ + 7 + ¦ 7 + 6 + 6 * * * * ¨ ¨ © ¨ ¨ : is extracted from a hypothesis by an elimination ic ic ¨ ic ic £ £ + 7 + 6 + ¦ 6 ¦ * * * ¨ derivation ic ic ic £ + 7 + ¦ 7 * * © © ic ic
£ £ + 7 + 7 ¦ ¦ * * Example: Disjunction: ic ic £ £ ¦ ¦ + 6 + 7 + 7 * * * £ £ £ + ¦ 7 + 6 + 6 ¦ * * * , , ic ic ic , © 7 + *
ic ic ic £ ¦ + 7 + ¦ 6 * * ic ic Implication: £ £ £ ¦ + ¦ 7 + 6 + 6 * * * , ©
ic ic ic £ + 7 + ¦ 6 ¦ * * ic ic
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002 ND Intercalation Rules II ND Intercalation Rules III + 6 *
© ic For classical logic add: + 7 + 7 * * £ + 7 *
Truth and Falsehood: , ic ic ic ' £ £ £ + 7 + 6 + 7 * * * £ + 7 * , ic © ic ic Proof by Contradiction: ic £ + 7 + 7 * * Negation: ic ic Universal Quantif.: £ £ + 7 + ! 6 * * !
! ic © ic £ £ 7 + 6 + ! * * " ic ic Existential Quantif.: £ £ £ + 7 + # 6 + 7 * * * " , # # ic © ic ic £ + 7 + # 7 * * ic
*: parameter a must be new in context
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002
Intercalation and ND Example Proofs
Normal form proofs In normal form > > = + = 6 ¨ ¨ ic ¨ > > = + 6 Assumptions ¨
0 ic 1 1 1 . " 5 3 / 3 2 > > = + 7 . ¨ meet © £ + 6 *
. 6 ic
> ? > = + 7 ic ¨ © £ + 7 * 7 guaranteed by meet ic
meet ( ) ( ) > > ? + = 7 ¨ ic 9;: 145 1 . " " 3 . 3 8 5 < ic . Goal With detour . . . . > > > . . . proofs without detour . . . = . + 7 = . + = 7 ¨ ¨ © ic ic ¨ > > = = + 7 ¨ ¨ £ + 7 * ic > > = + 6 = ¨ ic ¨ roundabout
£ + 6 * roundabout ic ¨ > > = + 6 To model all ND proofs add ic ¨ ic > > = + 7 ¨ meet ic . . Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002 Soundness and Completeness From ND to Sequent Calculus
+ @ Let ic denote the intercalation calculus with rule Normal form ND proofs Sequent proofs @ roundabout and ic the calculus without this rule. Assumptions 0 . 1 2 Theorem 1 (Soundness): . / @ BC @ B A A
. 6
+ If ic then . D initial E 7 meet 7 sequents 0 143 1 1 " . " . 8 5 3 8 5 . 2 Theorem 2 (Completeness): . . / .
@ B @ BC . . A A . + . . . If then ic . Goal Assumptions Goal Is normal form proof search also complete?: @ BC @ BC A A . + * If ic then ic ? Sequents pair < , > of finite lists, multisets, or sets of . * We will investigate this question within the formulas; notation: D . * sequent calculus. Intuitive: a kind of implication, “follows from”
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002
Sequent Calculus Rules I Sequent Calculus Rules II . . £ £ * * 1 1 " 3 D D . £ £ £ * , , F G D , , . . £ £ Initial Sequents: ( atomic) * * D D , Negation: , Conjunction: Disjunction: . . . £ £ ¦ ¦ * * * D D D . . . £ £ ¦ ¦ * * * , , , , G F D D D ¨ ¨ , , , , G F . . £ £ ¦ ¦ * * ¨ ¨ D D . . £ £ ¦ ¦ * * , , D D , ,
Implication Universal Quantification: . . . £ £ ¦ ¦ * * * . . £ £ £ ! * * " D D D D D , , , , , , , F G ! ! G F . . £ £ ¦ ¦ * * . . £ £ ! ! * * D D D D , , , , F G . . * * Existential Quantification: D D , , . . £ £ £ # * * "
Truth and Falsehood D D , , , ! ! F G . . £ £ # # * * D D , ,
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002 Example Proof Sequent Calculus: Cut-rule
To map natural deductions (in @ and + @ ) to
MON M ic P B S B J L K H H R MON M P
Q sequent calculus derivations we add: called B S B BIH J J J Q L L K K H R U Q T cut-rule: B B S B J J J Q Q T L L K K U Q X XYH B B A AZH L L V W K K B S B J J Q Q T L K []\ P U X A L L K V W V W B S B J J Q Q T L L K @ The question whether normal form proof search ( ic ) is complete corresponds to the question whether the cut-rule can be eliminated (is admissible) in sequent calculus.
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002
Sequent Calculus Gentzen's Hauptsatz L Let K + denote the sequent calculus with cut-rule Theorem 5 (Cut-Elimination): Cut-elimination L and K the sequent calculus without the cut-rule. holds for the sequent calculus. In other words: The cut rule is admissible in the sequent calculus. S S A A L L
K + K Theorem 3 (Soundness) If then S @ S C A A L K (a) If then ic . Proof non-trivial; main means: nested inductions S @ S C A A L K + + and case distinctions over rule applications (b) If then ic .
Theorem 4 (Completeness) This result qualifies the sequent calculus as suitable @ S C S A A L
+ K + If ic then . for automating proof search.
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002 Applications of Cut-Elimination What have we done?
Theorem (Normalization for ND): Natural Deduction Intercalation Sequent Calculus @ S @ S C A A + + If then ic . + D + ic (with detours) (with roundabout) (with cut) Proof sketch: 6 @ S A _ _ _ _ ^ Assume . ^ ^ ^ @ @ S C A ` ` ` ` `
+ + ^ ^ ^ ^ ^ Then ic by completeness of ic . S A L L K Then K + by completeness of + . S A + + L K Then by cut-elimination. ic D @ S C A L K Then ic by soundness of . (without detours) (without roundabout) (without cut)
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002
Applications of Cut-Elimination Summary
Theorem (Consistency of ND): There is no We have illustrated the connection of @ a natural deduction derivation . natural deduction and sequent calculus normal form natural deductions and cut-free Proof sketch: sequent calculus. @ Assume there is a proof of a . @ a
L L Fact: Sequent calculus often employed as
K + K + + Then by completeness of and ic . a
L meta-theory for specialized proof search calculi and But K + cannot be the conclusion of any strategies. sequent rule. Contradiction. Question: Can these calculi and strategies be transformed to natural deduction proof search?
Calculemus Autumn School, Pisa, Sep 2002 Calculemus Autumn School, Pisa, Sep 2002