The Dialectica Translation of Type Theory Andrej Bauer Pierre-Marie - - PowerPoint PPT Presentation

the dialectica translation of type theory
SMART_READER_LITE
LIVE PREVIEW

The Dialectica Translation of Type Theory Andrej Bauer Pierre-Marie - - PowerPoint PPT Presentation

The Dialectica Translation of Type Theory Andrej Bauer Pierre-Marie Pdrot University of Ljubljana INRIA TYPES 24th May 2016 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


slide-1
SLIDE 1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

The Dialectica Translation of Type Theory

Andrej Bauer Pierre-Marie Pédrot

University of Ljubljana INRIA

TYPES 24th May 2016

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 1 / 20

slide-2
SLIDE 2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Previously at TYPES...

Analytical description of the TYPES 2013 social event (Toulouse)

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 2 / 20

slide-3
SLIDE 3

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Previously at TYPES...

Analytical description of the TYPES 2013 social event (Toulouse)

  • U. Kohlenbach
  • C. Riba

An analytical table Myself An analytical bottle of wine Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 2 / 20

slide-4
SLIDE 4

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Previously at TYPES...

Analytical description of the TYPES 2013 social event (Toulouse)

  • U. Kohlenbach
  • C. Riba

An analytical table Myself An analytical bottle of wine

Dramatis Personae: Ulrich Kohlenbach, King of Dialectica Colin Riba, a Proof-Theory Gentleman Pierre-Marie Pédrot, a Novice PhD Student The Bottle of Wine

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 2 / 20

slide-5
SLIDE 5

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Previously at TYPES...

The Bottle of Wine is almost empty. Colin, carried away by the enthusiasm

  • f proof theory, begins to claim his love for the works of Gödel.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 3 / 20

slide-6
SLIDE 6

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Previously at TYPES...

The Bottle of Wine is almost empty. Colin, carried away by the enthusiasm

  • f proof theory, begins to claim his love for the works of Gödel.

Colin O, Dialectica, the mysterious functional interpretation!

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 3 / 20

slide-7
SLIDE 7

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Previously at TYPES...

The Bottle of Wine is almost empty. Colin, carried away by the enthusiasm

  • f proof theory, begins to claim his love for the works of Gödel.

Colin O, Dialectica, the mysterious functional interpretation! Ulrich nods.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 3 / 20

slide-8
SLIDE 8

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Previously at TYPES...

The Bottle of Wine is almost empty. Colin, carried away by the enthusiasm

  • f proof theory, begins to claim his love for the works of Gödel.

Colin O, Dialectica, the mysterious functional interpretation! Ulrich nods. Colin For thou canst not be understood through Curry-Howard!

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 3 / 20

slide-9
SLIDE 9

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Previously at TYPES...

The Bottle of Wine is almost empty. Colin, carried away by the enthusiasm

  • f proof theory, begins to claim his love for the works of Gödel.

Colin O, Dialectica, the mysterious functional interpretation! Ulrich nods. Colin For thou canst not be understood through Curry-Howard! Ulrich nods.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 3 / 20

slide-10
SLIDE 10

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Previously at TYPES...

The Bottle of Wine is almost empty. Colin, carried away by the enthusiasm

  • f proof theory, begins to claim his love for the works of Gödel.

Colin O, Dialectica, the mysterious functional interpretation! Ulrich nods. Colin For thou canst not be understood through Curry-Howard! Ulrich nods. P.-M. That can’t be true!

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 3 / 20

slide-11
SLIDE 11

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Previously at TYPES...

The Bottle of Wine is almost empty. Colin, carried away by the enthusiasm

  • f proof theory, begins to claim his love for the works of Gödel.

Colin O, Dialectica, the mysterious functional interpretation! Ulrich nods. Colin For thou canst not be understood through Curry-Howard! Ulrich nods. P.-M. That can’t be true! Ulrich nods.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 3 / 20

slide-12
SLIDE 12

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Previously at TYPES...

The Bottle of Wine is almost empty. Colin, carried away by the enthusiasm

  • f proof theory, begins to claim his love for the works of Gödel.

Colin O, Dialectica, the mysterious functional interpretation! Ulrich nods. Colin For thou canst not be understood through Curry-Howard! Ulrich nods. P.-M. That can’t be true! Ulrich nods. The Bottle of Wine is empty. The characters disappear in a blurred mist. Noone can really recollect this dialogue.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 3 / 20

slide-13
SLIDE 13

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Previously at TYPES...

The Bottle of Wine is almost empty. Colin, carried away by the enthusiasm

  • f proof theory, begins to claim his love for the works of Gödel.

