166
Exact measures of evaluation in classical natural deduction Pierre VIAL ´ Equipe Gallinette Inria - LS2N joint w. with Delia Kesner (IRIF) March 19, 2019 Exact bounds in λμ P. Vial 0 1 /36

pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Exact measures of evaluation in classical natural deduction

Pierre VIALEquipe Gallinette

Inria - LS2N

joint w. with Delia Kesner (IRIF)

March 19, 2019

Exact bounds in λµ P. Vial 0 1 /36

Page 2: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Where we lie

Non-IdempotentGardner 94 - de Carvalho 07

IntersectionCoppo-Dezani 80

Type Theory

Curry-Howardcorrespondence

characterizes:• normalization

• complexity classes• MSO-sat.

Quantitative info(upper bounds)

Exact measuresBernadet-Lengrand 11

Accatoli-Kesner-Lengrand 18

λµ-calculus(classical logic)

Parigot 92

Exact measures for λµ(this talk!)Upper bounds

Kesner-V 17

Exact bounds in λµ P. Vial 0 2 /36

Page 3: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Where we lie

Non-IdempotentGardner 94 - de Carvalho 07

IntersectionCoppo-Dezani 80

Type TheoryCurry-Howardcorrespondence

characterizes:• normalization

• complexity classes• MSO-sat.

Quantitative info(upper bounds)

Exact measuresBernadet-Lengrand 11

Accatoli-Kesner-Lengrand 18

λµ-calculus(classical logic)

Parigot 92

Exact measures for λµ(this talk!)Upper bounds

Kesner-V 17

Exact bounds in λµ P. Vial 0 2 /36

Page 4: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Where we lie

Non-IdempotentGardner 94 - de Carvalho 07

IntersectionCoppo-Dezani 80

Type TheoryCurry-Howardcorrespondence

characterizes:• normalization• complexity classes• MSO-sat.

Quantitative info(upper bounds)

Exact measuresBernadet-Lengrand 11

Accatoli-Kesner-Lengrand 18

λµ-calculus(classical logic)

Parigot 92

Exact measures for λµ(this talk!)Upper bounds

Kesner-V 17

Exact bounds in λµ P. Vial 0 2 /36

Page 5: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Where we lie

Non-IdempotentGardner 94 - de Carvalho 07

IntersectionCoppo-Dezani 80

Type TheoryCurry-Howardcorrespondence

characterizes:• normalization

• complexity classes• MSO-sat.

Quantitative info(upper bounds)

Exact measuresBernadet-Lengrand 11

Accatoli-Kesner-Lengrand 18

λµ-calculus(classical logic)

Parigot 92

Exact measures for λµ(this talk!)Upper bounds

Kesner-V 17

Exact bounds in λµ P. Vial 0 2 /36

Page 6: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Where we lie

Non-IdempotentGardner 94 - de Carvalho 07

IntersectionCoppo-Dezani 80

Type TheoryCurry-Howardcorrespondence

characterizes:• normalization

• complexity classes• MSO-sat.

Quantitative info(upper bounds)

Exact measuresBernadet-Lengrand 11

Accatoli-Kesner-Lengrand 18

λµ-calculus(classical logic)

Parigot 92

Exact measures for λµ(this talk!)Upper bounds

Kesner-V 17

Exact bounds in λµ P. Vial 0 2 /36

Page 7: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Where we lie

Non-IdempotentGardner 94 - de Carvalho 07

IntersectionCoppo-Dezani 80

Type Theory

Curry-Howardcorrespondence

characterizes:• normalization

• complexity classes• MSO-sat.

Quantitative info(upper bounds)

Exact measuresBernadet-Lengrand 11

Accatoli-Kesner-Lengrand 18

λµ-calculus(classical logic)

Parigot 92

Exact measures for λµ(this talk!)Upper bounds

Kesner-V 17

Exact bounds in λµ P. Vial 0 2 /36

Page 8: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Where we lie

Non-Idempotent

Gardner 94 - de Carvalho 07

Intersection

Coppo-Dezani 80

Type Theory

Curry-Howardcorrespondence

characterizes:• normalization

• complexity classes• MSO-sat.

Quantitative info(upper bounds)

Exact measuresBernadet-Lengrand 11

Accatoli-Kesner-Lengrand 18

λµ-calculus(classical logic)

Parigot 92

Exact measures for λµ(this talk!)Upper bounds

Kesner-V 17

Exact bounds in λµ P. Vial 0 2 /36

Page 9: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Where we lie

Non-Idempotent

Gardner 94 - de Carvalho 07

Intersection

Coppo-Dezani 80

Type Theory

Curry-Howardcorrespondence

characterizes:• normalization

• complexity classes• MSO-sat.

Quantitative info(upper bounds)

Exact measuresBernadet-Lengrand 11

Accatoli-Kesner-Lengrand 18

λµ-calculus(classical logic)

Parigot 92

Exact measures for λµ(this talk!)Upper bounds

Kesner-V 17

Exact bounds in λµ P. Vial 0 2 /36

Page 10: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Where we lie

Non-Idempotent

Gardner 94 - de Carvalho 07

Intersection

Coppo-Dezani 80

Type Theory

Curry-Howardcorrespondence

characterizes:• normalization

• complexity classes• MSO-sat.

Quantitative info(upper bounds)

Exact measuresBernadet-Lengrand 11

Accatoli-Kesner-Lengrand 18

λµ-calculus(classical logic)

Parigot 92

Exact measures for λµ(this talk!)Upper bounds

Kesner-V 17

Exact bounds in λµ P. Vial 0 2 /36

Page 11: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Where we lie

Non-Idempotent

Gardner 94 - de Carvalho 07

Intersection

Coppo-Dezani 80

Type Theory

Curry-Howardcorrespondence

characterizes:• normalization

• complexity classes• MSO-sat.

Quantitative info(upper bounds)

Exact measuresBernadet-Lengrand 11

Accatoli-Kesner-Lengrand 18

λµ-calculus(classical logic)

Parigot 92

Exact measures for λµ(this talk!)Upper bounds

Kesner-V 17

Exact bounds in λµ P. Vial 0 2 /36

Page 12: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Plan

1 Overview (idempotent or not intersection types)

2 Non-idempotent intersection types

3 Extracting exact lengths of reduction

4 Resources for Classical Logic

5 Exact Measures for λµ

6 Perspectives

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 3 /36

Page 13: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intersections types (Coppo, Dezani, 1980)

Goal

Equivalences of the form

“the program t is typable iff it can reach a terminal state”

Idea: several certificates to a same subprogram (next slides).

Proof: by the “circular” implications:

Some reduction strategynormalizes t

e.g., the leftmost-o. strat.

t can reach aterminal state

e.g., ∃ red. path to a β-NF(Weak Normalization)

t is typable

t is WN iff the leftmost-o. stategy terminates on t

nothing to do with types

Intersection types

Perhaps too expressive. . .

. . . but certify reduction strategies!

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 4 /36

Page 14: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intersections types (Coppo, Dezani, 1980)

Goal

Equivalences of the form

“the program t is typable iff it can reach a terminal state”

Idea: several certificates to a same subprogram (next slides).

Proof: by the “circular” implications:

Some reduction strategynormalizes t

e.g., the leftmost-o. strat.

t can reach aterminal state

e.g., ∃ red. path to a β-NF(Weak Normalization)

t is typable

t is WN iff the leftmost-o. stategy terminates on t

nothing to do with types

Intersection types

Perhaps too expressive. . .

. . . but certify reduction strategies!

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 4 /36

Page 15: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intersections types (Coppo, Dezani, 1980)

Goal

Equivalences of the form

“the program t is typable iff it can reach a terminal state”

Idea: several certificates to a same subprogram (next slides).

Proof: by the “circular” implications:

Some reduction strategynormalizes t

e.g., the leftmost-o. strat.

t can reach aterminal state

e.g., ∃ red. path to a β-NF(Weak Normalization)

t is typable

t is WN iff the leftmost-o. stategy terminates on t

nothing to do with types

Intersection types

Perhaps too expressive. . .

. . . but certify reduction strategies!

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 4 /36

Page 16: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intersections types (Coppo, Dezani, 1980)

Goal

Equivalences of the form

“the program t is typable iff it can reach a terminal state”

Idea: several certificates to a same subprogram (next slides).

Proof: by the “circular” implications:

Some reduction strategynormalizes t

e.g., the leftmost-o. strat.

t can reach aterminal state

e.g., ∃ red. path to a β-NF(Weak Normalization)

t is typable

t is WN iff the leftmost-o. stategy terminates on t

nothing to do with types

Intersection types

Perhaps too expressive. . .

. . . but certify reduction strategies!

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 4 /36

Page 17: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intersections types (Coppo, Dezani, 1980)

Goal

Equivalences of the form

“the program t is typable iff it can reach a terminal state”

Idea: several certificates to a same subprogram (next slides).

Proof: by the “circular” implications:

Some reduction strategynormalizes t

e.g., the leftmost-o. strat.

t can reach aterminal state

e.g., ∃ red. path to a β-NF(Weak Normalization)

t is typable

t is WN iff the leftmost-o. stategy terminates on t

nothing to do with types

Intersection types

Perhaps too expressive. . .

. . . but certify reduction strategies!

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 4 /36

Page 18: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intersections types (Coppo, Dezani, 1980)

Goal

Equivalences of the form

“the program t is typable iff it can reach a terminal state”

Idea: several certificates to a same subprogram (next slides).

Proof: by the “circular” implications:

Some reduction strategynormalizes t

e.g., the leftmost-o. strat.

t can reach aterminal state

e.g., ∃ red. path to a β-NF(Weak Normalization)

t is typable

t is WN iff the leftmost-o. stategy terminates on t

nothing to do with types

Intersection types

Perhaps too expressive. . .

. . . but certify reduction strategies!

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 4 /36

Page 19: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intuitions (syntax)

Naively, A ∧B stands for A ∩B:

t is of type A ∧B if t can be typed with A as well as B.

I : A→ A I : (A→ B)→ (A→ B)

I : (A→ A) ∧ ((A→ B)→ (A→ B))∧ −intro (with I = λx.x)

Intersection = kind of finite polymorphism.

(A→ A) ∧ ((A→ B)→ (A→ B)) = double instance of ∀X.X → X

(with X = A and X = A→ B)

But less constrained :

assigning x : o ∧ (o→ o′) ∧ (o→ o)→ o is legal.

(not an instance of a polymorphic type except ∀X.X := False!)

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 5 /36

Page 20: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intuitions (syntax)

Naively, A ∧B stands for A ∩B:

t is of type A ∧B if t can be typed with A as well as B.

I : A→ A I : (A→ B)→ (A→ B)

I : (A→ A) ∧ ((A→ B)→ (A→ B))∧ −intro (with I = λx.x)

Intersection = kind of finite polymorphism.

(A→ A) ∧ ((A→ B)→ (A→ B)) = double instance of ∀X.X → X

(with X = A and X = A→ B)

But less constrained :

assigning x : o ∧ (o→ o′) ∧ (o→ o)→ o is legal.

(not an instance of a polymorphic type except ∀X.X := False!)

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 5 /36

Page 21: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intuitions (syntax)

Naively, A ∧B stands for A ∩B:

t is of type A ∧B if t can be typed with A as well as B.

I : A→ A I : (A→ B)→ (A→ B)

I : (A→ A) ∧ ((A→ B)→ (A→ B))∧ −intro (with I = λx.x)

Intersection = kind of finite polymorphism.

(A→ A) ∧ ((A→ B)→ (A→ B)) = double instance of ∀X.X → X

(with X = A and X = A→ B)

But less constrained :

assigning x : o ∧ (o→ o′) ∧ (o→ o)→ o is legal.

(not an instance of a polymorphic type except ∀X.X := False!)

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 5 /36

Page 22: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Subject Reduction and Subject Expansion

A good intersection type system should enjoy:

Subject Reduction (SR):Typing is stable under reduction.

Subject Expansion (SE):Typing is stable under anti-reduction.

SE is usually not verified by simple or

polymorphic type systems

Some reduction strategynormalizes t

t can reach aterminal state

t is typabletyping theterm. states

+ SE SR + extra arg.

obvious

Extra arg. =

reducibility cand.

non-trivial well-founded order.

can it be simpler?

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 6 /36

Page 23: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Subject Reduction and Subject Expansion

A good intersection type system should enjoy:

Subject Reduction (SR):Typing is stable under reduction.

Subject Expansion (SE):Typing is stable under anti-reduction.

SE is usually not verified by simple or

polymorphic type systems

Some reduction strategynormalizes t

t can reach aterminal state

t is typabletyping theterm. states

+ SE SR + extra arg.

obvious

Extra arg. =

reducibility cand.

non-trivial well-founded order.

can it be simpler?

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 6 /36

Page 24: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Subject Reduction and Subject Expansion

A good intersection type system should enjoy:

Subject Reduction (SR):Typing is stable under reduction.

Subject Expansion (SE):Typing is stable under anti-reduction.

SE is usually not verified by simple or

polymorphic type systems

Some reduction strategynormalizes t

t can reach aterminal state

t is typabletyping theterm. states

+ SE SR + extra arg.

obvious Extra arg. =

reducibility cand.

non-trivial well-founded order.

can it be simpler?

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 6 /36

Page 25: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Ensuring Subject Expansion

x : Aax

x : Aax

x : Aax

x : A ` r : Babs

λx.r : A→ Bapp

(λx.r)s : B

s : A

Πs

Subject Reduction (SR):Typing is stable under reduction.

Subject Expansion (SE):Typing is stable under anti-reduction.

s : A

s : A

s : A

Πs

Πs

Πs

r[s/x] : B

s : A1

s : A2

s : A3

Π1s

Π2s

Π3s

r[s/x] : B

think of (λx.x x)I →β I I

Left occ. of I: (A→A)→(A→A)

Right occ. of I: A→A

Solution:Allow several type assignmentsfor a same variable/subterm

x : A1 ∧A2 ∧A3

` x : Ai (i = 1, 2, 3)

