Geometry of Interaction and Coherence Spaces

advertisement
Geometry of Interaction
and
Coherence Spaces
Naohiko Hoshino
Kyoto University
(CRECOGI 2016)
Computable Functions
Church-Turing thesis
− Turing machines
− Recursive functions
− The untyped lambda calculus
How about higher order functions?
PCF
PCF consists of
− The simply typed lambda calculus
− Recursion
PCF miss some “computable” functions
Example


0
def
pconv(x : N⊥ , y : N⊥ ) = 0


⊥
if x 6= ⊥
if y 6= ⊥
otherwise
It is easy to implement PCF+pconv
Example
strict(u : N⊥ → N⊥ )


0 if u(⊥) = 0
def
= 1 if u(⊥) = ⊥ and u(0) = 0


⊥ otherwise
PCF+strict is implementable
Implementability
We can not implement
PCF+strict+pconv
because there is
f (x : N⊥ ) =
(
0
1
if x 6= ⊥
if x = ⊥
Question
How many notions of
higher order computability are there?
Geometry of Interaction (GoI)
would provide a uniform approach.
Main Results
Thm
The full subCCC of Cpo generated by N⊥
is a full subcategory of Asm(Rel(N, N))
= {0, 1}N×N
Thm
The full subCCC of Coh generated by N⊥
is a full subcategory of Asm(wRel(N, N))
= {0, 1, . . . , ∞}N×N
c.f. [Oosten 99]
The full subCCC of HCoh generated by N⊥
is a full subcategory of Asm(Pfn(N, N))
Related Works
Characterizations of HCoh in terms of
− GoI [Oosten 99]
− Game semantics [Melliès 05]
Embeddings of game semantics into Coh
− [Melliès 13]
− [Calderon & McCusker 10]
Geometry of Interaction
Models of lambda calculi
− Programs as token machines
− Evaluation as execution
Bool
?
?
F
T
F
T
?
Div
Conjunction
T
?
and
F
Conjunction
?
T
?
and
F
Conjunction
?
T
T
?
and
F
Conjunction
?
T
T
?
and
?
F
Conjunction
?
T
T
?
and
?
F
F
Conjunction
?
T
T
?
and
?
F
F
F
Conjunction
T
?
and
Div
Conjunction
?
T
?
and
Div
Conjunction
?
T
T
?
and
Div
Conjunction
?
T
T
?
and
?
Div
GoI-Rel
GoI-Pfn
GoI-wRel
GoI-Rel
We can implement pconv
by sending multiple messages


0
def
pconv(x : N⊥ , y : N⊥ ) = 0


⊥
if x 6= ⊥
if y 6= ⊥
otherwise
(pconv ∈ Cpo)
Implementation
x
?
pconv
y
Implementation
?
x
?
pconv
?
y
Implementation
?
x
0
?
pconv
?
y
Implementation
?
x
0
?
pconv
?
y
0
Implementation
?
x
?
pconv
?
y
0
Implementation
?
x
?
pconv
?
y
0
0
GoI-Pfn
We can’t implement pconv
if we can’t send multiple messages


0
def
pconv(x : N⊥ , y : N⊥ ) = 0


⊥
if x 6= ⊥
if y 6= ⊥
otherwise
(pconv 6∈ HCoh)
GoI-Pfn
x
?
pconv
y
GoI-Pfn
?
x
?
pconv
?
y
GoI-Pfn
?
x
?
pconv
?
y
GoI-Pfn
We can implement strict
if u don’t send multiple messages
strict(u : N⊥ → N⊥ )


0 if u(⊥) = 0
def
= 1 if u(⊥) = ⊥ and u(0) = 0


⊥ otherwise
(strict ∈ HCoh)
Implementation
?
strict
?
u
Implementation
?
strict
?
u
0
Implementation
?
strict
?
u
0
0
Implementation
?
strict
?
u
Implementation
?
strict
?
?
u
Implementation
?
?
strict
?
u
Implementation
0
?
?
strict
?
u
Implementation
0
?
?
strict
?
u
0
Implementation
0
?
?
strict
?
u
0
1
GoI-Rel
We can’t implement strict
if u may send multiple messages
strict(u : N⊥ → N⊥ )


0 if u(⊥) = 0
def
= 1 if u(⊥) = ⊥ and u(0) = 0


⊥ otherwise
(strict 6∈ Cpo)
GoI-Rel
?
strict
u
GoI-Rel
?
strict
?
u
GoI-Rel
?
strict
?
?
u
0
GoI-Rel
?
?
strict
?
u
0
0
GoI-Rel
0
?
?
strict
?
u
0
0
GoI-Rel
0
?
?
strict
?
u
0,0
0
GoI-Rel
0
?
?
strict
?
u
0,0
0,1
GoI-Rel
0
?
?
strict
?
u
0,0
0,1
GoI-wRel
We can send multiple messages.
BUT, each number must be presented by
?
T
T
?
T
T,T,...
GoI-wRel
We can’t quantitatively implement pconv
even if we can send multiple messages


0 if x 6= ⊥
def
pconv(x : N⊥ , y : N⊥ ) = 0 if y 6= ⊥


⊥ otherwise
(pconv 6∈ Coh)
GoI-wRel
0
?
pconv
0
GoI-wRel
?
0
?
pconv
?
0
GoI-wRel
?
0
0
?
pconv
?
0
0
GoI-wRel
?
0
0
?
pconv
?
0
0
0,0
GoI-wRel
?
0
0
?
pconv
?
0
0
0,0
GoI-wRel
We can quantitatively implement gustave
if we can send multiple messages
gustave(x : N⊥ , y : N⊥ , z : N⊥ )

0
if
(x,
y)
=
(0,
1)



0 if (y, z) = (0, 1)
def
=

0
if
(z,
x)
=
(0,
1)



⊥ otherwise
(gustave ∈ Coh)
Implementation
?
0
0
?
gustave
1
1
z
?
0
Implementation
x
?
?
gustave
0
0
?
1
1
0
Implementation
?
1
1
?
y
gustave
0
?
0
0
GoI-wRel
We can quantitatively implement strict
even if u may send multiple messages
strict(u : N⊥ → N⊥ )


0 if u(⊥) = 0
def
= 1 if u(⊥) = ⊥ and u(0) = 0


⊥ otherwise
(strict ∈ Coh)
Arg can’t deceive
0
?
?
strict
?
u
0,0
Question
Is there any uniform approach?
Thank you
Download