Curry-Howard isomorphism for sequent calculus at last Jos e Carlos - - PowerPoint PPT Presentation

curry howard isomorphism for sequent calculus at last
SMART_READER_LITE
LIVE PREVIEW

Curry-Howard isomorphism for sequent calculus at last Jos e Carlos - - PowerPoint PPT Presentation

Introduction Sequent calculus Natural deduction Results Curry-Howard isomorphism for sequent calculus at last Jos e Carlos Esp rito Santo Centro de Matem atica Universidade do Minho Portugal jes@math.uminho.pt Estonian-Finnish


slide-1
SLIDE 1

Introduction Sequent calculus Natural deduction Results

Curry-Howard isomorphism for sequent calculus at last

Jos´ e Carlos Esp´ ırito Santo

Centro de Matem´ atica Universidade do Minho Portugal jes@math.uminho.pt

Estonian-Finnish Logic Meeting Rakvere, Estonia 14 November 2015

slide-2
SLIDE 2

Introduction Sequent calculus Natural deduction Results

Goal

slide-3
SLIDE 3

Introduction Sequent calculus Natural deduction Results

Goal

In the same sense as the simply-typed λ-calculus (resp. combinators) corresponds to natural deduction (Hilbert systems),

slide-4
SLIDE 4

Introduction Sequent calculus Natural deduction Results

Goal

In the same sense as the simply-typed λ-calculus (resp. combinators) corresponds to natural deduction (Hilbert systems), what variant of the simply-typed lambda-calculus does correspond to the sequent calculus for intuitionistic implicational logic?

slide-5
SLIDE 5

Introduction Sequent calculus Natural deduction Results

Goal

In the same sense as the simply-typed λ-calculus (resp. combinators) corresponds to natural deduction (Hilbert systems), what variant of the simply-typed lambda-calculus does correspond to the sequent calculus for intuitionistic implicational logic? Question in the purest form Clear-cut answer required

slide-6
SLIDE 6

Introduction Sequent calculus Natural deduction Results

Goal

In the same sense as the simply-typed λ-calculus (resp. combinators) corresponds to natural deduction (Hilbert systems), what variant of the simply-typed lambda-calculus does correspond to the sequent calculus for intuitionistic implicational logic? Question in the purest form Clear-cut answer required More than a term assignment, a computational interpretation

slide-7
SLIDE 7

Introduction Sequent calculus Natural deduction Results

Goal

In the same sense as the simply-typed λ-calculus (resp. combinators) corresponds to natural deduction (Hilbert systems), what variant of the simply-typed lambda-calculus does correspond to the sequent calculus for intuitionistic implicational logic? Question in the purest form Clear-cut answer required More than a term assignment, a computational interpretation An interpretation of proofs in terms of a functional language, so that, when cut-elimination is rephrased accordingly, a meaningful, perhaps familiar, computational behavior is recognized

slide-8
SLIDE 8

Introduction Sequent calculus Natural deduction Results

An open question

slide-9
SLIDE 9

Introduction Sequent calculus Natural deduction Results

An open question

Girard, 1989: “From an algorithmic viewpoint, the sequent calculus has no Curry-Howard isomorphism, because of the multitude of ways of writing the same proof”

slide-10
SLIDE 10

Introduction Sequent calculus Natural deduction Results

An open question

Girard, 1989: “From an algorithmic viewpoint, the sequent calculus has no Curry-Howard isomorphism, because of the multitude of ways of writing the same proof” Sørensen-Urzykzyn, 2006: sequent calculus corresponds to explicit substitutions, but “this is just the beginning of the story”

slide-11
SLIDE 11

Introduction Sequent calculus Natural deduction Results

An open question

Girard, 1989: “From an algorithmic viewpoint, the sequent calculus has no Curry-Howard isomorphism, because of the multitude of ways of writing the same proof” Sørensen-Urzykzyn, 2006: sequent calculus corresponds to explicit substitutions, but “this is just the beginning of the story” Wikipedia: “The structure of sequent calculus relates to a calculus whose structure is close to the one of some abstract machines”

slide-12
SLIDE 12

Introduction Sequent calculus Natural deduction Results

Basic unanswered questions

slide-13
SLIDE 13

Introduction Sequent calculus Natural deduction Results

Basic unanswered questions

What does a variable stand for in a sequent calculus proof expression? What is the related substitution operation?

slide-14
SLIDE 14

