computational content of proofs involving coinduction
play

Computational content of proofs involving coinduction Helmut - PowerPoint PPT Presentation

Computational content of proofs involving coinduction Helmut Schwichtenberg (j.w.w. Kenji Miyamoto and Fredrik Nordvall Forsberg) Mathematisches Institut, LMU, M unchen Advances in Proof Theory, Universit at Bern, 13.-14. Dezember 2013


  1. Total and cototal ideals of base type An ideal x ι is cototal if every constructor tree P ( ∗ ) ∈ x has a “ ≻ 1 -predecessor” P ( C � ∗ ) ∈ x ; it is total if it is cototal and the relation ≻ 1 on x is well-founded. Examples. N : ◮ Every total ideal is the deductive closure of a token S ( S . . . ( S 0) . . . ). The set of all tokens S ( S . . . ( S ∗ ) . . . ) is a cototal ideal. D (derivations): ◮ Total ideal ∼ finite derivation. ◮ Cototal ideal ∼ finite or infinite “locally correct” derivation [Mints 78]. ◮ Arbitrary ideal ∼ incomplete derivation, with “holes”. 5 / 26

  2. Total and cototal ideals of base type An ideal x ι is cototal if every constructor tree P ( ∗ ) ∈ x has a “ ≻ 1 -predecessor” P ( C � ∗ ) ∈ x ; it is total if it is cototal and the relation ≻ 1 on x is well-founded. Examples. N : ◮ Every total ideal is the deductive closure of a token S ( S . . . ( S 0) . . . ). The set of all tokens S ( S . . . ( S ∗ ) . . . ) is a cototal ideal. D (derivations): ◮ Total ideal ∼ finite derivation. ◮ Cototal ideal ∼ finite or infinite “locally correct” derivation [Mints 78]. ◮ Arbitrary ideal ∼ incomplete derivation, with “holes”. 5 / 26

  3. Total and cototal ideals of base type An ideal x ι is cototal if every constructor tree P ( ∗ ) ∈ x has a “ ≻ 1 -predecessor” P ( C � ∗ ) ∈ x ; it is total if it is cototal and the relation ≻ 1 on x is well-founded. Examples. N : ◮ Every total ideal is the deductive closure of a token S ( S . . . ( S 0) . . . ). The set of all tokens S ( S . . . ( S ∗ ) . . . ) is a cototal ideal. D (derivations): ◮ Total ideal ∼ finite derivation. ◮ Cototal ideal ∼ finite or infinite “locally correct” derivation [Mints 78]. ◮ Arbitrary ideal ∼ incomplete derivation, with “holes”. 5 / 26

  4. Total and cototal ideals of base type An ideal x ι is cototal if every constructor tree P ( ∗ ) ∈ x has a “ ≻ 1 -predecessor” P ( C � ∗ ) ∈ x ; it is total if it is cototal and the relation ≻ 1 on x is well-founded. Examples. N : ◮ Every total ideal is the deductive closure of a token S ( S . . . ( S 0) . . . ). The set of all tokens S ( S . . . ( S ∗ ) . . . ) is a cototal ideal. D (derivations): ◮ Total ideal ∼ finite derivation. ◮ Cototal ideal ∼ finite or infinite “locally correct” derivation [Mints 78]. ◮ Arbitrary ideal ∼ incomplete derivation, with “holes”. 5 / 26

  5. Tokens, consistency and entailment at function types Ideals: partial continuous functionals f ρ → σ (Scott, Ershov). ◮ Tokens of type ρ → σ are pairs ( U , a ) with U ∈ Con ρ . ◮ { ( U i , a i ) | i ∈ I } ∈ Con ρ → σ means ∀ J ⊆ I ( � j ∈ J U j ∈ Con ρ → { a j | j ∈ J } ∈ Con σ ) . “Formal neighborhood”. ◮ W ⊢ ρ → σ ( U , a ) means WU ⊢ σ a , where application WU of W = { ( U i , a i ) | i ∈ I } to U is { a i | U ⊢ ρ U i } . Application of f ρ → σ to x ρ is f ( x ) := { a σ | ∃ U ⊆ x ( U , a ) ∈ f } . Principles of finite support and monotonicity hold. 6 / 26

  6. Tokens, consistency and entailment at function types Ideals: partial continuous functionals f ρ → σ (Scott, Ershov). ◮ Tokens of type ρ → σ are pairs ( U , a ) with U ∈ Con ρ . ◮ { ( U i , a i ) | i ∈ I } ∈ Con ρ → σ means ∀ J ⊆ I ( � j ∈ J U j ∈ Con ρ → { a j | j ∈ J } ∈ Con σ ) . “Formal neighborhood”. ◮ W ⊢ ρ → σ ( U , a ) means WU ⊢ σ a , where application WU of W = { ( U i , a i ) | i ∈ I } to U is { a i | U ⊢ ρ U i } . Application of f ρ → σ to x ρ is f ( x ) := { a σ | ∃ U ⊆ x ( U , a ) ∈ f } . Principles of finite support and monotonicity hold. 6 / 26

  7. Tokens, consistency and entailment at function types Ideals: partial continuous functionals f ρ → σ (Scott, Ershov). ◮ Tokens of type ρ → σ are pairs ( U , a ) with U ∈ Con ρ . ◮ { ( U i , a i ) | i ∈ I } ∈ Con ρ → σ means ∀ J ⊆ I ( � j ∈ J U j ∈ Con ρ → { a j | j ∈ J } ∈ Con σ ) . “Formal neighborhood”. ◮ W ⊢ ρ → σ ( U , a ) means WU ⊢ σ a , where application WU of W = { ( U i , a i ) | i ∈ I } to U is { a i | U ⊢ ρ U i } . Application of f ρ → σ to x ρ is f ( x ) := { a σ | ∃ U ⊆ x ( U , a ) ∈ f } . Principles of finite support and monotonicity hold. 6 / 26

  8. Tokens, consistency and entailment at function types Ideals: partial continuous functionals f ρ → σ (Scott, Ershov). ◮ Tokens of type ρ → σ are pairs ( U , a ) with U ∈ Con ρ . ◮ { ( U i , a i ) | i ∈ I } ∈ Con ρ → σ means ∀ J ⊆ I ( � j ∈ J U j ∈ Con ρ → { a j | j ∈ J } ∈ Con σ ) . “Formal neighborhood”. ◮ W ⊢ ρ → σ ( U , a ) means WU ⊢ σ a , where application WU of W = { ( U i , a i ) | i ∈ I } to U is { a i | U ⊢ ρ U i } . Application of f ρ → σ to x ρ is f ( x ) := { a σ | ∃ U ⊆ x ( U , a ) ∈ f } . Principles of finite support and monotonicity hold. 6 / 26

  9. Tokens, consistency and entailment at function types Ideals: partial continuous functionals f ρ → σ (Scott, Ershov). ◮ Tokens of type ρ → σ are pairs ( U , a ) with U ∈ Con ρ . ◮ { ( U i , a i ) | i ∈ I } ∈ Con ρ → σ means ∀ J ⊆ I ( � j ∈ J U j ∈ Con ρ → { a j | j ∈ J } ∈ Con σ ) . “Formal neighborhood”. ◮ W ⊢ ρ → σ ( U , a ) means WU ⊢ σ a , where application WU of W = { ( U i , a i ) | i ∈ I } to U is { a i | U ⊢ ρ U i } . Application of f ρ → σ to x ρ is f ( x ) := { a σ | ∃ U ⊆ x ( U , a ) ∈ f } . Principles of finite support and monotonicity hold. 6 / 26

  10. Tokens, consistency and entailment at function types Ideals: partial continuous functionals f ρ → σ (Scott, Ershov). ◮ Tokens of type ρ → σ are pairs ( U , a ) with U ∈ Con ρ . ◮ { ( U i , a i ) | i ∈ I } ∈ Con ρ → σ means ∀ J ⊆ I ( � j ∈ J U j ∈ Con ρ → { a j | j ∈ J } ∈ Con σ ) . “Formal neighborhood”. ◮ W ⊢ ρ → σ ( U , a ) means WU ⊢ σ a , where application WU of W = { ( U i , a i ) | i ∈ I } to U is { a i | U ⊢ ρ U i } . Application of f ρ → σ to x ρ is f ( x ) := { a σ | ∃ U ⊆ x ( U , a ) ∈ f } . Principles of finite support and monotonicity hold. 6 / 26

  11. Tokens, consistency and entailment at function types Ideals: partial continuous functionals f ρ → σ (Scott, Ershov). ◮ Tokens of type ρ → σ are pairs ( U , a ) with U ∈ Con ρ . ◮ { ( U i , a i ) | i ∈ I } ∈ Con ρ → σ means ∀ J ⊆ I ( � j ∈ J U j ∈ Con ρ → { a j | j ∈ J } ∈ Con σ ) . “Formal neighborhood”. ◮ W ⊢ ρ → σ ( U , a ) means WU ⊢ σ a , where application WU of W = { ( U i , a i ) | i ∈ I } to U is { a i | U ⊢ ρ U i } . Application of f ρ → σ to x ρ is f ( x ) := { a σ | ∃ U ⊆ x ( U , a ) ∈ f } . Principles of finite support and monotonicity hold. 6 / 26

  12. Computable functionals A partial continuous functional f ρ is computable if it is a (primitive) recursively enumerable set of tokens. How to define computable functionals? By computation rules D � P i ( � y i ) = M i ( i = 1 , . . . , n ) with free variables of � y i , where � P i ( � y i ) and M i among � P i ( � y i ) are “constructor patterns”. Terms (a common extension of G¨ odel’s T and Plotkin’s PCF ) M , N ::= x ρ | C ρ | D ρ | ( λ x ρ M σ ) ρ → σ | ( M ρ → σ N ρ ) σ . 7 / 26

  13. Computable functionals A partial continuous functional f ρ is computable if it is a (primitive) recursively enumerable set of tokens. How to define computable functionals? By computation rules D � P i ( � y i ) = M i ( i = 1 , . . . , n ) with free variables of � y i , where � P i ( � y i ) and M i among � P i ( � y i ) are “constructor patterns”. Terms (a common extension of G¨ odel’s T and Plotkin’s PCF ) M , N ::= x ρ | C ρ | D ρ | ( λ x ρ M σ ) ρ → σ | ( M ρ → σ N ρ ) σ . 7 / 26

  14. Computable functionals A partial continuous functional f ρ is computable if it is a (primitive) recursively enumerable set of tokens. How to define computable functionals? By computation rules D � P i ( � y i ) = M i ( i = 1 , . . . , n ) with free variables of � y i , where � P i ( � y i ) and M i among � P i ( � y i ) are “constructor patterns”. Terms (a common extension of G¨ odel’s T and Plotkin’s PCF ) M , N ::= x ρ | C ρ | D ρ | ( λ x ρ M σ ) ρ → σ | ( M ρ → σ N ρ ) σ . 7 / 26

  15. Computable functionals A partial continuous functional f ρ is computable if it is a (primitive) recursively enumerable set of tokens. How to define computable functionals? By computation rules D � P i ( � y i ) = M i ( i = 1 , . . . , n ) with free variables of � y i , where � P i ( � y i ) and M i among � P i ( � y i ) are “constructor patterns”. Terms (a common extension of G¨ odel’s T and Plotkin’s PCF ) M , N ::= x ρ | C ρ | D ρ | ( λ x ρ M σ ) ρ → σ | ( M ρ → σ N ρ ) σ . 7 / 26

  16. Computable functionals A partial continuous functional f ρ is computable if it is a (primitive) recursively enumerable set of tokens. How to define computable functionals? By computation rules D � P i ( � y i ) = M i ( i = 1 , . . . , n ) with free variables of � y i , where � P i ( � y i ) and M i among � P i ( � y i ) are “constructor patterns”. Terms (a common extension of G¨ odel’s T and Plotkin’s PCF ) M , N ::= x ρ | C ρ | D ρ | ( λ x ρ M σ ) ρ → σ | ( M ρ → σ N ρ ) σ . 7 / 26

  17. Examples +: N → N → N defined by n + 0 = n , n + S m = S ( n + m ) . Y : ( τ → τ ) → τ defined by Yf = f ( Yf ) . R τ N : N → τ → ( N → τ → τ ) → τ defined by R τ N 0 xf = x , R τ N ( S n ) xf = fx ( R τ N nxf ) . Reduction (including β , η ) is non-terminating, but confluent. 8 / 26

  18. Examples +: N → N → N defined by n + 0 = n , n + S m = S ( n + m ) . Y : ( τ → τ ) → τ defined by Yf = f ( Yf ) . R τ N : N → τ → ( N → τ → τ ) → τ defined by R τ N 0 xf = x , R τ N ( S n ) xf = fx ( R τ N nxf ) . Reduction (including β , η ) is non-terminating, but confluent. 8 / 26

  19. Examples +: N → N → N defined by n + 0 = n , n + S m = S ( n + m ) . Y : ( τ → τ ) → τ defined by Yf = f ( Yf ) . R τ N : N → τ → ( N → τ → τ ) → τ defined by R τ N 0 xf = x , R τ N ( S n ) xf = fx ( R τ N nxf ) . Reduction (including β , η ) is non-terminating, but confluent. 8 / 26

  20. Examples +: N → N → N defined by n + 0 = n , n + S m = S ( n + m ) . Y : ( τ → τ ) → τ defined by Yf = f ( Yf ) . R τ N : N → τ → ( N → τ → τ ) → τ defined by R τ N 0 xf = x , R τ N ( S n ) xf = fx ( R τ N nxf ) . Reduction (including β , η ) is non-terminating, but confluent. 8 / 26

  21. Denotational semantics How to use computation rules to define a computable functional? Inductively define ( � U , a ) ∈ [ [ λ � x M ] ] ( FV ( M ) ⊆ { � x } ). Case λ � z M with � x free in M , but not y . x , y ,� ( � U , � W , a ) ∈ [ [ λ � z M ] ] x ,� ( K ) . ( � U , V , � W , a ) ∈ [ [ λ � z M ] ] x , y ,� x M with � x the free variables in M . Case λ � ( � ( � U ⊢ a U , V , a ) ∈ [ [ λ � x M ] ] U , V ) ⊆ [ [ λ � x N ] ] ]( V ) , ( A ) . ( U , a ) ∈ [ [ λ x x ] ( � U , a ) ∈ [ [ λ � x ( MN )] ] For every constructor C and defined constant D : � ( � � U ⊢ � P ( � U ⊢ � a ∗ V , a ) ∈ [ [ λ � x M ] ] V ) ( C ) , ( D ) , ( � ( � U , C � a ∗ ) ∈ [ [ C ] ] U , a ) ∈ [ [ D ] ] with one rule ( D ) for every defining equation D � P ( � x ) = M . 9 / 26

  22. Denotational semantics How to use computation rules to define a computable functional? Inductively define ( � U , a ) ∈ [ [ λ � x M ] ] ( FV ( M ) ⊆ { � x } ). Case λ � z M with � x free in M , but not y . x , y ,� ( � U , � W , a ) ∈ [ [ λ � z M ] ] x ,� ( K ) . ( � U , V , � W , a ) ∈ [ [ λ � z M ] ] x , y ,� x M with � x the free variables in M . Case λ � ( � ( � U ⊢ a U , V , a ) ∈ [ [ λ � x M ] ] U , V ) ⊆ [ [ λ � x N ] ] ]( V ) , ( A ) . ( U , a ) ∈ [ [ λ x x ] ( � U , a ) ∈ [ [ λ � x ( MN )] ] For every constructor C and defined constant D : � ( � � U ⊢ � P ( � U ⊢ � a ∗ V , a ) ∈ [ [ λ � x M ] ] V ) ( C ) , ( D ) , ( � ( � U , C � a ∗ ) ∈ [ [ C ] ] U , a ) ∈ [ [ D ] ] with one rule ( D ) for every defining equation D � P ( � x ) = M . 9 / 26

  23. Denotational semantics How to use computation rules to define a computable functional? Inductively define ( � U , a ) ∈ [ [ λ � x M ] ] ( FV ( M ) ⊆ { � x } ). Case λ � z M with � x free in M , but not y . x , y ,� ( � U , � W , a ) ∈ [ [ λ � z M ] ] x ,� ( K ) . ( � U , V , � W , a ) ∈ [ [ λ � z M ] ] x , y ,� x M with � x the free variables in M . Case λ � ( � ( � U ⊢ a U , V , a ) ∈ [ [ λ � x M ] ] U , V ) ⊆ [ [ λ � x N ] ] ]( V ) , ( A ) . ( U , a ) ∈ [ [ λ x x ] ( � U , a ) ∈ [ [ λ � x ( MN )] ] For every constructor C and defined constant D : � ( � � U ⊢ � P ( � U ⊢ � a ∗ V , a ) ∈ [ [ λ � x M ] ] V ) ( C ) , ( D ) , ( � ( � U , C � a ∗ ) ∈ [ [ C ] ] U , a ) ∈ [ [ D ] ] with one rule ( D ) for every defining equation D � P ( � x ) = M . 9 / 26

  24. Denotational semantics How to use computation rules to define a computable functional? Inductively define ( � U , a ) ∈ [ [ λ � x M ] ] ( FV ( M ) ⊆ { � x } ). Case λ � z M with � x free in M , but not y . x , y ,� ( � U , � W , a ) ∈ [ [ λ � z M ] ] x ,� ( K ) . ( � U , V , � W , a ) ∈ [ [ λ � z M ] ] x , y ,� x M with � x the free variables in M . Case λ � ( � ( � U ⊢ a U , V , a ) ∈ [ [ λ � x M ] ] U , V ) ⊆ [ [ λ � x N ] ] ]( V ) , ( A ) . ( U , a ) ∈ [ [ λ x x ] ( � U , a ) ∈ [ [ λ � x ( MN )] ] For every constructor C and defined constant D : � ( � � U ⊢ � P ( � U ⊢ � a ∗ V , a ) ∈ [ [ λ � x M ] ] V ) ( C ) , ( D ) , ( � ( � U , C � a ∗ ) ∈ [ [ C ] ] U , a ) ∈ [ [ D ] ] with one rule ( D ) for every defining equation D � P ( � x ) = M . 9 / 26

  25. Denotational semantics How to use computation rules to define a computable functional? Inductively define ( � U , a ) ∈ [ [ λ � x M ] ] ( FV ( M ) ⊆ { � x } ). Case λ � z M with � x free in M , but not y . x , y ,� ( � U , � W , a ) ∈ [ [ λ � z M ] ] x ,� ( K ) . ( � U , V , � W , a ) ∈ [ [ λ � z M ] ] x , y ,� x M with � x the free variables in M . Case λ � ( � ( � U ⊢ a U , V , a ) ∈ [ [ λ � x M ] ] U , V ) ⊆ [ [ λ � x N ] ] ]( V ) , ( A ) . ( U , a ) ∈ [ [ λ x x ] ( � U , a ) ∈ [ [ λ � x ( MN )] ] For every constructor C and defined constant D : � ( � � U ⊢ � P ( � U ⊢ � a ∗ V , a ) ∈ [ [ λ � x M ] ] V ) ( C ) , ( D ) , ( � ( � U , C � a ∗ ) ∈ [ [ C ] ] U , a ) ∈ [ [ D ] ] with one rule ( D ) for every defining equation D � P ( � x ) = M . 9 / 26

  26. Denotational semantics How to use computation rules to define a computable functional? Inductively define ( � U , a ) ∈ [ [ λ � x M ] ] ( FV ( M ) ⊆ { � x } ). Case λ � z M with � x free in M , but not y . x , y ,� ( � U , � W , a ) ∈ [ [ λ � z M ] ] x ,� ( K ) . ( � U , V , � W , a ) ∈ [ [ λ � z M ] ] x , y ,� x M with � x the free variables in M . Case λ � ( � ( � U ⊢ a U , V , a ) ∈ [ [ λ � x M ] ] U , V ) ⊆ [ [ λ � x N ] ] ]( V ) , ( A ) . ( U , a ) ∈ [ [ λ x x ] ( � U , a ) ∈ [ [ λ � x ( MN )] ] For every constructor C and defined constant D : � ( � � U ⊢ � P ( � U ⊢ � a ∗ V , a ) ∈ [ [ λ � x M ] ] V ) ( C ) , ( D ) , ( � ( � U , C � a ∗ ) ∈ [ [ C ] ] U , a ) ∈ [ [ D ] ] with one rule ( D ) for every defining equation D � P ( � x ) = M . 9 / 26

  27. Properties of the denotational semantics ◮ The value is preserved under standard β, η -conversion and the computation rules. ◮ An adequacy theorem holds: whenever a closed term M ι has a proper token in its denotation [ [ M ] ], then M (head) reduces to a constructor term entailing this token. 10 / 26

  28. Properties of the denotational semantics ◮ The value is preserved under standard β, η -conversion and the computation rules. ◮ An adequacy theorem holds: whenever a closed term M ι has a proper token in its denotation [ [ M ] ], then M (head) reduces to a constructor term entailing this token. 10 / 26

  29. Properties of the denotational semantics ◮ The value is preserved under standard β, η -conversion and the computation rules. ◮ An adequacy theorem holds: whenever a closed term M ι has a proper token in its denotation [ [ M ] ], then M (head) reduces to a constructor term entailing this token. 10 / 26

  30. A theory of computable functionals ( TCF ) A variant of HA ω . Formulas A and predicates P are defined simultaneously A , B ::= P � r | A → B | ∀ x A P ::= X | { � x | A } | I ( I inductively defined) . ∀ X A not allowed, since this would be impredicative: in the predicate existence axiom P := { � x | A } the formula A could contain quantifiers with the newly created P in its range. ∀ x ρ A is unproblematic: no such existence axioms. 11 / 26

  31. A theory of computable functionals ( TCF ) A variant of HA ω . Formulas A and predicates P are defined simultaneously A , B ::= P � r | A → B | ∀ x A P ::= X | { � x | A } | I ( I inductively defined) . ∀ X A not allowed, since this would be impredicative: in the predicate existence axiom P := { � x | A } the formula A could contain quantifiers with the newly created P in its range. ∀ x ρ A is unproblematic: no such existence axioms. 11 / 26

  32. A theory of computable functionals ( TCF ) A variant of HA ω . Formulas A and predicates P are defined simultaneously A , B ::= P � r | A → B | ∀ x A P ::= X | { � x | A } | I ( I inductively defined) . ∀ X A not allowed, since this would be impredicative: in the predicate existence axiom P := { � x | A } the formula A could contain quantifiers with the newly created P in its range. ∀ x ρ A is unproblematic: no such existence axioms. 11 / 26

  33. A theory of computable functionals ( TCF ) A variant of HA ω . Formulas A and predicates P are defined simultaneously A , B ::= P � r | A → B | ∀ x A P ::= X | { � x | A } | I ( I inductively defined) . ∀ X A not allowed, since this would be impredicative: in the predicate existence axiom P := { � x | A } the formula A could contain quantifiers with the newly created P in its range. ∀ x ρ A is unproblematic: no such existence axioms. 11 / 26

  34. A theory of computable functionals ( TCF ) A variant of HA ω . Formulas A and predicates P are defined simultaneously A , B ::= P � r | A → B | ∀ x A P ::= X | { � x | A } | I ( I inductively defined) . ∀ X A not allowed, since this would be impredicative: in the predicate existence axiom P := { � x | A } the formula A could contain quantifiers with the newly created P in its range. ∀ x ρ A is unproblematic: no such existence axioms. 11 / 26

  35. Brouwer - Heyting - Kolmogorov Have → ± , ∀ ± , I ± . BHK-interpretation: ◮ p proves A → B iff p is a construction transforming any proof q of A into a proof p ( q ) of B . ◮ p proves ∀ x ρ A ( x ) iff p is a construction such that for all a ρ , p ( a ) proves A ( a ). Leaves open: ◮ What is a “construction”? ◮ What is a proof of a prime formula? Proposal: ◮ Construction: computable functional. ◮ Proof of a prime formula I � r : generation tree. Example: generation tree for Even (6) should consist of a single branch with nodes Even (0), Even (2), Even (4) and Even (6). 12 / 26

  36. Brouwer - Heyting - Kolmogorov Have → ± , ∀ ± , I ± . BHK-interpretation: ◮ p proves A → B iff p is a construction transforming any proof q of A into a proof p ( q ) of B . ◮ p proves ∀ x ρ A ( x ) iff p is a construction such that for all a ρ , p ( a ) proves A ( a ). Leaves open: ◮ What is a “construction”? ◮ What is a proof of a prime formula? Proposal: ◮ Construction: computable functional. ◮ Proof of a prime formula I � r : generation tree. Example: generation tree for Even (6) should consist of a single branch with nodes Even (0), Even (2), Even (4) and Even (6). 12 / 26

  37. Brouwer - Heyting - Kolmogorov Have → ± , ∀ ± , I ± . BHK-interpretation: ◮ p proves A → B iff p is a construction transforming any proof q of A into a proof p ( q ) of B . ◮ p proves ∀ x ρ A ( x ) iff p is a construction such that for all a ρ , p ( a ) proves A ( a ). Leaves open: ◮ What is a “construction”? ◮ What is a proof of a prime formula? Proposal: ◮ Construction: computable functional. ◮ Proof of a prime formula I � r : generation tree. Example: generation tree for Even (6) should consist of a single branch with nodes Even (0), Even (2), Even (4) and Even (6). 12 / 26

  38. Brouwer - Heyting - Kolmogorov Have → ± , ∀ ± , I ± . BHK-interpretation: ◮ p proves A → B iff p is a construction transforming any proof q of A into a proof p ( q ) of B . ◮ p proves ∀ x ρ A ( x ) iff p is a construction such that for all a ρ , p ( a ) proves A ( a ). Leaves open: ◮ What is a “construction”? ◮ What is a proof of a prime formula? Proposal: ◮ Construction: computable functional. ◮ Proof of a prime formula I � r : generation tree. Example: generation tree for Even (6) should consist of a single branch with nodes Even (0), Even (2), Even (4) and Even (6). 12 / 26

  39. Brouwer - Heyting - Kolmogorov Have → ± , ∀ ± , I ± . BHK-interpretation: ◮ p proves A → B iff p is a construction transforming any proof q of A into a proof p ( q ) of B . ◮ p proves ∀ x ρ A ( x ) iff p is a construction such that for all a ρ , p ( a ) proves A ( a ). Leaves open: ◮ What is a “construction”? ◮ What is a proof of a prime formula? Proposal: ◮ Construction: computable functional. ◮ Proof of a prime formula I � r : generation tree. Example: generation tree for Even (6) should consist of a single branch with nodes Even (0), Even (2), Even (4) and Even (6). 12 / 26

  40. Brouwer - Heyting - Kolmogorov Have → ± , ∀ ± , I ± . BHK-interpretation: ◮ p proves A → B iff p is a construction transforming any proof q of A into a proof p ( q ) of B . ◮ p proves ∀ x ρ A ( x ) iff p is a construction such that for all a ρ , p ( a ) proves A ( a ). Leaves open: ◮ What is a “construction”? ◮ What is a proof of a prime formula? Proposal: ◮ Construction: computable functional. ◮ Proof of a prime formula I � r : generation tree. Example: generation tree for Even (6) should consist of a single branch with nodes Even (0), Even (2), Even (4) and Even (6). 12 / 26

  41. Brouwer - Heyting - Kolmogorov Have → ± , ∀ ± , I ± . BHK-interpretation: ◮ p proves A → B iff p is a construction transforming any proof q of A into a proof p ( q ) of B . ◮ p proves ∀ x ρ A ( x ) iff p is a construction such that for all a ρ , p ( a ) proves A ( a ). Leaves open: ◮ What is a “construction”? ◮ What is a proof of a prime formula? Proposal: ◮ Construction: computable functional. ◮ Proof of a prime formula I � r : generation tree. Example: generation tree for Even (6) should consist of a single branch with nodes Even (0), Even (2), Even (4) and Even (6). 12 / 26

  42. The type τ ( A ) of a formula A Distinguish non-computational (n.c.) (or Harrop) and computationally relevant (c.r.) formulas. Example: ◮ r = s is n.c. ◮ Even ( n ) is c.r. Extend the use of ρ → σ to the “nulltype symbol” ◦ : ( ρ → ◦ ) := ◦ , ( ◦ → σ ) := σ, ( ◦ → ◦ ) := ◦ . Define the type τ ( A ) of a formula A by � if I is c.r. , ι I τ ( I � r ) = ◦ if I is n.c. , τ ( A → B ) := τ ( A ) → τ ( B ) , τ ( ∀ x ρ A ) := ρ → τ ( A ) with ι I associated naturally with I . 13 / 26

  43. The type τ ( A ) of a formula A Distinguish non-computational (n.c.) (or Harrop) and computationally relevant (c.r.) formulas. Example: ◮ r = s is n.c. ◮ Even ( n ) is c.r. Extend the use of ρ → σ to the “nulltype symbol” ◦ : ( ρ → ◦ ) := ◦ , ( ◦ → σ ) := σ, ( ◦ → ◦ ) := ◦ . Define the type τ ( A ) of a formula A by � if I is c.r. , ι I τ ( I � r ) = ◦ if I is n.c. , τ ( A → B ) := τ ( A ) → τ ( B ) , τ ( ∀ x ρ A ) := ρ → τ ( A ) with ι I associated naturally with I . 13 / 26

  44. The type τ ( A ) of a formula A Distinguish non-computational (n.c.) (or Harrop) and computationally relevant (c.r.) formulas. Example: ◮ r = s is n.c. ◮ Even ( n ) is c.r. Extend the use of ρ → σ to the “nulltype symbol” ◦ : ( ρ → ◦ ) := ◦ , ( ◦ → σ ) := σ, ( ◦ → ◦ ) := ◦ . Define the type τ ( A ) of a formula A by � if I is c.r. , ι I τ ( I � r ) = ◦ if I is n.c. , τ ( A → B ) := τ ( A ) → τ ( B ) , τ ( ∀ x ρ A ) := ρ → τ ( A ) with ι I associated naturally with I . 13 / 26

  45. The type τ ( A ) of a formula A Distinguish non-computational (n.c.) (or Harrop) and computationally relevant (c.r.) formulas. Example: ◮ r = s is n.c. ◮ Even ( n ) is c.r. Extend the use of ρ → σ to the “nulltype symbol” ◦ : ( ρ → ◦ ) := ◦ , ( ◦ → σ ) := σ, ( ◦ → ◦ ) := ◦ . Define the type τ ( A ) of a formula A by � if I is c.r. , ι I τ ( I � r ) = ◦ if I is n.c. , τ ( A → B ) := τ ( A ) → τ ( B ) , τ ( ∀ x ρ A ) := ρ → τ ( A ) with ι I associated naturally with I . 13 / 26

  46. The type τ ( A ) of a formula A Distinguish non-computational (n.c.) (or Harrop) and computationally relevant (c.r.) formulas. Example: ◮ r = s is n.c. ◮ Even ( n ) is c.r. Extend the use of ρ → σ to the “nulltype symbol” ◦ : ( ρ → ◦ ) := ◦ , ( ◦ → σ ) := σ, ( ◦ → ◦ ) := ◦ . Define the type τ ( A ) of a formula A by � if I is c.r. , ι I τ ( I � r ) = ◦ if I is n.c. , τ ( A → B ) := τ ( A ) → τ ( B ) , τ ( ∀ x ρ A ) := ρ → τ ( A ) with ι I associated naturally with I . 13 / 26

  47. Realizability Introduce a special nullterm symbol ε to be used as a “realizer” for n.c. formulas. Extend term application to ε by ε t := ε, t ε := t , εε := ε. Definition ( t r A , t realizes A ) Let A be a formula and t either a term of type τ ( A ) if the latter is a type, or the nullterm symbol ε for n.c. A . � if I is c.r. ( I r inductively defined) , I r t � s t r I � s := I � s if I is n.c. , t r ( A → B ) := ∀ x ( x r A → tx r B ) , t r ∀ x A := ∀ x ( tx r A ) . 14 / 26

  48. Realizability Introduce a special nullterm symbol ε to be used as a “realizer” for n.c. formulas. Extend term application to ε by ε t := ε, t ε := t , εε := ε. Definition ( t r A , t realizes A ) Let A be a formula and t either a term of type τ ( A ) if the latter is a type, or the nullterm symbol ε for n.c. A . � if I is c.r. ( I r inductively defined) , I r t � s t r I � s := I � s if I is n.c. , t r ( A → B ) := ∀ x ( x r A → tx r B ) , t r ∀ x A := ∀ x ( tx r A ) . 14 / 26

  49. Realizability Introduce a special nullterm symbol ε to be used as a “realizer” for n.c. formulas. Extend term application to ε by ε t := ε, t ε := t , εε := ε. Definition ( t r A , t realizes A ) Let A be a formula and t either a term of type τ ( A ) if the latter is a type, or the nullterm symbol ε for n.c. A . � if I is c.r. ( I r inductively defined) , I r t � s t r I � s := I � s if I is n.c. , t r ( A → B ) := ∀ x ( x r A → tx r B ) , t r ∀ x A := ∀ x ( tx r A ) . 14 / 26

  50. Realizability Introduce a special nullterm symbol ε to be used as a “realizer” for n.c. formulas. Extend term application to ε by ε t := ε, t ε := t , εε := ε. Definition ( t r A , t realizes A ) Let A be a formula and t either a term of type τ ( A ) if the latter is a type, or the nullterm symbol ε for n.c. A . � if I is c.r. ( I r inductively defined) , I r t � s t r I � s := I � s if I is n.c. , t r ( A → B ) := ∀ x ( x r A → tx r B ) , t r ∀ x A := ∀ x ( tx r A ) . 14 / 26

  51. Realizability Introduce a special nullterm symbol ε to be used as a “realizer” for n.c. formulas. Extend term application to ε by ε t := ε, t ε := t , εε := ε. Definition ( t r A , t realizes A ) Let A be a formula and t either a term of type τ ( A ) if the latter is a type, or the nullterm symbol ε for n.c. A . � if I is c.r. ( I r inductively defined) , I r t � s t r I � s := I � s if I is n.c. , t r ( A → B ) := ∀ x ( x r A → tx r B ) , t r ∀ x A := ∀ x ( tx r A ) . 14 / 26

  52. Extracted terms, soundness theorem For a derivation M of a formula A define its extracted term et ( M ), of type τ ( A ). For M A with A n.c. let et ( M A ) := ε . Else := x τ ( A ) ( x τ ( A ) et ( u A ) uniquely associated to u A ) , u u et (( λ u A M B ) A → B ) := λ x τ ( A ) et ( M ) , u et (( M A → B N A ) B ) := et ( M ) et ( N ) , et (( λ x ρ M A ) ∀ x A ) := λ x ρ et ( M ) , et (( M ∀ x A ( x ) r ) A ( r ) ) := et ( M ) r . Extracted terms for the axioms: let I be c.r. et ( I + et ( I − ) := R , i ) := C i , where both the constructor C i and the recursion operator R refer to the algebra ι I associated with I . Soundness. Let M be a derivation of A from assumptions u i : C i . Then we can derive et ( M ) r A from assumptions x u i r C i . 15 / 26

  53. Extracted terms, soundness theorem For a derivation M of a formula A define its extracted term et ( M ), of type τ ( A ). For M A with A n.c. let et ( M A ) := ε . Else := x τ ( A ) ( x τ ( A ) et ( u A ) uniquely associated to u A ) , u u et (( λ u A M B ) A → B ) := λ x τ ( A ) et ( M ) , u et (( M A → B N A ) B ) := et ( M ) et ( N ) , et (( λ x ρ M A ) ∀ x A ) := λ x ρ et ( M ) , et (( M ∀ x A ( x ) r ) A ( r ) ) := et ( M ) r . Extracted terms for the axioms: let I be c.r. et ( I + et ( I − ) := R , i ) := C i , where both the constructor C i and the recursion operator R refer to the algebra ι I associated with I . Soundness. Let M be a derivation of A from assumptions u i : C i . Then we can derive et ( M ) r A from assumptions x u i r C i . 15 / 26

  54. Extracted terms, soundness theorem For a derivation M of a formula A define its extracted term et ( M ), of type τ ( A ). For M A with A n.c. let et ( M A ) := ε . Else := x τ ( A ) ( x τ ( A ) et ( u A ) uniquely associated to u A ) , u u et (( λ u A M B ) A → B ) := λ x τ ( A ) et ( M ) , u et (( M A → B N A ) B ) := et ( M ) et ( N ) , et (( λ x ρ M A ) ∀ x A ) := λ x ρ et ( M ) , et (( M ∀ x A ( x ) r ) A ( r ) ) := et ( M ) r . Extracted terms for the axioms: let I be c.r. et ( I + et ( I − ) := R , i ) := C i , where both the constructor C i and the recursion operator R refer to the algebra ι I associated with I . Soundness. Let M be a derivation of A from assumptions u i : C i . Then we can derive et ( M ) r A from assumptions x u i r C i . 15 / 26

  55. Extracted terms, soundness theorem For a derivation M of a formula A define its extracted term et ( M ), of type τ ( A ). For M A with A n.c. let et ( M A ) := ε . Else := x τ ( A ) ( x τ ( A ) et ( u A ) uniquely associated to u A ) , u u et (( λ u A M B ) A → B ) := λ x τ ( A ) et ( M ) , u et (( M A → B N A ) B ) := et ( M ) et ( N ) , et (( λ x ρ M A ) ∀ x A ) := λ x ρ et ( M ) , et (( M ∀ x A ( x ) r ) A ( r ) ) := et ( M ) r . Extracted terms for the axioms: let I be c.r. et ( I + et ( I − ) := R , i ) := C i , where both the constructor C i and the recursion operator R refer to the algebra ι I associated with I . Soundness. Let M be a derivation of A from assumptions u i : C i . Then we can derive et ( M ) r A from assumptions x u i r C i . 15 / 26

  56. Extracted terms, soundness theorem For a derivation M of a formula A define its extracted term et ( M ), of type τ ( A ). For M A with A n.c. let et ( M A ) := ε . Else := x τ ( A ) ( x τ ( A ) et ( u A ) uniquely associated to u A ) , u u et (( λ u A M B ) A → B ) := λ x τ ( A ) et ( M ) , u et (( M A → B N A ) B ) := et ( M ) et ( N ) , et (( λ x ρ M A ) ∀ x A ) := λ x ρ et ( M ) , et (( M ∀ x A ( x ) r ) A ( r ) ) := et ( M ) r . Extracted terms for the axioms: let I be c.r. et ( I + et ( I − ) := R , i ) := C i , where both the constructor C i and the recursion operator R refer to the algebra ι I associated with I . Soundness. Let M be a derivation of A from assumptions u i : C i . Then we can derive et ( M ) r A from assumptions x u i r C i . 15 / 26

  57. Extracted terms, soundness theorem For a derivation M of a formula A define its extracted term et ( M ), of type τ ( A ). For M A with A n.c. let et ( M A ) := ε . Else := x τ ( A ) ( x τ ( A ) et ( u A ) uniquely associated to u A ) , u u et (( λ u A M B ) A → B ) := λ x τ ( A ) et ( M ) , u et (( M A → B N A ) B ) := et ( M ) et ( N ) , et (( λ x ρ M A ) ∀ x A ) := λ x ρ et ( M ) , et (( M ∀ x A ( x ) r ) A ( r ) ) := et ( M ) r . Extracted terms for the axioms: let I be c.r. et ( I + et ( I − ) := R , i ) := C i , where both the constructor C i and the recursion operator R refer to the algebra ι I associated with I . Soundness. Let M be a derivation of A from assumptions u i : C i . Then we can derive et ( M ) r A from assumptions x u i r C i . 15 / 26

  58. Relation of TCF to type theory ◮ Main difference: partial functionals are first class citizens. ◮ “Logic enriched”: Formulas and types kept separate. ◮ Minimal logic: → , ∀ only. x = y (Leibniz equality), ∃ , ∨ , ∧ inductively defined (Martin-L¨ of). ◮ ⊥ := ( False = True ). Ex-falso-quodlibet: ⊥ → A provable. ◮ “Decorations” → nc , ∀ nc (i) allow abstract theory (ii) remove unused data. 16 / 26

  59. Relation of TCF to type theory ◮ Main difference: partial functionals are first class citizens. ◮ “Logic enriched”: Formulas and types kept separate. ◮ Minimal logic: → , ∀ only. x = y (Leibniz equality), ∃ , ∨ , ∧ inductively defined (Martin-L¨ of). ◮ ⊥ := ( False = True ). Ex-falso-quodlibet: ⊥ → A provable. ◮ “Decorations” → nc , ∀ nc (i) allow abstract theory (ii) remove unused data. 16 / 26

  60. Relation of TCF to type theory ◮ Main difference: partial functionals are first class citizens. ◮ “Logic enriched”: Formulas and types kept separate. ◮ Minimal logic: → , ∀ only. x = y (Leibniz equality), ∃ , ∨ , ∧ inductively defined (Martin-L¨ of). ◮ ⊥ := ( False = True ). Ex-falso-quodlibet: ⊥ → A provable. ◮ “Decorations” → nc , ∀ nc (i) allow abstract theory (ii) remove unused data. 16 / 26

  61. Relation of TCF to type theory ◮ Main difference: partial functionals are first class citizens. ◮ “Logic enriched”: Formulas and types kept separate. ◮ Minimal logic: → , ∀ only. x = y (Leibniz equality), ∃ , ∨ , ∧ inductively defined (Martin-L¨ of). ◮ ⊥ := ( False = True ). Ex-falso-quodlibet: ⊥ → A provable. ◮ “Decorations” → nc , ∀ nc (i) allow abstract theory (ii) remove unused data. 16 / 26

  62. Relation of TCF to type theory ◮ Main difference: partial functionals are first class citizens. ◮ “Logic enriched”: Formulas and types kept separate. ◮ Minimal logic: → , ∀ only. x = y (Leibniz equality), ∃ , ∨ , ∧ inductively defined (Martin-L¨ of). ◮ ⊥ := ( False = True ). Ex-falso-quodlibet: ⊥ → A provable. ◮ “Decorations” → nc , ∀ nc (i) allow abstract theory (ii) remove unused data. 16 / 26

  63. Relation of TCF to type theory ◮ Main difference: partial functionals are first class citizens. ◮ “Logic enriched”: Formulas and types kept separate. ◮ Minimal logic: → , ∀ only. x = y (Leibniz equality), ∃ , ∨ , ∧ inductively defined (Martin-L¨ of). ◮ ⊥ := ( False = True ). Ex-falso-quodlibet: ⊥ → A provable. ◮ “Decorations” → nc , ∀ nc (i) allow abstract theory (ii) remove unused data. 16 / 26

  64. Case study: uniformly continuous functions (U. Berger) ◮ Formalization of an abstract theory of (uniformly) continuous real functions f : I → I ( I := [ − 1 , 1]). ◮ Let C f express that f is a continuous real function. Assume the abstract theory proves with I b , n := [ b − 1 2 n , b + 1 C f → ∀ n ∃ m ∀ a ∃ b ( f [ I a , m ] ⊆ I b , n ) 2 n ] � �� � B m , n f Then n �→ m modulus of (uniform) continuity ( ω ) n , a �→ b approximating rational function ( h ) 17 / 26

  65. Case study: uniformly continuous functions (U. Berger) ◮ Formalization of an abstract theory of (uniformly) continuous real functions f : I → I ( I := [ − 1 , 1]). ◮ Let C f express that f is a continuous real function. Assume the abstract theory proves with I b , n := [ b − 1 2 n , b + 1 C f → ∀ n ∃ m ∀ a ∃ b ( f [ I a , m ] ⊆ I b , n ) 2 n ] � �� � B m , n f Then n �→ m modulus of (uniform) continuity ( ω ) n , a �→ b approximating rational function ( h ) 17 / 26

  66. Case study: uniformly continuous functions (U. Berger) ◮ Formalization of an abstract theory of (uniformly) continuous real functions f : I → I ( I := [ − 1 , 1]). ◮ Let C f express that f is a continuous real function. Assume the abstract theory proves with I b , n := [ b − 1 2 n , b + 1 C f → ∀ n ∃ m ∀ a ∃ b ( f [ I a , m ] ⊆ I b , n ) 2 n ] � �� � B m , n f Then n �→ m modulus of (uniform) continuity ( ω ) n , a �→ b approximating rational function ( h ) 17 / 26

  67. Case study: uniformly continuous functions (U. Berger) ◮ Formalization of an abstract theory of (uniformly) continuous real functions f : I → I ( I := [ − 1 , 1]). ◮ Let C f express that f is a continuous real function. Assume the abstract theory proves with I b , n := [ b − 1 2 n , b + 1 C f → ∀ n ∃ m ∀ a ∃ b ( f [ I a , m ] ⊆ I b , n ) 2 n ] � �� � B m , n f Then n �→ m modulus of (uniform) continuity ( ω ) n , a �→ b approximating rational function ( h ) 17 / 26

  68. Read X and its witnesses Inductively define a predicate Read X of arity ( ϕ ) by the clauses ( Read X ) + ∀ nc f ∀ d ( f [ I ] ⊆ I d → X ( Out d ◦ f ) → Read X f ) , 0 ∀ nc f ( Read X ( f ◦ In − 1 ) → Read X ( f ◦ In 0 ) → Read X ( f ◦ In 1 ) → Read X f ) . ( Read X ) + 1 where I d = [ d − 1 2 , d +1 2 ] ( d ∈ {− 1 , 0 , 1 } ) and ( f ◦ In d )( x ) := f ( x + d ( Out d ◦ f )( x ) := 2 f ( x ) − d , ) . 2 Witnesses for Read X f : total ideals in R α := µ ξ (Put SD → α → ξ , Get ξ → ξ → ξ → ξ ) where SD := {− 1 , 0 , 1 } . 18 / 26

  69. Read X and its witnesses Inductively define a predicate Read X of arity ( ϕ ) by the clauses ( Read X ) + ∀ nc f ∀ d ( f [ I ] ⊆ I d → X ( Out d ◦ f ) → Read X f ) , 0 ∀ nc f ( Read X ( f ◦ In − 1 ) → Read X ( f ◦ In 0 ) → Read X ( f ◦ In 1 ) → Read X f ) . ( Read X ) + 1 where I d = [ d − 1 2 , d +1 2 ] ( d ∈ {− 1 , 0 , 1 } ) and ( f ◦ In d )( x ) := f ( x + d ( Out d ◦ f )( x ) := 2 f ( x ) − d , ) . 2 Witnesses for Read X f : total ideals in R α := µ ξ (Put SD → α → ξ , Get ξ → ξ → ξ → ξ ) where SD := {− 1 , 0 , 1 } . 18 / 26

  70. Read X and its witnesses Inductively define a predicate Read X of arity ( ϕ ) by the clauses ( Read X ) + ∀ nc f ∀ d ( f [ I ] ⊆ I d → X ( Out d ◦ f ) → Read X f ) , 0 ∀ nc f ( Read X ( f ◦ In − 1 ) → Read X ( f ◦ In 0 ) → Read X ( f ◦ In 1 ) → Read X f ) . ( Read X ) + 1 where I d = [ d − 1 2 , d +1 2 ] ( d ∈ {− 1 , 0 , 1 } ) and ( f ◦ In d )( x ) := f ( x + d ( Out d ◦ f )( x ) := 2 f ( x ) − d , ) . 2 Witnesses for Read X f : total ideals in R α := µ ξ (Put SD → α → ξ , Get ξ → ξ → ξ → ξ ) where SD := {− 1 , 0 , 1 } . 18 / 26

  71. Write , co Write and its witnesses Nested inductive definition of a predicate Write of arity ( ϕ ): ∀ nc Write ( Id ) , f ( Read Write f → Write f ) ( Id identity function) . Witnesses for Write f : total ideals in W := µ ξ (Stop ξ , Cont R ξ → ξ ) . Define co Write , a companion predicate of Write , by ∀ nc f ( co Write f → f = Id ∨ Read co Write f ) . ( co Write ) − Witnesses for co Write f : W -cototal R W -total ideals t . 19 / 26

  72. Write , co Write and its witnesses Nested inductive definition of a predicate Write of arity ( ϕ ): ∀ nc Write ( Id ) , f ( Read Write f → Write f ) ( Id identity function) . Witnesses for Write f : total ideals in W := µ ξ (Stop ξ , Cont R ξ → ξ ) . Define co Write , a companion predicate of Write , by ∀ nc f ( co Write f → f = Id ∨ Read co Write f ) . ( co Write ) − Witnesses for co Write f : W -cototal R W -total ideals t . 19 / 26

  73. Write , co Write and its witnesses Nested inductive definition of a predicate Write of arity ( ϕ ): ∀ nc Write ( Id ) , f ( Read Write f → Write f ) ( Id identity function) . Witnesses for Write f : total ideals in W := µ ξ (Stop ξ , Cont R ξ → ξ ) . Define co Write , a companion predicate of Write , by ∀ nc f ( co Write f → f = Id ∨ Read co Write f ) . ( co Write ) − Witnesses for co Write f : W -cototal R W -total ideals t . 19 / 26

  74. Write , co Write and its witnesses Nested inductive definition of a predicate Write of arity ( ϕ ): ∀ nc Write ( Id ) , f ( Read Write f → Write f ) ( Id identity function) . Witnesses for Write f : total ideals in W := µ ξ (Stop ξ , Cont R ξ → ξ ) . Define co Write , a companion predicate of Write , by ∀ nc f ( co Write f → f = Id ∨ Read co Write f ) . ( co Write ) − Witnesses for co Write f : W -cototal R W -total ideals t . 19 / 26

  75. Write , co Write and its witnesses Nested inductive definition of a predicate Write of arity ( ϕ ): ∀ nc Write ( Id ) , f ( Read Write f → Write f ) ( Id identity function) . Witnesses for Write f : total ideals in W := µ ξ (Stop ξ , Cont R ξ → ξ ) . Define co Write , a companion predicate of Write , by ∀ nc f ( co Write f → f = Id ∨ Read co Write f ) . ( co Write ) − Witnesses for co Write f : W -cototal R W -total ideals t . 19 / 26

  76. W -cototal R W -total ideals are possibly non well-founded trees t : . . . . . . . . . • • • ❅ � ❅ � ❅ � • Get • Cont Stop ✏ • • • Stop Put d ✏ ❅ ✏ ✏ ✏ ❅ ✏ ✏ ❅ ✏ • Get ◮ Get-Put-part: well-founded, ◮ Stop-Cont-part: not necessarily well-founded. 20 / 26

  77. W -cototal R W -total ideals are possibly non well-founded trees t : . . . . . . . . . • • • ❅ � ❅ � ❅ � • Get • Cont Stop ✏ • • • Stop Put d ✏ ❅ ✏ ✏ ✏ ❅ ✏ ✏ ❅ ✏ • Get ◮ Get-Put-part: well-founded, ◮ Stop-Cont-part: not necessarily well-founded. 20 / 26

  78. W -cototal R W -total ideals as stream transformers View them as read-write machines. ◮ Start at the root of the tree. ◮ At node Put d t , output the digit d , carry on with the tree t . ◮ At node Get t − 1 t 0 t 1 , read a digit d from the input stream and continue with the tree t d . ◮ At node Stop, return the rest of the input unprocessed as output. ◮ At node Cont t , continue with the tree t . Output might be infinite, but R W -totality ensures that the machine can only read finitely many input digits before producing another output digit. The machine represents a continuous function. 21 / 26

  79. W -cototal R W -total ideals as stream transformers View them as read-write machines. ◮ Start at the root of the tree. ◮ At node Put d t , output the digit d , carry on with the tree t . ◮ At node Get t − 1 t 0 t 1 , read a digit d from the input stream and continue with the tree t d . ◮ At node Stop, return the rest of the input unprocessed as output. ◮ At node Cont t , continue with the tree t . Output might be infinite, but R W -totality ensures that the machine can only read finitely many input digits before producing another output digit. The machine represents a continuous function. 21 / 26

  80. W -cototal R W -total ideals as stream transformers View them as read-write machines. ◮ Start at the root of the tree. ◮ At node Put d t , output the digit d , carry on with the tree t . ◮ At node Get t − 1 t 0 t 1 , read a digit d from the input stream and continue with the tree t d . ◮ At node Stop, return the rest of the input unprocessed as output. ◮ At node Cont t , continue with the tree t . Output might be infinite, but R W -totality ensures that the machine can only read finitely many input digits before producing another output digit. The machine represents a continuous function. 21 / 26

  81. W -cototal R W -total ideals as stream transformers View them as read-write machines. ◮ Start at the root of the tree. ◮ At node Put d t , output the digit d , carry on with the tree t . ◮ At node Get t − 1 t 0 t 1 , read a digit d from the input stream and continue with the tree t d . ◮ At node Stop, return the rest of the input unprocessed as output. ◮ At node Cont t , continue with the tree t . Output might be infinite, but R W -totality ensures that the machine can only read finitely many input digits before producing another output digit. The machine represents a continuous function. 21 / 26

  82. W -cototal R W -total ideals as stream transformers View them as read-write machines. ◮ Start at the root of the tree. ◮ At node Put d t , output the digit d , carry on with the tree t . ◮ At node Get t − 1 t 0 t 1 , read a digit d from the input stream and continue with the tree t d . ◮ At node Stop, return the rest of the input unprocessed as output. ◮ At node Cont t , continue with the tree t . Output might be infinite, but R W -totality ensures that the machine can only read finitely many input digits before producing another output digit. The machine represents a continuous function. 21 / 26

  83. W -cototal R W -total ideals as stream transformers View them as read-write machines. ◮ Start at the root of the tree. ◮ At node Put d t , output the digit d , carry on with the tree t . ◮ At node Get t − 1 t 0 t 1 , read a digit d from the input stream and continue with the tree t d . ◮ At node Stop, return the rest of the input unprocessed as output. ◮ At node Cont t , continue with the tree t . Output might be infinite, but R W -totality ensures that the machine can only read finitely many input digits before producing another output digit. The machine represents a continuous function. 21 / 26

  84. W -cototal R W -total ideals as stream transformers View them as read-write machines. ◮ Start at the root of the tree. ◮ At node Put d t , output the digit d , carry on with the tree t . ◮ At node Get t − 1 t 0 t 1 , read a digit d from the input stream and continue with the tree t d . ◮ At node Stop, return the rest of the input unprocessed as output. ◮ At node Cont t , continue with the tree t . Output might be infinite, but R W -totality ensures that the machine can only read finitely many input digits before producing another output digit. The machine represents a continuous function. 21 / 26

  85. W -cototal R W -total ideals as stream transformers View them as read-write machines. ◮ Start at the root of the tree. ◮ At node Put d t , output the digit d , carry on with the tree t . ◮ At node Get t − 1 t 0 t 1 , read a digit d from the input stream and continue with the tree t d . ◮ At node Stop, return the rest of the input unprocessed as output. ◮ At node Cont t , continue with the tree t . Output might be infinite, but R W -totality ensures that the machine can only read finitely many input digits before producing another output digit. The machine represents a continuous function. 21 / 26

  86. W -cototal R W -total ideals as stream transformers View them as read-write machines. ◮ Start at the root of the tree. ◮ At node Put d t , output the digit d , carry on with the tree t . ◮ At node Get t − 1 t 0 t 1 , read a digit d from the input stream and continue with the tree t d . ◮ At node Stop, return the rest of the input unprocessed as output. ◮ At node Cont t , continue with the tree t . Output might be infinite, but R W -totality ensures that the machine can only read finitely many input digits before producing another output digit. The machine represents a continuous function. 21 / 26

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend