Natural Number Objects in Dialectica Categories

48
Outline Motivation Natural Numbers Objects Dialectica Categories NNOs Conclusions Natural Number Objects in Dialectica Categories Valeria de Paiva Charles Morgan Samuel Gomes da Silva September 2, 2013 Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

description

Talk given at LSFA2013, Sao Paulo, Brazil. http://lsfa.ime.usp.br/lsfa2013/

Transcript of Natural Number Objects in Dialectica Categories

Page 1: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Natural Number Objects in Dialectica Categories

Valeria de Paiva Charles Morgan Samuel Gomes da Silva

September 2, 2013

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 2: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Motivation

Natural Numbers Objects

Dialectica Categories

NNOs

Conclusions

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 3: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Linear Logic perspective into recursion and iteration?

I Linear Logic can be seen as magnifying lens to understandlogic

I Decomposing implication via Girard’s translationA→ B :=!A−◦B gives new insights on computationalphenomena

I Want to use linear perspective for iteration and recursion

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 4: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Linear Logic perspective into recursion and iteration?

I Linear Logic can be seen as magnifying lens to understandlogic

I Decomposing implication via Girard’s translationA→ B :=!A−◦B gives new insights on computationalphenomena

I Want to use linear perspective for iteration and recursion

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 5: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Linear Logic perspective into recursion and iteration?

I Linear Logic can be seen as magnifying lens to understandlogic

I Decomposing implication via Girard’s translationA→ B :=!A−◦B gives new insights on computationalphenomena

I Want to use linear perspective for iteration and recursion

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 6: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Linear Recursion and Iteration?

I Iteration and recursion in intuitionistic logic done via PCF

I the mother of all programming languages

I and its denotational models

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 7: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Linear Recursion and Iteration?

I Iteration and recursion in intuitionistic logic done via PCF

I the mother of all programming languages

I and its denotational models

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 8: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Linear Recursion and Iteration?

I Iteration and recursion in intuitionistic logic done via PCF

I the mother of all programming languages

I and its denotational models

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 9: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Categorical Models of PCF?

I Cartesian closed category

I with booleans, NNO and fixpoints

I Want to start with Linear PCF and linear natural numberobjects...

I This talk: linear natural number objects in a specific model ofLinear Logic, Dialectica categories

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 10: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Categorical Models of PCF?

I Cartesian closed category

I with booleans, NNO and fixpoints

I Want to start with Linear PCF and linear natural numberobjects...

I This talk: linear natural number objects in a specific model ofLinear Logic, Dialectica categories

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 11: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Categorical Models of PCF?

I Cartesian closed category

I with booleans, NNO and fixpoints

I Want to start with Linear PCF and linear natural numberobjects...

I This talk: linear natural number objects in a specific model ofLinear Logic, Dialectica categories

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 12: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Categorical Models of PCF?

I Cartesian closed category

I with booleans, NNO and fixpoints

I Want to start with Linear PCF and linear natural numberobjects...

I This talk: linear natural number objects in a specific model ofLinear Logic, Dialectica categories

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 13: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

What are Natural Numbers Objects?

I Lawvere’s way of modelling the natural numbers with Peano’sInduction

I CCC with NNO ⇒ all primitive recursive functions.

I A Natural Numbers Object (or NNO) is an object in acategory equipped with structure giving it properties similar tothose of the set of natural numbers N in the category Sets.

I Want to linearize this setting...

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 14: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

What are Natural Numbers Objects?

I Lawvere’s way of modelling the natural numbers with Peano’sInduction

I CCC with NNO ⇒ all primitive recursive functions.

I A Natural Numbers Object (or NNO) is an object in acategory equipped with structure giving it properties similar tothose of the set of natural numbers N in the category Sets.

I Want to linearize this setting...

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 15: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

What are Natural Numbers Objects?

I Lawvere’s way of modelling the natural numbers with Peano’sInduction

I CCC with NNO ⇒ all primitive recursive functions.

I A Natural Numbers Object (or NNO) is an object in acategory equipped with structure giving it properties similar tothose of the set of natural numbers N in the category Sets.

I Want to linearize this setting...

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 16: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