x : ?ax

x : ?ax

x : ?ax

x : ? ` r : Babs

λx.r : ?→ Bapp

(λx.r)s : B

s : ?

Πs

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 7 /36

Page 26: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Ensuring Subject Expansion

x : Aax

x : Aax

x : Aax

x : A ` r : Babs

λx.r : A→ Bapp

(λx.r)s : B

s : A

Πs

Subject Reduction (SR):Typing is stable under reduction.

Subject Expansion (SE):Typing is stable under anti-reduction.

s : A

s : A

s : A

Πs

Πs

Πs

r[s/x] : B

s : A1

s : A2

s : A3

Π1s

Π2s

Π3s

r[s/x] : B

think of (λx.x x)I →β I I

Left occ. of I: (A→A)→(A→A)

Right occ. of I: A→A

Solution:Allow several type assignmentsfor a same variable/subterm

x : A1 ∧A2 ∧A3

` x : Ai (i = 1, 2, 3)

x : ?ax

x : ?ax

x : ?ax

x : ? ` r : Babs

λx.r : ?→ Bapp

(λx.r)s : B

s : ?

Πs

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 7 /36

Page 27: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Ensuring Subject Expansion

x : Aax

x : Aax

x : Aax

x : A ` r : Babs

λx.r : A→ Bapp

(λx.r)s : B

s : A

Πs

Subject Reduction (SR):Typing is stable under reduction.

Subject Expansion (SE):Typing is stable under anti-reduction.

s : A

s : A

s : A

Πs

Πs

Πs

r[s/x] : B

s : A1

s : A2

s : A3

Π1s

Π2s

Π3s

r[s/x] : B

think of (λx.x x)I →β I I

Left occ. of I: (A→A)→(A→A)

Right occ. of I: A→A

Solution:Allow several type assignmentsfor a same variable/subterm

x : A1 ∧A2 ∧A3

` x : Ai (i = 1, 2, 3)

x : ?ax

x : ?ax

x : ?ax

x : ? ` r : Babs

λx.r : ?→ Bapp

(λx.r)s : B

s : ?

Πs

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 7 /36

Page 28: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Ensuring Subject Expansion

x : Aax

x : Aax

x : Aax

x : A ` r : Babs

λx.r : A→ Bapp

(λx.r)s : B

s : A

Πs

Subject Reduction (SR):Typing is stable under reduction.

Subject Expansion (SE):Typing is stable under anti-reduction.

s : A

s : A

s : A

Πs

Πs

Πs

r[s/x] : B

s : A1

s : A2

s : A3

Π1s

Π2s

Π3s

r[s/x] : B

think of (λx.x x)I →β I I

Left occ. of I: (A→A)→(A→A)

Right occ. of I: A→A

Solution:Allow several type assignmentsfor a same variable/subterm

x : A1 ∧A2 ∧A3

` x : Ai (i = 1, 2, 3)

x : ?ax

x : ?ax

x : ?ax

x : ? ` r : Babs

λx.r : ?→ Bapp

(λx.r)s : B

s : ?

Πs

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 7 /36

Page 29: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Ensuring Subject Expansion

x : Aax

x : Aax

x : Aax

x : A ` r : Babs

λx.r : A→ Bapp

(λx.r)s : B

s : A

Πs

Subject Reduction (SR):Typing is stable under reduction.

Subject Expansion (SE):Typing is stable under anti-reduction.

s : A

s : A

s : A

Πs

Πs

Πs

r[s/x] : B

s : A1

s : A2

s : A3

Π1s

Π2s

Π3s

r[s/x] : B

think of (λx.x x)I →β I I

Left occ. of I: (A→A)→(A→A)

Right occ. of I: A→A

Solution:Allow several type assignmentsfor a same variable/subterm

x : A1 ∧A2 ∧A3

` x : Ai (i = 1, 2, 3)

x : ?ax

x : ?ax

x : ?ax

x : ? ` r : Babs

λx.r : ?→ Bapp

(λx.r)s : B

s : ?

Πs

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 7 /36

Page 30: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Ensuring Subject Expansion

x : Aax

x : Aax

x : Aax

x : A ` r : Babs

λx.r : A→ Bapp

(λx.r)s : B

s : A

Πs

Subject Reduction (SR):Typing is stable under reduction.

Subject Expansion (SE):Typing is stable under anti-reduction.

s : A

s : A

s : A

Πs

Πs

Πs

r[s/x] : B

s : A1

s : A2

s : A3

Π1s

Π2s

Π3s

r[s/x] : B

think of (λx.x x)I →β I I

Left occ. of I: (A→A)→(A→A)

Right occ. of I: A→A

Solution:Allow several type assignmentsfor a same variable/subterm

x : A1 ∧A2 ∧A3

` x : Ai (i = 1, 2, 3)

x : ?ax

x : ?ax

x : ?ax

x : ? ` r : Babs

λx.r : ?→ Bapp

(λx.r)s : B

s : ?

Πs

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 7 /36

Page 31: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Ensuring Subject Expansion

x : Aax

x : Aax

x : Aax

x : A ` r : Babs

λx.r : A→ Bapp

(λx.r)s : B

s : A

Πs

Subject Reduction (SR):Typing is stable under reduction.

Subject Expansion (SE):Typing is stable under anti-reduction.

s : A

s : A

s : A

Πs

Πs

Πs

r[s/x] : B

s : A1

s : A2

s : A3

Π1s

Π2s

Π3s

r[s/x] : B

think of (λx.x x)I →β I I

Left occ. of I: (A→A)→(A→A)

Right occ. of I: A→A

Solution:Allow several type assignmentsfor a same variable/subterm

x : A1 ∧A2 ∧A3

` x : Ai (i = 1, 2, 3)

x : ?ax

x : ?ax

x : ?ax

x : ? ` r : Babs

λx.r : ?→ Bapp

(λx.r)s : B

s : ?

Πs

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 7 /36

Page 32: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Ensuring Subject Expansion

x : Aax

x : Aax

x : Aax

x : A ` r : Babs

λx.r : A→ Bapp

(λx.r)s : B

s : A

Πs

Subject Reduction (SR):Typing is stable under reduction.

Subject Expansion (SE):Typing is stable under anti-reduction.

s : A

s : A

s : A

Πs

Πs

Πs

r[s/x] : B

s : A1

s : A2

s : A3

Π1s

Π2s

Π3s

r[s/x] : B

think of (λx.x x)I →β I I

Left occ. of I: (A→A)→(A→A)

Right occ. of I: A→A

Solution:Allow several type assignmentsfor a same variable/subterm

x : A1 ∧A2 ∧A3

` x : Ai (i = 1, 2, 3)

x : ?ax

x : ?ax

x : ?ax

x : ? ` r : Babs

λx.r : ?→ Bapp

(λx.r)s : B

s : ?

Πs

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 7 /36

Page 33: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Ensuring Subject Expansion

x : Aax

x : Aax

x : Aax

x : A ` r : Babs

λx.r : A→ Bapp

(λx.r)s : B

s : A

Πs

Subject Reduction (SR):Typing is stable under reduction.

Subject Expansion (SE):Typing is stable under anti-reduction.

s : A

s : A

s : A

Πs

Πs

Πs

r[s/x] : B

s : A1

s : A2

s : A3

Π1s

Π2s

Π3s

r[s/x] : B

think of (λx.x x)I →β I I

Left occ. of I: (A→A)→(A→A)

Right occ. of I: A→A

Solution:Allow several type assignmentsfor a same variable/subterm

x : A1 ∧A2 ∧A3

` x : Ai (i = 1, 2, 3)

x : ?ax

x : ?ax

x : ?ax

x : ? ` r : Babs

λx.r : ?→ Bapp

(λx.r)s : B

s : ?

Πs

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 7 /36

Page 34: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Ensuring Subject Expansion

x : Aax

x : Aax

x : Aax

x : A ` r : Babs

λx.r : A→ Bapp

(λx.r)s : B

s : A

Πs

Subject Reduction (SR):Typing is stable under reduction.

Subject Expansion (SE):Typing is stable under anti-reduction.

s : A

s : A

s : A

Πs

Πs

Πs

r[s/x] : B

s : A1

s : A2

s : A3

Π1s

Π2s

Π3s

r[s/x] : B

think of (λx.x x)I →β I I

Left occ. of I: (A→A)→(A→A)

Right occ. of I: A→A

Solution:Allow several type assignmentsfor a same variable/subterm

x : A1 ∧A2 ∧A3

` x : Ai (i = 1, 2, 3)

x : ?ax

x : ?ax

x : ?ax

x : ? ` r : Babs

λx.r : ?→ Bapp

(λx.r)s : B

s : ?

Πs

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 7 /36

Page 35: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Typing every normal form

Consider (y(x (λz.z))) (x (λz.z c))

We want x : E → F

λz.z : A→ A vs. λz.z c : (C → D)→ D

E = A→ A or E = (C → D)→ D?

Solution:Allow several type assignmentsfor a same variable/subterm

Typing normal form: just structural induction (no clash).

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 8 /36

Page 36: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Typing every normal form

Consider (y(x (λz.z))) (x (λz.z c))

We want x : E → F

λz.z : A→ A vs. λz.z c : (C → D)→ D

E = A→ A or E = (C → D)→ D?

Solution:Allow several type assignmentsfor a same variable/subterm

Typing normal form: just structural induction (no clash).

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 8 /36

Page 37: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Typing every normal form

Consider (y(x (λz.z))) (x (λz.z c))

We want x : E → F

λz.z : A→ A vs. λz.z c : (C → D)→ D

E = A→ A or E = (C → D)→ D?

Solution:Allow several type assignmentsfor a same variable/subterm

Typing normal form: just structural induction (no clash).

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 8 /36

Page 38: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Typing every normal form

Consider (y(x (λz.z))) (x (λz.z c))

We want x : E → F

λz.z : A→ A vs. λz.z c : (C → D)→ D

E = A→ A or E = (C → D)→ D?

Solution:Allow several type assignmentsfor a same variable/subterm

Typing normal form: just structural induction (no clash).

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 8 /36

Page 39: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Typing every normal form

Consider (y(x (λz.z))) (x (λz.z c))

We want x : E → F

λz.z : A→ A vs. λz.z c : (C → D)→ D

E = A→ A or E = (C → D)→ D?

Solution:Allow several type assignmentsfor a same variable/subterm

Typing normal form: just structural induction (no clash).

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 8 /36

Page 40: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Typing every normal form

Consider (y(x (λz.z))) (x (λz.z c))

We want x : E → F

λz.z : A→ A vs. λz.z c : (C → D)→ D

E = A→ A or E = (C → D)→ D?

Solution:Allow several type assignmentsfor a same variable/subterm

Typing normal form: just structural induction (no clash).

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 8 /36

Page 41: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Non-idempotency

Computation causes duplication.

Non-idempotent intersection types

Disallow duplication for typing certificates. Possibly many certificates (subderivations) for a subprogram.

Size of certificates decreases.

Initialcertificate

Initial stateof the prog.

STOP(cannot be

reduced more)

Terminalstate reached!!

Execution

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 9 /36

Page 42: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Non-idempotency

Computation causes duplication.

Non-idempotent intersection types

Disallow duplication for typing certificates. Possibly many certificates (subderivations) for a subprogram.

Size of certificates decreases.

Initialcertificate

Initial stateof the prog.

STOP(cannot be

reduced more)

Terminalstate reached!!

Execution

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 9 /36

Page 43: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Non-idempotency

Computation causes duplication.

Non-idempotent intersection types

Disallow duplication for typing certificates. Possibly many certificates (subderivations) for a subprogram.

Size of certificates decreases.

Initialcertificate

Initial stateof the prog.

STOP(cannot be

reduced more)

Terminalstate reached!!

Execution

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 9 /36

Page 44: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Non-idempotency

Computation causes duplication.

Non-idempotent intersection types

Disallow duplication for typing certificates. Possibly many certificates (subderivations) for a subprogram.

Size of certificates decreases.

Initialcertificate

Initial stateof the prog.

STOP(cannot be

reduced more)

Terminalstate reached!!

Execution

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 9 /36

Page 45: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Non-idempotency

Computation causes duplication.

Non-idempotent intersection types

Disallow duplication for typing certificates. Possibly many certificates (subderivations) for a subprogram.

Size of certificates decreases.

Initialcertificate

Initial stateof the prog.

STOP(cannot be

reduced more)

Terminalstate reached!!

Execution

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 9 /36

Page 46: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Non-idempotency

Computation causes duplication.

Non-idempotent intersection types

Disallow duplication for typing certificates. Possibly many certificates (subderivations) for a subprogram.

Size of certificates decreases.

Initialcertificate

Initial stateof the prog.

STOP(cannot be

reduced more)

Terminalstate reached!!

Execution

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 9 /36

Page 47: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Non-idempotency

Computation causes duplication.

Non-idempotent intersection types

Disallow duplication for typing certificates. Possibly many certificates (subderivations) for a subprogram.

Size of certificates decreases.

Initialcertificate

Initial stateof the prog.

STOP(cannot be

reduced more)

Terminalstate reached!!

Execution

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 9 /36

Page 48: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Non-idempotency

Computation causes duplication.

Non-idempotent intersection types

Disallow duplication for typing certificates. Possibly many certificates (subderivations) for a subprogram.

Size of certificates decreases.

Initialcertificate

Initial stateof the prog.

STOP(cannot be

reduced more)

Terminalstate reached!!

Execution