Introduction Sequent calculus Natural deduction Results

Basic unanswered questions

What does a variable stand for in a sequent calculus proof expression? What is the related substitution operation? What is co-control?

slide-15
SLIDE 15

Introduction Sequent calculus Natural deduction Results

Plan

Sequent calculus λ˜ µ

Internal interpretation

Natural deduction λlet

External interpretation Explains co-control, justifies design of λ˜ µ

Results

slide-16
SLIDE 16

Introduction Sequent calculus Natural deduction Results

SEQUENT CALCULUS

slide-17
SLIDE 17

Introduction Sequent calculus Natural deduction Results Preliminaries

Overview of λ˜ µ

slide-18
SLIDE 18

Introduction Sequent calculus Natural deduction Results Preliminaries

Overview of λ˜ µ

System λ˜ µ: formal vector notation with first-class co-control

slide-19
SLIDE 19

Introduction Sequent calculus Natural deduction Results Preliminaries

Overview of λ˜ µ

System λ˜ µ: formal vector notation with first-class co-control Generalization of (the essence of) λ-calculus

slide-20
SLIDE 20

Introduction Sequent calculus Natural deduction Results Preliminaries

Overview of λ˜ µ

System λ˜ µ: formal vector notation with first-class co-control Generalization of (the essence of) λ-calculus Re-interpretation of a 15-years-old result

The λ-calculus has an isomorphic copy inside λ This copy is a formal vector notation

slide-21
SLIDE 21

Introduction Sequent calculus Natural deduction Results Preliminaries

Overview of λ˜ µ

System λ˜ µ: formal vector notation with first-class co-control Generalization of (the essence of) λ-calculus Re-interpretation of a 15-years-old result

The λ-calculus has an isomorphic copy inside λ This copy is a formal vector notation

Dualization of first-class control as found in λµ-calculus

Concept of co-continuation ˜ µx.t (known from λµ˜ µ) becomes a co-control operator

slide-22
SLIDE 22

Introduction Sequent calculus Natural deduction Results Preliminaries

Overview of λ˜ µ

System λ˜ µ: formal vector notation with first-class co-control Generalization of (the essence of) λ-calculus Re-interpretation of a 15-years-old result

The λ-calculus has an isomorphic copy inside λ This copy is a formal vector notation

Dualization of first-class control as found in λµ-calculus

Concept of co-continuation ˜ µx.t (known from λµ˜ µ) becomes a co-control operator

Variables in proof expressions stand for co-continuations

slide-23
SLIDE 23

Introduction Sequent calculus Natural deduction Results Preliminaries

Overview of λ˜ µ

System λ˜ µ: formal vector notation with first-class co-control Generalization of (the essence of) λ-calculus Re-interpretation of a 15-years-old result

The λ-calculus has an isomorphic copy inside λ This copy is a formal vector notation

Dualization of first-class control as found in λµ-calculus

Concept of co-continuation ˜ µx.t (known from λµ˜ µ) becomes a co-control operator

Variables in proof expressions stand for co-continuations λ˜ µ is developed hand-in-hand with isomorphic natural deduction system λlet

slide-24
SLIDE 24

Introduction Sequent calculus Natural deduction Results Preliminaries

Herbelin’s λ-calculus

slide-25
SLIDE 25

Introduction Sequent calculus Natural deduction Results Preliminaries

Herbelin’s λ-calculus

Permutation-free, focused fragment of sequent calculus

slide-26
SLIDE 26

Introduction Sequent calculus Natural deduction Results Preliminaries

Herbelin’s λ-calculus

Permutation-free, focused fragment of sequent calculus Two-sorted syntax

Proof terms t and lists l Sequents Γ ⇒ t : A and Γ|A ⇒ l : B

slide-27
SLIDE 27

Introduction Sequent calculus Natural deduction Results Preliminaries

Herbelin’s λ-calculus

Permutation-free, focused fragment of sequent calculus Two-sorted syntax

Proof terms t and lists l Sequents Γ ⇒ t : A and Γ|A ⇒ l : B

Sketch of two computational interpretations

Internal interpretation

Lists are stacks Cuts tl are states in a rudimentary abstract machine

External interpretation

Lists l = u1 :: · · · :: um :: [] are “evaluation contexts”/continuations [·]N1 · · · Nm Cuts tl denote M filled in [·]N1 · · · Nm

slide-28
SLIDE 28

