SlideShare uma empresa Scribd logo
1 de 45
Baixar para ler offline
Simply Typed Lambda-Calculus
Modulo Type Isomorphisms
Alejandro Díaz-Caro
Université Paris-Ouest
INRIA Paris - Rocquencourt
Gilles Dowek
INRIA Paris - Rocquencourt
TYPES 2014
Paris, May 12th, 2014
Propositional equivalence vs definitional equality
∀x.∀y.(x = y) ⇒ (even(x) = even(y))
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 2 / 15
Propositional equivalence vs definitional equality
∀x.∀y.(x = y) ⇒ (even(x) = even(y)) (2 + 2 = 4) ⇒ (even(2 + 2) = even(4))
(2 + 2 = 5) ⇒ (even(2 + 2) = even(5))
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 2 / 15
Propositional equivalence vs definitional equality
∀x.∀y.(x =
&&
y) ⇒ (even(x) = even(y)) (2 + 2 = 4) ⇒ (even(2 + 2) = even(4))
(2 + 2 =
))
5) ⇒ (even(2 + 2) = even(5))
Proposition Computation
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 2 / 15
Propositional equivalence vs definitional equality
∀x.∀y.(x =
&&
y) ⇒ (even(x) = even(y)) (2 + 2 = 4) ⇒ (even(2 + 2) = even(4))
(2 + 2 =
))
5) ⇒ (even(2 + 2) = even(5))
Proposition Computation
∀X.∀Y .(X ≡
&&
Y ) ⇒ (X ⇔ Y ) (A ≡
((
B) ⇒ (A ⇔ B)
Propositional Decidable! [DiCosmo et al]
(for some settings)
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 2 / 15
Propositional equivalence vs definitional equality
∀x.∀y.(x =
&&
y) ⇒ (even(x) = even(y)) (2 + 2 = 4) ⇒ (even(2 + 2) = even(4))
(2 + 2 =
))
5) ⇒ (even(2 + 2) = even(5))
Proposition Computation
∀X.∀Y .(X ≡
&&
Y ) ⇒ (X ⇔ Y ) (A ≡
((
B) ⇒ (A ⇔ B)
Propositional Decidable! [DiCosmo et al]
(for some settings)
We want to go further:
(A ≡ B) ⇒ (π : A ⇔ π : B)
The goal is to identify isomorphic types
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 2 / 15
The basic setting
Simply types with conjunction and implication
A, B, C ::= τ | A ⇒ B | A ∧ B
An equivalence relation between types (based on the isomorphisms1
)
1. A ∧ B ≡ B ∧ A (comm)
2. A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C (asso)
3. (A ∧ B) ⇒ C ≡ A ⇒ B ⇒ C (curry)
4. A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C) (distrib)
1Bruce, Di Cosmo, Longo, MSCS 2(2), 231–247, 1992
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 3 / 15
The basic setting
Simply types with conjunction and implication
A, B, C ::= τ | A ⇒ B | A ∧ B
An equivalence relation between types (based on the isomorphisms1
)
1. A ∧ B ≡ B ∧ A (comm)
2. A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C (asso)
3. (A ∧ B) ⇒ C ≡ A ⇒ B ⇒ C (curry)
4. A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C) (distrib)
We want
[A≡B]
r : A
r : B
1Bruce, Di Cosmo, Longo, MSCS 2(2), 231–247, 1992
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 3 / 15
Associative and commutative conjunction
Γ r : A Γ s : B
Γ r, s : A ∧ B
(∧i )
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
Associative and commutative conjunction
Γ r : A Γ s : B
Γ r, s : A ∧ B
(∧i )
A ∧ B ≡ B ∧ A
A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C
So
r, s s, r
r, s, t r, s , t
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
Associative and commutative conjunction
Γ r : A Γ s : B
Γ r, s : A ∧ B
(∧i )
A ∧ B ≡ B ∧ A
A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C
So
r, s s, r
r, s, t r, s , t
What about the elimination?
Γ r, s : A ∧ B
Γ π1 r, s : A
(∧e )
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
Associative and commutative conjunction
Γ r : A Γ s : B
Γ r, s : A ∧ B
(∧i )
A ∧ B ≡ B ∧ A
A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C
So
r, s s, r
r, s, t r, s , t
What about the elimination?
Γ r, s : A ∧ B
Γ π1 r, s : A
(∧e )
But A ∧ B = B ∧ A!!
Γ r, s : B ∧ A
Γ π1 r, s : B
(∧e )
Moreover r, s = s, r so π1 r, s = π1 s, r !!
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
Associative and commutative conjunction
Γ r : A Γ s : B
Γ r, s : A ∧ B
(∧i )
A ∧ B ≡ B ∧ A
A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C
So
r, s s, r
r, s, t r, s , t
What about the elimination?
Γ r, s : A ∧ B
Γ π1 r, s : A
(∧e )
But A ∧ B = B ∧ A!!
Γ r, s : B ∧ A
Γ π1 r, s : B
(∧e )
Moreover r, s = s, r so π1 r, s = π1 s, r !!
Workaround: Church-style – Project w.r.t. a type
If r : A then πA r, s → r
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
Associative and commutative conjunction
Γ r : A Γ s : B
Γ r, s : A ∧ B
(∧i )
A ∧ B ≡ B ∧ A
A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C
So
r, s s, r
r, s, t r, s , t
What about the elimination?
Γ r, s : A ∧ B
Γ π1 r, s : A
(∧e )
But A ∧ B = B ∧ A!!
Γ r, s : B ∧ A
Γ π1 r, s : B
(∧e )
Moreover r, s = s, r so π1 r, s = π1 s, r !!
Workaround: Church-style – Project w.r.t. a type
If r : A then πA r, s → r
This induces non-determinism
If
r : A
s : A
then
πA r, s → r
πA r, s → s
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
Associative and commutative conjunction
Γ r : A Γ s : B
Γ r, s : A ∧ B
(∧i )
A ∧ B ≡ B ∧ A
A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C
So
r, s s, r
r, s, t r, s , t
What about the elimination?
Γ r, s : A ∧ B
Γ π1 r, s : A
(∧e )
But A ∧ B = B ∧ A!!
Γ r, s : B ∧ A
Γ π1 r, s : B
(∧e )
Moreover r, s = s, r so π1 r, s = π1 s, r !!
Workaround: Church-style – Project w.r.t. a type
If r : A then πA r, s → r
This induces non-determinism
If
r : A
s : A
then
πA r, s → r
πA r, s → s
We are interested in the proof theory and
both r and s are valid proofs of A
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
Curryfication
(A ∧ B) ⇒ C ≡ A ⇒ B ⇒ C
induces
r s, t rst
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 5 / 15
Curryfication
(A ∧ B) ⇒ C ≡ A ⇒ B ⇒ C
induces
r s, t rst
(λxA
.r)s → r[s/x]
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 5 / 15
Curryfication
(A ∧ B) ⇒ C ≡ A ⇒ B ⇒ C
induces
r s, t rst
If s : A, (λxA
.r)s → r[s/x]
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 5 / 15
Distributivity of implication over conjunction
A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C)
induces
λxA
. r, s λxA
.r, λxA
.s
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 6 / 15
Distributivity of implication over conjunction
A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C)
induces
λxA
. r, s λxA
.r, λxA
.s and λxA
.πB (r) πA⇒B (λxA
.r)
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 6 / 15
Distributivity of implication over conjunction
A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C)
induces
λxA
. r, s λxA
.r, λxA
.s and λxA
.πB (r) πA⇒B (λxA
.r)
Example
λxA∧B
.x : (A ∧ B) ⇒ (A ∧ B)
λxA∧B
.x : ((A ∧ B) ⇒ A) ∧ ((A ∧ B) ⇒ B)
(≡)
π(A∧B)⇒A(λxA∧B
.x) : (A ∧ B) ⇒ A
(∧e )
π(A∧B)⇒A(λxA∧B
.x) λxA∧B
.πA(x)
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 6 / 15
Distributivity of implication over conjunction
Multiple choices
A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C)
λxA
. r, s λxA
.r, λxA
.s ⇒i , ∧i ∧i , ⇒i
λxA
.πB (r) πA⇒B (λxA
.r) ⇒i , ∧e ∧e, ⇒i
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 7 / 15
Distributivity of implication over conjunction
Multiple choices
A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C)
λxA
. r, s λxA
.r, λxA
.s ⇒i , ∧i ∧i , ⇒i
λxA
.πB (r) πA⇒B (λxA
.r) ⇒i , ∧e ∧e, ⇒i
r, s t rt, st ⇒e, ∧i ∧i , ⇒e
πA⇒B (r)s πB (rs) ∗
⇒e, ∧e ∧e, ⇒e
∗ if r : A ⇒ (B ∧ C)
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 7 / 15
Distributivity of implication over conjunction
Multiple choices
A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C)
λxA
. r, s λxA
.r, λxA
.s ⇒i , ∧i ∧i , ⇒i
λxA
.πB (r) πA⇒B (λxA
.r) ⇒i , ∧e ∧e, ⇒i
r, s t rt, st ⇒e, ∧i ∧i , ⇒e
πA⇒B (r)s πB (rs) ∗
⇒e, ∧e ∧e, ⇒e
∗ if r : A ⇒ (B ∧ C)
πA⇒B (r)s πB (rs) suffices . . . plus η and δ (surjective pairing)
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 7 / 15
α-equivalence
Rules
If A ≡ B, r r[A/B]
If r =α r , r r
Example
Let A ≡ B
A⇒(C1∧C2)
λxA
.r, λyB
.s
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 8 / 15
α-equivalence
Rules
If A ≡ B, r r[A/B]
If r =α r , r r
Example
Let A ≡ B
A⇒(C1∧C2)
λxA
.r, λyB
.s ∗
λxA
.r, λxA
.s[x/y][A/B]
λxA
. r, s[x/y][A/B]
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 8 / 15
The full operational semantics
Symmetric relation:
r, s s, r (comm)
r, s , t r, s, t (asso)
rst r s, t (curry)
If r : A ⇒ C, πA⇒B (r)s πB (rs) (dist)
If A ≡ B, r r[A/B] (α–Types)
If r =α s, r s (α–Terms)
If r s, then K[r] K[s] for any context K[·]
Reductions:
If s : A, (λxA
.r)s r[s/x] (β)
If r : A, πA r, s r (πn)
If r : A, πA(r) r (π1)
Extensionality:
If



x /∈ FV (r),
r : A ⇒ B,
r ∗
λyA
.r



, r λxA
.rx (η)
If



r : A ∧ B,
r ∗
r1, r2
with r1 : A, r2 : B



, r πA(r), πB (r) (δ)
r s
r → s
r → s
λxA
.r → λxA
.s
r → s
tr → ts
r
¬η
→ s
rt → st
r → s
t, r → t, s
r
¬δ
→ s
πA(r) → πA(s)
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 9 / 15
Normalisation
r is in normal form, if it can only continue reducing by relation
Normal form
Red(r) = {s | r ∗
r → s ∗
s}
r in normal form if Red(r) = ∅
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 10 / 15
Normalisation
r is in normal form, if it can only continue reducing by relation
Normal form
Red(r) = {s | r ∗
r → s ∗
s}
r in normal form if Red(r) = ∅
Theorem (Strong normalisation)
If Γ r : A then r strongly normalising
Proof. Reducibility method
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 10 / 15
Finding an interpretation
The standard interpretation does not work
A ∧ B = {r | πA(r) ∈ A and πB (r) ∈ B }
Counter-example: r = xA
, yB
, Ω ∈ A ∧ B
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 11 / 15
Finding an interpretation
The standard interpretation does not work
A ∧ B = {r | πA(r) ∈ A and πB (r) ∈ B }
Counter-example: r = xA
, yB
, Ω ∈ A ∧ B
A ∧ B = {r : A ∧ B | πA(r) ∈ A and πB (r) ∈ B }
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 11 / 15
Finding an interpretation
The standard interpretation does not work
A ∧ B = {r | πA(r) ∈ A and πB (r) ∈ B }
Counter-example: r = xA
, yB
, Ω ∈ A ∧ B
A ∧ B = {r : A ∧ B | πA(r) ∈ A and πB (r) ∈ B }
How to prove that r ∈ A and s ∈ B implies r, s ∈ A ∧ B ?
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 11 / 15
Finding an interpretation
The standard interpretation does not work
A ∧ B = {r | πA(r) ∈ A and πB (r) ∈ B }
Counter-example: r = xA
, yB
, Ω ∈ A ∧ B
A ∧ B = {r : A ∧ B | πA(r) ∈ A and πB (r) ∈ B }
How to prove that r ∈ A and s ∈ B implies r, s ∈ A ∧ B ?
πA(r, s)→r
πB (r, s)→s
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 11 / 15
Finding an interpretation
The standard interpretation does not work
A ∧ B = {r | πA(r) ∈ A and πB (r) ∈ B }
Counter-example: r = xA
, yB
, Ω ∈ A ∧ B
A ∧ B = {r : A ∧ B | πA(r) ∈ A and πB (r) ∈ B }
How to prove that r ∈ A and s ∈ B implies r, s ∈ A ∧ B ?
πA(r, s)→r
πB (r, s)→s
but. . .
let A = A1 ∧ A2
B = A2 ∧ B2
πA1∧A2
(r1, r2
A1∧A2
, s1, s2
A2∧B2
) → r1, s1
We need something more subtle
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 11 / 15
Finding an interpretation
Conjunction free
Conjunction-free type S, R ::= τ | S ⇒ R
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 12 / 15
Finding an interpretation
Conjunction free
Conjunction-free type S, R ::= τ | S ⇒ R
Lemma
∀A, A ≡
m
i=1
Si1 ⇒ · · · ⇒ Sini
⇒ τ
Example
(A ∧ B) ⇒ C ≡ A ⇒ B ⇒ C
A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C)
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 12 / 15
Finding an interpretation
Interpreting canonical types
n
i=1
(Sij )
mi
j=1 ⇒ τ = r | ∀i,
sij ∈ Sij
j = 1, . . . , mi
implies π(Sij )
mi
j=1⇒τ
(r)si ∈ SN
with n ≥ 1, and m ≥ 0
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 13 / 15
Finding an interpretation
Interpreting canonical types
n
i=1
(Sij )
mi
j=1 ⇒ τ = r | ∀i,
sij ∈ Sij
j = 1, . . . , mi
implies π(Sij )
mi
j=1⇒τ
(r)si ∈ SN
with n ≥ 1, and m ≥ 0
Example
(S ⇒ τ) ∧ τ =



