an introduction to dialectica realizability
play

An Introduction to Dialectica Realizability Pierre-Marie Pdrot - PowerPoint PPT Presentation

An Introduction to Dialectica Realizability Pierre-Marie Pdrot INRIA 22th July 2016 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pdrot (INRIA)


  1. Target language (reduction) Again, this is the usual λ -calculus plus integer recursion. ( λx. M ) N → β M [ x := N ] → β rec N 0 N S 0 N 0 rec N 0 N S ( S M ) → β N S M ( rec N 0 N S M ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 18 / 101

  2. Meta-theory I don’t want to dwell too much on this, but We’ll reason intuitionistically all of the time Mostly about term equivalence generated by → β No fancy stuff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 19 / 101

  3. Hacking in System T There are many things we’re lacking in System T ! booleans pairs algebraic datatypes ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 20 / 101

  4. Hacking in System T There are many things we’re lacking in System T ! booleans pairs algebraic datatypes ... We actually need them for the Dialectica interpretation... Let us do a bit of assembly to emulate them. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 20 / 101

  5. Booleans That one is easy! B := N tt := 0 ff := S 0 if M then N else P := rec N ( λ __ . P ) M Everything works as expected. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 21 / 101

  6. Sequences That one is hairy... I’ll consider sequences of System T types: ⃗ σ System T terms: ⃗ M Variables: ⃗ x and I’ll write empty sequence ∅ concatenation ⃗ M ; ⃗ N implicit lifting from an object to a singleton and forget about the ⃗ · when I’m fed up with it. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 22 / 101

  7. Sequences (moar) Due to associativity, there are natural notations for sequences: ⃗ σ ⇒ τ := σ 1 ⇒ . . . ⇒ σ n ⇒ τ (a type) σ ⇒ ⃗ := ( σ ⇒ τ 1 ) ; . . . ; ( σ ⇒ τ n ) (a sequence of types) τ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 23 / 101

  8. Sequences (moar) Due to associativity, there are natural notations for sequences: ⃗ σ ⇒ τ := σ 1 ⇒ . . . ⇒ σ n ⇒ τ (a type) σ ⇒ ⃗ := ( σ ⇒ τ 1 ) ; . . . ; ( σ ⇒ τ n ) (a sequence of types) τ This induces a similar structure on abstraction and application: λ⃗ x. M := λx 1 . . . x n . M (a term) λx. ⃗ := ( λx. M 1 ) ; . . . ; ( λx. M n ) (a sequence of terms) M M ⃗ N := M N 1 . . . N n (a term) ⃗ M N := ( M 1 N ) ; . . . ; ( M n N ) (a sequence of terms) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 23 / 101

  9. Sequences (moar) Due to associativity, there are natural notations for sequences: ⃗ σ ⇒ τ := σ 1 ⇒ . . . ⇒ σ n ⇒ τ (a type) σ ⇒ ⃗ := ( σ ⇒ τ 1 ) ; . . . ; ( σ ⇒ τ n ) (a sequence of types) τ This induces a similar structure on abstraction and application: λ⃗ x. M := λx 1 . . . x n . M (a term) λx. ⃗ := ( λx. M 1 ) ; . . . ; ( λx. M n ) (a sequence of terms) M M ⃗ N := M N 1 . . . N n (a term) ⃗ M N := ( M 1 N ) ; . . . ; ( M n N ) (a sequence of terms) Typing and reduction are pointwise compatible with this sequencification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 23 / 101

  10. Sequences (moar) In particular, ∅ ⇒ τ := (a type) τ σ ⇒ ∅ := ∅ (a sequence of types) and λ ∅ . M := (a term) M λx. ∅ := ∅ (a sequence of terms) M ∅ := (a term) M ∅ N := ∅ (a sequence of terms) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 24 / 101

  11. Gödel’s anatomy To any HA formula A , associate a meta formula Sequence of types Sequence of types Witness Counter Orthogonality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 25 / 101

  12. Gödel’s anatomy To any HA formula A , associate a meta formula Sequence of types Sequence of types Witness Counter Orthogonality To any HA proof π ⊢ A , associate a meta proof of where π • : W ( A ) x : C ( A ) . A D [ π • , ⃗ ∀ ⃗ x ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 25 / 101

  13. Building bridges Intuitively, seen through Krivine’s realizability, W ( A ) ≡ | A | , typed truth values C ( A ) ≡ || A || , typed falsity values M ⊩ A ≡ ∀ ⃗ x : C ( A ) . M ⊥ A ⃗ x (assumes implicitly M : W ( A ) ) Yet, actually in Krivine realizability | A | ⊆ Λ and || A || ⊆ Π are untyped Orthogonality untyped as well: M ⊥ π ≡ ⟨ M | π ⟩ ⊆ ‚ M ⊩ A ≡ ∀ π ∈ || A || . M ⊥ π (Another alternative explanation as logical games.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 26 / 101

  14. Roadmap We’re going to do the following in the next slides: Define W ( · ) , C ( · ) and ⊥ ( · ) by induction on the type State the soundness theorem abstractly Look at a few key cases from the proof and get an idea of the realizers Then we’ll have a look at what we got new. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 27 / 101

  15. Dialectica translation (easy cases) W ( A ∧ B ) := W ( A ) ; W ( B ) C ( A ∧ B ) := C ( A ) ; C ( B ) M A ⊥ A Π A M B ⊥ B Π B M A ; M B ⊥ A ∧ B Π A ; Π B W ( A ∨ B ) := B ; W ( A ) ; W ( B ) C ( A ∨ B ) := C ( A ) ; C ( B ) M A ⊥ A Π A M B ⊥ B Π B tt ; M A ; M B ⊥ A ∨ B Π A ; Π B ff ; M A ; M B ⊥ A ∨ B Π A ; Π B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 28 / 101

  16. Dialectica translation (easy cases) W ( ⊤ ) := ∅ C ( ⊤ ) := ∅ ∅ ⊥ ⊤ ∅ W ( ⊥ ) := ∅ C ( ⊥ ) := ∅ (no orthogonality) t = u W ( t = u ) := ∅ C ( t = u ) := ∅ ∅ ⊥ t = u ∅ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 29 / 101

  17. Dialectica translation (first-order) W ( ∀ x. A ) := N ⇒ W ( A ) C ( ∀ x. A ) := N ; C ( A ) M N ⊥ A [ x := N ] Π M ⊥ ∀ x. A N ; Π W ( ∃ x. A ) := N ; W ( A ) C ( ∃ x. A ) := N ⇒ C ( A ) M ⊥ A [ x := N ] Π N N ; M ⊥ ∃ x. A Π . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 30 / 101

  18. Dialectica translation (first-order) W ( ∀ x. A ) := N ⇒ W ( A ) C ( ∀ x. A ) := N ; C ( A ) M N ⊥ A [ x := N ] Π M ⊥ ∀ x. A N ; Π W ( ∃ x. A ) := N ; W ( A ) C ( ∃ x. A ) := N ⇒ C ( A ) M ⊥ A [ x := N ] Π N N ; M ⊥ ∃ x. A Π (I’m a bit cheating here for pedagogical purposes.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 30 / 101

  19. Dialectica translation: the wondrous intuitionistic arrow The mysterious part of the Dialectica translation comes from the arrow... W ( A → B ) := ( W ( A ) ⇒ W ( B )) ; ( W ( A ) ⇒ C ( B ) ⇒ C ( A )) C ( A → B ) := W ( A ) ; C ( B ) N ⊥ A Φ N Π M N ⊥ B Π if then M ; Φ ⊥ A → B N ; Π The witness of an arrow has a second, fancy component! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 31 / 101

  20. Remarks The W ( · ) translation corresponds essentially to Kreisel extraction. ... except for the arrow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 32 / 101

  21. Remarks The W ( · ) translation corresponds essentially to Kreisel extraction. ... except for the arrow. Most of the logical content is pushed into the meta ... thanks to the orthogonality. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 32 / 101

  22. Remarks The W ( · ) translation corresponds essentially to Kreisel extraction. ... except for the arrow. Most of the logical content is pushed into the meta ... thanks to the orthogonality. Hacks are quite clear, e.g. A + B ∼ B × A × B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 32 / 101

  23. Easy result Our realizability interpretation is trivially consistent. Theorem (Consistency) There is no System T sequence of terms M ⊩ ⊥ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 33 / 101

  24. Easy result Our realizability interpretation is trivially consistent. Theorem (Consistency) There is no System T sequence of terms M ⊩ ⊥ . Proof. Assume such sequence M , then there should not be ⃗ x : C ( ⊥ ) by definition of ⊥ ⊥ . But C ( ⊥ ) ≡ ∅ and the empty sequence is trivially inhabited, which contradicts the above statement. Note that we do have paraproofs of falsity... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 33 / 101

  25. Soundness (overview) We will now sketch the proof of the following statement. Theorem (Soundness) If ⊢ HA A , then there is a sequence of System T terms M ⊩ A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 34 / 101

  26. Soundness (overview) We will now sketch the proof of the following statement. Theorem (Soundness) If ⊢ HA A , then there is a sequence of System T terms M ⊩ A . We will prove a generalized statement by induction on the proof. Theorem (Generalized soundness) If π : Γ 1 , . . . , Γ n ⊢ HA A , then there is: a sequence of terms π • : W (Γ) ⇒ W ( A ) n sequences of terms π ◦ i : W (Γ) ⇒ C ( A ) ⇒ C (Γ i ) s.t. for all M : W (Γ) and Π : C ( A ) , M i ⊥ Γ i π ◦ π • M ⊥ A Π if for all i ≤ n , i M Π then . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 34 / 101

  27. Enters technique The theorem relies on two essential facts of the translation. All System T types are inhabited. The ⊥ A relation is decidable in System T for all A , i.e. there is a term of type W ( A ) ⇒ C ( A ) ⇒ B which internalizes ⊥ A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 35 / 101

  28. Enters technique The theorem relies on two essential facts of the translation. All System T types are inhabited. The ⊥ A relation is decidable in System T for all A , i.e. there is a term of type W ( A ) ⇒ C ( A ) ⇒ B which internalizes ⊥ A . Proof. By induction on the considered type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 35 / 101

  29. Hack, hack, hack your bloat This allows to define two families of System T terms: The dummy terms ✠ A : C ( A ) The merge terms ⊕ A : C ( A ) ⇒ C ( A ) ⇒ W ( A ) ⇒ C ( A ) s.t. for all Π , Ξ : C ( A ) and M : W ( A ) , M ⊥ A (Π ⊕ M A Ξ) iff M ⊥ A Π and M ⊥ A Ξ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 36 / 101

  30. Hack, hack, hack your bloat This allows to define two families of System T terms: The dummy terms ✠ A : C ( A ) The merge terms ⊕ A : C ( A ) ⇒ C ( A ) ⇒ W ( A ) ⇒ C ( A ) s.t. for all Π , Ξ : C ( A ) and M : W ( A ) , M ⊥ A (Π ⊕ M A Ξ) iff M ⊥ A Π and M ⊥ A Ξ . Proof. Take an arbitrary inhabitant of C ( A ) for ✠ A Define Π ⊕ M A Ξ := if M ⊥ A Π then Ξ else Π . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 36 / 101

  31. Soundness (Axiom) Let us give the interpretation of the rule : ( axm ) Γ 1 , . . . , Γ n ⊢ Γ k axm • : W (Γ) ⇒ W (Γ k ) axm • := λx 1 . . . x n . x k axm ◦ : W (Γ) ⇒ C (Γ k ) ⇒ C (Γ k ) k axm ◦ := λx 1 . . . x n . λπ. π k axm ◦ : W (Γ) ⇒ C (Γ k ) ⇒ C (Γ i ) ( i ̸ = k ) i axm ◦ := λx 1 . . . x n . λπ. ✠ Γ i i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 37 / 101

  32. Soundness (Axiom) Let us give the interpretation of the rule : ( axm ) Γ 1 , . . . , Γ n ⊢ Γ k axm • : W (Γ) ⇒ W (Γ k ) axm • := λx 1 . . . x n . x k axm ◦ : W (Γ) ⇒ C (Γ k ) ⇒ C (Γ k ) k axm ◦ := λx 1 . . . x n . λπ. π k axm ◦ : W (Γ) ⇒ C (Γ k ) ⇒ C (Γ i ) ( i ̸ = k ) i axm ◦ := λx 1 . . . x n . λπ. ✠ Γ i i We easily show for all γ : W (Γ) and π : C (Γ k ) : ∧ axm • γ ⊥ Γ k π γ i ⊥ Γ i axm ◦ i γ π − → i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 37 / 101

  33. Soundness (Axiom) Everything has been done implicitly with sequences in the previous slide! The actual demacroified sequence of terms is less palatable... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 38 / 101

  34. Soundness ( λ -abstraction) q : Γ , A ⊢ B Rule : p : Γ ⊢ A → B  p • : W (Γ) ⇒ W ( A ) ⇒ W ( B )   +  λγ. λx. q • γ x p • := p • + p • : W (Γ) ⇒ W ( A ) ⇒ C ( B ) ⇒ C ( A )   −  p • λγ. λx. λπ. q ◦ := A γ x π − p ◦ : W (Γ) ⇒ W ( A ) ⇒ C ( B ) ⇒ C (Γ i ) i p ◦ λγ. λx. λπ. q ◦ := Γ i γ x π i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 39 / 101

  35. Soundness ( λ -abstraction) q : Γ , A ⊢ B Rule : p : Γ ⊢ A → B  p • : W (Γ) ⇒ W ( A ) ⇒ W ( B )   +  λγ. λx. q • γ x p • := p • + p • : W (Γ) ⇒ W ( A ) ⇒ C ( B ) ⇒ C ( A )   −  p • λγ. λx. λπ. q ◦ := A γ x π − p ◦ : W (Γ) ⇒ W ( A ) ⇒ C ( B ) ⇒ C (Γ i ) i p ◦ λγ. λx. λπ. q ◦ := Γ i γ x π i Need to show for all γ : W (Γ) , x : W ( A ) and π : C ( B ) : ∧ γ i ⊥ Γ i p ◦ x ⊥ A p • p • − → − → + γ x ⊥ B π i γ x π − γ x π i which comes directly from hypothesis on q . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 39 / 101

  36. Soundness (application) q : Γ ⊢ A → B r : Γ ⊢ A Rule : p : Γ ⊢ B p • : W (Γ) ⇒ W ( B ) + γ ( r • γ ) p • λγ. q • := p ◦ : W (Γ) ⇒ C ( B ) ⇒ C (Γ i ) i i γ ( r • γ ) π ) ⊕ γ i − γ ( r • γ ) π )) p ◦ λγ. λπ. ( q ◦ Γ i ( r ◦ i γ ( q • := i Need to show for all γ : W (Γ) and π : C ( B ) : ∧ p • γ ⊥ B π γ i ⊥ Γ i p ◦ − → i γ π i which implies a bit of work... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 40 / 101

  37. Soundness (other cases) Essentially, Nullary connectives are trivial The one atomic formula t = u is pushed back in the meta The ( − ) • translation is more or less identity on the underlying proof-term The ( − ) ◦ i translation merges all available counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 41 / 101

  38. Stepping back We now see where the technical apparatus is needed. The ✠ A terms are used to implement weakening The ⊕ A terms are used to implement contraction Linear logicians should be jumping on their seats by now . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 42 / 101

  39. Stepping back We now see where the technical apparatus is needed. The ✠ A terms are used to implement weakening The ⊕ A terms are used to implement contraction Linear logicians should be jumping on their seats by now Note that this is not the standard presentation of Dialectica. Usually, realizers are not explicitly written Here, we can already get a rough idea of what is going on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 42 / 101

  40. Stepping back We now see where the technical apparatus is needed. The ✠ A terms are used to implement weakening The ⊕ A terms are used to implement contraction Linear logicians should be jumping on their seats by now Note that this is not the standard presentation of Dialectica. Usually, realizers are not explicitly written Here, we can already get a rough idea of what is going on Later! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 42 / 101

  41. Overview 1 Gödel’s Dialectica Translation 2 Realizing more by Working more 3 Curry-Howard at the rescue 4 Enters Linear Logic 5 Intepretation of the λ -calculus 6 Towards CC ω 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 43 / 101

  42. You are Here We’ve proved the soudness theorem, therefore Dialectica is a realizability interpretation of HA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 44 / 101

  43. You are Here We’ve proved the soudness theorem, therefore Dialectica is a realizability interpretation of HA . We preserve good properties... Dialectica preserves positives. Yet, as for Kreisel and Krivine realizability, we get more! Dialectica interprets MP and IP . i.e. there are term sequences MP ⊩ MP and IP ⊩ IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 44 / 101

  44. Constructivity It is obvious to check that proofs of positive connectives are preserved! If b ; M 1 ; M 2 ⊩ A ∨ B then b tells you which realizer is the good one. If n ; M ⊩ ∃ x. A then n is a correct witness and M realizes that. (Remember:) W ( A ∨ B ) := B ; W ( A ) ; W ( B ) W ( ∃ x. A ) := N ; W ( A ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 45 / 101

  45. Premises, what are they needed for? P → ∃ m. Q m IP ∃ m. P → Q m This is only true for irrelevant P ! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 46 / 101

  46. Premises, what are they needed for? P → ∃ m. Q m IP ∃ m. P → Q m This is only true for irrelevant P ! Luckily, we can define this through the Dialectica. Definition (Irrelevance) A formula A is irrelevant whenever both W ( A ) = ∅ and C ( A ) = ∅ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 46 / 101

  47. Premises, what are they needed for? P → ∃ m. Q m IP ∃ m. P → Q m This is only true for irrelevant P ! Luckily, we can define this through the Dialectica. Definition (Irrelevance) A formula A is irrelevant whenever both W ( A ) = ∅ and C ( A ) = ∅ . Theorem (Irrelevance) The negative propositional fragment A − is irrelevant. A − , B − ::= ⊥ | ⊤ | t = u | A − ∧ B − | A − → B − . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 46 / 101

  48. Address IP Assume P irrelevant, we have W (( P → ∃ m. Q m ) → ∃ m. ( P → Q m ))  W ( P → ∃ m. Q m ) ⇒ N    W ( P → ∃ m. Q m ) ⇒ W ( P → Q m ) =  W ( P → ∃ m. Q m ) ⇒ C ( ∃ m. P → Q m ) ⇒ W ( P )   W ( P → ∃ m. Q m ) ⇒ C ( ∃ m. P → Q m ) ⇒ C ( ∃ m. Q m )  N ⇒ W ( Q m ) ⇒ N  = N ⇒ W ( Q m ) ⇒ W ( Q m )  N ⇒ W ( Q m ) ⇒ ( N ⇒ C ( Q m )) ⇒ N ⇒ C ( Q m ) as W ( P → A ) = W ( A ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 47 / 101

  49. IP , at last Therefore, just take IP • : N ⇒ W ( Q m ) ⇒ N N IP • := λn _ . n N IP • : N ⇒ W ( Q m ) ⇒ W ( Q m ) Q m IP • := λ _ p. p Q m IP • : N ⇒ W ( Q m ) ⇒ ( N ⇒ C ( Q m )) ⇒ N ⇒ C ( Q m ) − IP • := λ _ _ k. k − . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 48 / 101

  50. IP , at last Therefore, just take IP • : N ⇒ W ( Q m ) ⇒ N N IP • := λn _ . n N IP • : N ⇒ W ( Q m ) ⇒ W ( Q m ) Q m IP • := λ _ p. p Q m IP • : N ⇒ W ( Q m ) ⇒ ( N ⇒ C ( Q m )) ⇒ N ⇒ C ( Q m ) − IP • := λ _ _ k. k − Proving that this is a proper realizer is trivial, this is mostly a projection. IP • ⊩ ( P → ∃ m. Q m ) → ∃ m. ( P → Q m ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 48 / 101

  51. Reflexions on IP Actually, IP is mostly an accident It works for about the same reasons as in usual realizability Namely, irrelevant stuff is erased by the translation The realizer does not take advantage of the added structure “ IP is merely a consequence of realizability. ” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 49 / 101

  52. Towards MP ¬ ( ∀ n. ¬ P n ) MP ∃ n. P n Let us try to realize this assuming P is decidable! A quick introductory remark: our target language is strongly normalizing... We can’t write the naive loop algorithm from intuitionistic realizability! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 50 / 101

  53. Towards MP ¬ ( ∀ n. ¬ P n ) MP ∃ n. P n Let us try to realize this assuming P is decidable! A quick introductory remark: our target language is strongly normalizing... We can’t write the naive loop algorithm from intuitionistic realizability! We’ll do much better. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 50 / 101

  54. Nein First, let’s scrutinize the interpretation of negation. ¬ A := A → ⊥ We have: W ( ¬ A ) = W ( A ) ⇒ C ( A ) C ( ¬ A ) = W ( A ) and M ̸⊥ A Φ M Φ ⊥ ¬ A M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 51 / 101

  55. Nein First, let’s scrutinize the interpretation of negation. ¬ A := A → ⊥ We have: W ( ¬ A ) = W ( A ) ⇒ C ( A ) C ( ¬ A ) = W ( A ) and M ̸⊥ A Φ M Φ ⊥ ¬ A M Negation highly asymmetrical, not degenerate! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 51 / 101

  56. Unfolding... We have then: W ( ¬∀ n. ¬ P n → ∃ n. P n )  W ( ¬ Ψ) ⇒ N  = W ( ¬ Ψ) ⇒ W ( P n )  W ( ¬ Ψ) ⇒ C ( ∃ n. P n ) ⇒ C ( ¬ Ψ)  ( W (Ψ) ⇒ N ) ⇒ ( W (Ψ) ⇒ W ( P n )) ⇒ N  ( W (Ψ) ⇒ N ) ⇒ ( W (Ψ) ⇒ W ( P n )) ⇒ W ( P n ) =  ( W (Ψ) ⇒ N ) ⇒ ( W (Ψ) ⇒ W ( P n )) ⇒ C ( ∃ n. P n ) ⇒ W (Ψ) where Ψ := ∀ n. ¬ P n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 52 / 101

  57. Simplifying things drastically But P is decidable, so wlog we can assume it is irrelevant, thus: W ( P n ) = ∅ W ( ¬∀ n. ¬ P n ) = ∅ and then W ( ¬∀ n. ¬ P n → ∃ n. P n )  ( W (Ψ) ⇒ N ) ⇒ ( W (Ψ) ⇒ W ( P n )) ⇒ N  = ( W (Ψ) ⇒ N ) ⇒ ( W (Ψ) ⇒ W ( P n )) ⇒ W ( P n )  ( W (Ψ) ⇒ N ) ⇒ ( W (Ψ) ⇒ W ( P n )) ⇒ C ( ∃ n. P n ) ⇒ W (Ψ)  N ⇒ N  ∅ =  ∅ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 53 / 101

  58. Markov’s principle It’s pretty clear how to provide a term of the expected type: MP • : W ( ¬∀ n. ¬ P n → ∃ n. P n ) MP • := λn. n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 54 / 101

  59. Markov’s principle It’s pretty clear how to provide a term of the expected type: MP • : W ( ¬∀ n. ¬ P n → ∃ n. P n ) MP • := λn. n The realizibility condition amounts to prove for all n : N : ∅ ̸⊥ ∀ n. ¬ P n n − → n ⊥ ∃ n. P n ∅ ¬¬∅⊥ P n ∅ − → ∅ ⊥ P n ∅ This is true intuitionistically thanks to decidability... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 54 / 101

  60. Markov’s principle? Something fishy going on here. The realizer is suspiciously simple... The realizability condition makes appear classical-looking stuff The integer is provided by the reverse part of the negation “ MP is using the Dialectica translation in-depth. ” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 55 / 101

  61. End of Part I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 56 / 101

  62. Part II A Functional Functional Interpretation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 57 / 101

  63. Can I haz Curry-Howard? Let us forget the 50’s, and rather jump directly to the 90’s. Take seriously the computational content Dialectica as a typed object Works of De Paiva, Hyland, etc. Get rid of Gödel’s hacks: Proper datatypes No more sequences! Stop ugly encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 58 / 101

  64. A systematic approach “Realizability interpretations tend to hide a programming translation.” Logic Programming Kreisel modified realizability Identity translation Krivine classical realizability Lafont-Reus-Streicher CPS Gödel Dialectica realizability ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 59 / 101

  65. A systematic approach “Realizability interpretations tend to hide a programming translation.” Logic Programming Kreisel modified realizability Identity translation Krivine classical realizability Lafont-Reus-Streicher CPS Gödel Dialectica realizability A fancy one! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 59 / 101

  66. A systematic approach “Realizability interpretations tend to hide a programming translation.” Logic Programming Kreisel modified realizability Identity translation Krivine classical realizability Lafont-Reus-Streicher CPS Gödel Dialectica realizability A fancy one! Gives first-class status to stacks Features a computationally relevant substitution Mix of LRS with delimited continuations Requires computational (finite) multisets M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 59 / 101

  67. Target programming language Instead of System T , we take a simply-typed λ -calculus with datatypes. σ, τ ::= . . . | σ × τ | σ + τ | 0 | 1 and add the proper pattern-matchings and constructors. We interpret everything directly into System T (no sequences!). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 60 / 101

  68. The same, with types If we wish to put more types in there: W C ⊤ 1 1 ⊥ 1 1 A ∧ B W ( A ) × W ( B ) C ( A ) × C ( B ) A ∨ B W ( A ) + W ( B ) C ( A ) × C ( B )   W ( A ) ⇒ W ( B )   A → B × W ( A ) × C ( B ) W ( A ) ⇒ C ( B ) ⇒ C ( A ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 61 / 101

  69. The same, with types If we wish to put more types in there: W C ⊤ 1 1 ⊥ 1 1 A ∧ B W ( A ) × W ( B ) C ( A ) × C ( B ) A ∨ B W ( A ) + W ( B ) C ( A ) × C ( B )   W ( A ) ⇒ W ( B )   A → B × W ( A ) × C ( B ) W ( A ) ⇒ C ( B ) ⇒ C ( A ) Orthogonality is adapted in a direct way (sequences �→ pairs). Observe how W ( A ) and C ( A ) are always inhabited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 61 / 101

  70. Not too hastily We could give a computational content right now . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 62 / 101

  71. Not too hastily We could give a computational content right now But it would be a special case, taking advantage of some encodings Let us use our our favorite tool: Linear Logic . It factorizes Dialectica! A genuine exponential! With real chunks of sum types! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 62 / 101

  72. Not too hastily We could give a computational content right now But it would be a special case, taking advantage of some encodings Let us use our our favorite tool: Linear Logic . It factorizes Dialectica! A genuine exponential! With real chunks of sum types! (Do not worry too much if you know nothing about LL , this is mainly for general culture purposes.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 62 / 101

  73. Overview 1 Gödel’s Dialectica Translation 2 Realizing more by Working more 3 Curry-Howard at the rescue 4 Enters Linear Logic 5 Intepretation of the λ -calculus 6 Towards CC ω 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 63 / 101

  74. Linearized Dialectica As forecasted on the previous slide, we essentially apply the following modifications: Introduction of duality with sum types Call-by-name decomposition of the arrow: A → B ≡ ! A ⊸ B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 64 / 101

  75. Linearized Dialectica As forecasted on the previous slide, we essentially apply the following modifications: Introduction of duality with sum types Call-by-name decomposition of the arrow: A → B ≡ ! A ⊸ B Now we will be translating LL into LJ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pierre-Marie Pédrot (INRIA) Dialectica 22/07/2016 64 / 101

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