proofs with feasible computational content
play

Proofs with Feasible Computational Content Helmut Schwichtenberg - PowerPoint PPT Presentation

Proofs with Feasible Computational Content Helmut Schwichtenberg Mathematisches Institut der Universit at M unchen Summer School Marktoberdorf 1. - 11. August 2007 Proof and computation , , decidable prime formulas: negative


  1. Proofs with Feasible Computational Content Helmut Schwichtenberg Mathematisches Institut der Universit¨ at M¨ unchen Summer School Marktoberdorf 1. - 11. August 2007

  2. Proof and computation ◮ → , ∀ , decidable prime formulas: negative arithmetic A ω . ◮ Computational content (Brouwer, Heyting, Kolmogorov): by inductively defined predicates only. Examples: ∃ x A , Acc ≺ . ◮ Induction ∼ (structural) recursion. ◮ Curry-Howard correspondence: formula ∼ type. ◮ Higher types necessary (nested → , ∀ ).

  3. Why extract computational content from proofs? ◮ Proofs are machine checkable ⇒ no logical errors. ◮ Program on the proof level ⇒ maintenance becomes easier. Possibility of program development by proof transformation (Goad 1980). ◮ Discover unexpected content: ◮ Berger 1993: Tait’s proof of the existence of normal forms for the typed λ -calculus ⇒ “normalization by evaluation”. ◮ Content in proofs of ˜ ∃ x A , via proof interpretations: (refined) A -translation or G¨ odel’s Dialectica interpretation.

  4. Base types := µ α α, U B := µ α ( α, α ) , := µ α ( α, α → α ) , N L ( ρ ) := µ α ( α, ρ → α → α ) , ρ ∧ σ := µ α ( ρ → σ → α ) , ρ + σ := µ α ( ρ → α, σ → α ) , ( tree , tlist ) := µ α,β ( N → α, β, β → α, α → β → β ) , bin := µ α ( α, α → α → α ) , O := µ α ( α, α → α, ( N → α ) → α ) , T 0 := N , T n +1 := µ α ( α, ( T n → α ) → α ) .

  5. Types ρ, σ, τ ::= µ | ρ → σ. A type is finitary if it is a base type ◮ with all its “parameter types” finitary, and ◮ all its “constructor types” without “functional” recursive argument types. In the examples above U , B , N , tree , tlist and bin are all finitary, but O and T n +1 are not. L ( ρ ) and ρ ∧ σ are finitary if their parameter types ρ, σ are.

  6. Recursion operators tt B := C B ff B := C B 1 , 2 , R τ B : B → τ → τ → τ, 0 N := C N S N → N := C N 1 , 2 , R τ N : N → τ → ( N → τ → τ ) → τ, nil L ( ρ ) := C L ( ρ ) cons ρ → L ( ρ ) → L ( ρ ) := C L ( ρ ) , , 1 2 R τ L ( ρ ) : L ( ρ ) → τ → ( ρ → L ( ρ ) → τ → τ ) → τ, � ρ → σ → ρ ∧ σ := C ρ ∧ σ ∧ + � , ρσ 1 R τ ρ ∧ σ : ρ ∧ σ → ( ρ → σ → τ ) → τ. We write x :: l for cons x l , and � y , z � for ∧ + yz .

  7. Terms and formulas We work with typed variables x ρ , y ρ , . . . . Definition (Terms) r , s , t ::= x ρ | C | ( λ x ρ r σ ) ρ → σ | ( r ρ → σ s ρ ) σ . Definition (Formulas) A , B , C ::= atom ( r B ) | A → B | ∀ x A .

  8. Examples Projections: t 0 := R ρ t 1 := R ρ ρ ∧ σ t ρ ∧ σ ( λ x ρ , y σ x ρ ) , ρ ∧ σ t ρ ∧ σ ( λ x ρ , y σ y σ ) . The append-function :+: for lists is defined recursively by nil :+: l 2 := l 2 , ( x :: l 1 ) :+: l 2 := x :: ( l 1 :+: l 2 ) . It can be defined as the term l 1 :+: l 2 := R L ( α ) → L ( α ) l 1 ( λ l 2 l 2 )( λ x , l 1 , p , l 2 ( x :: ( pl 2 ))) l 2 . L ( α ) Using the append function :+: we can define list reversal R by R nil := nil , R ( x :: l ) := ( R l ) :+: ( x :: nil ) . The corresponding term is R l := R L ( α ) L ( α ) l nil ( λ x , l , p ( p :+: ( x :: nil )) .

  9. Induction A (tt) → A (ff) → A ( p B ) � � Ind p , A : ∀ p , A (0) → ∀ n ( A ( n ) → A ( S n )) → A ( m N ) � � Ind n , A : ∀ m , A ( nil ) → ∀ x , l ′ ( A ( l ′ ) → A ( x :: l ′ )) → A ( l L ( ρ ) ) � � Ind l , A : ∀ l . We also require the truth axiom Ax t t : atom (tt).

  10. Natural deduction: assumptions, → -rules derivation term u A u : A [ u : A ] | M ( λ u A M B ) A → B B → + u A → B | M | N ( M A → B N A ) B A → B A → − B

  11. Natural deduction: ∀ -rules derivation term | M ( λ x M A ) ∀ x A (VarC) A ∀ + x (VarC) ∀ x A | M ( M ∀ x A ( x ) r ) A ( r ) ∀ x A ( x ) r ∀ − A ( r )

  12. Negative arithmetic A ω → , ∀ , decidable prime formulas. No inductively defined predicates. F := atom (ff) , ¬ A := A → F , ˜ ∃ x A := ¬∀ x ¬ A . Lemma (Stability, or principle of indirect proof) ⊢ ¬¬ A → A, for every formula A in A ω . Proof. Induction on A . For the atomic case one needs boolean induction (i.e., case distinction).

  13. An alternative: falsity as a predicate variable ⊥ In A ω , we have an “arithmetical” falsity F := atom (ff). However, in some proofs no knowledge about F is required. Then a predicate variable ⊥ instead of F will do, and we can define ˜ ∃ x A := ∀ x ( A → ⊥ ) → ⊥ . Why is this of interest? We then can substitute an arbitrary formula for ⊥ , for instance, ∃ x A (the “proper” existential quantifier, to be defined below). Then ˜ ∃ x A := ∀ x ( A → ∃ x A ) → ∃ x A . The premise will be provable. Hence we have a proof of ∃ x A .

  14. Realizability interpretation ◮ Study the “computational content” of a proof. ◮ This only makes sense after we have introduced inductively defined predicates to our “negative” language of A ω involving ∀ and → only. ◮ The resulting system will be called arithmetic with inductively defined predicates ID ω .

  15. The intended meaning of an inductively defined predicate I ◮ The clauses correspond to constructors of an appropriate algebra µ (or better µ I ). ◮ We associate to I a new predicate I r , of arity ( µ, � ρ ), where the first argument r of type µ represents a generation tree, witnessing how the other arguments � r were put into I . ◮ This object r of type µ is called a realizer of the prime formula I ( � r ).

  16. Example Consider the graph of the list reversal function as an inductively defined predicate. The clauses or introduction axioms are Rev + 0 : ∀ U v , w ( F → Rev ( v , w )) , Rev + 1 : Rev ( nil , nil ) , Rev + 2 : ∀ U v , w ∀ x ( Rev ( v , w ) → Rev ( v :+: x : , x :: w )) . The algebra µ Rev is generated by ◮ two constants for the first two clauses, and ◮ a constructor of type N → µ Rev → µ Rev for the final clause.

  17. Example (continued) The (strengthened) elimination axiom says that Rev is the least predicate satisfying the clauses: Rev − : ∀ U ∀ U � v , w ( F → P ( v , w )) → v , w P ( nil , nil ) → ∀ U � � v , w ∀ x Rev ( v , w ) → P ( v , w ) → P ( v :+: x : , x :: w ) → � Rev ( v , w ) → P ( v , w ) .

  18. Uniformity ◮ We want to select relevant parts of the complete computational content of a proof. ◮ This will be possible if some uniformities hold; we express this fact by using a uniform variant ∀ U of ∀ (as done by Berger 2005) and → U of → . ◮ Both are governed by the same rules as the non-uniform ones. However, we will put some uniformity conditions on a proof to ensure that the extracted computational content is correct.

  19. Example: existential quantifier Let α be a type variable, y an object variable of type α , and Q a predicate variable of arity ( α ). We have four variants: � � Ex ( α, Q ) := µ X ∀ y ( Q ( y ) → X ) , ∀ y ( Q ( y ) → U X ) � � ExL ( α, Q ) := µ X , ∀ U � � ExR ( α, Q ) := µ X y ( Q ( y ) → X ) , y ( Q ( y ) → U X ) ∀ U � � ExU ( α, Q ) := µ X . The introduction axioms are ∃ + : ∀ x ( A → ∃ x A ) , + : ∀ x ( A → U ∃ L ( ∃ L ) x A ) , + : ∀ U ( ∃ R ) x ( A → ∃ R x A ) , + : ∀ U x ( A → U ∃ U ( ∃ U ) x A ) , where ∃ x A abbreviates Ex ( ρ, { x ρ | A } ) (similar for the others).

  20. Example: existential quantifier (continued) The elimination axioms are (with x / ∈ FV ( C )) ∃ − : ∃ x A → ∀ x ( A → C ) → C , − : ∃ L x A → ∀ x ( A → U C ) → C , ( ∃ L ) − : ∃ R ( ∃ R ) x A → ∀ U x ( A → C ) → C , − : ∃ U x ( A → U C ) → C . ( ∃ U ) x A → ∀ U

  21. Example: Leibniz equality The introduction axioms are Eq + 0 : ∀ U Eq + 1 : ∀ U n , m ( F → Eq ( n , m )) , n Eq ( n , n ) , and the elimination axiom is Eq − : ∀ U Eq ( n , m ) → ∀ U � � n Q ( n , n ) → Q ( n , m ) . n , m One can prove symmetry, transitivity and compatibility of Eq : Lemma (CompatEq) ∀ U � � Eq ( n 1 , n 2 ) → Q ( n 1 ) → Q ( n 2 ) . n 1 , n 2 Proof. Use Eq − .

  22. Example: pointwise equality = ρ For every arrow type ρ → σ we have the introduction axiom ∀ U � � ∀ y ( x 1 y = σ x 2 y ) → x 1 = ρ → σ x 2 . x 1 , x 2 An example of = µ with a non-finitary base type µ is = T for T := T 1 : ∀ U x 1 , x 2 ( F → x 1 = T x 2 ) , 0 = T 0 , ∀ U f 1 , f 2 ( ∀ n ( f 1 n = T f 2 n ) → Sup f 1 = T Sup f 2 ) . The elimination axiom is = − T : ∀ U � x 1 = T x 2 → P (0 , 0) → x 1 , x 2 ∀ U � ∀ n ( f 1 n = T f 2 n ) → ∀ n P ( f 1 n , f 2 n ) → f 1 , f 2 � P ( Sup f 1 , Sup f 2 ) → � P ( x 1 , x 2 ) .

  23. Example: pointwise equality (continued) One can prove reflexivity of = ρ , using meta-induction on ρ : Lemma (ReflPtEq) ∀ n ( n = ρ n ) . A consequence is that Leibniz equality implies pointwise equality: Lemma (EqToPtEq) � � ∀ n 1 , n 2 Eq ( n 1 , n 2 ) → n 1 = ρ n 2 . Proof. Use CompatEq and ReflPtEq.

Recommend


More recommend