r s ∈ S implies πS⇒τ (r)s ∈ SN
and πτ (r) ∈ SN



Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 13 / 15
Finding an interpretation
Interpreting canonical types
n
i=1
(Sij )
mi
j=1 ⇒ τ = r | ∀i,
sij ∈ Sij
j = 1, . . . , mi
implies π(Sij )
mi
j=1⇒τ
(r)si ∈ SN
with n ≥ 1, and m ≥ 0
Example
(S ⇒ τ) ∧ τ =



r s ∈ S implies πS⇒τ (r)s ∈ SN
and πτ (r) ∈ SN



Lemma
If r : A then r ∈ A
Corollary
If r : A then r ∈ SN
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 13 / 15
Computing with this calculus
Pairs
πNat(3, 4) → 3 and πNat(3, 4) → 4
But it is possible to encode pairs behaving in an standard way
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 14 / 15
Computing with this calculus
Pairs
πNat(3, 4) → 3 and πNat(3, 4) → 4
But it is possible to encode pairs behaving in an standard way
Booleans
(λxA
.λyA
.x)rs (λxA
.λyA
.x)(r, s)
(λxA
.λyA
.x)(s, r)
(λxA
.λyA
.x)sr →∗
s
Hence
true ∼ false
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 14 / 15
Computing with this calculus
Pairs
πNat(3, 4) → 3 and πNat(3, 4) → 4
But it is possible to encode pairs behaving in an standard way
Booleans
(λxA
.λyA
.x)rs (λxA
.λyA
.x)(r, s)
(λxA
.λyA
.x)(s, r)
(λxA
.λyA
.x)sr →∗
s
Hence
true ∼ false
A ⇒ A ⇒ A
is a singleton!
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 14 / 15
Computing with this calculus
Pairs
πNat(3, 4) → 3 and πNat(3, 4) → 4
But it is possible to encode pairs behaving in an standard way
Booleans
(λxA
.λyA
.x)rs (λxA
.λyA
.x)(r, s)
(λxA
.λyA
.x)(s, r)
(λxA
.λyA
.x)sr →∗
s
Hence
true ∼ false
A ⇒ A ⇒ A
is a singleton!
But (A ⇒ B) ⇒ B ⇒ B is not
So, it is possible to encode booleans too
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 14 / 15
Summarising
What have we done?
We introduced a new calculus where
isomorphic propositions have the same proofs
Why?
If A ≡ B, a proof of A
should not be distinguishable from a proof of B
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 15 / 15
Summarising
What have we done?
We introduced a new calculus where
isomorphic propositions have the same proofs
Why?
If A ≡ B, a proof of A
should not be distinguishable from a proof of B
Future work
Add more connectives
Introduce polymorphism (not trivial)
Move to dependant types (provable isomorphisms?)
Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 15 / 15