Introduction Sequent calculus Natural deduction Results Preliminaries

Herbelin’s λ-calculus

Permutation-free, focused fragment of sequent calculus Two-sorted syntax

Proof terms t and lists l Sequents Γ ⇒ t : A and Γ|A ⇒ l : B

Sketch of two computational interpretations

Internal interpretation

Lists are stacks Cuts tl are states in a rudimentary abstract machine

External interpretation

Lists l = u1 :: · · · :: um :: [] are “evaluation contexts”/continuations [·]N1 · · · Nm Cuts tl denote M filled in [·]N1 · · · Nm

S.c. versus n.d.: inversion of associativity of non-abstractions

N.d. is left associative (· · · (MN1) · · · Nm) S.c. is right associative t(u1 :: · · · (um :: []) · · · )

slide-29
SLIDE 29

Introduction Sequent calculus Natural deduction Results Preliminaries

Vector notation

slide-30
SLIDE 30

Introduction Sequent calculus Natural deduction Results Preliminaries

Vector notation

Recall M, N ::= λx.M (1st form) | x N (2nd form) | (λx.M)N N (3rd form)

slide-31
SLIDE 31

Introduction Sequent calculus Natural deduction Results Preliminaries

Vector notation

Recall M, N ::= λx.M (1st form) | x N (2nd form) | (λx.M)N N (3rd form) Relaxed vector notation: 3rd form becomes M N

slide-32
SLIDE 32

Introduction Sequent calculus Natural deduction Results Preliminaries

Vector notation

Recall M, N ::= λx.M (1st form) | x N (2nd form) | (λx.M)N N (3rd form) Relaxed vector notation: 3rd form becomes M N This introduces the need for vector bookkeeping M[] = M (x Q)N N = x( QN N) (P Q)N N = P( QN N)

slide-33
SLIDE 33

Introduction Sequent calculus Natural deduction Results Preliminaries

A variant of Parigot’s λµ-calculus...

slide-34
SLIDE 34

Introduction Sequent calculus Natural deduction Results Preliminaries

A variant of Parigot’s λµ-calculus...

... called λµ-calculus

slide-35
SLIDE 35

Introduction Sequent calculus Natural deduction Results Preliminaries

A variant of Parigot’s λµ-calculus...

... called λµ-calculus ... whose management of sequents’ RHS we want to “dualize”

slide-36
SLIDE 36

Introduction Sequent calculus Natural deduction Results Preliminaries

A variant of Parigot’s λµ-calculus...

... called λµ-calculus ... whose management of sequents’ RHS we want to “dualize” Control points Mˆ a, where a, b, · · · are co-variables Control operator µa.M

slide-37
SLIDE 37

Introduction Sequent calculus Natural deduction Results Preliminaries

A variant of Parigot’s λµ-calculus...

... called λµ-calculus ... whose management of sequents’ RHS we want to “dualize” Control points Mˆ a, where a, b, · · · are co-variables Control operator µa.M Control operation: if C = ([·]N1 · · · Nm)ˆ b C[µa.M] → [C/a]M

slide-38
SLIDE 38

Introduction Sequent calculus Natural deduction Results Preliminaries

A variant of Parigot’s λµ-calculus...

... called λµ-calculus ... whose management of sequents’ RHS we want to “dualize” Control points Mˆ a, where a, b, · · · are co-variables Control operator µa.M Control operation: if C = ([·]N1 · · · Nm)ˆ b C[µa.M] → [C/a]M Context substitution (rather than “structural substitution”) [C/a](Mˆ a) = C[M′] where M′ = [C/a]M

slide-39
SLIDE 39

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Syntax of proof expressions

slide-40
SLIDE 40

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Syntax of proof expressions

(Terms) t, u, v ::= λx.t (1st form) | xˆk (2nd form, co-control point) | tk (3rd form) (Generalized vectors) k ::= [] (empty vector) | ˜ µx.v (co-control operator) | u :: k (vector constructor)

slide-41
SLIDE 41

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Typing

Recall (terms) t, u, v ::= λx.t | xˆk | tk (gen. vectors) k ::= [] | ˜ µx.t | u :: k

slide-42
SLIDE 42

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Typing

Recall (terms) t, u, v ::= λx.t | xˆk | tk (gen. vectors) k ::= [] | ˜ µx.t | u :: k Sequents Γ ⊢ t : A and Γ|A ⊢ k : A