Exact bounds in λµ P. Vial 1 Overview (idempotent or not intersection types) 9 /36

Page 49: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Plan

1 Overview (idempotent or not intersection types)

2 Non-idempotent intersection types

3 Extracting exact lengths of reduction

4 Resources for Classical Logic

5 Exact Measures for λµ

6 Perspectives

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 10 /36

Page 50: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Head Normalization (λ)

x

head variable

t1

@ tq

@

λxp

Head Normal Form

r

λxs

@

head redex

t1

@ tq

@

λxp

Head Reducible Term

the head reduction strategyterminates on t

t is HN(∃path from t to a HNF)

obvious

true but not obvious

Intersection types come to help!

t is head normalizing (HN) if ∃ reduction path from t to a HNF.

The head reduction strategy: reducing head redexes while it is possible.

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 11 /36

Page 51: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Head Normalization (λ)

x

head variable

t1

@ tq

@

λxp

Head Normal Form

r

λxs

@

head redex

t1

@ tq

@

λxp

Head Reducible Term

the head reduction strategyterminates on t

t is HN(∃path from t to a HNF)

obvious

true but not obvious

Intersection types come to help!

t is head normalizing (HN) if ∃ reduction path from t to a HNF.

The head reduction strategy: reducing head redexes while it is possible.

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 11 /36

Page 52: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Head Normalization (λ)

x

head variable

t1

@ tq

@

λxp

Head Normal Form

r

λxs

@

head redex

t1

@ tq

@

λxp

Head Reducible Term

the head reduction strategyterminates on t

t is HN(∃path from t to a HNF)

obvious

true but not obvious

Intersection types come to help!

t is head normalizing (HN) if ∃ reduction path from t to a HNF.

The head reduction strategy: reducing head redexes while it is possible.

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 11 /36

Page 53: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Head Normalization (λ)

x

head variable

t1

@ tq

@

λxp

Head Normal Form

r

λxs

@

head redex

t1

@ tq

@

λxp

Head Reducible Term

the head reduction strategyterminates on t

t is HN(∃path from t to a HNF)

obvious

true but not obvious

Intersection types come to help!

t is head normalizing (HN) if ∃ reduction path from t to a HNF.

The head reduction strategy: reducing head redexes while it is possible.

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 11 /36

Page 54: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Head Normalization (λ)

x

head variable

t1

@ tq

@

λxp

Head Normal Form

r

λxs

@

head redex

t1

@ tq

@

λxp

Head Reducible Term

the head reduction strategyterminates on t

t is HN(∃path from t to a HNF)

obvious

true but not obvious

Intersection types come to help!

t is head normalizing (HN) if ∃ reduction path from t to a HNF.

The head reduction strategy: reducing head redexes while it is possible.

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 11 /36

Page 55: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Head Normalization (λ)

x

head variable

t1

@ tq

@

λxp

Head Normal Form

r

λxs

@

head redex

t1

@ tq

@

λxp

Head Reducible Term

the head reduction strategyterminates on t

t is HN(∃path from t to a HNF)

obvious

true but not obvious

Intersection types come to help!

t is head normalizing (HN) if ∃ reduction path from t to a HNF.

The head reduction strategy: reducing head redexes while it is possible.

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 11 /36

Page 56: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Head Normalization (λ)

x

head variable

t1

@ tq

@

λxp

Head Normal Form

r

λxs

@

head redex

t1

@ tq

@

λxp

Head Reducible Term

the head reduction strategyterminates on t

t is HN(∃path from t to a HNF)

obvious

true but not obvious

Intersection types come to help!

t is head normalizing (HN) if ∃ reduction path from t to a HNF.

The head reduction strategy: reducing head redexes while it is possible.

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 11 /36

Page 57: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intersection types (Coppo-Dezani 80)

Type constructors: o ∈ O, → and ∧ (intersection).

Strict types:no inter. on the right h.s. of →, e.g., (A ∧B)→ A, not A→ (B ∧ C)

no intro/elim. rules for ∧

Assoc.: (A ∧B) ∧ C ∼ A ∧ (B ∧ C) Comm.: A ∧B ∼ B ∧A

Idempotency? A ∧A ∼ A

Typing= qualitative info. Typing= quantitative info.

Coppo-Dezani 80 Gardner 94 - de Carvalho 07

Yes No

Collapsing A ∧B ∧ C into [A,B,C] (multiset) no need for perm rules etc.

A ∧B ∧A := [A,B,A] = [A,A,B] 6= [A,B] [A,B,A] = [A,B] + [A]

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 12 /36

Page 58: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intersection types (Coppo-Dezani 80)

Type constructors: o ∈ O, → and ∧ (intersection).

Strict types:no inter. on the right h.s. of →, e.g., (A ∧B)→ A, not A→ (B ∧ C)

no intro/elim. rules for ∧

Assoc.: (A ∧B) ∧ C ∼ A ∧ (B ∧ C) Comm.: A ∧B ∼ B ∧A

Idempotency? A ∧A ∼ A

Typing= qualitative info. Typing= quantitative info.

Coppo-Dezani 80 Gardner 94 - de Carvalho 07

Yes No

Collapsing A ∧B ∧ C into [A,B,C] (multiset) no need for perm rules etc.

A ∧B ∧A := [A,B,A] = [A,A,B] 6= [A,B] [A,B,A] = [A,B] + [A]

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 12 /36

Page 59: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intersection types (Coppo-Dezani 80)

Type constructors: o ∈ O, → and ∧ (intersection).

Strict types:no inter. on the right h.s. of →, e.g., (A ∧B)→ A, not A→ (B ∧ C)

no intro/elim. rules for ∧

Assoc.: (A ∧B) ∧ C ∼ A ∧ (B ∧ C) Comm.: A ∧B ∼ B ∧A

Idempotency? A ∧A ∼ A

Typing= qualitative info. Typing= quantitative info.

Coppo-Dezani 80 Gardner 94 - de Carvalho 07

Yes No

Collapsing A ∧B ∧ C into [A,B,C] (multiset) no need for perm rules etc.

A ∧B ∧A := [A,B,A] = [A,A,B] 6= [A,B] [A,B,A] = [A,B] + [A]

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 12 /36

Page 60: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intersection types (Coppo-Dezani 80)

Type constructors: o ∈ O, → and ∧ (intersection).

Strict types:no inter. on the right h.s. of →, e.g., (A ∧B)→ A, not A→ (B ∧ C)

no intro/elim. rules for ∧

Assoc.: (A ∧B) ∧ C ∼ A ∧ (B ∧ C) Comm.: A ∧B ∼ B ∧A

Idempotency? A ∧A ∼ A

Typing= qualitative info. Typing= quantitative info.

Coppo-Dezani 80 Gardner 94 - de Carvalho 07

Yes No

Collapsing A ∧B ∧ C into [A,B,C] (multiset) no need for perm rules etc.

A ∧B ∧A := [A,B,A] = [A,A,B] 6= [A,B] [A,B,A] = [A,B] + [A]

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 12 /36

Page 61: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intersection types (Coppo-Dezani 80)

Type constructors: o ∈ O, → and ∧ (intersection).

Strict types:no inter. on the right h.s. of →, e.g., (A ∧B)→ A, not A→ (B ∧ C)

no intro/elim. rules for ∧

Assoc.: (A ∧B) ∧ C ∼ A ∧ (B ∧ C) Comm.: A ∧B ∼ B ∧A

Idempotency? A ∧A ∼ A

Typing= qualitative info. Typing= quantitative info.

Coppo-Dezani 80 Gardner 94 - de Carvalho 07

Yes No

Collapsing A ∧B ∧ C into [A,B,C] (multiset) no need for perm rules etc.

A ∧B ∧A := [A,B,A] = [A,A,B] 6= [A,B] [A,B,A] = [A,B] + [A]

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 12 /36

Page 62: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Intersection types (Coppo-Dezani 80)

Type constructors: o ∈ O, → and ∧ (intersection).

Strict types:no inter. on the right h.s. of →, e.g., (A ∧B)→ A, not A→ (B ∧ C)

no intro/elim. rules for ∧

Assoc.: (A ∧B) ∧ C ∼ A ∧ (B ∧ C) Comm.: A ∧B ∼ B ∧A

Idempotency? A ∧A ∼ A

Typing= qualitative info. Typing= quantitative info.

Coppo-Dezani 80 Gardner 94 - de Carvalho 07

Yes No

Collapsing A ∧B ∧ C into [A,B,C] (multiset) no need for perm rules etc.

A ∧B ∧A := [A,B,A] = [A,A,B] 6= [A,B] [A,B,A] = [A,B] + [A]

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 12 /36

Page 63: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

System R0 (Gardner 94-de Carvalho 07)

Types: τ, σ ::= o | [σi]i∈I → τ

intersection = multiset of types [σi]i∈I

only on the left-h.s of → (strictness)

axx : [τ ] ` x : τ

Γ; x : [σi]i∈I ` t : τabs

Γ ` λx.t : [σi]i∈I → τ

Γ ` t : [σi]i∈I → τ (Γi ` u : σi)i∈Iapp

Γ +i∈I Γi ` t u : τ

Remark

Relevant system (no weakening, cf. ax-rule)

Non-idempotency (σ ∧ σ 6= σ):in app-rule, pointwise multiset sum e.g.,

(x : [σ]; y : [τ ]) + (x : [σ, τ ]) = x : [σ, σ, τ ]; y : [τ ]

Example

axf : [o]→ o

axx : o

appf x : o

axf : [o]→ o

app

f : [[o]→ o, [o]→ o], x : [o] `

f(f x) : o

Head redexesalways typed!

but an arg. maybe typed 0 time

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 13 /36

Page 64: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

System R0 (Gardner 94-de Carvalho 07)

Types: τ, σ ::= o | [σi]i∈I → τ

intersection = multiset of types [σi]i∈I

only on the left-h.s of → (strictness)

axx : [τ ] ` x : τ

Γ; x : [σi]i∈I ` t : τabs

Γ ` λx.t : [σi]i∈I → τ

Γ ` t : [σi]i∈I → τ (Γi ` u : σi)i∈Iapp

Γ +i∈I Γi ` t u : τ

Remark

Relevant system (no weakening, cf. ax-rule)

Non-idempotency (σ ∧ σ 6= σ):in app-rule, pointwise multiset sum e.g.,

(x : [σ]; y : [τ ]) + (x : [σ, τ ]) = x : [σ, σ, τ ]; y : [τ ]

Example

axf : [o]→ o

axx : o

appf x : o

axf : [o]→ o

app

f : [[o]→ o, [o]→ o], x : [o] `

f(f x) : o

Head redexesalways typed!

but an arg. maybe typed 0 time

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 13 /36

Page 65: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

System R0 (Gardner 94-de Carvalho 07)

Types: τ, σ ::= o | [σi]i∈I → τ

intersection = multiset of types [σi]i∈I

only on the left-h.s of → (strictness)

axx : [τ ] ` x : τ

Γ; x : [σi]i∈I ` t : τabs

Γ ` λx.t : [σi]i∈I → τ

Γ ` t : [σi]i∈I → τ (Γi ` u : σi)i∈Iapp

Γ +i∈I Γi ` t u : τ

Remark

Relevant system (no weakening, cf. ax-rule)

Non-idempotency (σ ∧ σ 6= σ):in app-rule, pointwise multiset sum e.g.,

(x : [σ]; y : [τ ]) + (x : [σ, τ ]) = x : [σ, σ, τ ]; y : [τ ]

Example

axf : [o]→ o

axx : o

appf x : o

axf : [o]→ o

app

f : [[o]→ o, [o]→ o], x : [o] `

f(f x) : o

Head redexesalways typed!

but an arg. maybe typed 0 time

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 13 /36

Page 66: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

System R0 (Gardner 94-de Carvalho 07)

Types: τ, σ ::= o | [σi]i∈I → τ

intersection = multiset of types [σi]i∈I

only on the left-h.s of → (strictness)

axx : [τ ] ` x : τ

Γ; x : [σi]i∈I ` t : τabs

Γ ` λx.t : [σi]i∈I → τ

Γ ` t : [σi]i∈I → τ (Γi ` u : σi)i∈Iapp

Γ +i∈I Γi ` t u : τ

Remark

Relevant system (no weakening, cf. ax-rule)

Non-idempotency (σ ∧ σ 6= σ):in app-rule, pointwise multiset sum e.g.,

(x : [σ]; y : [τ ]) + (x : [σ, τ ]) = x : [σ, σ, τ ]; y : [τ ]

Example

axf : [o]→ o

axx : o

appf x : o

axf : [o]→ o

app

f : [[o]→ o, [o]→ o], x : [o] `

f(f x) : o

Head redexesalways typed!

but an arg. maybe typed 0 time

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 13 /36

Page 67: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

System R0 (Gardner 94-de Carvalho 07)

Types: τ, σ ::= o | [σi]i∈I → τ

intersection = multiset of types [σi]i∈I

only on the left-h.s of → (strictness)

axx : [τ ] ` x : τ

Γ; x : [σi]i∈I ` t : τabs

Γ ` λx.t : [σi]i∈I → τ

Γ ` t : [σi]i∈I → τ (Γi ` u : σi)i∈Iapp

Γ +i∈I Γi ` t u : τ

Remark

Relevant system (no weakening, cf. ax-rule)

Non-idempotency (σ ∧ σ 6= σ):in app-rule, pointwise multiset sum e.g.,

(x : [σ]; y : [τ ]) + (x : [σ, τ ]) = x : [σ, σ, τ ]; y : [τ ]

Example

axf : [o]→ o

axx : o

appf x : o

axf : [o]→ o

app

f : [[o]→ o, [o]→ o], x : [o] `

f(f x) : o

Head redexesalways typed!

but an arg. maybe typed 0 time

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 13 /36

Page 68: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

System R0 (Gardner 94-de Carvalho 07)

Types: τ, σ ::= o | [σi]i∈I → τ

intersection = multiset of types [σi]i∈I

only on the left-h.s of → (strictness)

axx : [τ ] ` x : τ

Γ; x : [σi]i∈I ` t : τabs

Γ ` λx.t : [σi]i∈I → τ

Γ ` t : [σi]i∈I → τ (Γi ` u : σi)i∈Iapp