Mais conteúdo relacionado

Mais procurados

35 tangent and arc length in polar coordinates
35 tangent and arc length in polar coordinates35 tangent and arc length in polar coordinates
35 tangent and arc length in polar coordinatesmath266
 
33 parametric equations x
33 parametric equations x33 parametric equations x
33 parametric equations xmath266
 

Mais procurados (6)

Polar coordinates
Polar coordinatesPolar coordinates
Polar coordinates
 
Polar Co Ordinates
Polar Co OrdinatesPolar Co Ordinates
Polar Co Ordinates
 
Gch6 l2
Gch6 l2Gch6 l2
Gch6 l2
 
MSc_thesis
MSc_thesisMSc_thesis
MSc_thesis
 
35 tangent and arc length in polar coordinates
35 tangent and arc length in polar coordinates35 tangent and arc length in polar coordinates
35 tangent and arc length in polar coordinates
 
33 parametric equations x
33 parametric equations x33 parametric equations x
33 parametric equations x
 

Semelhante a Simply typed lambda-calculus modulo isomorphisms

On the proof theory for Description Logics
On the proof theory for Description LogicsOn the proof theory for Description Logics
On the proof theory for Description LogicsAlexandre Rademaker
 
The probability of non-confluent systems
The probability of non-confluent systemsThe probability of non-confluent systems
The probability of non-confluent systemsAlejandro Díaz-Caro
 
Typing quantum superpositions and measurement
Typing quantum superpositions and measurementTyping quantum superpositions and measurement
Typing quantum superpositions and measurementAlejandro Díaz-Caro
 
Dialectica Categories: the mathematical version
Dialectica Categories: the mathematical versionDialectica Categories: the mathematical version
Dialectica Categories: the mathematical versionValeria de Paiva
 
4.6 Relative product and composition
4.6 Relative product and composition4.6 Relative product and composition
4.6 Relative product and compositionJan Plaza
 
Sensors and Samples: A Homological Approach
Sensors and Samples:  A Homological ApproachSensors and Samples:  A Homological Approach
Sensors and Samples: A Homological ApproachDon Sheehy
 
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...Marco Benini
 
Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Omnia A. Abdullah
 
Threshold network models
Threshold network modelsThreshold network models
Threshold network modelsNaoki Masuda
 
Trilinear embedding for divergence-form operators
Trilinear embedding for divergence-form operatorsTrilinear embedding for divergence-form operators
Trilinear embedding for divergence-form operatorsVjekoslavKovac1
 
theorem of isosceles triangle
theorem of isosceles triangletheorem of isosceles triangle
theorem of isosceles triangleRameshSiyol
 
Towards a quantum lambda-calculus with quantum control
Towards a quantum lambda-calculus with quantum controlTowards a quantum lambda-calculus with quantum control
Towards a quantum lambda-calculus with quantum controlAlejandro Díaz-Caro
 
Towards a one shot entanglement theory
Towards a one shot entanglement theoryTowards a one shot entanglement theory
Towards a one shot entanglement theorywtyru1989
 
Semi-automatic ABC: a discussion
Semi-automatic ABC: a discussionSemi-automatic ABC: a discussion
Semi-automatic ABC: a discussionChristian Robert
 
2015 CMS Winter Meeting Poster
2015 CMS Winter Meeting Poster2015 CMS Winter Meeting Poster
2015 CMS Winter Meeting PosterChelsea Battell
 
Application of Cylindrical and Spherical coordinate system in double-triple i...
Application of Cylindrical and Spherical coordinate system in double-triple i...Application of Cylindrical and Spherical coordinate system in double-triple i...
Application of Cylindrical and Spherical coordinate system in double-triple i...Sonendra Kumar Gupta
 
Symbolic Solving of Extended Regular Expression Inequalities
Symbolic Solving of Extended Regular Expression InequalitiesSymbolic Solving of Extended Regular Expression Inequalities
Symbolic Solving of Extended Regular Expression InequalitiesMatthias Keil
 

Semelhante a Simply typed lambda-calculus modulo isomorphisms (20)

On the proof theory for Description Logics
On the proof theory for Description LogicsOn the proof theory for Description Logics
On the proof theory for Description Logics
 
The probability of non-confluent systems
The probability of non-confluent systemsThe probability of non-confluent systems
The probability of non-confluent systems
 
pres_coconat
pres_coconatpres_coconat
pres_coconat
 
Typing quantum superpositions and measurement
Typing quantum superpositions and measurementTyping quantum superpositions and measurement
Typing quantum superpositions and measurement
 
Dialectica Categories: the mathematical version
Dialectica Categories: the mathematical versionDialectica Categories: the mathematical version
Dialectica Categories: the mathematical version
 
4.6 Relative product and composition
4.6 Relative product and composition4.6 Relative product and composition
4.6 Relative product and composition
 
C2.0 propositional logic
C2.0 propositional logicC2.0 propositional logic
C2.0 propositional logic
 
smtlecture.10
smtlecture.10smtlecture.10
smtlecture.10
 
Sensors and Samples: A Homological Approach
Sensors and Samples:  A Homological ApproachSensors and Samples:  A Homological Approach
Sensors and Samples: A Homological Approach
 
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
 
Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Discrete Mathematics - All chapters
Discrete Mathematics - All chapters
 
Threshold network models
Threshold network modelsThreshold network models
Threshold network models
 