slide-43
SLIDE 43

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Typing

Recall (terms) t, u, v ::= λx.t | xˆk | tk (gen. vectors) k ::= [] | ˜ µx.t | u :: k Sequents Γ ⊢ t : A and Γ|A ⊢ k : A Typing/inference rules Ax Γ|A ⊢ [] : A Cut Γ ⊢ t : A Γ|A ⊢ k : B Γ ⊢ tk : B Pass Γ, x : A|A ⊢ k : B Γ, x : A ⊢ xˆk : B Act Γ, x : A ⊢ v : B Γ|A ⊢ ˜ µx.v : B ⊃L Γ ⊢ u : A Γ|B ⊢ k : C Γ|A ⊃ B ⊢ u :: k : C ⊃R Γ, x : A ⊢ t : B Γ ⊢ λx.t : A ⊃ B

slide-44
SLIDE 44

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Derived syntax

slide-45
SLIDE 45

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Derived syntax

Concatenation of two generalized vectors k@k′ []@k′ = k′ (u :: k)@k′ = u :: (k@k′) (˜ µx.t)@k′ = ˜ µx.tk′

slide-46
SLIDE 46

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Derived syntax: co-continuations

slide-47
SLIDE 47

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Derived syntax: co-continuations

Recall (terms) t, u, v ::= λx.t | xˆk | tk (gen. vectors) k ::= [] | ˜ µx.t | u :: k

slide-48
SLIDE 48

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Derived syntax: co-continuations

Recall (terms) t, u, v ::= λx.t | xˆk | tk (gen. vectors) k ::= [] | ˜ µx.t | u :: k Co-continuations H ::= xˆ[·] | t([·]) | H[u :: [·]] Hence co-continuations have the forms

xˆ(u1 :: · · · :: um :: [·]) or t(u1 :: · · · :: um :: [·]) (m ≥ 0) that is, a non-abstraction with a hole at the right end hole expects a vector

slide-49
SLIDE 49

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Derived syntax: co-continuations

Recall (terms) t, u, v ::= λx.t | xˆk | tk (gen. vectors) k ::= [] | ˜ µx.t | u :: k Co-continuations H ::= xˆ[·] | t([·]) | H[u :: [·]] Hence co-continuations have the forms

xˆ(u1 :: · · · :: um :: [·]) or t(u1 :: · · · :: um :: [·]) (m ≥ 0) that is, a non-abstraction with a hole at the right end hole expects a vector

Co-continuation substitution [H/x]t and [H/x]k [H/x](xˆk) = H[k′] with k′ = [H/x]k

slide-50
SLIDE 50

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Reduction

Recall (terms) t, u, v ::= λx.t | xˆk | tk (gen. vectors) k ::= [] | ˜ µx.t | u :: k

slide-51
SLIDE 51

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Reduction

Recall (terms) t, u, v ::= λx.t | xˆk | tk (gen. vectors) k ::= [] | ˜ µx.t | u :: k Reduction rules (β) (λx.t)(u :: k) → (u(˜ µx.t))k (˜ µ) H[˜ µx.t] → [H/x]t (ǫ) t[] → t (π1) (xˆk)k′ → xˆ(k@k′) (π2) (tk)k′ → t(k@k′)

slide-52
SLIDE 52

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Reduction

Recall (terms) t, u, v ::= λx.t | xˆk | tk (gen. vectors) k ::= [] | ˜ µx.t | u :: k Reduction rules (β) (λx.t)(u :: k) → (u(˜ µx.t))k (˜ µ) H[˜ µx.t] → [H/x]t (ǫ) t[] → t (π1) (xˆk)k′ → xˆ(k@k′) (π2) (tk)k′ → t(k@k′) Interp: formal vector notation with first-class co-control

β: function call ˜ µ: co-control operation ǫ and πi: vector bookkeeping in relaxed vector notation

slide-53
SLIDE 53

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Reduction

Recall the ˜ µ-rule: H[˜ µx.t] → [H/x]t

slide-54
SLIDE 54

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Reduction

Recall the ˜ µ-rule: H[˜ µx.t] → [H/x]t Partition of ˜ µ (ρ) yˆ(˜ µx.t) → [yˆ([·])/x]t (σ) t(˜ µx.t) → [t([·])/x]t (τ) H[u :: ˜ µx.t] → [H[u :: [·]]/x]t

slide-55
SLIDE 55