Colin O, Dialectica, the mysterious functional interpretation! Ulrich nods. Colin For thou canst not be understood through Curry-Howard! Ulrich nods. P.-M. That can’t be true! Ulrich nods. The Bottle of Wine is empty. The characters disappear in a blurred mist. Noone can really recollect this dialogue.

But I had found the matter for my PhD!

(Morale: you definitely should attend social events.)

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 3 / 20

slide-14
SLIDE 14

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A Quick Recap

Dialectica is a logical translation due to Gödel Nowadays would be called a realizability intepretation ⊢HA π : A ⇝ { A λ-term π• : [ [A] ] A logical property π• ⊩ A in the meta HA MP IP

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 4 / 20

slide-15
SLIDE 15

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A Quick Recap

Dialectica is a logical translation due to Gödel Nowadays would be called a realizability intepretation ⊢HA π : A ⇝ { A λ-term π• : [ [A] ] A logical property π• ⊩ A in the meta It preserves consistency, i.e. there is no π : [ [⊥] ] s.t. π ⊩ ⊥ It interprets strictly more than HA, namely: MP : ¬(∀x : N. ¬P) → ∃x : N. P (P decidable) IP : (I → ∃x : N.P) → ∃x : N. I → P (I irrelevant)

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 4 / 20

slide-16
SLIDE 16

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Curry-Howard & Realizability

“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 ?

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 5 / 20

slide-17
SLIDE 17

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Curry-Howard & Realizability

“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!

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 5 / 20

slide-18
SLIDE 18

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Curry-Howard & Realizability

“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

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 5 / 20

slide-19
SLIDE 19

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Program translation, did you say?

It operates on raw syntax (no need for the typing derivation) t ∈ Λ ⇝ t• ∈ Λ + . . . It preserves typing: t : A ⇝ t• : [ [A] ] It preserves syntactic program equality (conversion): t ≡β u ⇝ t• ≡β u•

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 6 / 20

slide-20
SLIDE 20

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Program translation, did you say?

It operates on raw syntax (no need for the typing derivation) t ∈ Λ ⇝ t• ∈ Λ + . . . It preserves typing: t : A ⇝ t• : [ [A] ] It preserves syntactic program equality (conversion): t ≡β u ⇝ t• ≡β u• There is an itch: this requires multisets that compute definitionally ∅ ⊎ t ≡β t t ⊎ u ≡β u ⊎ t (t ⊎ u) ⊎ r ≡β t ⊎ (u ⊎ r) . . .

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 6 / 20

slide-21
SLIDE 21

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Effectively

In CBN, the effect provided by Dialectica can be explained as follows: From λx. t : A → B u : A π : B⊥ Recover µ : M A⊥ where: X ⊥ is the type of stacks accepting X (first-class contexts) µ is obtained by the following process:

1

evaluate t on stack π

2

each time t dereferences x, store the current stack ρi and continue with u

3

when finished, return the multiset of all [ρ1; . . . ; ρn]

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 7 / 20

slide-22
SLIDE 22

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Effectively

In CBN, the effect provided by Dialectica can be explained as follows: From λx. t : A → B u : A π : B⊥ Recover µ : M A⊥ where: X ⊥ is the type of stacks accepting X (first-class contexts) µ is obtained by the following process:

1

evaluate t on stack π

2

each time t dereferences x, store the current stack ρi and continue with u

3

when finished, return the multiset of all [ρ1; . . . ; ρn]

Thus Dialectica instruments stack manipulation and substitution.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 7 / 20

slide-23
SLIDE 23

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Effectively

In CBN, the effect provided by Dialectica can be explained as follows: From λx. t : A → B u : A π : B⊥ Recover µ : M A⊥ where: X ⊥ is the type of stacks accepting X (first-class contexts) µ is obtained by the following process:

1

evaluate t on stack π

2

each time t dereferences x, store the current stack ρi and continue with u

3

when finished, return the multiset of all [ρ1; . . . ; ρn]

Thus Dialectica instruments stack manipulation and substitution.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 7 / 20

slide-24
SLIDE 24

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

In practice

The translation goes roughly as follows: A type ⇝ { W(A) witness type: type of objects C(A) counter type: type of stacks

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 8 / 20

slide-25
SLIDE 25

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

In practice

The translation goes roughly as follows: A type ⇝ { W(A) witness type: type of objects C(A) counter type: type of stacks In particular,

W(A → B) := (W(A) → W(B)) × (W(A) → C(B) → M C(A)) C(A → B) := W(A) × C(B)

There is a special translation handling open terms:

x1 : Γ1, . . . , xn : Γn ⊢ t : A ⇝          W(Γ) ⊢ t• : W(A) W(Γ) ⊢ tx1 : C(A) → M C(Γ1) . . . W(Γ) ⊢ txn : C(A) → M C(Γn)

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 8 / 20

slide-26
SLIDE 26

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Moar!

This translation is actually easily adapted to the dependent case. There is a Dialectica translation for CCω (by making stuff dependent). LL

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 9 / 20

slide-27
SLIDE 27

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Moar!

This translation is actually easily adapted to the dependent case. There is a Dialectica translation for CCω (by making stuff dependent). And you can also account for algebraic datatypes. There is a Dialectica translation for +, ×, . . . (by a LL decomposition).

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 9 / 20

slide-28
SLIDE 28

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Moar!

This translation is actually easily adapted to the dependent case. There is a Dialectica translation for CCω (by making stuff dependent). And you can also account for algebraic datatypes. There is a Dialectica translation for +, ×, . . . (by a LL decomposition). But it seems you can’t have the full power of dependent elimination. Interpreting dependent elimination through Dialectica looks complicated.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 9 / 20

slide-29
SLIDE 29

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Moar!

This translation is actually easily adapted to the dependent case. There is a Dialectica translation for CCω (by making stuff dependent). And you can also account for algebraic datatypes. There is a Dialectica translation for +, ×, . . . (by a LL decomposition). But it seems you can’t have the full power of dependent elimination. Interpreting dependent elimination through Dialectica looks complicated. </End of the recap of my PhD>

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 9 / 20

slide-30
SLIDE 30

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Decomposing Dialectica

In her PhD, De Paiva gave a LL decomposition of Dialectica Root of double-glueing constructions Although it works, it inherits from the quirks of LL CBPV CIC

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 10 / 20

slide-31
SLIDE 31

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Decomposing Dialectica

In her PhD, De Paiva gave a LL decomposition of Dialectica Root of double-glueing constructions Although it works, it inherits from the quirks of LL We give a new decomposition in CBPV It is inherently highly dependent And it naturally provides an interpretation for the whole CIC

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 10 / 20

slide-32
SLIDE 32

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

CBPV

CBPV is a syntax for a pervasive class of models value types A, B := U X | A + B | A × B | . . . computation types X, Y := F A | A → X | . . . values v, w := . . . computations t, u := . . . Essentially, it decomposes Moggi’s monadic language in an adjunction T A := U (F A) Thus, finer-grained.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 11 / 20

slide-33
SLIDE 33

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

CBPV

CBPV is a syntax for a pervasive class of models value types A, B := U X | A + B | A × B | . . . computation types X, Y := F A | A → X | . . . values v, w := . . . computations t, u := . . . Essentially, it decomposes Moggi’s monadic language in an adjunction T A := U (F A) Thus, finer-grained.

(We actually studied a dependently-typed variant, although not really thought about.)

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 11 / 20

slide-34
SLIDE 34

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Key idea of the decomposition

We translate value and computation types alike The C(·) type now crucially depends on a corresponding W(·), i.e. W(A) : □ C(A)[·] : W(A) → □

snd F F U U

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 12 / 20

slide-35
SLIDE 35

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Key idea of the decomposition

We translate value and computation types alike The C(·) type now crucially depends on a corresponding W(·), i.e. W(A) : □ C(A)[·] : W(A) → □

W(A → X) := Πx : W(A). Σy : W(X). (C(X)[y] → M C(A)[x]) C(A → X)[f ] := Σx : W(A). C(X)[snd (f x)] W(F A) := W(A) C(F A)[x] := M C(A)[x] W(U X) := W(X) C(U X)[x] := C(X)[x]

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 12 / 20

slide-36
SLIDE 36

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Sequents

This naturally gives rise to the interpretation:

x1 : Γ1, . . . , xn : Γn ⊢ t : X ⇝          W(Γ) ⊢ t• : W(X) W(Γ) ⊢ tx1 : C(X)[t•] → M C(Γ1)[x1] . . . W(Γ) ⊢ txn : C(X)[t•] → M C(Γn)[xn]

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 13 / 20

slide-37
SLIDE 37

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Sequents

This naturally gives rise to the interpretation:

x1 : Γ1, . . . , xn : Γn ⊢ t : X ⇝          W(Γ) ⊢ t• : W(X) W(Γ) ⊢ tx1 : C(X)[t•] → M C(Γ1)[x1] . . . W(Γ) ⊢ txn : C(X)[t•] → M C(Γn)[xn]

We never use the counter argument and merely pass it around! In absence of datatypes, this is the same as the previous translation

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 13 / 20

slide-38
SLIDE 38

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Datatypes, at least

This counter dependency is only required for dependent elimination!

W(A × B) := W(A) × W(B) C(A × B)[(x, y)] := M C(A)[x] × M C(B)[y] W(A + B) := W(A) + W(B) C(A + B)[inl x] := M C(A)[x] C(A + B)[inr y] := M C(B)[y]

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 14 / 20

slide-39
SLIDE 39

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Datatypes, at least

This counter dependency is only required for dependent elimination!

W(A × B) := W(A) × W(B) C(A × B)[(x, y)] := M C(A)[x] × M C(B)[y] W(A + B) := W(A) + W(B) C(A + B)[inl x] := M C(A)[x] C(A + B)[inr y] := M C(B)[y]

The argument is crucially observed through dependent elimination. There is an implicit pattern-matching at the head of the definition.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 14 / 20

slide-40
SLIDE 40

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

An interesting remark

In absence of dependency, those types are emulated by being less precise. Typically, compare the dependent:

C(A × B)[(x, y)] := M C(A)[x] × M C(B)[y] C(A + B)[inl x] := M C(A)[x] C(A + B)[inr y] := M C(B)[y]

with the LL-induced:

C(A × B) := W(A) × W(B) → M C(A) × M C(B) C(A + B) := (W(A) → M C(A)) × (W(B) → M C(B))

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 15 / 20

slide-41
SLIDE 41

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Exploiting the translation

There exists a Dialectica translation from CIC into CIC + M.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 16 / 20

slide-42
SLIDE 42

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Exploiting the translation

There exists a Dialectica translation from CIC into CIC + M. Not entirely satisfying though. There is no such thing as computational multisets. Looks like their theory is decidable (?) Maybe we can implement a type-checker (?)

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 16 / 20

slide-43
SLIDE 43

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Exploiting the translation

There exists a Dialectica translation from CIC into CIC + M. Not entirely satisfying though. There is no such thing as computational multisets. Looks like their theory is decidable (?) Maybe we can implement a type-checker (?) In any case, we can’t reuse an off-the-shelf implementation of type theory.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 16 / 20

slide-44
SLIDE 44

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A funny, more intensional CIC (in CBN)

Through the translation, we get strictly more than CIC. CICD negates functional extensionality (and thus univalence): CICD ⊢ ¬(Πf g. (Πx. f x = g x) → f = g) It is fairly trivial, because of the second component of arrows. E.g.: λ_. () ∼ = 0 vs. λ(). () ∼ = 1 in 1 → 1 ∼ = N CIC

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 17 / 20

slide-45
SLIDE 45

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A funny, more intensional CIC (in CBN)

Through the translation, we get strictly more than CIC. CICD negates functional extensionality (and thus univalence): CICD ⊢ ¬(Πf g. (Πx. f x = g x) → f = g) It is fairly trivial, because of the second component of arrows. E.g.: λ_. () ∼ = 0 vs. λ(). () ∼ = 1 in 1 → 1 ∼ = N Yet it is not that badly behaved w.r.t. functions: CICD preserves η-expansion.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 17 / 20

slide-46
SLIDE 46

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Towards implicit complexity in Type Theory?

A generalization of the previous constatation: CICD allows to count the uses of a function argument. Indeed, the size of the multisets corresponds to the number of uses. It is not trivial, because very higher-order-ish In particular, the number of uses depends on the argument E.g.: λb : B. if b then () else if b then () else () CIC

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 18 / 20

slide-47
SLIDE 47

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Towards implicit complexity in Type Theory?

A generalization of the previous constatation: CICD allows to count the uses of a function argument. Indeed, the size of the multisets corresponds to the number of uses. It is not trivial, because very higher-order-ish In particular, the number of uses depends on the argument E.g.: λb : B. if b then () else if b then () else () Actually, somehow already known: by the proof mining community (majorability) by the linear logic community (quantitative semantics) CIC

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 18 / 20

slide-48
SLIDE 48

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Towards implicit complexity in Type Theory?

A generalization of the previous constatation: CICD allows to count the uses of a function argument. Indeed, the size of the multisets corresponds to the number of uses. It is not trivial, because very higher-order-ish In particular, the number of uses depends on the argument E.g.: λb : B. if b then () else if b then () else () Actually, somehow already known: by the proof mining community (majorability) by the linear logic community (quantitative semantics) Can we use it to implement implicit complexity in CICD?

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 18 / 20

slide-49
SLIDE 49

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Food for thought

Why is Dialectica inherently dependent? Can LL be encoded with dependent elimination? Does the implicit complexity stuff really requires multisets? How much can we fiddle with the CBPV decomposition? Can we merge CBPV and LL?

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 19 / 20

slide-50
SLIDE 50

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Scribitur ad narrandum, non ad probandum

Thanks for your attention.

Bauer & Pédrot (U. Ljubljana, INRIA) The Dialectica Translation of TT 24/05/2016 20 / 20