Trilinear embedding for divergence-form operators
Trilinear embedding for divergence-form operatorsTrilinear embedding for divergence-form operators
Trilinear embedding for divergence-form operators
 
theorem of isosceles triangle
theorem of isosceles triangletheorem of isosceles triangle
theorem of isosceles triangle
 
Towards a quantum lambda-calculus with quantum control
Towards a quantum lambda-calculus with quantum controlTowards a quantum lambda-calculus with quantum control
Towards a quantum lambda-calculus with quantum control
 
Towards a one shot entanglement theory
Towards a one shot entanglement theoryTowards a one shot entanglement theory
Towards a one shot entanglement theory
 
Semi-automatic ABC: a discussion
Semi-automatic ABC: a discussionSemi-automatic ABC: a discussion
Semi-automatic ABC: a discussion
 
2015 CMS Winter Meeting Poster
2015 CMS Winter Meeting Poster2015 CMS Winter Meeting Poster
2015 CMS Winter Meeting Poster
 
Application of Cylindrical and Spherical coordinate system in double-triple i...
Application of Cylindrical and Spherical coordinate system in double-triple i...Application of Cylindrical and Spherical coordinate system in double-triple i...
Application of Cylindrical and Spherical coordinate system in double-triple i...
 
Symbolic Solving of Extended Regular Expression Inequalities
Symbolic Solving of Extended Regular Expression InequalitiesSymbolic Solving of Extended Regular Expression Inequalities
Symbolic Solving of Extended Regular Expression Inequalities
 

Mais de Alejandro Díaz-Caro

A lambda calculus for density matrices with classical and probabilistic controls
A lambda calculus for density matrices with classical and probabilistic controlsA lambda calculus for density matrices with classical and probabilistic controls
A lambda calculus for density matrices with classical and probabilistic controlsAlejandro Díaz-Caro
 
Affine computation and affine automaton
Affine computation and affine automatonAffine computation and affine automaton
Affine computation and affine automatonAlejandro Díaz-Caro
 
Vectorial types, non-determinism and probabilistic systems: Towards a computa...
Vectorial types, non-determinism and probabilistic systems: Towards a computa...Vectorial types, non-determinism and probabilistic systems: Towards a computa...
Vectorial types, non-determinism and probabilistic systems: Towards a computa...Alejandro Díaz-Caro
 
Quantum computing, non-determinism, probabilistic systems... and the logic be...
Quantum computing, non-determinism, probabilistic systems... and the logic be...Quantum computing, non-determinism, probabilistic systems... and the logic be...
Quantum computing, non-determinism, probabilistic systems... and the logic be...Alejandro Díaz-Caro
 
Call-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type disciplineCall-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type disciplineAlejandro Díaz-Caro
 
Slides used during my thesis defense "Du typage vectoriel"
Slides used during my thesis defense "Du typage vectoriel"Slides used during my thesis defense "Du typage vectoriel"
Slides used during my thesis defense "Du typage vectoriel"Alejandro Díaz-Caro
 
Linearity in the non-deterministic call-by-value setting
Linearity in the non-deterministic call-by-value settingLinearity in the non-deterministic call-by-value setting
Linearity in the non-deterministic call-by-value settingAlejandro Díaz-Caro
 
A type system for the vectorial aspects of the linear-algebraic lambda-calculus
A type system for the vectorial aspects of the linear-algebraic lambda-calculusA type system for the vectorial aspects of the linear-algebraic lambda-calculus
A type system for the vectorial aspects of the linear-algebraic lambda-calculusAlejandro Díaz-Caro
 
Equivalence of algebraic λ-calculi
Equivalence of algebraic λ-calculiEquivalence of algebraic λ-calculi
Equivalence of algebraic λ-calculiAlejandro Díaz-Caro
 

Mais de Alejandro Díaz-Caro (11)

A lambda calculus for density matrices with classical and probabilistic controls
A lambda calculus for density matrices with classical and probabilistic controlsA lambda calculus for density matrices with classical and probabilistic controls
A lambda calculus for density matrices with classical and probabilistic controls
 
Affine computation and affine automaton
Affine computation and affine automatonAffine computation and affine automaton
Affine computation and affine automaton
 
Vectorial types, non-determinism and probabilistic systems: Towards a computa...
Vectorial types, non-determinism and probabilistic systems: Towards a computa...Vectorial types, non-determinism and probabilistic systems: Towards a computa...
Vectorial types, non-determinism and probabilistic systems: Towards a computa...
 
Quantum computing, non-determinism, probabilistic systems... and the logic be...
Quantum computing, non-determinism, probabilistic systems... and the logic be...Quantum computing, non-determinism, probabilistic systems... and the logic be...
Quantum computing, non-determinism, probabilistic systems... and the logic be...
 
Call-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type disciplineCall-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type discipline
 
Slides used during my thesis defense "Du typage vectoriel"
Slides used during my thesis defense "Du typage vectoriel"Slides used during my thesis defense "Du typage vectoriel"
Slides used during my thesis defense "Du typage vectoriel"
 
Linearity in the non-deterministic call-by-value setting
Linearity in the non-deterministic call-by-value settingLinearity in the non-deterministic call-by-value setting
Linearity in the non-deterministic call-by-value setting
 
A type system for the vectorial aspects of the linear-algebraic lambda-calculus
A type system for the vectorial aspects of the linear-algebraic lambda-calculusA type system for the vectorial aspects of the linear-algebraic lambda-calculus
A type system for the vectorial aspects of the linear-algebraic lambda-calculus
 
Slides QuAND 2011
Slides QuAND 2011Slides QuAND 2011
Slides QuAND 2011
 
Equivalence of algebraic λ-calculi
Equivalence of algebraic λ-calculiEquivalence of algebraic λ-calculi
Equivalence of algebraic λ-calculi
 