Introduction Sequent calculus Natural deduction Results The λ˜ µ-calculus

Reduction

Recall the ˜ µ-rule: H[˜ µx.t] → [H/x]t Partition of ˜ µ (ρ) yˆ(˜ µx.t) → [yˆ([·])/x]t (σ) t(˜ µx.t) → [t([·])/x]t (τ) H[u :: ˜ µx.t] → [H[u :: [·]]/x]t Logical procedures cut-elimination β, σ, ǫ, π ˜ µ-elimination = co-control ρ, τ, σ permutation τ, σ, ǫ, π focalization ρ, τ

slide-56
SLIDE 56

Introduction Sequent calculus Natural deduction Results

NATURAL DEDUCTION

slide-57
SLIDE 57

Introduction Sequent calculus Natural deduction Results Preliminaries

Developing natural deduction

slide-58
SLIDE 58

Introduction Sequent calculus Natural deduction Results Preliminaries

Developing natural deduction

Bidirectional syntax

slide-59
SLIDE 59

Introduction Sequent calculus Natural deduction Results Preliminaries

Developing natural deduction

Bidirectional syntax Let-expressions (“Lets” vs cuts) Lets vs explicit substitutions

slide-60
SLIDE 60

Introduction Sequent calculus Natural deduction Results Preliminaries

Developing natural deduction

Bidirectional syntax Let-expressions (“Lets” vs cuts) Lets vs explicit substitutions Isomorphic to sequent calculus

slide-61
SLIDE 61

Introduction Sequent calculus Natural deduction Results The system

Syntax of proof terms of λlet

slide-62
SLIDE 62

Introduction Sequent calculus Natural deduction Results The system

Syntax of proof terms of λlet

(Terms) M, N, P ::= λx.M (abstraction) | app(H) (applicative term) | let x := H in P (let-expression) (Heads) H ::= x (variable) | hd(M) (head term) | HN (application)

slide-63
SLIDE 63

Introduction Sequent calculus Natural deduction Results The system

Typing in λlet

Recall (Terms) M, N, P ::= λx.M | app(H) | let x := H in P (Heads) H ::= x | hd(M) | HN

slide-64
SLIDE 64

Introduction Sequent calculus Natural deduction Results The system

Typing in λlet

Recall (Terms) M, N, P ::= λx.M | app(H) | let x := H in P (Heads) H ::= x | hd(M) | HN Sequents Γ ⊢ M : A and Γ ⊲ H : A

slide-65
SLIDE 65

Introduction Sequent calculus Natural deduction Results The system

Typing in λlet

Recall (Terms) M, N, P ::= λx.M | app(H) | let x := H in P (Heads) H ::= x | hd(M) | HN Sequents Γ ⊢ M : A and Γ ⊲ H : A Rules Γ, x : A ⊲ x : A Hyp Γ ⊲ H : A Γ, x : A ⊢ P : B Γ ⊢ let x := H in P : B Let Γ ⊲ H : A Γ ⊢ app(H) : A WCoercion Γ ⊢ M : A Γ ⊲ hd(M) : A SCoercion Γ, x : A ⊢ M : B Γ ⊢ λx.M : A ⊃ B Intro Γ ⊲ H : A ⊃ B Γ ⊢ N : A Γ ⊲ HN : B Elim

slide-66
SLIDE 66

Introduction Sequent calculus Natural deduction Results The system

Derived syntax

Recall (Terms) M, N, P ::= λx.M | app(H) | let x := H in P (Heads) H ::= x | hd(M) | HN

slide-67
SLIDE 67

Introduction Sequent calculus Natural deduction Results The system

Derived syntax

Recall (Terms) M, N, P ::= λx.M | app(H) | let x := H in P (Heads) H ::= x | hd(M) | HN Continuations K ::= app([·]) | let x := [·] in P | K[[·]N] Hence co-continuations have the forms

app([·]N1 · · · Nm) or let x := [·]N1 · · · Nm in P (m ≥ 0) that is, a non-abstraction with a hole at the left end hole expects a head

slide-68
SLIDE 68

Introduction Sequent calculus Natural deduction Results The system

Reduction in λlet

Recall (Terms) M, N, P ::= λx.M | app(H) | let x := H in P (Heads) H ::= x | hd(M) | HN

slide-69
SLIDE 69

Introduction Sequent calculus Natural deduction Results The system

Reduction in λlet

