proofs and computations
play

Proofs and Computations Helmut Schwichtenberg Mathematisches - PowerPoint PPT Presentation

Proofs and Computations Helmut Schwichtenberg Mathematisches Institut, LMU, M unchen 22. August 2010 Helmut Schwichtenberg Proofs and Computations Computing with partial continuous functionals Proofs in mathematics: on abstract,


  1. Proofs and Computations Helmut Schwichtenberg Mathematisches Institut, LMU, M¨ unchen 22. August 2010 Helmut Schwichtenberg Proofs and Computations

  2. Computing with partial continuous functionals ◮ Proofs in mathematics: on abstract, “higher type” objects. ◮ Therefore an analysis of computational aspects of such proofs must be based on a theory of computation in higher types. ◮ Such a theory has been provided by Scott (1970) and Ershov (1977). Basic concept: partial continuous functional F . ◮ Since F can be seen as a limit of its finite approximations U we get for free the notion of a computable functional: it is given by a recursive enumeration of finite approximations. ◮ The price to pay for this simplicity is that functionals are now partial, in stark contrast to the view of G¨ odel (1958). ◮ However, the total functionals can be defined as a dense subset of the partial ones, w.r.t. the Scott topology. Helmut Schwichtenberg Proofs and Computations

  3. TCF , a “theory of computable functionals” ◮ The partial continuous functionals are the intended range of its (typed) variables. ◮ Terms: T + , an extension of G¨ odel’s T and Plotkin’s PCF . ◮ (Co)inductively defined predicates (with param.); only → , ∀ . ◮ Eq ( r , s ) (Leibniz), ∃ , ∧ , ∨ inductively defined. F := Eq (ff , tt). ◮ Natural deduction style (rules → ± , ∀ ± ). F → A provable. Properties ◮ TCF can reflect on the computational content of proofs, along the lines of the Brouwer-Heyting-Kolmogorov interpretation. ◮ Main difference to Martin-L¨ of type theory (or Coq, Agda): Partial continuous functionals are first class citizens. Helmut Schwichtenberg Proofs and Computations

  4. Finitary algebras as non-flat Scott information systems ◮ An algebra ι is given by its constructors. ◮ Examples: 0 N , S N → N for N (unary natural numbers) , 1 P , S P → P , S P → P for P (Cantor algebra) , 0 1 0 D (axiom) and C D → D → D (rule) for D (derivations) . ◮ Examples of “tokens” ( ∗ : special symbol; no information): S n 0 ( n ≥ 0), S 2 ∗ (in N ) , S 0 S 1 S 0 S 0 1 , S 0 S 1 S 0 S 0 ∗ (in P ) , C ( C 0 ∗ )( C ∗ 0) (in D ) . ◮ A token is total if it contains no ∗ . ◮ In D : total token ∼ finite (well-founded) derivation. Helmut Schwichtenberg Proofs and Computations

  5. Finitary algebras: consistency, entailment, ideals By example. For D (derivations): ◮ { C 0 ∗ , C ∗ 0 } is “consistent”, written C 0 ∗ ↑ C ∗ 0. ◮ { C 0 ∗ , C ∗ 0 } ⊢ C 00 (“entails”). ◮ Ideals: consistent and “deductively closed” sets of tokens. Examples of ideals: ◮ { C 0 ∗ , C ∗∗} . ◮ { C 00 , C 0 ∗ , C ∗ 0 , C ∗∗} , and generally the deductive closure of a finite (well-founded) derivation. ◮ { C ∗∗ , C ( C ∗∗ ) ∗ , C ∗ ( C ∗∗ ) , C ( C ∗∗ )( C ∗∗ ) , . . . } (“cototal”). ◮ Locally correct, but possibly non well-founded derivations (Mints 1978). An ideal x is cototal if every constructor tree P ( ∗ ) ∈ x has a “predecessor” P ( C � ∗ ) ∈ x . Helmut Schwichtenberg Proofs and Computations

  6. Tokens and entailment for N ... • S ( S ( S 0)) ❅ � ❅ � ❅ � • • S ( S ( S ∗ )) S ( S 0) ❅ � ❅ � ❅ � • • S ( S ∗ ) S 0 ❅ � ❅ � ❅ � • • 0 S ∗ Helmut Schwichtenberg Proofs and Computations

  7. Why non-flat? ◮ Continuous maps f : | N | → | N | (see below) are monotone: x ⊆ y → fx ⊆ fy . ◮ Easy: every constructor gives rise to a continuous function. ◮ Want: constructors have disjoint ranges and are injective (cf. the Peano axioms S x � = 0 and S x = S y → x = y ). ◮ This holds for non-flat algebras, but not for flat ones: S ( S 0) 0 S 0 . . . • • • There constructors must be strict (i.e., C � x ∅ � y = ∅ ), hence S 1 ∅ = ∅ = S 2 ∅ , In P : In D : C ∅{ 0 } = ∅ = C { 0 }∅ . Helmut Schwichtenberg Proofs and Computations

  8. The Scott-Ershov model of partial continuous functionals ◮ Let A = ( A , Con A , ⊢ A ), B = ( B , Con B , ⊢ B ) be information systems (Scott). Function space: A → B := ( C , Con , ⊢ ), with C := Con A × B , � { ( U i , b i ) } i ∈ I ∈ Con := ∀ J ⊆ I ( U j ∈ Con A → { b j } j ∈ J ∈ Con B ) , j ∈ J { ( U i , b i ) } i ∈ I ⊢ ( U , b ) := ( { b i | U ⊢ A U i } ⊢ B b ) . ◮ Partial continuous functionals of type ρ : the ideals in C ρ . C ι := ( Tok ι , Con ι , ⊢ ι ) , C ρ → σ := C ρ → C σ . | C ρ | is defined to be the set of ideals in C ρ . ◮ f ∈ | C ρ | : limit of formal neighborhoods U ∈ Con ρ → σ . ◮ f ∈ | C ρ | computable: r.e. limit. Helmut Schwichtenberg Proofs and Computations

  9. A common extension T + of G¨ odel’s T and Plotkin’s PCF ◮ Terms of T + are built from (typed) variables and constants: M , N ::= x ρ | C ρ | D ρ | ( λ x ρ M σ ) ρ → σ | ( M ρ → σ N ρ ) σ . (constructors C or defined constants D , see below) ◮ Every defined constant D comes with a system of computation rules D � P i ( � y i ) = M i with FV ( M i ) ⊆ � y i . ◮ � P i ( � y i ): “constructor patterns”, i.e., lists of applicative terms built from constructors and distinct variables, with each constructor C occurring in a context C � P (of base type). We assume that � P i and � P j for i � = j are non-unifiable. Examples: ◮ Predecessor P : N → N , defined by P 0 = 0, P ( S n ) = n , ◮ G¨ odel’s primitive recursion operators R τ N : N → τ → ( N → τ → τ ) → τ with computation rules R 0 fg = f , R ( S n ) fg = gn ( R nfg ), and ◮ the least-fixed-point operators Y ρ of type ( ρ → ρ ) → ρ defined by the computation rule Y ρ f = f ( Y ρ f ). Helmut Schwichtenberg Proofs and Computations

  10. Corecursion operators Recall R τ N : N → τ → ( N → τ → τ ) → τ with computation rules R 0 fg = f , R ( S n ) fg = gn ( R nfg ). Corecursion operators: co R τ N : τ → ( τ → U + ( N + τ )) → N , co R τ P : τ → ( τ → U + ( P + τ ) + ( P + τ )) → P , co R τ D : τ → ( τ → U + ( D + τ ) × ( D + τ )) → D , Conversion: For f : ρ → τ and g : σ → τ we denote λ x ( R τ ρ + σ xfg ) of type ρ + σ → τ by [ f , g ]. co R τ N NM �→ [ λ 0 , λ x ( S ([ id N → N , λ y ( co R τ N yM )] x ))]( MN ) , co R τ P NM �→ [ λ 1 , λ x ( S 0 ([ id , P P ] x )) , λ x ( S 1 ([ id , P P ] x ))]( MN ) , co R τ D NM �→ [ λ 0 , λ x ( C ([ id , P D ] x 1 )([ id , P D ] x 2 ))]( MN ) . Helmut Schwichtenberg Proofs and Computations

  11. Denotational semantics For every closed term λ � x M of type � ρ → σ we inductively define a ρ → σ . set [ [ λ � x M ] ] of tokens of type � ( � ( � U i ⊢ b U , V , c ) ∈ [ [ λ � x M ] ] U , V ) ⊆ [ [ λ � x N ] ] ( V ) , ( A ) . ( � ( � U , b ) ∈ [ [ λ � x x i ] ] U , c ) ∈ [ [ λ � x ( MN )] ] For every constructor C and defined constant D : ( � U , � W ⊢ � � P ( � V ⊢ � � b ∗ V , b ) ∈ [ [ λ � y M ] ] V ) x ,� ( C ) , ( D ) , ( � U , � V , C � ( � U , � b ∗ ) ∈ [ [ λ � x C ] ] W , b ) ∈ [ [ λ � x D ] ] with one rule ( D ) for every computation rule D � P ( � y ) = M . Note: ( � U , b ) denotes ( U 1 , . . . ( U n , b ) . . . ) , ( � ] means ( � U , V ) ⊆ [ U , b ) ∈ [ ] for all b ∈ V . [ λ � x M ] [ λ � x M ] Helmut Schwichtenberg Proofs and Computations

  12. Denotational semantics (continued) Theorem ◮ For every term M, [ [ λ � x M ] ] is an ideal. ◮ If a term M converts to M ′ by βη -conversion or application of [ M ′ ] a computation rule, then [ [ M ] ] = [ ] . Let � � ] � � x := { b | ( � u U U U , b ) ∈ [ ] } . [ [ M ] x := [ [ M ] ] with [ [ M ] ] [ λ � x M ] � x � � � U ⊆ � u A consequence of ( A ) is continuity of application: ] � u ] � u c ∈ [ [ MN ] x ↔ ∃ V ⊆ [ x (( V , c ) ∈ [ [ M ] x ) . ] � u � [ N ] � � Helmut Schwichtenberg Proofs and Computations

  13. Inductive and coinductive definitions ◮ Computational content of Ir , with I inductively defined: what was needed to put r into I . ◮ Example: Even is inductively defined by the clauses Even (0) , ∀ n ( Even ( n ) → Even ( S ( S n ))) . A generation tree for Even (6) consists of a single branch with nodes Even (0), Even (2), Even (4) and Even (6). ◮ Computational content of Jr , with J coinductively defined: how to continue after putting r into J . ◮ Example: St (“ t is a stream”) is coinductively defined by the clause St → t = nil ∨ St 0 ∨ St 1 . Helmut Schwichtenberg Proofs and Computations

  14. An abstract theory of sets of nodes Nodes a , b , c are total ideals in P , viewed as lists of 0 , 1. Let t be a variable of an unspecified type α (“set of nodes”). Language: ◮ a relation of arity ( P , α ), written a ∈ t , ◮ a function of type α → P → α , written t a (“ t ’s subtree at a ”) ◮ a function of type P → α → α , written at (“ a plus t ”). Define Tree ( t ) := ∀ a ∈ t ∀ n ≤| a | an ∈ t “ t is upward closed” , Inf ( t ) := ∀ n ∃ a ∈ t | a | = n “ t is infinite” , UEU ( t ) := ∀ n ∃ m ≥ n ∀ a , b ∈ t ( | a | = | b | = m → an = bn ) “ t satisfies the uniform effective uniqueness condition” , C t a := ∃ n ≥| a | ∀ b ∈ t ( | b | = n → b | a | = a ) “ a covers the paths in t ” . Helmut Schwichtenberg Proofs and Computations

Recommend


More recommend