What are Natural Numbers Objects?

I Lawvere’s way of modelling the natural numbers with Peano’sInduction

I CCC with NNO ⇒ all primitive recursive functions.

I A Natural Numbers Object (or NNO) is an object in acategory equipped with structure giving it properties similar tothose of the set of natural numbers N in the category Sets.

I Want to linearize this setting...

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 17: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

What are Natural Numbers Objects?

A NNO in a CCC C consists of an object N of C together with twomorphisms, zero : 1→ N and a successor mapping succ : N → N.The triple (N, zero, succ) is required to satisfy the condition that,given any pair of morphisms f : 1→ B and g : B → B in C, thereexists a unique h : N → B such that the following diagramcommutes.

1zero

- Nsucc

- N

@@@@@

fR

B?

h

g- B?

h

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 18: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Natural Numbers Objects in Sets

A NNO in Sets consists of the object N in Sets together with twomorphisms, zero : 1→ N (where we really choose the element 0 ofthe natural numbers N, and the successor mapping succ : N→ N isreally +1 : N→ N.

1zero

- Nsucc

- N@@@@@

fR

B?

h

g- B?

h

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 19: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Natural Numbers Objects in Sets

Given f : 1 −→ X (or f (∗) = x0) and g : X −→ X we have themap h given by h(n) = gn(f (∗)) makes the following diagramcommute and is the unique map doing so.

1zero

- N+ 1- N

@@@@@

fR

X

h

?

g- X

h

?

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 20: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Natural Numbers Objects in a SMCC?

Pare and Roman (thinking of Linear Logic) have the following:Given a monoidal category C a NNO is an object N of C andmorphisms zero : I −→ N and succ : N −→ N such that for anyobject B of C and morphisms b : I −→ B and g : B −→ B there isa morphism h : N −→ B such that the diagrams below commute:

Izero

- Nsucc

- N

@@@@@

bR

B?

h

g- B?

h

Can we calculate with it?Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 21: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Dialectica Categories

Conceived as an internal model of Godel’s DialecticaInterpretation, turned out to be also a model of Linear Logic.Objects of the Dialectica category Dial2(Sets) are triples,A = (U,X ,R), where U and X are sets and R ⊆ U × X is arelation.Given elements u in U and x in X , either they are related by R,R(u, x) = 1 or they are not and R(u, x) = 0, hence the 2 in thename of the category.

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 22: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Dialectica Categories

A morphism from A to B = (V ,Y , S) is a pair of functionsf : U −→ V and F : Y −→ X such that uRF (y) =⇒ f (u)Sy .

u ∈ U �R

X

V

f

?�

SY 3 y

6

F

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 23: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Tensor in Dialectica Categories

Let A = (U,X ,R) and B = (V ,Y , S) be objects in Dial2(Sets).

The tensor product of A and B is given by

A⊗ B = (U × V ,XV × Y U ,R ⊗ S)

where the relation R ⊗ S is given by (u, v) R ⊗ S (f , g) iff uRf (v)and vSg(u).

The unit for this tensor product is the object IDial := (1, 1,=),where 1 = {∗} is a singleton set and = is the identity relation onthe singleton set.

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 24: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Symmetric Monoidal Closed Dialectica Categories

Let A = (U,X ,R) and B = (V ,Y , S) be objects in Dial2(Sets).

The internal-hom is given by

[A,B] = (V U × XY ,U × Y , [R,S ])

where (f ,F )[R,S ](u, x) iff uRF (y) implies f (u)Sy .

The tensor product is adjoint to the internal-hom, as usual

HomDial(A⊗ B,C ) ∼= HomDial(A, [B,C ])

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 25: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Other structure of Dialectica Categories

Let A = (U,X ,R) and B = (V ,Y , S) be objects in Dial2(Sets).

There is an auxiliary tensor product structure given by

A ◦ B = (U × V ,X × Y ,R ◦ S)

where (u, v)R ◦ S(x , y) iff uRx and vSy .

This simpler tensor structure is not the adjoint of the internal-hom.It’s necessary to prove existence of appropriate modality !.The unit for this tensor product is also IDial .

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 26: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Cartesian structure of Dialectica Categories

Let A = (U,X ,R) and B = (V ,Y , S) be objects in Dial2(Sets).

The cartesian product is given by A× B = (U × V ,X + Y , ch)where X + Y = X × 0 ∪ Y × 1 and the relation ch (short for‘choose’) is given by (u, v)ch(x , 0) if uRx and (u, v)ch(y , 1) if vSy .

The unit for this product is (1, ∅, ∅), the terminal object ofDial2(Sets). (there are also cartesian coproducts.)

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 27: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNOs in Dialectica Categories?

To investigate iteration and recursion in linear categories we wantto define a natural numbers object in Dial2(Sets).We can use either the cartesian structure of Dial2(Sets) or any oneof its tensor structures.The first candidate monoidal structure is the cartesian product inDial2(Sets).This requires a map corresponding to zero from the terminal object(1, ∅, ∅) in Dial2(Sets) to our natural numbers object candidate,say a generic object like (N,M,E )

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 28: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNOs in Dialectica Categories?

Reading the definition, (N,M,E ) is a NNO with respect to thecartesian structure of Dial2(Sets)if there are maps(z ,Z ) : (1, ∅, ∅) −→ (N,M,E ) and(s, S) : (N,M,E ) −→ (N,M,E ) such that for any object(X ,Y ,R) and any pair of morphisms(f ,F ) : (1, ∅, ∅) −→ (X ,Y ,R) and(g ,G ) : (X ,Y ,R) −→ (X ,Y ,R) there exists some (unique)(h,H) : (N,M,E ) −→ (X ,Y ,R) such that a big diagramcommutes.

Which big diagram?

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 29: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using cartesian structure

∅ � ZM � S

M

��∅ I@

@F

��E

��E

1z

- Ns-

H6

N

@@@@@@

f

R

@@

Y � GY

H

6

��R �

�R

X

h

?

g- X

?

h

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 30: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using cartesian structure

Proposition 1. The category Dial2(Sets) has a (trivial) NNO withrespect to its cartesian structure, given by (N, ∅, ∅).

Proof sketch: any possible NNO for Dial2(Sets) is of the formN = (N,M,E ) for some set M and some relation E ⊆ N×M,where N is the usual natural numbers object in Sets, with theusual zero constant and the usual successor functions.There must exist a morphism in Dial2(Sets) zero = (z ,Z ) : 1→ Nwith two components, z : 1→ N (as in Sets) and Z : M → 0. Butsince the only map into the empty set in the category of Sets isthe empty map, we conclude that M is empty and so is E as this isa relation in the product N× ∅.

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 31: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using cartesian structure

This trivial NNO works, because given any object B of Dial2(Sets)with maps f : 1→ B and g : B → B, we can find a unique maph : N → B making all the necessary diagrams commute: In thefirst coordinate h is given by the map that exists for N as a NNOin Sets and in the second coordinate this is simply the empty map.

Not very exciting...

This triviality result is expected, since the ‘main’ structure of thecategory Dial2(Sets) is the tensor product that makes it asymmetric monoidal closed category, not its cartesian structure.

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 32: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using monoidal structure

[Burroni] Peano-Lawvere axiom’s says that for any object X in a

category E , there is a diagram XzX- NX

sX- NX

with the universal property that for any diagram of the form

Xf- Y

g- Y there exists h : NX → Y such that

the following diagram commutes

XzX- NX

sX- NX

@@@@@

fR

Y

h

?

g- Y?

h

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 33: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using monoidal structure

If a category satisfies this axiom, we say the category is aPeano-Lawvere (PL) category.

Dial2(Sets) is a PL-category if given any object (A,B,C ) ofDial2(Sets) there is an object (N,M,E ) and maps(z ,Z ) : (A,B,C ) −→ (N,M,E ) and(s, S) : (N,M,E ) −→ (N,M,E ) such that for any object ofDial2(Sets) (X ,Y ,R) together with a pair of morphisms(f ,F ) : (A,B,C ) −→ (X ,Y ,R) and(g ,G ) : (X ,Y ,R) −→ (X ,Y ,R) there exists some (unique) mapin Dial2(Sets) (h,H) : (N,M,E ) −→ (X ,Y ,R) making the bigdiagram commute.

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 34: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using monoidal structure

B � ZM � S

M

��C I@

@F

��E

��E

Az

- Ns-

H6

N

@@@@@@

f

R

@@

Y � GY

H

6

��R �

�R

X

h

?

g- X

?

h

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 35: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using monoidal structure

Simplifying this picture for the case where the unit (1, 1,=) isused. If N = (N,M,E ) is a proposed NNO in Dial2(Sets) thenthere must exist morphisms zero = (z ,Z ) : (1, 1,=)→ (N,M,E )and succ = (s,S) : (N,M,E )→ (N,M,E ) such that:

1 � ZM � S

M

��= I@

@F

��E

��E

1z

- Ns-

H6

N

@@@@@@

f

R

@@

Y � GY

H

6

��R �

�R

X

h

?

g- X

?

h

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 36: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using monoidal structure

Proposition 2. The category Dial2(Sets) has a (trivial) weakNNO with respect to its monoidal closed structure described, givenby (N, 1,N× 1).As before, any possible NNO for Dial2(Sets) is of the formN = (N,M,E ) for some set M and some relation E ⊆ N×M,where N is the usual natural numbers object in Sets, with the usualzero constant and the usual successor function on natural numbers.The morphism zero has two components, z : 1→ N (as in Sets)and Z : M → 1. The map Z has to be the unique map !M : M → 1sending all m’s in M to the singleton set ∗

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 37: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using monoidal structure

The morphism succ : N → N has two components (s,S), wheres : N→ N is the usual successor function in N, and S : M → M isto be determined, satisfying some equations.Fact 1. If there is a map (f ,F ) : I → B in Dial2(Sets) for ageneric object B of the form (X ,Y ,R) then there exists x0 in Xsuch for all y in Y we have x0Ry .By definition of maps in Dial2(Sets), we must have

1 �=

1

X

f

?�

RY

6

F =!

where the map in the left f simply picks up an element of X andthe map on the right F is the unique terminal map, hence∀∗ ∈ 1, ∀y ∈ Y , ∗ = ∗ implies x0 = f (∗)Ry .

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 38: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using monoidal structure

Fact 2. If there is a NNO in Dial2(Sets) of the form (N,M,E ),where M is the singleton set 1, then S : 1→ 1 is the identity on 1and E relates every n in N to ∗.If N = (N, 1,E ) is a NNO in Dial2(Sets) then the mapzero = (z ,Z ) : I → N has to be the zero map in N together withthe terminal map in 1 and the succ = (s,S) : N → N consists ofthe usual successor function on the integers and S : 1→ 1 has tobe the identity on 1.

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 39: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using monoidal structure

The fact that (s,S) is map of Dial2(Sets) gives us the diagram

N �E

1

N

s

?�

E1

6

S

and the condition on morphisms says for all n in N and for all ∗ in1, if nES∗ then n + 1 = s(n)E∗. But S is the identity on 1, ieS∗ = ∗, so if nES∗ ⇒ n + 1E∗, which is just what we need toprove that E relates every n in N to ∗.

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 40: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using monoidal structure

Back to the proposition 2: The object of Dial2(Sets) of the form(N, 1,E ), where E relates every n in N to ∗, together withmorphisms zero = (0, id1) : I → N and succ = (+1, id1) : N → Nis a weak NNO in Dial2(Sets).Proof. Let B be an object (X ,Y ,R) of Dial2(Sets) such thatthere are maps (f ,F ) : I → B and (g ,G ) : B → B. To proveN = (N, 1,E ), where nE∗ for all n in N is a weak NNO, we mustdefine a map (h,H) : N → B such that the main NNO diagramcommutes. It is clear that h : N→ X can be defined using the factthat N is a NNO in Sets. It is clear that we must take H : Y → 1as the terminal map on Y . We need to check that all the requiredconditions are satisfied.

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 41: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using monoidal structure

The required conditions amount to showing that

1. the map (h,H) is a map of Dial2(Sets);2. the triangles commute, and3. the squares commute in the diagram below.

1 � Z = id11 � S = id1

1

��= I@

@F =!Y

��E

��E

1z = 0

- Ns = +1

-

H6

N

@@@@@@

f

R

@@

Y � GY

H =!Y

6

��R �

�R

X

h

?

g- X

?

h

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 42: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using monoidal structure

Items 2 and 3 are boring, but easy.Need to show that the proposed map (h,H) is indeed a map inDial2(Sets).The map (h,H) is a map in Dial2(Sets) if the conditionfor all m in N, for all y in Y , if mEH(y) then h(m)Ryis satisfied.Since H(y) = ∗ and we know mE∗ for all m in N, we need to showh(m)Ry for all m ∈ N and all y in Y . (vertical square)By cases, either m = 0 or not.

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 43: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using monoidal structure

If m = 0 we need to show h(0)Ry for all y ∈ Y . Since N is theNNO in Sets we know that

10- N

+1- N

@@fR

X

?h

g- X

?h

commutes, hence h(0) = f (∗) and h(m + 1) = g(h(m)). SinceB = (X ,Y ,R) is an object that has a map (f ,F ) : I → B we know(Fact 1) that there exists x0 = f (∗) such that f (∗)Ry for all y inY and hence h(0) = f (∗)Ry for all y ∈ Y .

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 44: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

NNO using monoidal structure

If m is not zero, then m = n + 1 and h(n + 1) = g(h(n)) by thedefinition of h in Sets. But B is an object of Dial2(Sets) equippedwith a map (g ,G ) : B → B, which means that there existg : X → X and G : Y → Y in Sets such that for all x ∈ X and forall y ∈ Y , if xRG (y) then g(x)Ry . To show that h(n)Ry , since weknow that h(0)Ry we need to show that if h(n)Ry for all y ∈ Ythen h(n + 1)Ry for all y ∈ Y .But if h(n)Ry for all y ∈ Y , then in particular h(n)RG (y ′) for ally ’s that happen to be in the range of G , that is if y happens to beGy ′. In this case g(h(n))Ry ′, that is h(n + 1)Ry ′.

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 45: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Summing up

We obtained a degenerate weak NNO, where in the first coordinatewe have business as usual in Sets and in the second coordinate wehave simply the singleton set 1 and terminal maps.

We expected to find a NNO in the dialectica categories, withiteration and recursion as usual in the first coordinate, butco-recursion/co-iteration in the second coordinate.

It is disappointing to obtain only a ‘degenerate’ NNO as above,where the second coordinate is trivial. Maybe we have not got theright level of generality...

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 46: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Summing up

Natural number algebras 1→ N ← N are in bijectivecorrespondence with F -algebras (for F the endofunctorF (X ) = 1 + X ) . The initial algebra for this functor in Set isindeed the usual natural numbers, where we have an isomoprhismN ∼= 1 + N. Since this is an isomorphism we could also see it as anF -coalgebra, but this is not final in the category of sets. AsPlotkin remarks this coalgebra is final in the category of sets andpartial functions Pfn.

Can we change our working underlying category of Dial2(Sets) sothat a non-trivial NNO can be constructed?

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 47: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Some references

I Sandra Alves, Maribel Fernandez, Mario Florido, and IanMackie. Linear recursive functions. In Rewriting,Computation and Proof, pages 182195. Springer, 2007.

I Dialectica and Chu constructions: Cousins?Theory andApplications of Categories, Vol. 17, 2006, No. 7, pp 127-152.

I Thesis TR: The Dialectica Categorieshttp://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-213.html

I A Dialectica-like Model of Linear Logic.In Proceedings ofCTCS, Manchester, UK, September 1989. LNCS 389 .

I The Dialectica Categories. In Proc of Categories in ComputerScience and Logic, Boulder, CO, 1987. ContemporaryMathematics, vol 92, American Mathematical Society, 1989

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories

Page 48: Natural Number Objects in Dialectica Categories

OutlineMotivation

Natural Numbers ObjectsDialectica Categories

NNOsConclusions

Thanks!

Valeria de Paiva, Charles Morgan, Samuel Gomes da Silva Natural Number Objects in Dialectica Categories