Recall (Terms) M, N, P ::= λx.M | app(H) | let x := H in P (Heads) H ::= x | hd(M) | HN Rules (beta) hd(λx.M)N → hd(let x := hd(N) in M) (let) let x := H in P → [H/x]P (triv) app(hd(M)) → M (head1) hd(app(H)) → H (head2) K[hd(let x := H in P)] → let x := H in K[hd(P)]

slide-70
SLIDE 70

Introduction Sequent calculus Natural deduction Results The system

Reduction in λlet

Recall (Terms) M, N, P ::= λx.M | app(H) | let x := H in P (Heads) H ::= x | hd(M) | HN Rules (beta) hd(λx.M)N → hd(let x := hd(N) in M) (let) let x := H in P → [H/x]P (triv) app(hd(M)) → M (head1) hd(app(H)) → H (head2) K[hd(let x := H in P)] → let x := H in K[hd(P)] Comments: bidirectional, agnostic, computational λ-calculus

slide-71
SLIDE 71

Introduction Sequent calculus Natural deduction Results

Mapping sequent calculus

slide-72
SLIDE 72

Introduction Sequent calculus Natural deduction Results

Mapping sequent calculus

Map Θ : λ˜ µ → λlet xˆ(u1 :: · · · um :: []) → app(xN1 · · · Nm) xˆ(u1 :: · · · um :: ˜ µy.v) → let y := (xN1 · · · Nm) in P t(u1 :: · · · um :: []) → app(hd(M)N1 · · · Nm) t(u1 :: · · · um :: ˜ µy.v) → let y := (hd(M)N1 · · · Nm) in P Replace each left-introduction by an elimination

slide-73
SLIDE 73

Introduction Sequent calculus Natural deduction Results

Mapping sequent calculus

Map Θ : λ˜ µ → λlet xˆ(u1 :: · · · um :: []) → app(xN1 · · · Nm) xˆ(u1 :: · · · um :: ˜ µy.v) → let y := (xN1 · · · Nm) in P t(u1 :: · · · um :: []) → app(hd(M)N1 · · · Nm) t(u1 :: · · · um :: ˜ µy.v) → let y := (hd(M)N1 · · · Nm) in P Replace each left-introduction by an elimination Inversion of the associativity of non-abstractions

slide-74
SLIDE 74

Introduction Sequent calculus Natural deduction Results

Mapping sequent calculus

Map Θ : λ˜ µ → λlet xˆ(u1 :: · · · um :: []) → app(xN1 · · · Nm) xˆ(u1 :: · · · um :: ˜ µy.v) → let y := (xN1 · · · Nm) in P t(u1 :: · · · um :: []) → app(hd(M)N1 · · · Nm) t(u1 :: · · · um :: ˜ µy.v) → let y := (hd(M)N1 · · · Nm) in P

slide-75
SLIDE 75

Introduction Sequent calculus Natural deduction Results

Mapping sequent calculus

Map Θ : λ˜ µ → λlet xˆ(u1 :: · · · um :: []) → app(xN1 · · · Nm) xˆ(u1 :: · · · um :: ˜ µy.v) → let y := (xN1 · · · Nm) in P t(u1 :: · · · um :: []) → app(hd(M)N1 · · · Nm) t(u1 :: · · · um :: ˜ µy.v) → let y := (hd(M)N1 · · · Nm) in P Proof expressions of λ˜ µ as instructions to build λlet proofs tk → K[hd(M)] where t → M and k → K xˆk → K[x] where k → K u :: k → K[[·]N] where u → N and k → K ˜ µx.v → let x := [·] in P where v → P [] → app([·])

slide-76
SLIDE 76

Introduction Sequent calculus Natural deduction Results

RESULTS

slide-77
SLIDE 77

Introduction Sequent calculus Natural deduction Results Results

Isomorphism

slide-78
SLIDE 78

Introduction Sequent calculus Natural deduction Results Results

Isomorphism

Isomorphism Θ : λ˜ µ ∼ = λlet

slide-79
SLIDE 79

Introduction Sequent calculus Natural deduction Results Results

Isomorphism

Isomorphism Θ : λ˜ µ ∼ = λlet Bijections of syntactic classes terms t M terms

  • gen. vectors

k K continuations co-continuations H H heads

slide-80
SLIDE 80

Introduction Sequent calculus Natural deduction Results Results

Isomorphism