Γ +i∈I Γi ` t u : τ

Remark

Relevant system (no weakening, cf. ax-rule)

Non-idempotency (σ ∧ σ 6= σ):in app-rule, pointwise multiset sum e.g.,

(x : [σ]; y : [τ ]) + (x : [σ, τ ]) = x : [σ, σ, τ ]; y : [τ ]

Example

axf : [o]→ o

axx : o

appf x : o

axf : [o]→ o

appf : [[o]→ o, [o]→ o], x : [o] ` f(f x) : o

Head redexesalways typed!

but an arg. maybe typed 0 time

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 13 /36

Page 69: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

System R0 (Gardner 94-de Carvalho 07)

Types: τ, σ ::= o | [σi]i∈I → τ

intersection = multiset of types [σi]i∈I

only on the left-h.s of → (strictness)

axx : [τ ] ` x : τ

Γ; x : [σi]i∈I ` t : τabs

Γ ` λx.t : [σi]i∈I → τ

Γ ` t : [σi]i∈I → τ (Γi ` u : σi)i∈Iapp

Γ +i∈I Γi ` t u : τ

Remark

Relevant system (no weakening, cf. ax-rule)

Non-idempotency (σ ∧ σ 6= σ):in app-rule, pointwise multiset sum e.g.,

(x : [σ]; y : [τ ]) + (x : [σ, τ ]) = x : [σ, σ, τ ]; y : [τ ]

Example

axf : [o]→ o

axx : o

appf x : o

axf : [o]→ o

app

f : [[o]→ o, [o]→ o], x : [o] `

f(f x) : o

Head redexesalways typed!

but an arg. maybe typed 0 time

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 13 /36

Page 70: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

System R0 (Gardner 94-de Carvalho 07)

Types: τ, σ ::= o | [σi]i∈I → τ

intersection = multiset of types [σi]i∈I

only on the left-h.s of → (strictness)

axx : [τ ] ` x : τ

Γ; x : [σi]i∈I ` t : τabs

Γ ` λx.t : [σi]i∈I → τ

Γ ` t : [σi]i∈I → τ (Γi ` u : σi)i∈Iapp

Γ +i∈I Γi ` t u : τ

Remark

Relevant system (no weakening, cf. ax-rule)

Non-idempotency (σ ∧ σ 6= σ):in app-rule, pointwise multiset sum e.g.,

(x : [σ]; y : [τ ]) + (x : [σ, τ ]) = x : [σ, σ, τ ]; y : [τ ]

Example

axf : [o]→ o

axx : o

appf x : o

axf : [o]→ o

app

f : [[o]→ o, [o]→ o], x : [o] `

f(f x) : o

Head redexesalways typed!

but an arg. maybe typed 0 time

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 13 /36

Page 71: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

System R0 (Gardner 94-de Carvalho 07)

Types: τ, σ ::= o | [σi]i∈I → τ

intersection = multiset of types [σi]i∈I

only on the left-h.s of → (strictness)

axx : [τ ] ` x : τ

Γ; x : [σi]i∈I ` t : τabs

Γ ` λx.t : [σi]i∈I → τ

Γ ` t : [σi]i∈I → τ (Γi ` u : σi)i∈Iapp

Γ +i∈I Γi ` t u : τ

Remark

Relevant system (no weakening, cf. ax-rule)

Non-idempotency (σ ∧ σ 6= σ):in app-rule, pointwise multiset sum e.g.,

(x : [σ]; y : [τ ]) + (x : [σ, τ ]) = x : [σ, σ, τ ]; y : [τ ]

Example

axf : [o]→ o

axx : o

appf x : o

axf : [o]→ o

app

f : [[o]→ o, [o]→ o], x : [o] `

f(f x) : o

Head redexesalways typed!

but an arg. maybe typed 0 time

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 13 /36

Page 72: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Properties (R0)

Weighted Subject ReductionReduction preserves types and environments, and. . .. . . head reduction strictly decreases the number of nodes of the deriv. tree (size).

(actually, holds for any typed redex)

Subject ExpansionAnti-reduction preserves types and environments.

Theorem (de Carvalho)

Let t be a λ-term. Then equivalence between:

1 t is typable (in R0)

2 t is HN

3 the head reduction strategy terminates on t ( certification!)

Bonus (quantitative information)

If Π types t, then size(Π) bounds the number of stepsof the head red. strategy on t

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 14 /36

Page 73: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Head vs Weak and Strong Normalization

Let t be a λ-term.

Head normalization (HN):there is a path from t to a head normal form.

Weak normalization (WN):there is at least one path from t to a β-Normal Form (NF)

Strong normalization (SN):there is no infinite path starting at t.

SN ⇒ WN ⇒ HN

Nota Bene: yΩ HNF but not WN (λx.y)Ω WN but not SN

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 15 /36

Page 74: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Characterizing Weak and Strong Normalization

any arg. can be left untyped

non-erasable args must be typed

all args must be typed

HN System R0 sz(Π) bounds the number ofhead reduction steps

WN System R0

+ unforgetfulness criterionsz(Π) bounds the numberof leftmost-outermost red.steps (and more)

SN Modify system R0

with choice operatorsz(Π) bounds the length ofany reduction path

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 16 /36

Page 75: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Subject reduction and expansion in R0

From a typing of (λx.r)s . . . to a typing of r[s/x]

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆a

1 `s :σ1

Πa1

∆a1 `s :σ1

Πa1

∆b1`s :σ1

Πb1

Non-determinism of SR

axx : [σ2] ` x :σ2

axx : [σ2] ` x :σ2∆2`s :σ2

Π2

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆b

1`s :σ1

Πb1

∆b1`s :σ1

Πb1

∆a1 `s :σ1

Πa1

Γ; x : [σ1, σ2, σ1] ` r : τabs

Γ ` λx.r : [σ1, σ2, σ1]→ τapp

Γ + ∆a1 + ∆b

1 + ∆2 ` (λx.r)s : τ

∆a1 `s :σ1

Πa1

∆2`s :σ2

Π2

∆b1`s :σ1

Πb1

Γ + ∆a1 + ∆b

1 + ∆2 ` r[s/x] : τ

By relevance and non-idempotency!

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 17 /36

Page 76: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Subject reduction and expansion in R0

From a typing of (λx.r)s . . . to a typing of r[s/x]

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆a

1 `s :σ1

Πa1

∆a1 `s :σ1

Πa1

∆b1`s :σ1

Πb1

Non-determinism of SR

axx : [σ2] ` x :σ2

axx : [σ2] ` x :σ2∆2`s :σ2

Π2

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆b

1`s :σ1

Πb1

∆b1`s :σ1

Πb1

∆a1 `s :σ1

Πa1

Γ; x : [σ1, σ2, σ1] ` r : τabs

Γ ` λx.r : [σ1, σ2, σ1]→ τapp

Γ + ∆a1 + ∆b

1 + ∆2 ` (λx.r)s : τ

∆a1 `s :σ1

Πa1

∆2`s :σ2

Π2

∆b1`s :σ1

Πb1

Γ + ∆a1 + ∆b

1 + ∆2 ` r[s/x] : τ

By relevance and non-idempotency!

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 17 /36

Page 77: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Subject reduction and expansion in R0

From a typing of (λx.r)s . . . to a typing of r[s/x]

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆a

1 `s :σ1

Πa1

∆a1 `s :σ1

Πa1

∆b1`s :σ1

Πb1

Non-determinism of SR

axx : [σ2] ` x :σ2

axx : [σ2] ` x :σ2∆2`s :σ2

Π2

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆b

1`s :σ1

Πb1

∆b1`s :σ1

Πb1

∆a1 `s :σ1

Πa1

Γ; x : [σ1, σ2, σ1] ` r : τabs

Γ ` λx.r : [σ1, σ2, σ1]→ τapp

Γ + ∆a1 + ∆b

1 + ∆2 ` (λx.r)s : τ

∆a1 `s :σ1

Πa1

∆2`s :σ2

Π2

∆b1`s :σ1

Πb1

Γ + ∆a1 + ∆b

1 + ∆2 ` r[s/x] : τ

By relevance and non-idempotency!

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 17 /36

Page 78: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Subject reduction and expansion in R0

From a typing of (λx.r)s . . . to a typing of r[s/x]

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆a

1 `s :σ1

Πa1

∆a1 `s :σ1

Πa1

∆b1`s :σ1

Πb1

Non-determinism of SR

axx : [σ2] ` x :σ2

axx : [σ2] ` x :σ2∆2`s :σ2

Π2

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆b

1`s :σ1

Πb1

∆b1`s :σ1

Πb1

∆a1 `s :σ1

Πa1

Γ; x : [σ1, σ2, σ1] ` r : τabs

Γ ` λx.r : [σ1, σ2, σ1]→ τapp

Γ + ∆a1 + ∆b

1 + ∆2 ` (λx.r)s : τ

∆a1 `s :σ1

Πa1

∆2`s :σ2

Π2

∆b1`s :σ1

Πb1

Γ + ∆a1 + ∆b

1 + ∆2 ` r[s/x] : τ

By relevance and non-idempotency!

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 17 /36

Page 79: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Subject reduction and expansion in R0

From a typing of (λx.r)s . . . to a typing of r[s/x]

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1

∆a1 `s :σ1

Πa1

∆a1 `s :σ1

Πa1

∆b1`s :σ1

Πb1

Non-determinism of SR

axx : [σ2] ` x :σ2

axx : [σ2] ` x :σ2

∆2`s :σ2

Π2

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1

∆b1`s :σ1

Πb1

∆b1`s :σ1

Πb1

∆a1 `s :σ1

Πa1

Γ; x : [σ1, σ2, σ1] ` r : τabs

Γ ` λx.r : [σ1, σ2, σ1]→ τapp

Γ + ∆a1 + ∆b

1 + ∆2 ` (λx.r)s : τ

∆a1 `s :σ1

Πa1

∆2`s :σ2

Π2

∆b1`s :σ1

Πb1

Γ + ∆a1 + ∆b

1 + ∆2 ` r[s/x] : τ

By relevance and non-idempotency!

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 17 /36

Page 80: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Subject reduction and expansion in R0

From a typing of (λx.r)s . . . to a typing of r[s/x]

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆a

1 `s :σ1

Πa1

∆a1 `s :σ1

Πa1

∆b1`s :σ1

Πb1

Non-determinism of SR

axx : [σ2] ` x :σ2

axx : [σ2] ` x :σ2∆2`s :σ2

Π2

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆b

1`s :σ1

Πb1

∆b1`s :σ1

Πb1

∆a1 `s :σ1

Πa1

Γ; x : [σ1, σ2, σ1] ` r : τabs

Γ ` λx.r : [σ1, σ2, σ1]→ τapp

Γ + ∆a1 + ∆b

1 + ∆2 ` (λx.r)s : τ

∆a1 `s :σ1

Πa1

∆2`s :σ2

Π2

∆b1`s :σ1

Πb1

Γ + ∆a1 + ∆b

1 + ∆2 ` r[s/x] : τ

By relevance and non-idempotency!

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 17 /36

Page 81: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Subject reduction and expansion in R0

From a typing of (λx.r)s . . . to a typing of r[s/x]

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆a

1 `s :σ1

Πa1

∆a1 `s :σ1

Πa1

∆b1`s :σ1

Πb1

Non-determinism of SR

axx : [σ2] ` x :σ2

axx : [σ2] ` x :σ2∆2`s :σ2

Π2

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆b

1`s :σ1

Πb1

∆b1`s :σ1

Πb1

∆a1 `s :σ1

Πa1

Γ; x : [σ1, σ2, σ1] ` r : τabs

Γ ` λx.r : [σ1, σ2, σ1]→ τapp

Γ + ∆a1 + ∆b

1 + ∆2 ` (λx.r)s : τ

∆a1 `s :σ1

Πa1

∆2`s :σ2

Π2

∆b1`s :σ1

Πb1

Γ + ∆a1 + ∆b

1 + ∆2 ` r[s/x] : τ

By relevance and non-idempotency!

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 17 /36

Page 82: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Subject reduction and expansion in R0

From a typing of (λx.r)s . . . to a typing of r[s/x]

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1

∆a1 `s :σ1

Πa1

∆a1 `s :σ1

Πa1

∆b1`s :σ1

Πb1

Non-determinism of SR

axx : [σ2] ` x :σ2

axx : [σ2] ` x :σ2

∆2`s :σ2

Π2

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1

∆b1`s :σ1

Πb1

∆b1`s :σ1

Πb1

∆a1 `s :σ1

Πa1

Γ; x : ` r : τabs

Γ ` λx.r : [σ1, σ2, σ1]→ τapp

Γ + ∆a1 + ∆b

1 + ∆2 ` (λx.r)s : τ

Γ + ∆a1 + ∆b

1 + ∆2 ` r[s/x] : τ

By relevance and non-idempotency!

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 17 /36

Page 83: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Subject reduction and expansion in R0

From a typing of (λx.r)s . . . to a typing of r[s/x]

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆a

1 `s :σ1

Πa1

∆a1 `s :σ1

Πa1

∆b1`s :σ1

Πb1

Non-determinism of SR

axx : [σ2] ` x :σ2

axx : [σ2] ` x :σ2

∆2`s :σ2

Π2

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆b

1`s :σ1

Πb1

∆b1`s :σ1

Πb1

∆a1 `s :σ1

Πa1

Γ; x : ` r : τabs

Γ ` λx.r : [σ1, σ2, σ1]→ τapp

Γ + ∆a1 + ∆b

1 + ∆2 ` (λx.r)s : τ

Γ + ∆a1 + ∆b

1 + ∆2 ` r[s/x] : τ

By relevance and non-idempotency!

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 17 /36

Page 84: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Subject reduction and expansion in R0

From a typing of (λx.r)s . . . to a typing of r[s/x]

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆a

1 `s :σ1

Πa1

∆a1 `s :σ1

Πa1

∆b1`s :σ1

Πb1

Non-determinism of SR

axx : [σ2] ` x :σ2

axx : [σ2] ` x :σ2

∆2`s :σ2

Π2

axx : [σ1] ` x :σ1

axx : [σ1] ` x :σ1∆b

1`s :σ1

Πb1

∆b1`s :σ1

Πb1

∆a1 `s :σ1

Πa1

Γ; x : ` r : τabs

Γ ` λx.r : [σ1, σ2, σ1]→ τapp

Γ + ∆a1 + ∆b

1 + ∆2 ` (λx.r)s : τ

Γ + ∆a1 + ∆b

1 + ∆2 ` r[s/x] : τ

By relevance and non-idempotency!

Exact bounds in λµ P. Vial 2 Non-idempotent intersection types 17 /36

Page 85: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Plan

1 Overview (idempotent or not intersection types)

2 Non-idempotent intersection types

3 Extracting exact lengths of reduction

4 Resources for Classical Logic

5 Exact Measures for λµ

6 Perspectives

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 18 /36

Page 86: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Exact measures for the λ-calculus (principles)

Building on [Accatoli-Kesner-Lengrand,ICFP’18] and [Bernadet-Lengrand,LCMS’13]

Consider 3 reduction strategies S:

head →hd leftmost-o. →lo maximal →mx

(computes a longest red. path)

Goal : finding a type system with annotated judg. Γ `(`,f) t : τ such that:

t→`S t′ a S-norm. form with |t′|S = f

iff Γ `(`,f)S t : τ derivable

Remark:

hd-NF=HNFv.s. lo/mx-NF= full NF (no redex).

|λx1 . . . xp.x t1 . . . tq|hd = p+ q + 1

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 19 /36

Page 87: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Exact measures for the λ-calculus (principles)

Building on [Accatoli-Kesner-Lengrand,ICFP’18] and [Bernadet-Lengrand,LCMS’13]

Consider 3 reduction strategies S:

head →hd leftmost-o. →lo maximal →mx

(computes a longest red. path)

Goal : finding a type system with annotated judg. Γ `(`,f) t : τ such that:

t→`S t′ a S-norm. form with |t′|S = f

iff Γ `(`,f)S t : τ derivable

Remark:

hd-NF=HNFv.s. lo/mx-NF= full NF (no redex).

|λx1 . . . xp.x t1 . . . tq|hd = p+ q + 1

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 19 /36

Page 88: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Exact measures for the λ-calculus (principles)

Building on [Accatoli-Kesner-Lengrand,ICFP’18] and [Bernadet-Lengrand,LCMS’13]

Consider 3 reduction strategies S:

head →hd leftmost-o. →lo maximal →mx

(computes a longest red. path)

Goal : finding a type system with annotated judg. Γ `(`,f) t : τ such that:

t→`S t′ a S-norm. form with |t′|S = f

iff Γ `(`,f)S t : τ derivable

Remark:

hd-NF=HNFv.s. lo/mx-NF= full NF (no redex).

|λx1 . . . xp.x t1 . . . tq|hd = p+ q + 1

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 19 /36

Page 89: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Exact measures for the λ-calculus (principles)

Building on [Accatoli-Kesner-Lengrand,ICFP’18] and [Bernadet-Lengrand,LCMS’13]

Consider 3 reduction strategies S:

head →hd leftmost-o. →lo maximal →mx

(computes a longest red. path)

Goal : finding a type system with annotated judg. Γ `(`,f) t : τ such that:

t→`S t′ a S-norm. form with |t′|S = f

iff Γ `(`,f)S t : τ derivable

Remark:

hd-NF=HNFv.s. lo/mx-NF= full NF (no redex).

|λx1 . . . xp.x t1 . . . tq|hd = p+ q + 1

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 19 /36

Page 90: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

New formalism

• Persistent elements(remain in the NF)• Consuming elements(used during red.)

ex: (λx.y x x)@z →β y z z

• Explicit persistent arrow: 9(new type constructor)• One type constant •

(meaning “not applied”)

ex: λx.x : [•]→ • okλx.x : [•] 9 • not ok

λx.x : • ok

(Elementary types) σ, τ ::= • | [σi]i∈I→ τ | [σi]i∈I 9 τ(Tight elem. types-hd) tighthd ::= • | [ ]9 tighthd(Tight elem. types-full) tightfull ::= • | [•]9 tightfull

Remark: ItightS([σi]i∈I) iff the σi are tight (tight intersection).

This shouldbe ok:

axx : [ • ] 9 [ • ] 9 • u1 : •

appxu1 : [ • ] 9 • u2 : •

appxu1 u2 : •

λx.x u1 u2 : •

λyx.x u1 u2 : •

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 20 /36

Page 91: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

New formalism

• Persistent elements(remain in the NF)• Consuming elements(used during red.)

ex: (λx.y x x)@z →β y z z

• Explicit persistent arrow: 9(new type constructor)• One type constant •

(meaning “not applied”)

ex: λx.x : [•]→ • okλx.x : [•] 9 • not ok

λx.x : • ok

(Elementary types) σ, τ ::= • | [σi]i∈I→ τ | [σi]i∈I 9 τ(Tight elem. types-hd) tighthd ::= • | [ ]9 tighthd(Tight elem. types-full) tightfull ::= • | [•]9 tightfull

Remark: ItightS([σi]i∈I) iff the σi are tight (tight intersection).

This shouldbe ok:

axx : [ • ] 9 [ • ] 9 • u1 : •

appxu1 : [ • ] 9 • u2 : •

appxu1 u2 : •

λx.x u1 u2 : •

λyx.x u1 u2 : •

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 20 /36

Page 92: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

New formalism

• Persistent elements(remain in the NF)• Consuming elements(used during red.)

ex: (λx.y x x)@z →β y z z

• Explicit persistent arrow: 9(new type constructor)• One type constant •

(meaning “not applied”)

ex: λx.x : [•]→ • okλx.x : [•] 9 • not okλx.x : • ok

(Elementary types) σ, τ ::= • | [σi]i∈I→ τ | [σi]i∈I 9 τ(Tight elem. types-hd) tighthd ::= • | [ ]9 tighthd(Tight elem. types-full) tightfull ::= • | [•]9 tightfull

Remark: ItightS([σi]i∈I) iff the σi are tight (tight intersection).

This shouldbe ok:

axx : [ • ] 9 [ • ] 9 • u1 : •

appxu1 : [ • ] 9 • u2 : •

appxu1 u2 : •

λx.x u1 u2 : •

λyx.x u1 u2 : •

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 20 /36

Page 93: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

New formalism

• Persistent elements(remain in the NF)• Consuming elements(used during red.)

ex: (λx.y x x)@z →β y z z

• Explicit persistent arrow: 9(new type constructor)• One type constant •

(meaning “not applied”)

ex: λx.x : [•]→ • okλx.x : [•] 9 • not okλx.x : • ok

(Elementary types) σ, τ ::= • | [σi]i∈I→ τ | [σi]i∈I 9 τ(Tight elem. types-hd) tighthd ::= • | [ ]9 tighthd(Tight elem. types-full) tightfull ::= • | [•]9 tightfull

Remark: ItightS([σi]i∈I) iff the σi are tight (tight intersection).

This shouldbe ok:

axx : [ • ] 9 [ • ] 9 • u1 : •

appxu1 : [ • ] 9 • u2 : •

appxu1 u2 : •

λx.x u1 u2 : •

λyx.x u1 u2 : •

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 20 /36

Page 94: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

New formalism

• Persistent elements(remain in the NF)• Consuming elements(used during red.)

ex: (λx.y x x)@z →β y z z

• Explicit persistent arrow: 9(new type constructor)• One type constant •

(meaning “not applied”)

ex: λx.x : [•]→ • okλx.x : [•] 9 • not okλx.x : • ok

(Elementary types) σ, τ ::= • | [σi]i∈I→ τ | [σi]i∈I 9 τ(Tight elem. types-hd) tighthd ::= • | [ ]9 tighthd(Tight elem. types-full) tightfull ::= • | [•]9 tightfull

Remark: ItightS([σi]i∈I) iff the σi are tight (tight intersection).

This shouldbe ok:

axx : [ • ] 9 [ • ] 9 • u1 : •

appxu1 : [ • ] 9 • u2 : •

appxu1 u2 : •

λx.x u1 u2 : •

λyx.x u1 u2 : •Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 20 /36

Page 95: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

New formalism

• Persistent elements(remain in the NF)• Consuming elements(used during red.)

ex: (λx.y x x)@z →β y z z

• Explicit persistent arrow: 9(new type constructor)• One type constant •

(meaning “not applied”)

ex: λx.x : [•]→ • okλx.x : [•] 9 • not okλx.x : • ok

(Elementary types) σ, τ ::= • | [σi]i∈I→ τ | [σi]i∈I 9 τ(Tight elem. types-hd) tighthd ::= • | [ ]9 tighthd(Tight elem. types-full) tightfull ::= • | [•]9 tightfull

Remark: ItightS([σi]i∈I) iff the σi are tight (tight intersection).

This shouldbe ok:

axx : [ • ] 9 [ • ] 9 • u1 : •

appxu1 : [ • ] 9 • u2 : •

appxu1 u2 : •

λx.x u1 u2 : •

λyx.x u1 u2 : •Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 20 /36

Page 96: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

New formalism

• Persistent elements(remain in the NF)• Consuming elements(used during red.)

ex: (λx.y x x)@z →β y z z

• Explicit persistent arrow: 9(new type constructor)• One type constant •

(meaning “not applied”)

ex: λx.x : [•]→ • okλx.x : [•] 9 • not okλx.x : • ok

(Elementary types) σ, τ ::= • | [σi]i∈I→ τ | [σi]i∈I 9 τ(Tight elem. types-hd) tighthd ::= • | [ ]9 tighthd(Tight elem. types-full) tightfull ::= • | [•]9 tightfull

Remark: ItightS([σi]i∈I) iff the σi are tight (tight intersection).

This shouldbe ok:

axx : [ • ] 9 [ • ] 9 • u1 : •

appxu1 : [ • ] 9 • u2 : •

appxu1 u2 : •

λx.x u1 u2 : •

λyx.x u1 u2 : •Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 20 /36

Page 97: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

New formalism

• Persistent elements(remain in the NF)• Consuming elements(used during red.)

ex: (λx.y x x)@z →β y z z

• Explicit persistent arrow: 9(new type constructor)• One type constant •

(meaning “not applied”)

ex: λx.x : [•]→ • okλx.x : [•] 9 • not okλx.x : • ok

(Elementary types) σ, τ ::= • | [σi]i∈I→ τ | [σi]i∈I 9 τ(Tight elem. types-hd) tighthd ::= • | [ ]9 tighthd(Tight elem. types-full) tightfull ::= • | [•]9 tightfull

Remark: ItightS([σi]i∈I) iff the σi are tight (tight intersection).

This shouldbe ok:

axx : [

] 9 [

] 9 •

u1 : •

appxu1 : [

] 9 •

u2 : •

appxu1 u2 : •

λx.x u1 u2 : •

λyx.x u1 u2 : •Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 20 /36

Page 98: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Rules

Γ `(`,f) t : τnumber of β-steps size of the norm. form