A System F accounting for scalars
A System F accounting for scalarsA System F accounting for scalars
A System F accounting for scalars
 

Último

REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 

Último (20)

REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 

Simply typed lambda-calculus modulo isomorphisms

  • 1. Simply Typed Lambda-Calculus Modulo Type Isomorphisms Alejandro Díaz-Caro Université Paris-Ouest INRIA Paris - Rocquencourt Gilles Dowek INRIA Paris - Rocquencourt TYPES 2014 Paris, May 12th, 2014
  • 2. Propositional equivalence vs definitional equality ∀x.∀y.(x = y) ⇒ (even(x) = even(y)) Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 2 / 15
  • 3. Propositional equivalence vs definitional equality ∀x.∀y.(x = y) ⇒ (even(x) = even(y)) (2 + 2 = 4) ⇒ (even(2 + 2) = even(4)) (2 + 2 = 5) ⇒ (even(2 + 2) = even(5)) Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 2 / 15
  • 4. Propositional equivalence vs definitional equality ∀x.∀y.(x = && y) ⇒ (even(x) = even(y)) (2 + 2 = 4) ⇒ (even(2 + 2) = even(4)) (2 + 2 = )) 5) ⇒ (even(2 + 2) = even(5)) Proposition Computation Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 2 / 15
  • 5. Propositional equivalence vs definitional equality ∀x.∀y.(x = && y) ⇒ (even(x) = even(y)) (2 + 2 = 4) ⇒ (even(2 + 2) = even(4)) (2 + 2 = )) 5) ⇒ (even(2 + 2) = even(5)) Proposition Computation ∀X.∀Y .(X ≡ && Y ) ⇒ (X ⇔ Y ) (A ≡ (( B) ⇒ (A ⇔ B) Propositional Decidable! [DiCosmo et al] (for some settings) Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 2 / 15
  • 6. Propositional equivalence vs definitional equality ∀x.∀y.(x = && y) ⇒ (even(x) = even(y)) (2 + 2 = 4) ⇒ (even(2 + 2) = even(4)) (2 + 2 = )) 5) ⇒ (even(2 + 2) = even(5)) Proposition Computation ∀X.∀Y .(X ≡ && Y ) ⇒ (X ⇔ Y ) (A ≡ (( B) ⇒ (A ⇔ B) Propositional Decidable! [DiCosmo et al] (for some settings) We want to go further: (A ≡ B) ⇒ (π : A ⇔ π : B) The goal is to identify isomorphic types Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 2 / 15
  • 7. The basic setting Simply types with conjunction and implication A, B, C ::= τ | A ⇒ B | A ∧ B An equivalence relation between types (based on the isomorphisms1 ) 1. A ∧ B ≡ B ∧ A (comm) 2. A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C (asso) 3. (A ∧ B) ⇒ C ≡ A ⇒ B ⇒ C (curry) 4. A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C) (distrib) 1Bruce, Di Cosmo, Longo, MSCS 2(2), 231–247, 1992 Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 3 / 15
  • 8. The basic setting Simply types with conjunction and implication A, B, C ::= τ | A ⇒ B | A ∧ B An equivalence relation between types (based on the isomorphisms1 ) 1. A ∧ B ≡ B ∧ A (comm) 2. A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C (asso) 3. (A ∧ B) ⇒ C ≡ A ⇒ B ⇒ C (curry) 4. A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C) (distrib) We want [A≡B] r : A r : B 1Bruce, Di Cosmo, Longo, MSCS 2(2), 231–247, 1992 Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 3 / 15
  • 9. Associative and commutative conjunction Γ r : A Γ s : B Γ r, s : A ∧ B (∧i ) Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
  • 10. Associative and commutative conjunction Γ r : A Γ s : B Γ r, s : A ∧ B (∧i ) A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C So r, s s, r r, s, t r, s , t Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
  • 11. Associative and commutative conjunction Γ r : A Γ s : B Γ r, s : A ∧ B (∧i ) A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C So r, s s, r r, s, t r, s , t What about the elimination? Γ r, s : A ∧ B Γ π1 r, s : A (∧e ) Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
  • 12. Associative and commutative conjunction Γ r : A Γ s : B Γ r, s : A ∧ B (∧i ) A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C So r, s s, r r, s, t r, s , t What about the elimination? Γ r, s : A ∧ B Γ π1 r, s : A (∧e ) But A ∧ B = B ∧ A!! Γ r, s : B ∧ A Γ π1 r, s : B (∧e ) Moreover r, s = s, r so π1 r, s = π1 s, r !! Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
  • 13. Associative and commutative conjunction Γ r : A Γ s : B Γ r, s : A ∧ B (∧i ) A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C So r, s s, r r, s, t r, s , t What about the elimination? Γ r, s : A ∧ B Γ π1 r, s : A (∧e ) But A ∧ B = B ∧ A!! Γ r, s : B ∧ A Γ π1 r, s : B (∧e ) Moreover r, s = s, r so π1 r, s = π1 s, r !! Workaround: Church-style – Project w.r.t. a type If r : A then πA r, s → r Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
  • 14. Associative and commutative conjunction Γ r : A Γ s : B Γ r, s : A ∧ B (∧i ) A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C So r, s s, r r, s, t r, s , t What about the elimination? Γ r, s : A ∧ B Γ π1 r, s : A (∧e ) But A ∧ B = B ∧ A!! Γ r, s : B ∧ A Γ π1 r, s : B (∧e ) Moreover r, s = s, r so π1 r, s = π1 s, r !! Workaround: Church-style – Project w.r.t. a type If r : A then πA r, s → r This induces non-determinism If r : A s : A then πA r, s → r πA r, s → s Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
  • 15. Associative and commutative conjunction Γ r : A Γ s : B Γ r, s : A ∧ B (∧i ) A ∧ B ≡ B ∧ A A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C So r, s s, r r, s, t r, s , t What about the elimination? Γ r, s : A ∧ B Γ π1 r, s : A (∧e ) But A ∧ B = B ∧ A!! Γ r, s : B ∧ A Γ π1 r, s : B (∧e ) Moreover r, s = s, r so π1 r, s = π1 s, r !! Workaround: Church-style – Project w.r.t. a type If r : A then πA r, s → r This induces non-determinism If r : A s : A then πA r, s → r πA r, s → s We are interested in the proof theory and both r and s are valid proofs of A Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 4 / 15
  • 16. Curryfication (A ∧ B) ⇒ C ≡ A ⇒ B ⇒ C induces r s, t rst Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 5 / 15
  • 17. Curryfication (A ∧ B) ⇒ C ≡ A ⇒ B ⇒ C induces r s, t rst (λxA .r)s → r[s/x] Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 5 / 15
  • 18. Curryfication (A ∧ B) ⇒ C ≡ A ⇒ B ⇒ C induces r s, t rst If s : A, (λxA .r)s → r[s/x] Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 5 / 15
  • 19. Distributivity of implication over conjunction A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C) induces λxA . r, s λxA .r, λxA .s Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 6 / 15
  • 20. Distributivity of implication over conjunction A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C) induces λxA . r, s λxA .r, λxA .s and λxA .πB (r) πA⇒B (λxA .r) Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 6 / 15
  • 21. Distributivity of implication over conjunction A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C) induces λxA . r, s λxA .r, λxA .s and λxA .πB (r) πA⇒B (λxA .r) Example λxA∧B .x : (A ∧ B) ⇒ (A ∧ B) λxA∧B .x : ((A ∧ B) ⇒ A) ∧ ((A ∧ B) ⇒ B) (≡) π(A∧B)⇒A(λxA∧B .x) : (A ∧ B) ⇒ A (∧e ) π(A∧B)⇒A(λxA∧B .x) λxA∧B .πA(x) Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 6 / 15
  • 22. Distributivity of implication over conjunction Multiple choices A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C) λxA . r, s λxA .r, λxA .s ⇒i , ∧i ∧i , ⇒i λxA .πB (r) πA⇒B (λxA .r) ⇒i , ∧e ∧e, ⇒i Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 7 / 15
  • 23. Distributivity of implication over conjunction Multiple choices A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C) λxA . r, s λxA .r, λxA .s ⇒i , ∧i ∧i , ⇒i λxA .πB (r) πA⇒B (λxA .r) ⇒i , ∧e ∧e, ⇒i r, s t rt, st ⇒e, ∧i ∧i , ⇒e πA⇒B (r)s πB (rs) ∗ ⇒e, ∧e ∧e, ⇒e ∗ if r : A ⇒ (B ∧ C) Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 7 / 15
  • 24. Distributivity of implication over conjunction Multiple choices A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C) λxA . r, s λxA .r, λxA .s ⇒i , ∧i ∧i , ⇒i λxA .πB (r) πA⇒B (λxA .r) ⇒i , ∧e ∧e, ⇒i r, s t rt, st ⇒e, ∧i ∧i , ⇒e πA⇒B (r)s πB (rs) ∗ ⇒e, ∧e ∧e, ⇒e ∗ if r : A ⇒ (B ∧ C) πA⇒B (r)s πB (rs) suffices . . . plus η and δ (surjective pairing) Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 7 / 15
  • 25. α-equivalence Rules If A ≡ B, r r[A/B] If r =α r , r r Example Let A ≡ B A⇒(C1∧C2) λxA .r, λyB .s Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 8 / 15
  • 26. α-equivalence Rules If A ≡ B, r r[A/B] If r =α r , r r Example Let A ≡ B A⇒(C1∧C2) λxA .r, λyB .s ∗ λxA .r, λxA .s[x/y][A/B] λxA . r, s[x/y][A/B] Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 8 / 15
  • 27. The full operational semantics Symmetric relation: r, s s, r (comm) r, s , t r, s, t (asso) rst r s, t (curry) If r : A ⇒ C, πA⇒B (r)s πB (rs) (dist) If A ≡ B, r r[A/B] (α–Types) If r =α s, r s (α–Terms) If r s, then K[r] K[s] for any context K[·] Reductions: If s : A, (λxA .r)s r[s/x] (β) If r : A, πA r, s r (πn) If r : A, πA(r) r (π1) Extensionality: If    x /∈ FV (r), r : A ⇒ B, r ∗ λyA .r    , r λxA .rx (η) If    r : A ∧ B, r ∗ r1, r2 with r1 : A, r2 : B    , r πA(r), πB (r) (δ) r s r → s r → s λxA .r → λxA .s r → s tr → ts r ¬η → s rt → st r → s t, r → t, s r ¬δ → s πA(r) → πA(s) Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 9 / 15
  • 28. Normalisation r is in normal form, if it can only continue reducing by relation Normal form Red(r) = {s | r ∗ r → s ∗ s} r in normal form if Red(r) = ∅ Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 10 / 15
  • 29. Normalisation r is in normal form, if it can only continue reducing by relation Normal form Red(r) = {s | r ∗ r → s ∗ s} r in normal form if Red(r) = ∅ Theorem (Strong normalisation) If Γ r : A then r strongly normalising Proof. Reducibility method Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 10 / 15
  • 30. Finding an interpretation The standard interpretation does not work A ∧ B = {r | πA(r) ∈ A and πB (r) ∈ B } Counter-example: r = xA , yB , Ω ∈ A ∧ B Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 11 / 15
  • 31. Finding an interpretation The standard interpretation does not work A ∧ B = {r | πA(r) ∈ A and πB (r) ∈ B } Counter-example: r = xA , yB , Ω ∈ A ∧ B A ∧ B = {r : A ∧ B | πA(r) ∈ A and πB (r) ∈ B } Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 11 / 15
  • 32. Finding an interpretation The standard interpretation does not work A ∧ B = {r | πA(r) ∈ A and πB (r) ∈ B } Counter-example: r = xA , yB , Ω ∈ A ∧ B A ∧ B = {r : A ∧ B | πA(r) ∈ A and πB (r) ∈ B } How to prove that r ∈ A and s ∈ B implies r, s ∈ A ∧ B ? Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 11 / 15
  • 33. Finding an interpretation The standard interpretation does not work A ∧ B = {r | πA(r) ∈ A and πB (r) ∈ B } Counter-example: r = xA , yB , Ω ∈ A ∧ B A ∧ B = {r : A ∧ B | πA(r) ∈ A and πB (r) ∈ B } How to prove that r ∈ A and s ∈ B implies r, s ∈ A ∧ B ? πA(r, s)→r πB (r, s)→s Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 11 / 15
  • 34. Finding an interpretation The standard interpretation does not work A ∧ B = {r | πA(r) ∈ A and πB (r) ∈ B } Counter-example: r = xA , yB , Ω ∈ A ∧ B A ∧ B = {r : A ∧ B | πA(r) ∈ A and πB (r) ∈ B } How to prove that r ∈ A and s ∈ B implies r, s ∈ A ∧ B ? πA(r, s)→r πB (r, s)→s but. . . let A = A1 ∧ A2 B = A2 ∧ B2 πA1∧A2 (r1, r2 A1∧A2 , s1, s2 A2∧B2 ) → r1, s1 We need something more subtle Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 11 / 15
  • 35. Finding an interpretation Conjunction free Conjunction-free type S, R ::= τ | S ⇒ R Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 12 / 15
  • 36. Finding an interpretation Conjunction free Conjunction-free type S, R ::= τ | S ⇒ R Lemma ∀A, A ≡ m i=1 Si1 ⇒ · · · ⇒ Sini ⇒ τ Example (A ∧ B) ⇒ C ≡ A ⇒ B ⇒ C A ⇒ (B ∧ C) ≡ (A ⇒ B) ∧ (A ⇒ C) Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 12 / 15
  • 37. Finding an interpretation Interpreting canonical types n i=1 (Sij ) mi j=1 ⇒ τ = r | ∀i, sij ∈ Sij j = 1, . . . , mi implies π(Sij ) mi j=1⇒τ (r)si ∈ SN with n ≥ 1, and m ≥ 0 Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 13 / 15
  • 38. Finding an interpretation Interpreting canonical types n i=1 (Sij ) mi j=1 ⇒ τ = r | ∀i, sij ∈ Sij j = 1, . . . , mi implies π(Sij ) mi j=1⇒τ (r)si ∈ SN with n ≥ 1, and m ≥ 0 Example (S ⇒ τ) ∧ τ =    r s ∈ S implies πS⇒τ (r)s ∈ SN and πτ (r) ∈ SN    Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 13 / 15
  • 39. Finding an interpretation Interpreting canonical types n i=1 (Sij ) mi j=1 ⇒ τ = r | ∀i, sij ∈ Sij j = 1, . . . , mi implies π(Sij ) mi j=1⇒τ (r)si ∈ SN with n ≥ 1, and m ≥ 0 Example (S ⇒ τ) ∧ τ =    r s ∈ S implies πS⇒τ (r)s ∈ SN and πτ (r) ∈ SN    Lemma If r : A then r ∈ A Corollary If r : A then r ∈ SN Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 13 / 15
  • 40. Computing with this calculus Pairs πNat(3, 4) → 3 and πNat(3, 4) → 4 But it is possible to encode pairs behaving in an standard way Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 14 / 15
  • 41. Computing with this calculus Pairs πNat(3, 4) → 3 and πNat(3, 4) → 4 But it is possible to encode pairs behaving in an standard way Booleans (λxA .λyA .x)rs (λxA .λyA .x)(r, s) (λxA .λyA .x)(s, r) (λxA .λyA .x)sr →∗ s Hence true ∼ false Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 14 / 15
  • 42. Computing with this calculus Pairs πNat(3, 4) → 3 and πNat(3, 4) → 4 But it is possible to encode pairs behaving in an standard way Booleans (λxA .λyA .x)rs (λxA .λyA .x)(r, s) (λxA .λyA .x)(s, r) (λxA .λyA .x)sr →∗ s Hence true ∼ false A ⇒ A ⇒ A is a singleton! Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 14 / 15
  • 43. Computing with this calculus Pairs πNat(3, 4) → 3 and πNat(3, 4) → 4 But it is possible to encode pairs behaving in an standard way Booleans (λxA .λyA .x)rs (λxA .λyA .x)(r, s) (λxA .λyA .x)(s, r) (λxA .λyA .x)sr →∗ s Hence true ∼ false A ⇒ A ⇒ A is a singleton! But (A ⇒ B) ⇒ B ⇒ B is not So, it is possible to encode booleans too Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 14 / 15
  • 44. Summarising What have we done? We introduced a new calculus where isomorphic propositions have the same proofs Why? If A ≡ B, a proof of A should not be distinguishable from a proof of B Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 15 / 15
  • 45. Summarising What have we done? We introduced a new calculus where isomorphic propositions have the same proofs Why? If A ≡ B, a proof of A should not be distinguishable from a proof of B Future work Add more connectives Introduce polymorphism (not trivial) Move to dependant types (provable isomorphisms?) Alejandro Díaz-Caro and Gilles Dowek Simply Typed Lambda-Calculus Modulo Type Isomorphisms - TYPES2014 15 / 15