Isomorphism Θ : λ˜ µ ∼ = λlet Bijections of syntactic classes terms t M terms

  • gen. vectors

k K continuations co-continuations H H heads Remark: exchange of primitive/derived concepts

slide-81
SLIDE 81

Introduction Sequent calculus Natural deduction Results Results

Isomorphism

Isomorphism Θ : λ˜ µ ∼ = λlet Bijections of syntactic classes terms t M terms

  • gen. vectors

k K continuations co-continuations H H heads Remark: exchange of primitive/derived concepts Isomorphism of reduction relations β beta ˜ µ let ǫ triv π head

slide-82
SLIDE 82

Introduction Sequent calculus Natural deduction Results Results

Curry Howard at last

slide-83
SLIDE 83

Introduction Sequent calculus Natural deduction Results Results

Curry Howard at last

The two faces of the coin:

Internal interpretation: formal vector notation with first-class co-control External interpretation: bidirectional, agnostic, computational λ-calculus

slide-84
SLIDE 84

Introduction Sequent calculus Natural deduction Results Results

Curry Howard at last

The two faces of the coin:

Internal interpretation: formal vector notation with first-class co-control External interpretation: bidirectional, agnostic, computational λ-calculus

Example: expression xˆk

Internal interpretation: co-control point, fill k in the hole of the co-continuation H that will substitute x

slide-85
SLIDE 85

Introduction Sequent calculus Natural deduction Results Results

Curry Howard at last

The two faces of the coin:

Internal interpretation: formal vector notation with first-class co-control External interpretation: bidirectional, agnostic, computational λ-calculus

Example: expression xˆk

Internal interpretation: co-control point, fill k in the hole of the co-continuation H that will substitute x External interpretation: fill head x in the hole of continuation K, where K = Θk - an instruction for the construction of a λlet derivation (fill x in k better notation for this reading)

slide-86
SLIDE 86

Introduction Sequent calculus Natural deduction Results Results

Curry Howard at last

The two faces of the coin:

Internal interpretation: formal vector notation with first-class co-control External interpretation: bidirectional, agnostic, computational λ-calculus

Example: expression xˆk

Internal interpretation: co-control point, fill k in the hole of the co-continuation H that will substitute x External interpretation: fill head x in the hole of continuation K, where K = Θk - an instruction for the construction of a λlet derivation (fill x in k better notation for this reading)

Example: β-rule (λx.t)(u :: k) → (u(˜ µx.t))k

Internal interpretation: β-rule of a relaxed vector notation

slide-87
SLIDE 87

Introduction Sequent calculus Natural deduction Results Results

Curry Howard at last

The two faces of the coin:

Internal interpretation: formal vector notation with first-class co-control External interpretation: bidirectional, agnostic, computational λ-calculus

Example: expression xˆk

Internal interpretation: co-control point, fill k in the hole of the co-continuation H that will substitute x External interpretation: fill head x in the hole of continuation K, where K = Θk - an instruction for the construction of a λlet derivation (fill x in k better notation for this reading)

Example: β-rule (λx.t)(u :: k) → (u(˜ µx.t))k

Internal interpretation: β-rule of a relaxed vector notation External interpretation: rule beta of λlet written in the notation of instructions that λ˜ µ is

slide-88
SLIDE 88

Introduction Sequent calculus Natural deduction Results Results

More Results

slide-89
SLIDE 89

Introduction Sequent calculus Natural deduction Results Results

More Results

Studying forgetful/desugaring maps λlet → λ one gets

strong normalization of λlet, hence of λ˜ µ

slide-90
SLIDE 90

Introduction Sequent calculus Natural deduction Results Results

More Results

Studying forgetful/desugaring maps λlet → λ one gets

strong normalization of λlet, hence of λ˜ µ termination of the let rule, hence of ˜ µ rule of λ˜ µ

slide-91
SLIDE 91

Introduction Sequent calculus Natural deduction Results Results

More Results

Studying forgetful/desugaring maps λlet → λ one gets

strong normalization of λlet, hence of λ˜ µ termination of the let rule, hence of ˜ µ rule of λ˜ µ the latter gives a focalization result: every t ∈ λ˜ µ has a unique ˜ µ-nf (which is a LJT proof, if t is typable)

slide-92
SLIDE 92

Introduction Sequent calculus Natural deduction Results Results

More Results

Studying forgetful/desugaring maps λlet → λ one gets

