minimal logic for computable functionals
play

Minimal logic for computable functionals Helmut Schwichtenberg - PowerPoint PPT Presentation

Minimal logic for computable functionals Helmut Schwichtenberg Mathematisches Institut der Universit at M unchen Motivation Proof carrying code (Lee, Necula) Why? Proofs are machine checkable (easily) Need: code carrying proofs


  1. Minimal logic for computable functionals Helmut Schwichtenberg Mathematisches Institut der Universit¨ at M¨ unchen

  2. Motivation Proof carrying code (Lee, Necula) Why? Proofs are machine checkable (easily) Need: “code carrying proofs” Prospects: ◮ Mathematics as a numerical language (Bishop) ◮ Program development by proof transformation (adapt to special situations, computed function can change) ◮ Unexpected algorithms in classical proofs Here: Unexpected algorithms even in (clever) constructive proofs: existence of normal forms in typed lambda calculus, using computability predicates (a.k.a. logical relations). Needed for a proper treatment: computability in higer types based on the Scott-Ershov partial continuous functionals

  3. Motivation Proof carrying code (Lee, Necula) Why? Proofs are machine checkable (easily) Need: “code carrying proofs” Prospects: ◮ Mathematics as a numerical language (Bishop) ◮ Program development by proof transformation (adapt to special situations, computed function can change) ◮ Unexpected algorithms in classical proofs Here: Unexpected algorithms even in (clever) constructive proofs: existence of normal forms in typed lambda calculus, using computability predicates (a.k.a. logical relations). Needed for a proper treatment: computability in higer types based on the Scott-Ershov partial continuous functionals

  4. Motivation Proof carrying code (Lee, Necula) Why? Proofs are machine checkable (easily) Need: “code carrying proofs” Prospects: ◮ Mathematics as a numerical language (Bishop) ◮ Program development by proof transformation (adapt to special situations, computed function can change) ◮ Unexpected algorithms in classical proofs Here: Unexpected algorithms even in (clever) constructive proofs: existence of normal forms in typed lambda calculus, using computability predicates (a.k.a. logical relations). Needed for a proper treatment: computability in higer types based on the Scott-Ershov partial continuous functionals

  5. Motivation Proof carrying code (Lee, Necula) Why? Proofs are machine checkable (easily) Need: “code carrying proofs” Prospects: ◮ Mathematics as a numerical language (Bishop) ◮ Program development by proof transformation (adapt to special situations, computed function can change) ◮ Unexpected algorithms in classical proofs Here: Unexpected algorithms even in (clever) constructive proofs: existence of normal forms in typed lambda calculus, using computability predicates (a.k.a. logical relations). Needed for a proper treatment: computability in higer types based on the Scott-Ershov partial continuous functionals

  6. Formulas and their types r ) | A ∧ B | A → B | ∀ x ρ A | ∃ x ρ A . Formulas: P ( � τ ( A ) := type of the program to be extracted from a proof of A , or := ε if A has no “computational content” (e.g. ∀ n f ( n ) = 0). τ ( P ( � r )) := ε ( P a predicate constant) � ρ if τ ( A ) = ε τ ( ∃ x ρ A ) := ρ × τ ( A ) otherwise � ε if τ ( A ) = ε τ ( ∀ x ρ A ) := ρ ⇒ τ ( A ) otherwise � τ ( A i ) if τ ( A 1 − i ) = ε τ ( A 0 ∧ A 1 ) := τ ( A 0 ) × τ ( A 1 ) otherwise   τ ( B ) if τ ( A ) = ε  τ ( A → B ) := ε if τ ( B ) = ε   τ ( A ) ⇒ τ ( B ) otherwise

  7. Computational content of a proof [ [ M ] ]: τ ( A ), for M : A derivation (natural deduction style, written as a λ -term), and τ ( A ) � = ε . ] := x τ ( A ) ( x τ ( A ) [ u A ] uniquely associated with u A ) [ u u � [ [ M ] ] if τ ( A ) = ε [ λ u A M ] [ ] := λ x τ ( A ) [ [ M ] ] otherwise u � [ [ M ] ] if τ ( A ) = ε [ M A → B N ] [ ] := [ [ M ] ][ [ N ] ] otherwise [( λ x ρ M ) ∀ xA ] ] := λ x ρ [ [ [ M ] ] [ M ∀ xA r ] [ ] := [ [ M ] ] r . [ � M A 0 0 , M A 1 [ M A 0 ∧ A 1 i ] [ 1 � ] ] and [ ] are define in a similar way. Also: extracted terms for induction, cases, ∃ -axioms. For M : A where τ ( A ) = ε let [ [ M ] ] := ε (new symbol).

  8. Realizability r mr A , where r is a term of type τ ( A ) (or = ε ). ε mr P ( � r ) = P ( � r ) , � ε mr A x [ r ] if τ ( A ) = ε r mr ( ∃ xA ) = r 1 mr A x [ r 0] otherwise � ∀ x .ε mr A if τ ( A ) = ε r mr ( ∀ xA ) = ∀ x . rx mr A otherwise  ε mr A → r mr B  if τ ( A ) = ε  r mr ( A → B ) = ∀ x . x mr A → ε mr B if τ ( A ) � = ε = τ ( B )   ∀ x . x mr A → rx mr B otherwise  ε mr A 0 ∧ r mr A 1 if τ ( A 0 ) = ε   r mr ( A 0 ∧ A 1 ) = r mr A 0 ∧ ε mr A 1 if τ ( A 1 ) = ε   r 0 mr A 0 ∧ r 1 mr A 1 otherwise

  9. Soundness Let x u := ε if u A is an assumption variable with τ ( A ) = ε . Theorem If M is a derivation of a formula B, then there is a derivation µ ( M ) of [ [ M ] ] mr B from assumptions { x u mr C | u C ∈ FA ( M ) } . Proof. Induction on M .

  10. Quantifiers without computational content Problem: Redundant variables in extracted terms. Cure (Berger 1993): Add formulas ∀ nc xA | ∃ nc xA , with τ ( ∃ nc x ρ A ) := τ ( A ) , τ ( ∀ nc x ρ A ) := τ ( A ) . For ∃ nc : existence introduction and elimination axioms: ( ∃ nc ) + ∀ nc x . B → ∃ nc xB x , B : ( ∃ nc ) − x , A , B : ∃ nc xA → ( ∀ nc x . A → B ) → B with x / ∈ FV ( B ) Uniformity axiom: ∀ nc x ∃ yA → ∃ y ∀ nc xA . Can define “nc-correct proof”, w.r.t. “computational variables”.

  11. Information systems Let A and B be information systems. Then the objects u of A → B are in bijective correspondence with the continuous functions f from | A | to | B | : ◮ For u : A → B define | u | : | A | → | B | by | u | ( z ) := { b ∈ B | u ( X , b ) for some X ⊆ fin z } . ◮ For f : | A | → | B | define ˆ f : A → B by ˆ f ( X , b ) := b ∈ f ( X ) . Moreover, f = | ˆ f | and u = � | u | .

  12. A universal information system � C ι := N → Λ C ω := C ρ C ρ ⇒ σ := C ρ → C σ ρ Have injections and projections in − 1 in ρ : | C ρ | → | C ω | , ρ : | C ω | → | C ρ | . Every a ∈ | C ω | has the form in ρ ( u ) for some u ∈ | C ρ | , or else is ∅ . Call { in ρ ( u ) | u ∈ | C ρ | } the ρ -part of | C ω | . Let P ρ ( a ) mean that a is in the ρ -part of | C ω | .

  13. Administrative functions: ModIota , HatIota Define ModIota : | C ω | → | N | → | Λ | by � � ModIota in ι ( u ) := | u | � � � � ModIota in τ ( u ) ( k ) := ∅ for τ � = ι , ModIota ∅ ( k ) := ∅ . For g : | N | → | Λ | we have ˆ g ∈ | N → Λ | = | C ι | , hence � � in ι (ˆ g ) ∈ | C ω | . Define HatIota : | N | → | Λ | → | C ω | by HatIota ( g ) := in ι (ˆ g ) . for g : | N | → | Λ | , and := ∅ else. Then ModIota ( HatIota ( g )) = g .

  14. Administrative functions: Mod , Hat ρ,σ Define Mod : | C ω | → | C ω | → | C ω | by � � := in σ ◦ | u | ◦ in − 1 in ρ ⇒ σ ( u ) ρ , Mod � � ( a ) := ∅ for τ not of arrow form, and Mod in τ ( u ) � � Mod ∅ ( a ) := ∅ . � � Define Hat ρ,σ : | C ω | → | C ω | → | C ω | by Hat ρ,σ ( h ) := in ρ ⇒ σ (ˆ f ) for f := in − 1 ◦ h ◦ in ρ : | C ρ | → | C σ | . Then σ Mod ( Hat ρ,σ ( h )) = in σ ◦ in − 1 ◦ h ◦ in ρ ◦ in − 1 ρ . σ

  15. β -reduction, η -expansion ( λ xr ) s �→ r x [ s ] β -conversion , r �→ λ x . rx η -expansion ( x / ∈ FV ( r )) . Definition r is in β -normal form if no (inner) β -conversion is possible. Definition Let r be in β -normal form. r is in η -long normal form if no (inner) η -expansion is possible without creating a new β -convertible subterm.

  16. β -reduction, η -expansion ( λ xr ) s �→ r x [ s ] β -conversion , r �→ λ x . rx η -expansion ( x / ∈ FV ( r )) . Definition r is in β -normal form if no (inner) β -conversion is possible. Definition Let r be in β -normal form. r is in η -long normal form if no (inner) η -expansion is possible without creating a new β -convertible subterm.

  17. β -reduction, η -expansion ( λ xr ) s �→ r x [ s ] β -conversion , r �→ λ x . rx η -expansion ( x / ∈ FV ( r )) . Definition r is in β -normal form if no (inner) β -conversion is possible. Definition Let r be in β -normal form. r is in η -long normal form if no (inner) η -expansion is possible without creating a new β -convertible subterm.

  18. Long normal forms Terms in long normal form (i.e. normal w.r.t. β -reduction and η -expansion) are inductively defined by λ xr | ( xr 1 . . . r n ) ι . Definition Let r be in β -normal form. With lnf ( r ) we denote the result of maximally η -expanding r .

  19. Long normal forms Terms in long normal form (i.e. normal w.r.t. β -reduction and η -expansion) are inductively defined by λ xr | ( xr 1 . . . r n ) ι . Definition Let r be in β -normal form. With lnf ( r ) we denote the result of maximally η -expanding r .

  20. Predicates N ( r , s ) : ⇔ for some term t , r → · · · → t β -normal, and lnf ( t )= s A ( r , s ) : ⇔ r = xr 1 . . . r n and s = xs 1 . . . s n with N ( r i , s i ) for i = 1 , . . . , n r = ( λ x . t ) u � t and s = t x [ u ] � H ( r , s ) : ⇔ t F ( r , k ) : ⇔ every index of a variable free in r is < k Abbreviations: FN ( r ) := ∀ k . F ( r , k ) → ∃ s N ( r , s ) , FA ( r ) := ∀ k . F ( r , k ) → ∃ s A ( r , s ) .

Recommend


More recommend