(ax)x : [σ] `(0,1) x : σ

Γ `(`,f) t : σ(→i)

Γ \\x `(`+1,f−#Γ(x)) λx.t : Γ(x)→ σ

Γ `(`,f) t : tight tight(Γ(x))(•S)

Γ `(`,f+1) λx.t : •

Γ `(`t,ft) t : F ∆ (`u,fu) u : dom(F)(appS)

Γ ∧∆ `(`f+`u,ft+fu+#pF) t u : codom(F)

with #p?→? = 0 and #p? 9? = 1.

Systems Xλhd/lo

Auxiliary:(Γk `(`k,fk) t : τk)k∈K

∧k∈KΓk (+k∈K`k,+k∈Kfk) t : [τk]k∈K

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 21 /36

Page 99: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Rules

Γ `(`,f) t : τnumber of β-steps size of the norm. form

(ax)x : [σ] `(0,1) x : σ

Γ `(`,f) t : σ(→i)

Γ \\x `(`+1,f−#Γ(x)) λx.t : Γ(x)→ σ

Γ `(`,f) t : tight tight(Γ(x))(•S)

Γ `(`,f+1) λx.t : •

Γ `(`t,ft) t : F ∆ (`u,fu) u : dom(F)(appS)

Γ ∧∆ `(`f+`u,ft+fu+#pF) t u : codom(F)

with #p?→? = 0 and #p? 9? = 1.

Systems Xλhd/lo

Auxiliary:(Γk `(`k,fk) t : τk)k∈K

∧k∈KΓk (+k∈K`k,+k∈Kfk) t : [τk]k∈K

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 21 /36

Page 100: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Rules

Γ `(`,f) t : τnumber of β-steps size of the norm. form

(ax)x : [σ] `(0,1) x : σ

Γ `(`,f) t : σ(→i)

Γ \\x `(`+1,f−#Γ(x)) λx.t : Γ(x)→ σ

Γ `(`,f) t : tight tight(Γ(x))(•S)

Γ `(`,f+1) λx.t : •

Γ `(`t,ft) t : F ∆ (`u,fu) u : dom(F)(appS)

Γ ∧∆ `(`f+`u,ft+fu+#pF) t u : codom(F)

with #p?→? = 0 and #p? 9? = 1.

Systems Xλhd/lo

Auxiliary:(Γk `(`k,fk) t : τk)k∈K

∧k∈KΓk (+k∈K`k,+k∈Kfk) t : [τk]k∈K

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 21 /36

Page 101: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Rules

Γ `(`,f) t : τnumber of β-steps size of the norm. form

(ax)x : [σ] `(0,1) x : σ

Γ `(`,f) t : σ(→i)

Γ \\x `(`+1,f−#Γ(x)) λx.t : Γ(x)→ σ

Γ `(`,f) t : tight tight(Γ(x))(•S)

Γ `(`,f+1) λx.t : •

Γ `(`t,ft) t : F ∆ (`u,fu) u : dom(F)(appS)

Γ ∧∆ `(`f+`u,ft+fu+#pF) t u : codom(F)

with #p?→? = 0 and #p? 9? = 1.

Systems Xλhd/lo

Auxiliary:(Γk `(`k,fk) t : τk)k∈K

∧k∈KΓk (+k∈K`k,+k∈Kfk) t : [τk]k∈K

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 21 /36

Page 102: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Rules

Γ `(`,f) t : τnumber of β-steps size of the norm. form

(ax)x : [σ] `(0,1) x : σ

Γ `(`,f) t : σ(→i)

Γ \\x `(`+1,f−#Γ(x)) λx.t : Γ(x)→ σ

Γ `(`,f) t : tight tight(Γ(x))(•S)

Γ `(`,f+1) λx.t : •

Γ `(`t,ft) t : F ∆ (`u,fu) u : dom(F)(appS)

Γ ∧∆ `(`f+`u,ft+fu+#pF) t u : codom(F)

with #p?→? = 0 and #p? 9? = 1.

Systems Xλhd/lo

Auxiliary:(Γk `(`k,fk) t : τk)k∈K

∧k∈KΓk (+k∈K`k,+k∈Kfk) t : [τk]k∈K

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 21 /36

Page 103: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Rules

Γ `(`,f) t : τnumber of β-steps size of the norm. form

(ax)x : [σ] `(0,1) x : σ

Γ `(`,f) t : σ(→i)

Γ \\x `(`+1,f−#Γ(x)) λx.t : Γ(x)→ σ

Γ `(`,f) t : tight tight(Γ(x))(•S)

Γ `(`,f+1) λx.t : •

Γ `(`t,ft) t : F ∆ (`u,fu) u : dom(F)(appS)

Γ ∧∆ `(`f+`u,ft+fu+#pF) t u : codom(F)

with #p?→? = 0 and #p? 9? = 1.

Systems Xλhd/lo

Auxiliary:(Γk `(`k,fk) t : τk)k∈K

∧k∈KΓk (+k∈K`k,+k∈Kfk) t : [τk]k∈K

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 21 /36

Page 104: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Rules

Γ `(`,f) t : τnumber of β-steps size of the norm. form

(ax)x : [σ] `(0,1) x : σ

Γ `(`,f) t : σ(→i)

Γ \\x `(`+1,f−#Γ(x)) λx.t : Γ(x)→ σ

Γ `(`,f) t : tight tight(Γ(x))(•S)

Γ `(`,f+1) λx.t : •

Γ `(`t,ft) t : F ∆ (`u,fu) u : dom(F)(appS)

Γ ∧∆ `(`f+`u,ft+fu+#pF) t u : codom(F)

with #p?→? = 0 and #p? 9? = 1.

Systems Xλhd/lo

Auxiliary:(Γk `(`k,fk) t : τk)k∈K

∧k∈KΓk (+k∈K`k,+k∈Kfk) t : [τk]k∈K

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 21 /36

Page 105: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Rules

Γ `(`,f) t : τnumber of β-steps size of the norm. form

(ax)x : [σ] `(0,1) x : σ

Γ `(`,f) t : σ(→i)

Γ \\x `(`+1,f−#Γ(x)) λx.t : Γ(x)→ σ

Γ `(`,f) t : tight tight(Γ(x))(•S)

Γ `(`,f+1) λx.t : •

Γ `(`t,ft) t : F ∆ (`u,fu) u : dom(F)(appS)

Γ ∧∆ `(`f+`u,ft+fu+#pF) t u : codom(F)

with #p?→? = 0 and #p? 9? = 1.

Systems Xλhd/lo

Auxiliary:(Γk `(`k,fk) t : τk)k∈K

∧k∈KΓk (+k∈K`k,+k∈Kfk) t : [τk]k∈K

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 21 /36

Page 106: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

A simple example

Let I = λx.x.

(λx.x x)I→S I I→S I (S ∈ hd, lo, mx)

Expected counter (2,2)

x : [[•]→•] `(0,1)x : [•]→• x : [[•]] `(0,1)

x : •

x : [[•]→•, •] `(0,1+1=2)x x : •

(→i)`(1,2−2=0)

λx.x x : [[•]→•, •]→•

x : [•] `(0,1)x : •

(→i)`(1,0)

I : [•]→•

x : [•] `(0,1)x : •

(•S)`(0,1+1=2)

I : •

`(1+1=2,2)(λx.x x)I

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 22 /36

Page 107: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

A simple example

Let I = λx.x.

(λx.x x)I→S I I→S I (S ∈ hd, lo, mx)

Expected counter (2,2)

x : [[•]→•] `(0,1)x : [•]→• x : [[•]] `(0,1)

x : •

x : [[•]→•, •] `(0,1+1=2)x x : •

(→i)`(1,2−2=0)

λx.x x : [[•]→•, •]→•

x : [•] `(0,1)x : •

(→i)`(1,0)

I : [•]→•

x : [•] `(0,1)x : •

(•S)`(0,1+1=2)

I : •

`(1+1=2,2)(λx.x x)I

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 22 /36

Page 108: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Properties of X λhd/lo

Definition:

Tight judgment: Γ `(`,f) t : tight with Γ tight.

Tight deriv.: ccl with tight judg. (local criterion).

Theorem (HN/WN)

Let t ∈ Λ. Then:Γ `(`,f) t : τ tight iff • t→`

hd/lo t′HNF or NF

• |t′|hd/lo = f

Theorem (SN)

Idem for SN and a maximal reduction strategy.

Uniqueparametrized

systemfor the 3 strategies

· Just modify dom(F) with dommx([ ]→ τ) = [•]· Erasable args must now be typed· Specify the size of what is erased in t

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 23 /36

Page 109: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Properties of X λhd/lo

Definition:

Tight judgment: Γ `(`,f) t : tight with Γ tight.

Tight deriv.: ccl with tight judg. (local criterion).

Theorem (HN/WN)

Let t ∈ Λ. Then:Γ `(`,f) t : τ tight iff • t→`

hd/lo t′HNF or NF

• |t′|hd/lo = f

Theorem (SN)

Idem for SN and a maximal reduction strategy.

Uniqueparametrized

systemfor the 3 strategies

· Just modify dom(F) with dommx([ ]→ τ) = [•]· Erasable args must now be typed· Specify the size of what is erased in t

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 23 /36

Page 110: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Properties of X λhd/lo

Definition:

Tight judgment: Γ `(`,f) t : tight with Γ tight.

Tight deriv.: ccl with tight judg. (local criterion).

Theorem (HN/WN)

Let t ∈ Λ. Then:Γ `(`,f) t : τ tight iff • t→`

hd/lo t′HNF or NF

• |t′|hd/lo = f

Theorem (SN)

Idem for SN and a maximal reduction strategy.

Uniqueparametrized

systemfor the 3 strategies

· Just modify dom(F) with dommx([ ]→ τ) = [•]· Erasable args must now be typed· Specify the size of what is erased in t

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 23 /36

Page 111: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Properties of X λhd/lo

Definition:

Tight judgment: Γ `(`,f) t : tight with Γ tight.

Tight deriv.: ccl with tight judg. (local criterion).

Theorem (HN/WN)

Let t ∈ Λ. Then:Γ `(`,f) t : τ tight iff • t→`

hd/lo t′HNF or NF

• |t′|hd/lo = f

Theorem (SN)

Idem for SN and a maximal reduction strategy.

Uniqueparametrized

systemfor the 3 strategies

· Just modify dom(F) with dommx([ ]→ τ) = [•]

· Erasable args must now be typed· Specify the size of what is erased in t

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 23 /36

Page 112: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Properties of X λhd/lo

Definition:

Tight judgment: Γ `(`,f) t : tight with Γ tight.

Tight deriv.: ccl with tight judg. (local criterion).

Theorem (HN/WN)

Let t ∈ Λ. Then:Γ `(`,f) t : τ tight iff • t→`

hd/lo t′HNF or NF

• |t′|hd/lo = f

Theorem (SN)

Idem for SN and a maximal reduction strategy.

Uniqueparametrized

systemfor the 3 strategies

· Just modify dom(F) with dommx([ ]→ τ) = [•]· Erasable args must now be typed

· Specify the size of what is erased in t

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 23 /36

Page 113: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Properties of X λhd/lo

Definition:

Tight judgment: Γ `(`,f) t : tight with Γ tight.

Tight deriv.: ccl with tight judg. (local criterion).

Theorem (HN/WN)

Let t ∈ Λ. Then:Γ `(`,f) t : τ tight iff • t→`

hd/lo t′HNF or NF

• |t′|hd/lo = f

Theorem (SN)

Idem for SN and a maximal reduction strategy.

Uniqueparametrized

systemfor the 3 strategies

· Just modify dom(F) with dommx([ ]→ τ) = [•]· Erasable args must now be typed· Specify the size of what is erased in t

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 23 /36

Page 114: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Properties of X λhd/lo

Definition:

Tight judgment: Γ `(`,f) t : tight with Γ tight.

Tight deriv.: ccl with tight judg. (local criterion).

Theorem (HN/WN)

Let t ∈ Λ. Then:Γ `(`,f) t : τ tight iff • t→`

hd/lo t′HNF or NF

• |t′|hd/lo = f

Theorem (SN)

Idem for SN and a maximal reduction strategy.

Uniqueparametrized

systemfor the 3 strategies

· Just modify dom(F) with dommx([ ]→ τ) = [•]· Erasable args must now be typed· Specify the size of what is erased in t

Exact bounds in λµ P. Vial 3 Extracting exact lengths of reduction 23 /36

Page 115: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Plan

1 Overview (idempotent or not intersection types)

2 Non-idempotent intersection types

3 Extracting exact lengths of reduction

4 Resources for Classical Logic

5 Exact Measures for λµ

6 Perspectives

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 24 /36

Page 116: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The Lambda-Mu Calculus

Intuit. logic + Peirce’s Law ((A→ B)→ A)→ Agives classical logic.

Griffin 90: call−cc and Felleisen’s C-operator typable with Peirce’s Law((A→ B)→ A)→ A

the Curry-Howard iso extends to classical logic

classical logic backtracking

Parigot 92: λµ-calculus = computational interpretation of classical naturaldeduction (e.g., vs. λµµ).

judg. of the form A,A→ B ` A | B,C

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 25 /36

Page 117: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The Lambda-Mu Calculus

Intuit. logic + Peirce’s Law ((A→ B)→ A)→ Agives classical logic.

Griffin 90: call−cc and Felleisen’s C-operator typable with Peirce’s Law((A→ B)→ A)→ A

the Curry-Howard iso extends to classical logic

classical logic backtracking

Parigot 92: λµ-calculus = computational interpretation of classical naturaldeduction (e.g., vs. λµµ).

judg. of the form A,A→ B ` A | B,C

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 25 /36

Page 118: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The Lambda-Mu Calculus

Intuit. logic + Peirce’s Law ((A→ B)→ A)→ Agives classical logic.

Griffin 90: call−cc and Felleisen’s C-operator typable with Peirce’s Law((A→ B)→ A)→ A

the Curry-Howard iso extends to classical logic

classical logic backtracking

Parigot 92: λµ-calculus = computational interpretation of classical naturaldeduction (e.g., vs. λµµ).

judg. of the form A,A→ B ` A | B,C

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 25 /36

Page 119: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Peirce’s Law in Classical Natural Deduction

(A→ B)→ A ` (A→ B)→ A

A ` A,B

` A→ B,A

(A→ B)→ A ` A,A

(A→ B)→ A ` A

` ((A→ B)→ A)→ A

Standard Style

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 26 /36

Page 120: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Peirce’s Law in Classical Natural Deduction

(A→ B)→ A ` (A→ B)→ A

A ` A,B

` A→ B,A

(A→ B)→ A ` A,A

(A→ B)→ A ` A

` ((A→ B)→ A)→ A

Standard Style

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 26 /36

Page 121: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Peirce’s Law in Classical Natural Deduction

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 26 /36

Page 122: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Peirce’s Law in Classical Natural Deduction

(A→ B)→ A ` (A→ B)→ A |

A ` A | B

A ` B | A act

` A→ B | A

(A→ B)→ A ` A | A

(A→ B)→ A ` A |

` ((A→ B)→ A)→ A |

Focussed Style

In the right hand-side of Γ ` F |∆1 active formula F

inactive formulas ∆

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 26 /36

Page 123: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Peirce’s Law in Classical Natural Deduction

(A→ B)→ A ` (A→ B)→ A |

A ` A | B

A ` B | A act

` A→ B | A

(A→ B)→ A ` A | A

(A→ B)→ A ` A |

` ((A→ B)→ A)→ A |

Focussed Style

In the right hand-side of Γ ` F |∆1 active formula F

inactive formulas ∆

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 26 /36

Page 124: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The λµ-calculus

Syntax: λ-calculus

+ names α, β, γ (store inactive formulas)

x1 : D, y : E ` t : C | α : A, β : B

+ two constructors [α]t (naming) and µα (µ-abs.)de/activation

Typed and untyped version

Simply typable ⇒ SN

call−cc := λy.µα.[α]y(λx.µβ.[α]x) :

((A→ B)→ A)→ A

β-reduction+ (µα.[β]t)u→µ µα.[β]tu//α

where tu//α: replace every [α]v in t by [α]v u

How do we adapt the non-idempotent machinery to λµ?

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 27 /36

Page 125: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The λµ-calculus

Syntax: λ-calculus+ names α, β, γ (store inactive formulas)

x1 : D, y : E ` t : C | α : A, β : B

+ two constructors [α]t (naming) and µα (µ-abs.)de/activation

Typed and untyped version

Simply typable ⇒ SN

call−cc := λy.µα.[α]y(λx.µβ.[α]x) :

((A→ B)→ A)→ A

β-reduction+ (µα.[β]t)u→µ µα.[β]tu//α

where tu//α: replace every [α]v in t by [α]v u

How do we adapt the non-idempotent machinery to λµ?

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 27 /36

Page 126: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The λµ-calculus

Syntax: λ-calculus+ names α, β, γ (store inactive formulas)

x1 : D, y : E ` t : C | α : A, β : B

+ two constructors [α]t (naming) and µα (µ-abs.)de/activation

Typed and untyped version

Simply typable ⇒ SN

call−cc := λy.µα.[α]y(λx.µβ.[α]x) :

((A→ B)→ A)→ A

β-reduction+ (µα.[β]t)u→µ µα.[β]tu//α

where tu//α: replace every [α]v in t by [α]v u

How do we adapt the non-idempotent machinery to λµ?

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 27 /36

Page 127: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The λµ-calculus

Syntax: λ-calculus+ names α, β, γ (store inactive formulas)

x1 : D, y : E ` t : C | α : A, β : B

+ two constructors [α]t (naming) and µα (µ-abs.)de/activation

Typed and untyped version

Simply typable ⇒ SN

call−cc := λy.µα.[α]y(λx.µβ.[α]x) :

((A→ B)→ A)→ A

β-reduction+ (µα.[β]t)u→µ µα.[β]tu//α

where tu//α: replace every [α]v in t by [α]v u

How do we adapt the non-idempotent machinery to λµ?

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 27 /36

Page 128: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The λµ-calculus

Syntax: λ-calculus+ names α, β, γ (store inactive formulas)

x1 : D, y : E ` t : C | α : A, β : B

+ two constructors [α]t (naming) and µα (µ-abs.)de/activation

Typed and untyped version

Simply typable ⇒ SN

call−cc := λy.µα.[α]y(λx.µβ.[α]x) :

((A→ B)→ A)→ A

β-reduction+ (µα.[β]t)u→µ µα.[β]tu//α

where tu//α: replace every [α]v in t by [α]v u

How do we adapt the non-idempotent machinery to λµ?

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 27 /36

Page 129: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The λµ-calculus

Syntax: λ-calculus+ names α, β, γ (store inactive formulas)

x1 : D, y : E ` t : C | α : A, β : B

+ two constructors [α]t (naming) and µα (µ-abs.)de/activation

Typed and untyped version

Simply typable ⇒ SN

call−cc := λy.µα.[α]y(λx.µβ.[α]x) : ((A→ B)→ A)→ A

β-reduction+ (µα.[β]t)u→µ µα.[β]tu//α

where tu//α: replace every [α]v in t by [α]v u

How do we adapt the non-idempotent machinery to λµ?

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 27 /36

Page 130: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The λµ-calculus

Syntax: λ-calculus+ names α, β, γ (store inactive formulas)

x1 : D, y : E ` t : C | α : A, β : B

+ two constructors [α]t (naming) and µα (µ-abs.)de/activation

Typed and untyped version

Simply typable ⇒ SN

call−cc := λy.µα.[α]y(λx.µβ.[α]x) : ((A→ B)→ A)→ A

β-reduction+ (µα.[β]t)u→µ µα.[β]tu//α

where tu//α: replace every [α]v in t by [α]v u

How do we adapt the non-idempotent machinery to λµ?

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 27 /36

Page 131: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The λµ-calculus

Syntax: λ-calculus+ names α, β, γ (store inactive formulas)

x1 : D, y : E ` t : C | α : A, β : B

+ two constructors [α]t (naming) and µα (µ-abs.)de/activation

Typed and untyped version

Simply typable ⇒ SN

call−cc := λy.µα.[α]y(λx.µβ.[α]x) : ((A→ B)→ A)→ A

β-reduction+ (µα.[β]t)u→µ µα.[β]tu//α

where tu//α: replace every [α]v in t by [α]v u

How do we adapt the non-idempotent machinery to λµ?

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 27 /36

Page 132: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Cut-elimination steps (classical case)

axx : A |∆1

axx : A |∆2

x : A ` t : B |∆abs

λx.r : A→ B |∆app

(λx.r)s : B |∆

Πs

s : A

A→ B |Ciact

Ci |A→ B

C |A→ Bact

A→ B |C

Πs

s : Aapp

B |C

Πs

A→ B |Ciapp

s : A

actB |CiCi |B

C |Bact

B |C

Duplication of s

Creation of app-rules

B saved instead of A→ B

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 28 /36

Page 133: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Cut-elimination steps (classical case)

axx : A |∆1

axx : A |∆2

x : A ` t : B |∆abs

λx.r : A→ B |∆app

(λx.r)s : B |∆

Πs

s : A

A→ B |Ciact

Ci |A→ B

C |A→ Bact

A→ B |C

Πs

s : Aapp

B |C

Πs

A→ B |Ciapp

s : A

actB |CiCi |B

C |Bact

B |C

Duplication of s

Creation of app-rules

B saved instead of A→ B

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 28 /36

Page 134: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Cut-elimination steps (classical case)

axx : A |∆1

axx : A |∆2

x : A ` t : B |∆abs

λx.r : A→ B |∆app

(λx.r)s : B |∆

Πs

s : A

A→ B |Ciact

Ci |A→ B

C |A→ Bact

A→ B |C

Πs

s : Aapp

B |C

Πs

A→ B |Ciapp

s : A

actB |CiCi |B

C |Bact

B |C

Duplication of s

Creation of app-rules

B saved instead of A→ B

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 28 /36

Page 135: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Cut-elimination steps (classical case)

axx : A |∆1

axx : A |∆2

x : A ` t : B |∆abs

λx.r : A→ B |∆app

(λx.r)s : B |∆

Πs

s : A

A→ B |Ciact

Ci |A→ B

C |A→ Bact

A→ B |C

Πs

s : Aapp

B |C

Πs

A→ B |Ciapp

s : A

actB |CiCi |B

C |Bact

B |C

Duplication of s

Creation of app-rules

B saved instead of A→ B

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 28 /36

Page 136: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Cut-elimination steps (classical case)

axx : A |∆1

axx : A |∆2

x : A ` t : B |∆abs

λx.r : A→ B |∆app

(λx.r)s : B |∆

Πs

s : A

A→ B |Ciact

Ci |A→ B

C |A→ Bact

A→ B |C

Πs

s : Aapp

B |C

Πs

A→ B |Ciapp

s : A

actB |CiCi |B

C |Bact

B |C

Duplication of s

Creation of app-rules

B saved instead of A→ B

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 28 /36

Page 137: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Cut-elimination steps (classical case)

axx : A |∆1

axx : A |∆2

x : A ` t : B |∆abs

λx.r : A→ B |∆app

(λx.r)s : B |∆

Πs

s : A

A→ B |Ciact

Ci |A→ B

C |A→ Bact

A→ B |C

Πs

s : Aapp

B |C

Πs

A→ B |Ciapp

s : A

actB |CiCi |B

C |Bact

B |C

Duplication of s

Creation of app-rules

B saved instead of A→ B

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 28 /36

Page 138: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The Typing System

Intersection: I,J := [Uk]k∈K U ,V =: 〈σk〉k∈K : Union

x : [U1,U2]; y : [V] ` t : U | α : 〈σ1, σ2〉, β : 〈τ1, τ2, τ3〉

Features

Syntax-direction, relevance, multiplicative rules, accumulation of typinginformation.

app-rule based upon the admissible rule of ND:

A1 → B1 ∨ . . . ∨Ak → Bk A1 ∧ . . . ∧AkB1 ∨ . . . ∨Bk

(vs.

A→ B A

B

)

call−cc : [[[A]→B]→A]→ 〈A,A〉 vs. ((A→ B)→ A)→ A

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 29 /36

Page 139: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The Typing System

Intersection: I,J := [Uk]k∈K U ,V =: 〈σk〉k∈K : Union

x : [U1,U2]; y : [V] ` t : U | α : 〈σ1, σ2〉, β : 〈τ1, τ2, τ3〉

Features

Syntax-direction, relevance, multiplicative rules, accumulation of typinginformation.

app-rule based upon the admissible rule of ND:

A1 → B1 ∨ . . . ∨Ak → Bk A1 ∧ . . . ∧AkB1 ∨ . . . ∨Bk

(vs.

A→ B A

B

)

call−cc : [[[A]→B]→A]→ 〈A,A〉 vs. ((A→ B)→ A)→ A

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 29 /36

Page 140: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The Typing System

Intersection: I,J := [Uk]k∈K U ,V =: 〈σk〉k∈K : Union

x : [U1,U2]; y : [V] ` t : U | α : 〈σ1, σ2〉, β : 〈τ1, τ2, τ3〉

Features

Syntax-direction, relevance, multiplicative rules, accumulation of typinginformation.

app-rule based upon the admissible rule of ND:

A1 → B1 ∨ . . . ∨Ak → Bk A1 ∧ . . . ∧AkB1 ∨ . . . ∨Bk

(vs.

A→ B A

B

)

call−cc : [[[A]→B]→A]→ 〈A,A〉 vs. ((A→ B)→ A)→ A

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 29 /36

Page 141: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The Typing System

Intersection: I,J := [Uk]k∈K U ,V =: 〈σk〉k∈K : Union

x : [U1,U2]; y : [V] ` t : U | α : 〈σ1, σ2〉, β : 〈τ1, τ2, τ3〉

Features

Syntax-direction, relevance, multiplicative rules, accumulation of typinginformation.

app-rule based upon the admissible rule of ND:

A1 → B1 ∨ . . . ∨Ak → Bk A1 ∧ . . . ∧AkB1 ∨ . . . ∨Bk

(vs.

A→ B A

B

)

call−cc : [[[A]→B]→A]→ 〈A,A〉 vs. ((A→ B)→ A)→ A

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 29 /36

Page 142: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The Typing System

Intersection: I,J := [Uk]k∈K U ,V =: 〈σk〉k∈K : Union

x : [U1,U2]; y : [V] ` t : U | α : 〈σ1, σ2〉, β : 〈τ1, τ2, τ3〉

Features

Syntax-direction, relevance, multiplicative rules, accumulation of typinginformation.

app-rule based upon the admissible rule of ND:

A1 → B1 ∨ . . . ∨Ak → Bk A1 ∧ . . . ∧AkB1 ∨ . . . ∨Bk

(vs.

A→ B A

B

)

call−cc : [[[A]→B]→A]→ 〈A,A〉 vs. ((A→ B)→ A)→ A

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 29 /36

Page 143: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

The Typing System

Intersection: I,J := [Uk]k∈K U ,V =: 〈σk〉k∈K : Union

x : [U1,U2]; y : [V] ` t : U | α : 〈σ1, σ2〉, β : 〈τ1, τ2, τ3〉

Features

Syntax-direction, relevance, multiplicative rules, accumulation of typinginformation.

app-rule based upon the admissible rule of ND:

A1 → B1 ∨ . . . ∨Ak → Bk A1 ∧ . . . ∧AkB1 ∨ . . . ∨Bk

(vs.

A→ B A

B

)

call−cc : [[[A]→B]→A]→ 〈A,A〉 vs. ((A→ B)→ A)→ A

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 29 /36

Page 144: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

System Hλµ (Head Normalization)

Weighted Subject Reduction + Subject Expansion

size(Π) =

number of nodes of Π +

size of the type arities of all the names of commands +

multiplicities of arguments in all the app. nodes

Characterizes Head Normalizationadaptable to Strong Normalization

Theorem [Kesner,V.,FSCD17]:

Let t be a λµ-term. Equiv. between:

t is Hλµ-typable

t is HN

The head red. strategy terminates on t

+ quantitative info.

Small-step version.

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 30 /36

Page 145: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

System Hλµ (Head Normalization)

Weighted Subject Reduction + Subject Expansion

size(Π) =

number of nodes of Π +

size of the type arities of all the names of commands +

multiplicities of arguments in all the app. nodes

Characterizes Head Normalizationadaptable to Strong Normalization

Theorem [Kesner,V.,FSCD17]:

Let t be a λµ-term. Equiv. between:

t is Hλµ-typable

t is HN

The head red. strategy terminates on t

+ quantitative info.

Small-step version.

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 30 /36

Page 146: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

System Hλµ (Head Normalization)

Weighted Subject Reduction + Subject Expansion

size(Π) =

number of nodes of Π +

size of the type arities of all the names of commands +

multiplicities of arguments in all the app. nodes

Characterizes Head Normalizationadaptable to Strong Normalization

Theorem [Kesner,V.,FSCD17]:

Let t be a λµ-term. Equiv. between:

t is Hλµ-typable

t is HN

The head red. strategy terminates on t

+ quantitative info.

Small-step version.

Exact bounds in λµ P. Vial 4 Resources for Classical Logic 30 /36

Page 147: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Plan

1 Overview (idempotent or not intersection types)

2 Non-idempotent intersection types

3 Extracting exact lengths of reduction

4 Resources for Classical Logic

5 Exact Measures for λµ

6 Perspectives

Exact bounds in λµ P. Vial 5 Exact Measures for λµ 31 /36

Page 148: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Capturing exact measures in λµ

U 6= 〈 〉

x : [U ] `(0,0,1) x : U | ∅(ax)

Γ `(`,m,f) t : U | ∆

Γ `(`,m,f) [α]t | ∆ ∨ α : U(c) (∧)

(→i)Γ `(`,m,f) t : UtightS | ∆ ItightS(Γ(x))

Γ \\x `(`,m,f+1) λx.t : 〈•〉 | ∆(•S)

Γ `(`,m,f) c | ∆

Γ `(`,m+ar(∆(α)↑),f+1+rob(∆(α))) µα.c : ∆(α)↑ | ∆ \\α(µ)

Γt `(`t,mt,ft) t : F | ∆t Γu (`u,mu,fu) u : domS(F) | ∆u

Γt ∧ Γu `(`t+`u,mt+mu,ft+fu+#pF) t u : codom(F) | ∆t ∨∆u

(appS)

U↑ = transforms top-level 9 into →e.g., ([〈I9V〉]9•)↑ = ([〈I9V〉]→• with • = 〈•〉.

rob(U) = counts top-level 9 (= number of future @-nodes)

e.g., rob(〈I9•, I → 〈I9〈J9•〉〉, •〉) = 3

Exact bounds in λµ P. Vial 5 Exact Measures for λµ 32 /36

Page 149: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Capturing exact measures in λµ

U 6= 〈 〉

x : [U ] `(0,0,1) x : U | ∅(ax)

Γ `(`,m,f) t : U | ∆

Γ `(`,m,f) [α]t | ∆ ∨ α : U(c) (∧)

(→i)Γ `(`,m,f) t : UtightS | ∆ ItightS(Γ(x))

Γ \\x `(`,m,f+1) λx.t : 〈•〉 | ∆(•S)

Γ `(`,m,f) c | ∆

Γ `(`,m+ar(∆(α)↑),f+1+rob(∆(α))) µα.c : ∆(α)↑ | ∆ \\α(µ)

Γt `(`t,mt,ft) t : F | ∆t Γu (`u,mu,fu) u : domS(F) | ∆u

Γt ∧ Γu `(`t+`u,mt+mu,ft+fu+#pF) t u : codom(F) | ∆t ∨∆u

(appS)

U↑ = transforms top-level 9 into →e.g., ([〈I9V〉]9•)↑ = ([〈I9V〉]→• with • = 〈•〉.

rob(U) = counts top-level 9 (= number of future @-nodes)

e.g., rob(〈I9•, I → 〈I9〈J9•〉〉, •〉) = 3

Exact bounds in λµ P. Vial 5 Exact Measures for λµ 32 /36

Page 150: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Capturing exact measures in λµ

U 6= 〈 〉

x : [U ] `(0,0,1) x : U | ∅(ax)

Γ `(`,m,f) t : U | ∆

Γ `(`,m,f) [α]t | ∆ ∨ α : U(c) (∧)

(→i)Γ `(`,m,f) t : UtightS | ∆ ItightS(Γ(x))

Γ \\x `(`,m,f+1) λx.t : 〈•〉 | ∆(•S)

Γ `(`,m,f) c | ∆

Γ `(`,m+ar(∆(α)↑),f+1+rob(∆(α))) µα.c : ∆(α)↑ | ∆ \\α(µ)

Γt `(`t,mt,ft) t : F | ∆t Γu (`u,mu,fu) u : domS(F) | ∆u

Γt ∧ Γu `(`t+`u,mt+mu,ft+fu+#pF) t u : codom(F) | ∆t ∨∆u

(appS)

U↑ = transforms top-level 9 into →e.g., ([〈I9V〉]9•)↑ = ([〈I9V〉]→• with • = 〈•〉.

rob(U) = counts top-level 9 (= number of future @-nodes)

e.g., rob(〈I9•, I → 〈I9〈J9•〉〉, •〉) = 3

Exact bounds in λµ P. Vial 5 Exact Measures for λµ 32 /36

Page 151: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Capturing exact measures in λµ

U 6= 〈 〉

x : [U ] `(0,0,1) x : U | ∅(ax)

Γ `(`,m,f) t : U | ∆

Γ `(`,m,f) [α]t | ∆ ∨ α : U(c) (∧)

(→i)Γ `(`,m,f) t : UtightS | ∆ ItightS(Γ(x))

Γ \\x `(`,m,f+1) λx.t : 〈•〉 | ∆(•S)

Γ `(`,m,f) c | ∆

Γ `(`,m+ar(∆(α)↑),f+1+rob(∆(α))) µα.c : ∆(α)↑ | ∆ \\α(µ)

Γt `(`t,mt,ft) t : F | ∆t Γu (`u,mu,fu) u : domS(F) | ∆u

Γt ∧ Γu `(`t+`u,mt+mu,ft+fu+#pF) t u : codom(F) | ∆t ∨∆u

(appS)

U↑ = transforms top-level 9 into →e.g., ([〈I9V〉]9•)↑ = ([〈I9V〉]→• with • = 〈•〉.

rob(U) = counts top-level 9 (= number of future @-nodes)

e.g., rob(〈I9•, I → 〈I9〈J9•〉〉, •〉) = 3

Exact bounds in λµ P. Vial 5 Exact Measures for λµ 32 /36

Page 152: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Capturing exact measures in λµ

U 6= 〈 〉

x : [U ] `(0,0,1) x : U | ∅(ax)

Γ `(`,m,f) t : U | ∆

Γ `(`,m,f) [α]t | ∆ ∨ α : U(c) (∧)

(→i)Γ `(`,m,f) t : UtightS | ∆ ItightS(Γ(x))

Γ \\x `(`,m,f+1) λx.t : 〈•〉 | ∆(•S)

Γ `(`,m,f) c | ∆

Γ `(`,m+ar(∆(α)↑),f+1+rob(∆(α))) µα.c : ∆(α)↑ | ∆ \\α(µ)

Γt `(`t,mt,ft) t : F | ∆t Γu (`u,mu,fu) u : domS(F) | ∆u

Γt ∧ Γu `(`t+`u,mt+mu,ft+fu+#pF) t u : codom(F) | ∆t ∨∆u

(appS)

U↑ = transforms top-level 9 into →e.g., ([〈I9V〉]9•)↑ = ([〈I9V〉]→• with • = 〈•〉.

rob(U) = counts top-level 9 (= number of future @-nodes)

e.g., rob(〈I9•, I → 〈I9〈J9•〉〉, •〉) = 3

Exact bounds in λµ P. Vial 5 Exact Measures for λµ 32 /36

Page 153: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Parametrization

Parametrized system (tightness + domains)

Tight types

(spec. normal forms)

hd: empty domains

lo/mx: singleton domains

Domains

(spec. if erasable args are typed)

domhd/lo([ ]→ U) = [ ]

dommx([ ]→ U) = singleton

Theorem (Kesner,V)

let S ∈ hd, lo, mx and t a λµ-term. Then:

t→(`,m)S t′ a S-NF with |t′|S = f

(f − e when S = mx)

iff Γ `(`,m,f) t : U | ∆ tight for some Γ, U , ∆

Bonus: completely factorized proofs!

Exact bounds in λµ P. Vial 5 Exact Measures for λµ 33 /36

Page 154: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Parametrization

Parametrized system (tightness + domains)

Tight types

(spec. normal forms)

hd: empty domains

lo/mx: singleton domains

Domains

(spec. if erasable args are typed)

domhd/lo([ ]→ U) = [ ]

dommx([ ]→ U) = singleton

Theorem (Kesner,V)

let S ∈ hd, lo, mx and t a λµ-term. Then:

t→(`,m)S t′ a S-NF with |t′|S = f

(f − e when S = mx)

iff Γ `(`,m,f) t : U | ∆ tight for some Γ, U , ∆

Bonus: completely factorized proofs!

Exact bounds in λµ P. Vial 5 Exact Measures for λµ 33 /36

Page 155: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Parametrization

Parametrized system (tightness + domains)

Tight types

(spec. normal forms)

hd: empty domains

lo/mx: singleton domains

Domains

(spec. if erasable args are typed)

domhd/lo([ ]→ U) = [ ]

dommx([ ]→ U) = singleton

Theorem (Kesner,V)

let S ∈ hd, lo, mx and t a λµ-term. Then:

t→(`,m)S t′ a S-NF with |t′|S = f (f − e when S = mx)

iff Γ `(`,m,f) t : U | ∆ tight for some Γ, U , ∆

Bonus: completely factorized proofs!

Exact bounds in λµ P. Vial 5 Exact Measures for λµ 33 /36

Page 156: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Parametrization

Parametrized system (tightness + domains)

Tight types

(spec. normal forms)

hd: empty domains

lo/mx: singleton domains

Domains

(spec. if erasable args are typed)

domhd/lo([ ]→ U) = [ ]

dommx([ ]→ U) = singleton

Theorem (Kesner,V)

let S ∈ hd, lo, mx and t a λµ-term. Then:

t→(`,m)S t′ a S-NF with |t′|S = f (f − e when S = mx)

iff Γ `(`,m,f) t : U | ∆ tight for some Γ, U , ∆

Bonus: completely factorized proofs!

Exact bounds in λµ P. Vial 5 Exact Measures for λµ 33 /36

Page 157: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Plan

1 Overview (idempotent or not intersection types)

2 Non-idempotent intersection types

3 Extracting exact lengths of reduction

4 Resources for Classical Logic

5 Exact Measures for λµ

6 Perspectives

Exact bounds in λµ P. Vial 6 Perspectives 34 /36

Page 158: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Doggy bag

Non-idempotency:forbid duplication of typing deriv.

Simple proofs of termina-tion.

typing brings quali. and quanti. charac.

Very simpleoperational semantics

Persistencevs. consumption

Exact measures(red. length + NF)

Adapts to other higher-order calculie.g., feat. classical logic

Future work:

λµµ (seq. calc.)? Call-by-push-value?

Exact bounds in λµ P. Vial 6 Perspectives 35 /36

Page 159: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Doggy bag

Non-idempotency:forbid duplication of typing deriv.

Simple proofs of termina-tion.

typing brings quali. and quanti. charac.

Very simpleoperational semantics

Persistencevs. consumption

Exact measures(red. length + NF)

Adapts to other higher-order calculie.g., feat. classical logic

Future work:

λµµ (seq. calc.)? Call-by-push-value?

Exact bounds in λµ P. Vial 6 Perspectives 35 /36

Page 160: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Doggy bag

Non-idempotency:forbid duplication of typing deriv.

Simple proofs of termina-tion.

typing brings quali. and quanti. charac.

Very simpleoperational semantics

Persistencevs. consumption

Exact measures(red. length + NF)

Adapts to other higher-order calculie.g., feat. classical logic

Future work:

λµµ (seq. calc.)? Call-by-push-value?

Exact bounds in λµ P. Vial 6 Perspectives 35 /36

Page 161: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Doggy bag

Non-idempotency:forbid duplication of typing deriv.

Simple proofs of termina-tion.

typing brings quali. and quanti. charac.

Very simpleoperational semantics

Persistencevs. consumption

Exact measures(red. length + NF)

Adapts to other higher-order calculie.g., feat. classical logic

Future work:

λµµ (seq. calc.)? Call-by-push-value?

Exact bounds in λµ P. Vial 6 Perspectives 35 /36

Page 162: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Doggy bag

Non-idempotency:forbid duplication of typing deriv.

Simple proofs of termina-tion.

typing brings quali. and quanti. charac.

Very simpleoperational semantics

Persistencevs. consumption

Exact measures(red. length + NF)

Adapts to other higher-order calculie.g., feat. classical logic

Future work:

λµµ (seq. calc.)? Call-by-push-value?

Exact bounds in λµ P. Vial 6 Perspectives 35 /36

Page 163: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Doggy bag

Non-idempotency:forbid duplication of typing deriv.

Simple proofs of termina-tion.

typing brings quali. and quanti. charac.

Very simpleoperational semantics

Persistencevs. consumption

Exact measures(red. length + NF)

Adapts to other higher-order calculie.g., feat. classical logic

Future work:

λµµ (seq. calc.)? Call-by-push-value?

Exact bounds in λµ P. Vial 6 Perspectives 35 /36

Page 164: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Doggy bag

Non-idempotency:forbid duplication of typing deriv.

Simple proofs of termina-tion.

typing brings quali. and quanti. charac.

Very simpleoperational semantics

Persistencevs. consumption

Exact measures(red. length + NF)

Adapts to other higher-order calculie.g., feat. classical logic

Future work:

λµµ (seq. calc.)? Call-by-push-value?

Exact bounds in λµ P. Vial 6 Perspectives 35 /36

Page 165: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Doggy bag

Non-idempotency:forbid duplication of typing deriv.

Simple proofs of termina-tion.

typing brings quali. and quanti. charac.

Very simpleoperational semantics

Persistencevs. consumption

Exact measures(red. length + NF)

Adapts to other higher-order calculie.g., feat. classical logic

Future work:

λµµ (seq. calc.)? Call-by-push-value?

Exact bounds in λµ P. Vial 6 Perspectives 35 /36

Page 166: pierrevial.github.io · 2021. 1. 21. · Intersections types (Coppo, Dezani, 1980) Goal Equivalences of the form \the program tis typable i it can reach a terminal state" Idea: several

Thank you

Thank you for your attention!

Exact bounds in λµ P. Vial 6 Perspectives 36 /36