strong normalization of λlet, hence of λ˜ µ termination of the let rule, hence of ˜ µ rule of λ˜ µ the latter gives a focalization result: every t ∈ λ˜ µ has a unique ˜ µ-nf (which is a LJT proof, if t is typable)

Agnosticism theorem

slide-93
SLIDE 93

Introduction Sequent calculus Natural deduction Results Results

More Results

Studying forgetful/desugaring maps λlet → λ one gets

strong normalization of λlet, hence of λ˜ µ termination of the let rule, hence of ˜ µ rule of λ˜ µ the latter gives a focalization result: every t ∈ λ˜ µ has a unique ˜ µ-nf (which is a LJT proof, if t is typable)

Agnosticism theorem

take the s.c. characterization of CBN and CBV...

slide-94
SLIDE 94

Introduction Sequent calculus Natural deduction Results Results

More Results

Studying forgetful/desugaring maps λlet → λ one gets

strong normalization of λlet, hence of λ˜ µ termination of the let rule, hence of ˜ µ rule of λ˜ µ the latter gives a focalization result: every t ∈ λ˜ µ has a unique ˜ µ-nf (which is a LJT proof, if t is typable)

Agnosticism theorem

take the s.c. characterization of CBN and CBV...

  • btain the isomorphic characterization in n.d...
slide-95
SLIDE 95

Introduction Sequent calculus Natural deduction Results Results

More Results

Studying forgetful/desugaring maps λlet → λ one gets

strong normalization of λlet, hence of λ˜ µ termination of the let rule, hence of ˜ µ rule of λ˜ µ the latter gives a focalization result: every t ∈ λ˜ µ has a unique ˜ µ-nf (which is a LJT proof, if t is typable)

Agnosticism theorem

take the s.c. characterization of CBN and CBV...

  • btain the isomorphic characterization in n.d...

and see how CBN and CBV are superimposed in λlet

slide-96
SLIDE 96

Introduction Sequent calculus Natural deduction Results Results

More Results

Studying forgetful/desugaring maps λlet → λ one gets

strong normalization of λlet, hence of λ˜ µ termination of the let rule, hence of ˜ µ rule of λ˜ µ the latter gives a focalization result: every t ∈ λ˜ µ has a unique ˜ µ-nf (which is a LJT proof, if t is typable)

Agnosticism theorem

take the s.c. characterization of CBN and CBV...

  • btain the isomorphic characterization in n.d...

and see how CBN and CBV are superimposed in λlet

“Co-control theorem”

given that the let rule is isomorphic to the ˜ µ rule...

slide-97
SLIDE 97

Introduction Sequent calculus Natural deduction Results Results

More Results

Studying forgetful/desugaring maps λlet → λ one gets

strong normalization of λlet, hence of λ˜ µ termination of the let rule, hence of ˜ µ rule of λ˜ µ the latter gives a focalization result: every t ∈ λ˜ µ has a unique ˜ µ-nf (which is a LJT proof, if t is typable)

Agnosticism theorem

take the s.c. characterization of CBN and CBV...

  • btain the isomorphic characterization in n.d...

and see how CBN and CBV are superimposed in λlet

“Co-control theorem”

given that the let rule is isomorphic to the ˜ µ rule...

  • ne understands why co-control is almost invisible in n.d.
slide-98
SLIDE 98

Introduction Sequent calculus Natural deduction Results Results

Duality

slide-99
SLIDE 99

Introduction Sequent calculus Natural deduction Results Results

Duality

Are control and co-control related by classical duality?

slide-100
SLIDE 100

Introduction Sequent calculus Natural deduction Results Results

Duality

Are control and co-control related by classical duality? Not within classical sequent calculus!

slide-101
SLIDE 101

Introduction Sequent calculus Natural deduction Results Results

Duality

Are control and co-control related by classical duality? Not within classical sequent calculus! E.g. not in λµ˜ µ, because there

variables stand for terms (not co-continuations) ˜ µ is an ordinary term substitution former

slide-102
SLIDE 102

Introduction Sequent calculus Natural deduction Results Results

Duality

Are control and co-control related by classical duality? Not within classical sequent calculus! E.g. not in λµ˜ µ, because there

variables stand for terms (not co-continuations) ˜ µ is an ordinary term substitution former

Yes in a system that unifies λ˜ µ and λlet - see the paper

slide-103
SLIDE 103

Introduction Sequent calculus Natural deduction Results Results

THANKS