HAL Id: hal-00369831
https://hal.archives-ouvertes.fr/hal-00369831
Submitted on 22 Mar 2009
HAL is a multi-disciplinary open access
archive for the deposit and dissemination of
sci-entific research documents, whether they are
pub-lished or not. The documents may come from
teaching and research institutions in France or
L’archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d’enseignement et de
recherche français ou étrangers, des laboratoires
The Scott model of Linear Logic is the extensional
collapse of its relational model
Thomas Ehrhard
To cite this version:
Thomas Ehrhard.
The Scott model of Linear Logic is the extensional collapse of its relational
model. Theoretical Computer Science, Elsevier, 2012, 424, pp.20-45. �10.1016/j.tcs.2011.11.027�.
�hal-00369831�
extensional ollapse of its relational model
Thomas Ehrhard
Preuves, Programmes et Systèmes,UMR 7126 CNRS and University ParisDiderot - Paris 7
∗
Mar h 22,2009
Abstra t
Weshowthattheextensional ollapseoftherelationalmodeloflinear logi isthemodelofprime-algebrai latti es,anaturalextensiontolinear logi ofthewellknownS ottsemanti softhelambda- al ulus.
Introdu tion
LinearLogi arosefromdenotationalinvestigationsofse ondorderintuitionisti logi byGirard(systemF[Gir86℄). Heobservedthat thequalitativedomains
1 usedforinterpretingsystemF anbeassumedtobegeneratedbyabinary rela-tiononasetofverti es(theweb): su hastru tureis alleda oheren espa e
2 . The ategory of oheren e spa es, with linear maps (stable maps preserving arbitrary existing unions) asmorphisms, hasremarkablesymmetryproperties that ledhimto thesequent al ulusofLL,and thentoproof-nets[Gir87℄ and totheGeometryofIntera tion.
S ott semanti s ofLL. Inspiteof Barr'sobservation[Bar79℄that the at-egoryof ompletelatti es andlinearmaps is
∗
-autonomous, it wasa ommon beliefin theLinearLogi ommunitythat thestandardS ott semanti softhe lambda- al ulus(S ottdomains and ontinuousmaps) annot provide models of lassi allinearlogi . Huth showedhoweverin [Hut94℄ that prime-algebrai ompletelatti esandlub-preservingmapsprovideamodelof lassi alLLwhose asso iatedCCC (the Kleisli ategoryof the!
omonad) isafull-CCC of the ategoryofS ott domainsand ontinuousmaps. Huth onsidered howeverhis model as degenerate, as it identies the⊗
and`
onne tives of LL3
. A few yearslater,Winskelredis overedthesamemodel in asemanti alinvestigation
∗This
work as also been partly funded by the ANR proje t CHOCO: http:// ho o.pps.jussieu .fr.
1
Qualitativedomains anbeseenasparti ulardI-domains[Ber78 ℄. 2
Thepurelambda- al ulus,ortheTuring- ompletefun tionallanguagePCF[Plo77℄, an alsobeinterpretedin oheren espa es.
3
Theinterpretationofproofsinthismodelisnon-trivialandinterestingnevertheless.Asin the aseoftherelationalmodel(seebelow),itispossibletoendowthismodelwhi hadditional stru tureswhi hseparate
⊗
and`
,withoutmodifyingtheinterpretationofproofs.aparti ular aseof amoregeneralprofun tor onstru tion, heshowedindeed that the ategorywhoseobje tsarepreorderedsets andwhere themorphisms fromapreorder
S
toapreorderT
arethefun tionsfromthesetI(S)
of down-ward losed subsets ofS
to the setI(T )
whi h preserve arbitraryunions is a modelof lassi alLL.This ategoryisequivalenttoHuth'smodel,butweprefer Winskel's approa h, asitinsistson onsidering preorders(and notlatti es)as obje ts: preordersaresimilartothewebsof oheren espa es,tothesetsofthe relationalmodel,andrepresenttheprimeelementsofthe orrespondinglatti es. Moreover,theLL onstru tionsareeasiertodes ribeintermsofpreordersthan intermsoflatti es. ItisfairtomentionalsothatKrivine[Kri90,Kri93℄usedthe same onstru tion(setI(S)
ofinitialsegments ofapreorderS
)fordes ribing models of the pure lambda- al ulusand mentioned that these preorders give risetoamodelofLL,withlinearnegation orrespondingtotakingtheopposite preorder.Relational semanti s. On the other hand, when one applies the O am's RazorPrin ipletothe oheren espa esemanti s,oneisledtointerpreting for-mulaeassets(thewebs,withoutanystru ture)andproofsasrelationsbetween these sets. Somethingtri kyhappensduringthispro ess: sin e oheren e van-ishes,one annotrestri tthesetinterpretinganof ourseto ontainonlynite liques asGirarddid in [Gir86℄, thebest one an dois takeall nite subsets. Butthen, thedereli tion relation(from
!X
toX
), whi h isthe setof allpairs({a}, a)
wherea ∈ X
, isno moreanaturaltransformation. This problem an easilybesolvedbyrepla ingnitesetswithnitemultisets,buttheee tofthis hoi eis thatthe orrespondingKleisli ategoryis nomorewell-pointed. One denesinthatwaytherelationalsemanti soflinearlogi ,whi his ertainlyits simplest (and,maybe,most anoni al)denotationalmodel.Coe ients. One way of turning the CCC asso iated with the relational modelinto awell-pointed ategoryisby enri hingit with oe ients: instead oftakingsubsetof
X × Y
asmorphismsfromX
toY
,takeelementsofC
X×Y
, where
C
isasuitableset (or lass)of oe ients;a anoni al hoi e onsistsin takingC = Set
, the lass of all sets. An element ofSet
X×Y
should be on-sideredasamatrixwhoserowsareindexedbytheelementsof
Y
,and olumns bytheelementsofX
: this isbasi allytheideaofGirard'squantitative seman-ti s[Gir88℄,whi hispresentedasamodelofintuitionisti logi ,butisindeeda modelof LL(Girardwrotethispaperbeforehedis overedLL),see[Has02℄. It isalsoaninstan eofthealreadymentionedprofun tor onstru tions[Win99℄.Finite oe ients belonging to more standard algebrai stru tures (rigs, elds, et .) an also be onsidered, but this requires adding some stru ture to thesesets forguaranteeingthe onvergen eofthesumswhi happearwhen multiplyingthematri es,see[Ehr02,Ehr05,DE08℄: theee tofsu hadditional stru tureisthat obje tsareequippedwithatopologyforwhi h the(generally innite) sumsinvolvedinmultiplyingmatri es onverge.
Extensional ollapse of the relational model. Theotherwayofmaking therelationalmodelwell-pointedisbyperforminganextensional ollapse. This operationiseasilyunderstoodinthetypehierar hyasso iatedwiththe artesian losedKleisli ategoryofthenitemultiset omonadonthe ategoryofsetsand
relations: ea htype
A
isinterpretedbyitsrelationalinterpretation[A]
(asimple set),togetherwithapartialequivalen erelation(PER)∼
A
onP([A])
. WhenA
isthetypeB ⇒ C
,anelementofP([A])
is amorphismfromB
toC
,andtwo su hmorphismsf
andg
are∼
B⇒C
-equivalentif,foranyx, y
su hthatx ∼
A
y
, onehasf (x) ∼
B
g(y)
. Inother words,this PERisalogi alrelation4
, andthe extensional ollapseof this typehierar hy is obtainedbyquotienting ea hset
P([A])
bythePER∼
A
(one onsiders onlytheelementsx
ofP([A])
su hthatx ∼
A
x
,whi hareoften alled invariant elements).Content of the paper. Weprovethatthis extensional ollapseofthe rela-tional model oin ides pre isely with the S ott model of preorders. The rst problemwehavetofa eistogiveapre isemeaningtothisstatement. Westart fromtheworkofBu iarelli[Bu 97℄,re astingitina ategori alsetting: given aCCC
C
and awell-pointed CCCE
, wewantto express what it meansforE
to be (weshallsayto represent)theextensional ollapseofC
. Forthis, we introdu etwo ategori al onstru tions.•
Thehomogeneous ollapse ategorye(C)
, whose obje tsare pairs(U, ∼)
whereU
isanobje tofC
and∼
isapartialequivalen erelation(PER)on thepointsofU
(thatisonC(⊤, U )
where⊤
is theterminalobje tofC
). Themorphisms are those ofC
whi h preservethis additional stru ture, and it is easy to see that this ategoryis a CCC. The important point inthisdenitionisthat theobje tofmorphismsfrom(U, ∼)
to(V, ∼)
is(W, ∼
W
)whereW
istheobje tofmorphismsfromU
toV
inC
andthe relation∼
W
isdenedasalogi alrelation.•
Theheterogeneous ollapse ategorye(C, E)
,whoseobje tsaretriples(U, E, )
whereU
isanobje tofC
,E
isanobje tofE
and⊆ C(⊤, U ) × E(⊤, E)
shouldbeunderstoodasarealizabilitypredi ate:x ζ
meansintuitively thatζ
represents the extensional behavior ofx
. The morphisms are thepairs(f, ϕ)
of morphisms whi h preservethe relation, and again, it is easy to he k that this ategory is aCCC. The important point is that,when onstru tingtheobje tofmorphisms,
isdenedasalogi al relation.
These two onstru tions are possible for any CCCs
C
andE
. We say thatE
representstheextensional ollapseofE
if• e(C, E)
ontainsa su ientlylarge (in areasonablesense, to be made pre ise later) sub-CCCH
whose obje ts(U, E, )
are modest, meaning thatisapartial surje tion from
C(⊤, U )
toE(⊤, E)
,and therefore in-du esaPERonC(⊤, U )
(observethatE(⊤, E)
anbe onsideredasthe quotientofC(⊤, U )
bythisPER)•
andthefun torH → e(C)
whi hmaps(U, E, )
to(U, ∼)
,where∼
isthe PERindu edby(andmapsamorphism
(f, ϕ)
tof
),isaCCCfun tor (thatis,preservestheCCCstru tureonthenose).The ni e feature of this denition is that it is ompatible with the standard one(basedontypehierar hies)andthatit aneasilybeextended,forinstan e,
4
lambda- al ulustorepresenttheextensional ollapseofanotherone.
It would be ni e of ourse to have a similar denition of the extensional ollapseofa ategori almodelofLL,andnotonlyofCCCs,butsin ethe de-nitionofsu hamodelisalreadyquite ompli ated,weprefernottoaddressthis issue. Instead,weperformtheCCC onstru tionsdenedabove on retely,ina ompletelylinearsetting, obtainingbothCCCs
e(C)
andH
asKleisli onstru -tions of suitable exponential omonads: in thepresent paper,C
is the Kleisli ategoryRel
!
asso iatedwiththeLLmodelof setsandrelations,andE
isthe Kleisli ategoryScottL
!
asso iatedwith theLLmodelof preordersandlinear mapsbetweentheasso iated ompletelatti es.Afterhavingintrodu edthene essarypreliminarymaterial,werstbuildin Se tion 2.2 alinearversionof the ategory
e(Rel
!
)
. Morepre isely, we dene a model of LL denoted asPerL
, whose obje ts are alled PER-obje ts: they are setsequipped withaPER ontheir powersets. TheKleisli ategoryPerL
!
isisomorphi toe(Rel
!
)
(or,morepre isely,toafull sub-CCCofe(Rel
!
)
).Then,inSe tion3,wedes ribetheS ottmodel
ScottL
ofLL.Theobje ts arepreorderedsets,andamorphismfromS
toT
isalinearmap(thatis,amap preservingallunions)fromI(S)
(thesetofalldownward- losedsubsetsofS
)toI(T )
. Asfarassetsare on erned,themultipli ativeandadditive onstru tions inthismodel oin idewiththoseofthemodelRel
(morethingshavetobesaid abouttheasso iatedpreorders: forinstan e,S
⊥
istheset
S
equippedwiththe oppositeofthepreorderofS
). Astotheexponential,thenatural hoi ewould beto dene!S
astheset of nite subsetsofS
withasuitable preorder: with that hoi e,theKleisli ategoryScottL
!
isasub-CCCoftheCCCof omplete latti esand S ott- ontinuousfun tions. Butwe anobtainthesameee t by dening!S
asthesetofallnitemultisetsofelementsofS
,andthiswillgreatly simplify our onstru tions,be ausewiththis hoi e, theset interpretinganLL formulainRel
oin ideswiththesetinterpretingthesameformulainScottL
(rememberthatthisset isequippedwithapreorder).InSe tion4,weintrodu ethelinearversionoftheheterogeneous ategory
H
of the onstru tiondes ribedabove. An obje tshould beatriple(X, S, )
whereX
is aset,S
is apreordered set and⊆ P(X) × I(S)
(whi h hasto be apartial surje tion). By our hoi e abovefor the denition of!S
, we an assumeX = S
,soasarstsimpli ation,we anassumeourobje tstobepairs(S, )
whereS
is apreordered set and⊆ P(S) × I(S)
hasto be a partial surje tion. A arefulanalysis shows that, whenx u
, wemusthaveu = ↓ x
(the downward losureofx
inS
),so that,fordeningthepartialsurje tion, weonlyneedtoknowitsdomain
D
. Soanobje tofour ategorywillbeapair(S, D)
whereD ⊆ P(S)
. What onditionshouldsatisfyD
? Asusual,itshould beequal toits double dual for asuitablenotion ofduality: here, we saythatx, x
′
⊆ S
areindualityifx
′
∩ ↓ x 6= ∅ ⇒ x
′
∩ x 6= ∅
,thatisx
′
annotseparatex
fromitsdownward losure. Weshowthatthese obje ts( alledpreorderswith proje tions),withsuitablelinearmorphisms,formamodeloflinearlogiPpL
, whoseasso iatedKleisli ategoryPpL
!
anbe onsideredasafullsub-CCCofe(Rel
!
, ScottL
!
)
, of whi h allobje tsaremodest. AndweshowthatScottL
!
represents the extensional ollapse ofRel
!
in the sense explained above. We a tuallyexhibit afun torfromPpL
toPerL
whi h preservesthestru ture of LLmodelandwhi hindu estherequiredCCCfun torfromPpL
al ulus,usingnotionsofin lusionsbetweenthevariousstru tureswe onsider, organizing them into omplete partially ordered lasses, and using the fa t thatthelogi al onstru tions(tensorprodu t,orthogonalityet )are ontinuous wrt.these in lusions. Thisprovidesasimplerepresentationof theextensional ollapseofthereexiveobje tin
Rel
!
weintrodu edin[BEM07℄,asareexive obje tintheCCCof ompletelatti esand ontinuousmaps,whi hisprobably isomorphi toS ott'sstandardD
∞
.Contents
1 Preliminaries 6
1.1 Notations . . . 6
1.2 Cartesian losed ategoriesandmodelsofthepurelambda- al ulus 6 1.3 Intuitionisti extensional ollapse . . . 7
1.3.1 Representingthe ollapseasaninterpretation. . . 8
1.3.2 Categori alpresentation. . . 8
1.3.3 Conne tionbetweenthetwodenitions. . . 9
1.3.4 Extensional ollapseofareexiveobje t. . . 10
1.4 New-Seely ategoriesandLL-fun tors . . . 10
2 The ollapsepartialequivalen e relation 11 2.1 The ategoryofsetsandrelations. . . 11
2.1.1 Linearstru ture. . . 11
2.1.2 Theasso iatedCCC.. . . 12
2.1.3 In lusions.. . . 12
2.2 The ollapse ategory . . . 12
2.2.1 Pre-PERs,PERobje tsandmorphismsofPERobje ts.. 12
2.2.2 Orthogonalityandstrongisomorphisms. . . 13
2.2.3 Monoidalstru ture. . . 13
2.2.4 Additivestru ture. . . 14
2.2.5 Exponentials. . . 15
2.2.6 Fundamentalisomorphismand artesian loseness. . . 15
2.3 Thepartiallyordered lassofPER-obje ts. . . 16
2.3.1 Completeness. . . 16
2.3.2 VariablePER-obje tsandxpointsthereof. . . 17
2.3.3 AnextensionalreexivePER-obje t. . . 18
3 Alinear S ott semanti s 18 3.1 Star-autonomousstru ture. . . 18
3.1.1 Isomorphisms. . . 19
3.1.2 Monoidalstru ture. . . 19
3.2 Produ tsand oprodu ts. . . 20
3.3 Exponentials . . . 20
3.3.1 Comonadstru tureoftheexponential. . . 21
3.3.2 Weakeningand ontra tion. . . 21
3.4 TheKleisli ategory . . . 21
3.4.1 TheKleisli ategoryofpreorders. . . 22
4.1 Adualityonpreorders . . . 23
4.2 Thelinear ategory. . . 25
4.2.1 Identityand omposition. . . 25
4.2.2 Tensorprodu t.. . . 25
4.2.3 Strongisomorphisms. . . 26
4.2.4 Asso iativityandsymmetryisomorphisms. . . 26
4.2.5 Linearfun tionspa eandmonoidal loseness.. . . 26
4.2.6 Thepar onne tive. . . 27
4.2.7 Themorphism
mix
isnotanisomorphismin general. . . . 274.3 Theadditives . . . 27
4.4 Theexponentials . . . 28
4.4.1 Fundamentalisomorphism. . . 28
4.4.2 Stru turalmaps. . . 29
4.4.3 Cartesian loseness. . . 29
4.5 Thepartiallyordered lassofPPs . . . 29
4.5.1 Completeness. . . 30
4.5.2 VariablePPsandleastxpointsthereof. . . 31
4.5.3 AnextensionalreexivePP. . . 31
4.6 PPsareheterogeneouslogi alrelations . . . 31
4.6.1 Heterogeneousrelationasso iatedwithaPP. . . 31
4.7 Afun torfromPPs toPER-obje ts . . . 33
4.7.1 Continuityof
ε
.. . . 354.7.2 Imageofthereexiveobje tof
PpL
!
. . . 364.8 Afun torfromPPs topreorders . . . 36
1 Preliminaries 1.1 Notations
A nitemultiset
p
ofelementsofS
is amapp : S → N
su hthatp(a) = 0
for almost alla ∈ S
. Wewritea ∈ p
forp(a) > 0
,andusesupp(p)
forthesupport ofp
whi h is the set{a ∈ S | a ∈ p}
. Weusep + q
for thepointwisesum of multisets,and0
fortheemptymultiset.Givena ategory
C
andtwomorphismsf ∈ E(E, F )
andx ∈ C(⊤, E)
(where⊤
istheterminalobje tofC
thatweassumetoexist),wewritef (x)
insteadoff ◦ x
be ausewe onsiderx
asapoint (anelement)ofE
.1.2 Cartesian losed ategories and models of the pure lambda- al ulus
Webriey re allthat a ategory
C
is artesian losed (isaCCC) ifea h nite family(E
i
)
i∈I
of obje ts ofC
has a artesian produ t&
i∈I
E
i
(in parti ular, ithasaterminalobje t⊤
)together withproje tionsπ
j
∈ C(&
i∈I
E
i
, E
j
)
su h that, for any family(f
i
)
i∈I
withf
i
∈ C(F, E
i
)
there is an unique morphismhf
i
i
i∈I
∈ C(F, &
i∈I
E
i
)
su hthatπ
j
◦ hf
i
i
i∈I
= f
j
forea hj
andif,giventwo obje tsE
andF
ofC
,thereisapair(E ⇒ F, Ev)
, alledtheobje tofmorphisms fromE
toF
, togetherwith anevaluation morphismEv
∈ C((E ⇒ F ) & E, F )
su hthat,forany
f ∈ C(G & E, F )
,there isanuniqueCur(f ) ∈ C(G, E ⇒ F )
su hthatEv
◦ (Cur(f ) & Id
E
) = f
.GiventwoCCCs
C
andD
,afun torF : C → D
willbesaidtobea artesian losed fun tor if it preservesthe artesian losed stru ture on thenose. This meansthatF(&
i∈I
E
i
) = &
i∈I
F(E
i
)
,F(π
i
) = π
i
,F(E ⇒ F ) = F(E) ⇒ F(F )
andF(Ev) = Ev
.Areexive obje t in aCCC
C
isatriple(H, app, lam)
whereH
isanobje t ofC
,app
∈ C(H, H ⇒ H)
andlam
∈ C(H ⇒ H, H)
satisfyapp
◦ lam = Id
H⇒H
. One says moreover that(H, app, lam)
is extensional5
if
lam
◦ app = Id
H
. If(H, app, lam)
is a reexive obje t inC
and ifF : C → D
is a CCC fun tor, then(F (H), F (app), F (lam))
is areexiveobje tinD
, whi h is extensionalif(H, app, lam)
isextensional.Let
(H, app, lam)
be a reexive obje t in the CCCC
. Then, given any lambda-termM
and any repetition-free list of variables~x = x
1
, . . . , x
n
whi h ontains all the freevariables ofM
(su h a list will be said to be adapted toM
), onedenes[M ]
H
~
x
∈ C(H
n
, H)
byindu tion onM
([x
i
]
H
~
x
= π
i
,[λx N ]
H
~
x
=
lam
◦ Cur([N ]
H
~
x,x
)
and[(N ) P ]
H
~
x
= Ev ◦ happ ◦ [N ]
H
~
x
, [P ]
H
~
x
i
). IfM
andM
′
are
β
-equivalent and~x
is adapted toM
andM
′
, wehave
[M ]
H
~
x
= [M
′
]
H
~
x
. If(H, app, lam)
is extensional, we have[M ]
H
~
x
= [M
′
]
H
~
x
whenM
andM
′
areβη
-equivalent.If
F : C → D
is a CCC fun tor then, for any lambda-termM
, we haveF([M ]
H
~
x
) = [M ]
F (H)
~
x
where[M ]
F (H)
~
x
istheinterpretationofM
inthereexive obje t(F (H), F (app), F (lam))
.1.3 Intuitionisti extensional ollapse
Thepresentanalysisoftheextensional ollapseofamodelofthetyped lambda- al ulusisbasedon[Bu 97℄.
From the usual intuitionisti viewpoint, the extensional ollapse is a log-i al relation. More spe i ally, onsider the hierar hy of simple types based on some type atoms
α
,β
..., and intuitionisti impli ation⇒
. Consider a artesian losed ategoryC
(withterminal obje t⊤
, artesianprodu t&
and fun tion spa e⇒
). Given a valuationI
from type atoms to obje tsofC
, we haveaninterpretationoftypes[A]
I
∈ C
. Theextensional ollapse ofthis inter-pretationis atype-indexedfamilyofpartial equivalen erelations(∼
A
)
, where∼
A
⊆ C(⊤, [A]
I
)
2
. Thisrelationisdenedbyindu tionontypes.•
Atea hbasi typeα
,therelation∼
α
oin ideswithequalityonC(⊤, I(α))
.•
Then, givenf, g ∈ C(⊤, [A ⇒ B]
I
) = C(⊤, [A]
I
⇒ [B]
I
) ≃ C([A]
I
, [B]
I
)
, onehasf ∼
A⇒B
g
if,forallx, y ∈ C(⊤, [A]
I
)
su h thatx ∼
A
y
,one hasf (x) ∼
B
g(y)
(where were allthat wewritef (x)
insteadoff ◦ x
when thesour eofx
istheterminalobje t).By indu tion on types, one proveseasily that
∼
A
is a PER onC(⊤, [A]
I
)
for ea h typeA
. Sin e the family of PERs(∼
A
)
is dened asa logi al relation, it is ompatible with the syntax of the simply typed lambda- al ulus, in the sense that, ifM
is a losed term of typeA
, its semanti s[M ]
I
∈ C(⊤, [A]
I
)
5
Thisnotionofextensionality,whi h orrespondstothe
η
onversionruleofthe lambda- al ulus,shouldnotbe onfusedwiththenotionofextensionalitywearedealingwithinthis paper,whi hisrelatedtothe ategori alnotionofwell-pointedness.satises
[M ]
I
∼
A
[M ]
I
. Thisproperty anbeextended tofun tional enri hed versions ofthe simplytyped lambda- al ulus(su h asPCF) under somemild assumptionsonC
andI
.1.3.1 Representing the ollapse as an interpretation. Let
E
be an-other artesian losed ategory, that we assume to be well-pointed (mean-ing that, ifϕ, ψ ∈ E(E, F )
satisfyϕ(ζ) = ψ(ζ)
for allζ ∈ E(⊤, E)
, thenϕ = ψ
). LetJ
be a valuation of type atoms inE
and, for ea h type atomα
, letα
⊆ C(⊤, I(α)) × E(⊤, J(α))
be abije tion (to be understood as ex-pressinganequalityrelationbetweentheelementsofthetwomodelsatground types). ThenwedeneA
⊆ C(⊤, [A]
I
) × E(⊤, [A]
J
)
foralltypeA
asalogi al relation( alledtheheterogeneousrelation), thatisf
A⇒B
ψ ⇔ (∀x, ζ x
A
ζ ⇒ f (x)
B
ϕ(ζ)) .
If
A
issurje tiveforalltypeA
(thatis∀ζ ∈ E(⊤, [A]
J
) ∃x ∈ C(⊤, [A]
I
) x
A
ζ
), then all the relationsA
are fun tional (in the sense that ifx
A
ζ
andx
A
ζ
′
, thenζ = ζ
′
). Thisis easyto he kbyindu tion ontypesand isdue tothewell-pointednessof
E
.Wesaythat
(
A
)
isarepresentation of the ollapse oftheinterpretationI
bytheinterpretationofJ
if,foralltypeA
,A
issurje tive(andbije tivewhenA = α
isabasi type)andonehas∀x, y ∈ C(⊤, [A]
I
) x ∼
A
y ⇔ (∃ζ ∈ E(⊤, [A]
J
) x
A
ζ
andy
A
ζ) .
This meansthat,at ea h type
A
, therelationA
indu esabije tion betweenE(⊤, [A]
J
)
andthequotient 6C(⊤, [A]
I
)/∼
A
.Assume that
(
A
)
issu h arepresentation. Sin eit is dened asalogi al relation,wehave[M ]
I
A
[M ]
J
forea h losedlambda-termoftypeA
,wehave[M ]
I
∼
A
[N ]
I
i[M ]
J
= [N ]
J
forall losedtermsM
andN
oftypeA
.1.3.2 Categori al presentation. There is another, more on eptual way of des ribing thesituation above. First one denes the ollapse ategory
e(C)
ofC
. Its obje ts are pairsU = (pU q, ∼
U
)
wherep
U q
is an obje t ofC
and∼
U
⊆ C(⊤, pU q)
2
is aPER.Giventwoobje tsU
andV
ofe(C)
,the elements ofe(C)(U, V )
arethemorphismsf ∈ C(pU q, pV q)
su hthat∀x, x
′
∈ C(⊤, pU q) x ∼
U
x
′
⇒ f (x) ∼
V
f (x
′
) .
If the ategory
C
is artesian,thensoise(C)
(with artesian produ tsdened in the most obvious way). And ifC
is artesian losed, so ise(C)
. Given two obje tsU
andV
ofC
, one denesU ⇒ V = (pU q ⇒ pV q, ∼
U
⇒V
)
withf ∼
U⇒V
f
′
if (x) ∼
Y
f
′
(x
′
)
for allx, x
′
∈ C(⊤, pU q)
su h thatx ∼
U
x
′
(forf, f
′
∈ C(⊤, pU ⇒ V q) ≃ C(pU q, pV q)
). The evaluation morphism
Ev
∈
e(C)((U ⇒ V ) & U, V )
is theevaluationmorphism of the ategoryC
,whi h is also a morphism ine(C)
. We say that an obje tU
ofe(C)
is dis rete if∼
U
oin ideswithequality.Similarly, one denes the heterogeneous ategory
e(C, E)
ofC
andE
. Its obje ts are triplesX = (pXq, xXy,
X
)
wherep
Xq
is an obje t ofC
,x
Xy
6
WhenquotientingasetbyaPER,one onsidersonlytheelementsofthesetwhi hare equivalenttothemselves.
is an obje t of
E
andX
⊆ C(⊤, pXq) × E(⊤, xXy)
. A morphismθ
fromX
toY
in that ategory is a pair(pθq, xθy)
wherep
θq ∈ C(pXq, pY q)
andx
θy ∈ E(xXy, xY y)
satisfyp
θq(x)
Y
x
θy(ζ)
forall(x, ζ)
su hthatx
X
ζ
. Again, if both ategoriesC
andE
are artesian, so ise(C, E)
, and if they are artesian losed,soise(C, E)
, withX ⇒ Y
dened asfollows:p
X ⇒ Y q =
p
Xq ⇒ pY q
,x
X ⇒ Y y = xXy ⇒ xY y
and, givenf ∈ C(⊤, pX ⇒ Y q) ≃
C(pXq, pY q)
andϕ ∈ E(⊤, xX ⇒ Y y) ≃ C(xXy, xY y)
, we havef
X⇒Y
ϕ
iff (x)
Y
ϕ(ζ)
forall(x, ζ)
su h thatx
X
ζ
. Letussaythatanobje tX
ofe(C, E)
ismodest7
iftherelation
X
isapartial surje tion fromC(⊤, pXq)
toE(⊤, xXy)
. Lete
mod
(C, E)
bethefullsub ategory ofe(C, E)
whose obje tsarethemodestobje ts. IfC
andE
are artesian,thene
mod
(C, E)
is asub- artesian ategoryofe(C, E)
. But in general,e
mod
(C, E)
is not artesian losed. It an benoti ed that, ifX
andY
are obje tsofe(C, E)
whi h are modest (so that, again,X ⇒ Y
is well dened but notne essarily modest)andifX⇒Y
issurje tive,thenX⇒Y
isfun tional,andhen eX ⇒ Y
ismodest.There is a artesian losed se ond proje tion fun tor
σ : e(C, E) → E
(it maps an obje tX
tox
Xy
and a morphismθ
tox
θy
). There is also a fun torε : e
mod
(C, E) → e(C)
whi h mapsan obje tX
to(pXq, ∼
ε(X)
)
, wherex
1
∼
ε(X)
x
2
ifx
1
X
ζ
andx
2
X
ζ
for some(ne essarily unique)ζ
. Givenθ ∈ e(C, E)(X, Y )
, wesetε(θ) = pθq
. Indeed,letx
1
, x
2
∈ C(⊤, pXq)
su hthatx
1
∼
ε(X)
x
2
(withζ ∈ E(⊤, xXy)
su h thatx
1
X
ζ
andx
2
X
ζ
), wehavep
θq(x
1
)
Y
x
θy(ζ)
andp
θq(x
2
)
Y
x
θy(ζ)
, and hen ep
θq(x
1
) ∼
Y
p
θq(x
2
)
,so thatp
θq ∈ e(C)(ε(X), ε(Y ))
.Wesaythatthe ategory
E
representstheextensional ollapseofthe ategoryC
ifthereexistsasub-CCCH
ofe(C, E)
su h that•
ea hobje tofH
ismodest;•
thefun torε : H → e(C)
is artesian losed•
and, for any 8dis rete obje t
U
ofe(C)
, there is an obje tX
ofH
su h thatε(X) = U
(sothatp
Xq = U
andX
isabije tion).1.3.3 Conne tionbetween the twodenitions. Themotivationofthis denition is that, in that situation, if
I
is a type valuation inC
then, for ea h ground typeα
, we an nd an obje tJ(α)
ofE
su h thatK(α) =
(I(α), J(α),
α
)
is an obje tofH
, for some bije tionK(α)
. We anextend(K(α))
into an interpretation of types([A]
K
)
in the CCCH
whi h satises[A]
K
= ([A]
I
, [A]
J
,
A
)
whereA
oin ides with theheterogeneouslogi al re-lation denedin 1.3.1. Then ourassumption thatE
representstheextensional ollapseofC
impliesthat(
A
)
isarepresentationoftheextensional ollapseofI
byJ
, inthesenseof1.3.1.Thebenetofthisabstra tionisthat the on eptofaCCC
E
representing the extensional ollapse of a CCCC
is quite exible and independent of any type hierar hygivena priori. For instan e, it providesa naturaldenition of theextensional ollapseofamodelofthepurelambda- al ulus.7
Thisis ompatiblewiththestandardterminologyofrealizability,seee.g.[AC98℄. 8
Wea tually don'tneed thispropertyfor alldis rete
U
s,but onlyfor thosewhi h are intended torepresentthe basi typesof the fun tionallanguage wehaveinmind. Forthe sakeofsimpli ity,weadoptthisstrongerhypothesis.E
representsthe extensional ollapse ofC
in the sense above, withH
as het-erogeneous ollapse CCC. Let(Z, app, lam)
be a reexive obje t inH
. Then(ε(Z), pappq, plamq)
isareexiveobje tine(C)
,(pZq, pappq, plamq)
isa reex-iveobje tinC
and(xZy, xappy, xlamy)
isareexiveobje tinE
.Inthat ase,wesaythatthereexiveobje t
(xZy, xappy, xlamy)
isa repre-sentationoftheextensional ollapseofthereexiveobje t(pZq, pappq, plamq)
. Remark: Thepre ise synta ti al meaning ofthis denition is not ompletely learyet. Inthispaper,weshallgivearepresentationoftheextensional ollapse of the relationalmodel of thelambda- al ulusintrodu ed in [BEM07℄ (in the senseabove),andthesetwomodelswill learlybequitedierent. However,both modelsindu ethesameequationaltheoryonlambda-terms(namely,thetheoryH
∗
,a ordingtowhi htwoterms
M
andM
′
areequivalentif,forany ontext
C
,thetermC[M ]
issolvableithetermC[M
′
]
issolvable). Withthenotations above,thismeansthat,whenrestri tedtotheinterpretationsoflambda-terms, the relation
∼
Z
is just equality. Extending for instan e the lambda- al ulus withaparallel omposition onstru tionbasedonthemix ruleofLinearLogi asin[DK00,BEM08℄,thesituation be omesmoreinterestingandthetheories indu edbythetwomodelsonthelanguagearedistin t.1.4 New-Seely ategories and LL-fun tors
Following [Bie95℄, we dene a model
L
of LL as a New-Seely ategory. This onsistsof•
asymmetri monoidal losedstar-autonomous ategory(alsodenotedwithL
)whi hhasallniteprodu ts(theunitofthetensorprodu tisdenoted with1
,thedualizingobje twith⊥
,theterminalobje t⊤
andthe arte-sianprodu tofX
andY
isdenotedwithX & Y
),•
a omonad! : L → L
(the stru ture morphismsd
L
X
∈ L(!X, X)
is alled dereli tionandp
L
X
∈ L(!X, !!X)
is alleddigging),•
andtwonaturalisomorphisms!⊤ ≃ 1
and!(X & Y ) ≃ !X ⊗ !Y
su hthattheadjun tionbetween
L
anditsKleisli ategoryL
!
(whi his artesian losedbythehypothesesabove)isamonoidaladjun tion.Givenafun tion
I
(valuation)fromthepropositionalatomsofLLtoobje ts ofL
, the interpretation[A]
L
I
of an LL-formulaA
is dened by indu tion onA
, using theabove mentionedstru tures ofL
, e.g.[A ⊗ B]
L
I
= [A]
L
I
⊗
L
[B]
L
I
. Similarly,givenaproofπ
ofA
,onedenes[π]
L
I
∈ L(1, [A]
L
I
)
byindu tiononπ
(expressedinthestandardsequent al ulusofLL[Gir87℄).Given two New-Seely ategories
L
andM
, a fun torF : L → M
will be alled an LL-fun tor ifit ommutesonthe nose withall the onstru tions requiredforinterpretingLL,e.g.F (X ⊗
L
Y ) = F (X) ⊗
M
F (Y )
,F (d
L
X
) = d
M
X
et . Thenonehas
F ([A]
L
I
) = [A]
M
F◦I
andF ([π]
L
I
) = [π]
M
F◦I
forallformulaA
and proofπ
ofLL.Su h an LL-fun tor
F
fun tor indu es a artesian losed fun tor (still de-notedwithF
)fromL
!
toM
!
.We dene a ategory whose obje ts are sets equipped with a partial equiva-len e relation (PER) on theirpowersets, the intuition beingthat twosubsets are equivalent if they havethe sameextensional behavior. These PERs are dened as logi al relations,in thesense that, when wedenefun tion spa es, twomorphismsareequivalentitheymap equivalentsetstoequivalentsets.
2.1 The ategory of sets and relations
This ategoryunderliesthe ollapse ategorywewanttodene. Morepre isely, the ollapse ategorywedenein Se tion 2.2is anenri hmentof the ategory of sets and relations where ea h obje t is endowed with a partial equivalen e relationexpressingwhentwosetsareextensionallyequivalent,asin1.3.2. 2.1.1 Linear stru ture. The ategoryof sets and relations
Rel
has sets as obje ts, and, given twosetsE
andF
, the set of morphisms fromE
toF
isRel(E, F ) = P(E × F )
. Composition is dened in the standardrelational way: the ompositionofs ∈ Rel(E, F )
andt ∈ Rel(F, G)
ist · s ∈ Rel(E, G)
. Theidentitymorphismis thediagonalrelationId
∈ Rel(E, E)
. This ategory has aquitesimple monoidalstru ture: the tensorprodu tisE ⊗ F = E × F
and theunit of thetensor is1 = {∗}
. This tensor produ tis afun tor: givens
i
∈ Rel(E
i
, F
i
)
fori = 1, 2
, thens
1
⊗ s
2
= {((a
1
, a
2
), (b
1
, b
2
)) | (a
i
, b
i
) ∈
s
i
fori = 1, 2}
. Equippedwiththistensorprodu t,Rel
issymmetri monoidal losed(the asso iativity,neutralityandsymmetryisomorphismsaredenedin the usualobviousway),with anobje tof linearmorphismsE ⊸ F = E × F
and linear evaluation morphismev
∈ Rel((E ⊸ F ) ⊗ E, F )
given byev
=
{(((a, b), a), b) | a ∈ E
andb ∈ F }
.Thesymmetri monoidal losed ategory
Rel
isastar-autonomous ategory, withdualizingobje t⊥ = 1
,andthe orrespondingdualityistrivial:E
⊥
= E
. So
E`F = E ⊸ F = E ⊗ F = E × F
in thismodel.Remark: Again,this ategoryisadegeneratemodel ofLLin thesensethat itidenties
⊗
and`
,justasScottL
(andevenworse,sin eitequatesaformula withitslinearnegation!). Weshowedin[BE01℄howthismodel anbeenri hed with various stru tures withoutmodifying the interpretation of proofs, making⊗
and`
non-isomorphi operations. This anbe onsideredasoneofthemost strikingfeatures ofLL: thislogi alsystemis sorobust thatit survives(in the sense thatproofsarenottrivialized)in su h adegenerateframework.Given
s ∈ Rel(E, F )
andx ⊆ E
,onesetss · x = {b | ∃a ∈ x
and(a, b) ∈ s}
. The ategoryRel
is artesian. The artesianprodu tofafamily(E
i
)
i∈I
of sets is&
i∈I
E
i
=
S
i∈I
({i} × E
i
)
, withproje tionsπ
j
= {((j, a), a) | a ∈ E
j
} ∈
Rel
(&
i∈I
E
i
, E
j
)
. Given a family of morphismss
i
∈ Rel(F, E
i
)
, the orre-spondingmorphismhs
i
i
i∈I
∈ Rel(F, &
i∈I
E
i
)
is givenbyhs
i
i
i∈I
= {(b, (i, a)) |
i ∈ I
and(b, a) ∈ s
i
}
. Theterminalobje tis⊤ = ∅
.Theexponential omonad is
!E = M
fin
(E)
, with a tiononmorphisms de-nedasfollows:!s = {([a
1
, . . . , a
n
], [b
1
, . . . , b
n
]) | (a
i
, b
i
) ∈ s
fori = 1, . . . , n} ∈
Rel(!E, !F )
fors ∈ Rel(E, F )
. Dereli tion is given byd
E
= {([a], a) | a ∈
S} ∈ Rel(!E, E)
and digging byp
E
= {(m
1
+ · · · + m
n
, [m
1
, . . . , m
n
]) | n ∈
N
andm
1
, . . . , m
n
∈ !E} ∈ Rel(!E, !!E)
. Givenx ⊆ E
, one denesx
!
=
M
fin
(x)
. Observethat,asusual,!s · x
!
= (s · x)
!
,
d
E
· x
!
= x
and
p
Theisomorphism
!⊤ ≃ 1
identies[]
and∗
,andtheisomorphism!(E & F ) ≃
!E ⊗ !F
maps theelement[(1, a
1
), . . . , (1, a
l
), (2, b
1
), . . . , (2, b
r
)]
of!(E & F )
to([a
1
, . . . , a
l
], [b
1
, . . . , b
r
]) ∈ !E ⊗ !F
(thisis alled thefundamental isomorphism in thepresentpaper).Allthesedatadene anewSeely ategory,see Se tion1.4.
2.1.2 Theasso iatedCCC. TheKleisli ategory
Rel
!
is artesian losed. GivenasetE
,apointofE
inRel
!
isbydenitionamorphisminRel(!⊤, E)
, thatis,asubsetofE
. Theterminalobje tis⊤
,the artesianprodu tof(E
i
)
i∈I
isE = &
i∈I
E
i
, with proje tionsπ
i
◦ d
E
(still denoted asπ
i
). The obje t of morphismsE ⇒ F
is!E ⊸ F
, withevaluationmapEv
= ev ◦ (d
E⇒F
⊗ Id
!E
)
, that isEv
= {(([(m, b)], m), b) | m ∈ !E
andb ∈ F } .
Applyingamorphism
s ∈ Rel
!
(E, F ) = Rel(!E, F )
toapointx ⊆ E
onsists in omposings
withx
( onsidered asa morphismfrom⊤
toE
) inRel
!
; the resultiss(x) = s · x
!
= {b | ∃m (m, b) ∈ s
andsupp(m) ⊆ x} .
The ategory
Rel
!
isnotwellpointed,inthesensethattwodistin tmorphismss
1
, s
2
∈ Rel
!
(E, F )
an satisfy∀x ⊆ E s
1
(x) = s
2
(x)
; take for instan es
1
=
{([a], b)}
ands
2
= {([a, a], b)}
.Thepurpose ofthe ollapsePER is pre iselyto makeit expli itwhen two su h morphismsshould be identied. This depends of ourse onthe PERs
E
andF
areequippedwith: the ollapsePERisalogi alrelation. Weshallpresent this onstru tionasanew ategory.2.1.3 In lusions. Let
E
andF
be two sets su h thatE ⊆ F
. Then we denotebyη
E,F
andρ
E,F
therelationsη
E,F
= (E × F ) ∩ Id
E
andρ
E,F
= (F × E) ∩ Id
E
.
Observethat
ρ
E,F
◦ η
E,F
= Id
E
.We denote by
RelC
the lass of all sets, ordered by in lusion. This is a partiallyordered lass, whi his ompleteinthesensethatanyfamily(E
γ
)
γ∈Γ
ofelementsofRelC
admitsaleastupperbound. Weshall onsidera tuallyonly dire tedfamilies (thatis,whereΓ
isadire ted poset,andγ ≤ δ ⇒ E
γ
⊆ E
δ
).2.2 The ollapse ategory
We equip now the obje ts of
Rel
with a partial equivalen e relation whose purposeistoidentifymorphismswhi hyieldequivalentvalueswhenappliedto equivalentarguments.2.2.1 Pre-PERs,PER obje ts and morphisms ofPER obje ts. Let
E
beaset.GivenabinaryrelationB
onP(E)
,wedeneanotherbinaryrelationB
⊥
on
P(E)
, alledthedual ofB
,asfollows:x
′
B
⊥
y
′
if∀x, y ∈ P(E) x B y ⇒ (x ∩ x
′
6= ∅ ⇔ y ∩ y
′
6= ∅) .
As usual, onehas
B ⊆ C ⇒ C
⊥
⊆ B
⊥
and
B ⊆ B
⊥⊥
(as subsetsof
P(E)
2
). We say that the relation
B
is apre-PER ifit is symmetri and satisesx B
y ⇒ x B x
. Clearly,anyPER isapre-PERandifB
isapre-PER, thenB
⊥
is aPER.
APER-obje t isapair
U = (|U |, ∼
U
)
,where|U |
isasetand∼
U
isabinary relationonP(|U |)
whi hisapre-PERsu hthat∼
⊥⊥
U
= ∼
U
. Thissimplymeans that,givenx, y ⊆ |U |
, onehasx ∼
U
y
assoonasx ∩ x
′
6= ∅ ⇔ y ∩ y
′
6= ∅
, for allx
′
, y
′
⊆ |U |
su h thatx
′
∼
⊥
U
y
′
. Bythis ondition,∼
U
is automati ally a PER (indeed,∼
U
ispre-PER, hen e∼
⊥
U
isaPER, and therefore∼
U
=∼
⊥⊥
U
is aPER).Let
PerL
bethe ategorywhoseobje tsarethePER-obje ts,andwherea morphismfromU
toV
isarelationt ⊆ |U | × |V |
su h, forallx, y ∈ P(|X|)
,ifx ∼
X
y
thent · x ∼
Y
t · y
.Remark: Let
U
beaPER-obje tandA ⊆ P(|U |)
su hthat∀x
1
, x
2
∈ A x
1
∼
U
x
2
. Then∀x ∈ A x ∼
C
S A
. Indeed,letx
′
1
, x
′
2
⊆ |U |
besu hthatx
′
1
∼
U
⊥
x
′
2
. Ifx ∩ x
′
1
6= ∅
, thenx ∩ x
′
2
6= ∅
be ausex ∼
U
x
, and hen eS A ∩ x
′
2
6= ∅
. Conversely,ifS A ∩ x
′
2
6= ∅
,there issomey ∈ A
su hthaty ∩ x
′
2
6= ∅
and we on ludesin ex ∼
U
y
. Soea hequivalen e lassof∼
U
hasamaximalelement, whi histheunionofalltheelementsofthe lass. Theseparti ularelementsx
ofP(|U |)
are hara terizedbythetwofollowingproperties:• x ∼
U
x
•
and∀y ∈ P(|U |) y ∼
U
x ⇒ y ⊆ x
.Lemma1 Let
U
be a PER-obje t and let(x
i
)
i∈I
and(y
i
)
i∈I
be families of elements ofP(|U |)
be su h thatx
i
∼
U
y
i
for ea hi ∈ I
. ThenS
i∈I
x
i
∼
U
S
i∈I
y
i
.Theproofisstraightforward. Inparti ular
∅ ∼
U
∅
,foranyPER-obje tU
. 2.2.2 Orthogonality and strong isomorphisms. We dene the PER-obje tU
⊥
by|U
⊥
| = |U |
and∼
U
⊥
= ∼
⊥
U
,sothatU
⊥⊥
= U
.Lemma2 Given two PER-obje ts
U
andV
, any bije tionθ : |U | → |V |
su h that,for allx, y ∈ P(|X|)
,onehasx ∼
U
y
iθ(x) ∼
V
θ(y)
is anisomorphism fromU
toV
. Su h a bije tion will be alled a strong isomorphismfromU
toV
.Straightforwardveri ation. Of ourse,
θ
−1
isastrongisomorphismfrom
V
toU
.Observethatanystrongisomorphism
θ
fromU
toV
isalsoastrong isomor-phismfromU
⊥
toV
⊥
. Indeed,letx
′
1
, x
′
2
⊆ |U |
. Assume rstthatx
′
1
∼
U
⊥
x
′
2
and let us show that
θ(x
′
1
) ∼
V
⊥
θ(x
′
2
)
. So lety
1
, y
2
⊆ |V |
be su h thaty
1
∼
V
y
2
. We haveθ(x
′
1
) ∩ y
1
6= ∅ ⇔ x
′
1
∩ θ
−1
(y
1
) 6= ∅
and we on lude sin eθ
−1
is a strong isomorphism from
V
toU
. The onverse impli ationθ(x
′
1
) ∼
V
⊥
θ(x
′
2
) ⇒ x
1
′
∼
U
⊥
x
′
2
isprovensimilarly.2.2.3 Monoidalstru ture. Wedene
U ⊗V
asfollows. Wetake|U ⊗ V | =
|U | × |V |
,and∼
U⊗V
= E
⊥⊥
where
E = {(x
1
× y
1
, x
2
× y
2
) | x
1
∼
U
x
2
andy
1
∼
U
y
2
} ⊆ P(|U ⊗ V |)
Sin e this relation
E
is apre-PER(but not aPER apriori, sin e one annot re overx
andy
fromx × y
whenoneof thesetwosets isempty), therelation∼
U⊗V
is aPER, andU ⊗ V
sodened isaPER-obje t. WedeneU ⊸ V =
(U ⊗ V
⊥
)
⊥
.
Lemma3 One has
|U ⊸ V | = |U | × |V |
. Ift
1
, t
2
∈ P(|U ⊸ V |)
, one hast
1
∼
U ⊸V
t
2
iforallx
1
, x
2
⊆ |U |
su hthatx
1
∼
U
x
2
,onehast
1
· x
1
∼
Y
t
2
· x
2
. Moreover,one hast
1
∼
U ⊸V
t
2
⇔
t
t
1
∼
V
⊥
⊸U
⊥
t
t
2
.Proof. Thisisduetothefa tthat,forany
t ⊆ |U ⊸ V |
,x ⊆ |U |
andy
′
⊆ |V |
, onehas
t ∩ (x × y
′
) 6= ∅ ⇔ (t · x) ∩ y
′
6= ∅
2
Sothe morphismsfrom
U
toV
are exa tlythet ∈ P(|U ⊸ V |)
su hthatt ∼
U ⊸V
t
,andift ∈ PerL(U, V )
thent
t ∈ PerL(V
⊥
, U
⊥
)
.
Lemma4 Theobviousbije tion
λ
from|U ⊗ V ⊸ W |
to|U ⊸ (V ⊸ W )|
de-nes a strong isomorphism between the PER-obje tsU ⊗ V ⊸ W
andU ⊸
(V ⊸ W )
. In parti ular, fors
1
, s
2
∈ P(|U ⊗ V ⊸ W |)
, onehass
1
∼
U
⊗V ⊸W
s
2
i for anyx
1
, x
2
∈ P(|U |)
andy
1
, y
2
∈ P(|V |)
su h thatx
1
∼
U
x
2
andy
1
∼
U
y
2
,onehass
1
· (x
1
× y
1
) ∼
W
s
2
· (x
2
× y
2
)
.Proof. Let
t
1
, t
2
⊆ P(U ⊗ V ⊸ W )
. Assume rst thatt
1
∼
U
⊗V ⊸W
t
2
, we wantto provethatλ(t
1
) ∼
U ⊸(V ⊸W )
λ(t
2
)
. Butthisis learsin e,ifx
1
, x
2
⊆
|U |
andy
1
, y
2
⊆ |V |
satisfyx
1
∼
U
x
2
andy
1
∼
V
y
2
,thenwehavex
1
× y
2
∼
U⊗V
x
2
× y
2
, and therefore(λ(t
1
) · x
1
) · y
1
= t
1
· (x
1
× y
1
) ∼
W
t
2
· (x
2
× y
2
) =
(λ(t
2
) · x
2
) · y
2
. Assume onverselythatλ(t
1
) ∼
U ⊸(V ⊸W )
λ(t
2
)
,weprovethatt
1
∼
U⊗V ⊸W
t
2
. Forthis,wepro eedasabove,showingthatt
t
1
∼
W
⊥
⊸(U ⊗V )
⊥
t
t
2
andapplyingLemma 3.2
Lemma5 The obvious bije tion
α : |(U ⊗ V ) ⊗ W | → |U ⊗ (V ⊗ W )|
is an isomorphism of PER-obje ts from(U ⊗ V ) ⊗ W
toU ⊗ (V ⊗ W )
.Proof. By2.2.2,itsu estoprovethat
α
isanisomorphismfrom((U ⊗ V ) ⊗
W )
⊥
to
(U ⊗ (V ⊗ W ))
⊥
,andthisresultsfromLemma4.
2
Givens ∈ PerL(U
1
, U
2
)
andt ∈ PerL(V
1
, V
2
)
,onedeness⊗t ⊆ |U
1
⊗ V
1
|×
|U
2
⊗ V
2
|
as in 4.2.2. ThenoneshowsusingLemma 4thats ⊗ t ∈ PerL(U
1
⊗
V
1
, U
2
⊗V
2
)
,andone he ksthatthe ategoryPerL
equippedwiththis⊗
binary fun tor,togetherwiththeasso iativityisomorphismofLemma5(aswellasthe symmetryisomorphismet .) isasymmetri monoidal ategory,whi his losed (withU ⊸ V
asobje tof linearmorphismsfromU
toV
)by Lemma 4. The linearevaluation morphismisev
,asdenedin Se tion2.1.PerL
isstar-autonomous,with⊥ = ({∗}, =)
asdualizingobje t.2.2.4 Additivestru ture. Givenafamily
(U
i
)
i∈I
ofPER-obje ts,one de-nesU = &
i∈I
U
i
bysetting|U | =
Q
i∈I
({i} × |U
i
|)
,andbysayingthat,foranyx = (x
i
)
i∈I
, y = (y
i
)
i∈I
∈ P(|U |)
(identifying this latter set with a produ t), onehasx ∼
U
y
if onehasx
i
∼
U
i
y
i
foralli ∈ I
. Using thefa t that∅ ∼
V
∅
in any PER-obje tV
, one shows that∼
⊥
U
= ∼
&
i∈I
U
i
⊥
and it followsthat
U
is aPER-obje t. Itisroutineto he kthat&
i∈I
U
i
sodened isthe artesianprodu tofthe
U
i
sinthe ategoryPerL
,andthatthis artesianprodu tisalso a oprodu t. Inparti ular,ifU
isaPER-obje tandI
isaset,wedenotewithU
I
theprodu t
&
i∈I
U
i
whereU
i
= U
forea hU
.Inparti ular,
PerL
hasaterminalobje t⊤
,givenby|⊤| = ∅
and∅ ∼
⊤
∅
. ObservethatthisistheonlyPER-obje twithanemptyweb.2.2.5 Exponentials. GivenaPER-obje t
U
,wedene!U
by|!U | = M
fin
(|U |)
, and∼
!U
= E
⊥⊥
where
E = {(x
!
1
, x
!
2
) | x
1
, x
2
∈ P(|U |) x
1
∼
U
x
2
}
wherewere allthat
x
!
= M
fin
(x)
. Sin eE
isapre-PER(anda tuallyaPER, be ausex
an be re overedfromx
!
usingdereli tion:
x = {a | [a] ∈ x
!
}
), the relation
∼
!U
isa PER. Were all that, ifs ⊆ |!U ⊸ V |
andx ⊆ |U |
, then we denotewiths(x)
thesubsets · x
!
of
|Y |
,seeSe tion2.1.Lemma6 Let
U
andV
be PER-obje ts and lets
1
, s
2
⊆ |!U ⊸ V |
. One hass
1
∼
!U⊸V
s
2
i∀x
1
, x
2
⊆ |U |
x
1
∼
U
x
2
⇒ s
1
(x
1
) ∼
V
s
2
(x
2
) .
Proof. The
⇒
dire tionistrivial.Forthe onverse,oneassumesthatthestated onditionholds, and one he ksthatt
s
1
∼
V
⊥
⊸(!U )
⊥
t
s
2
, andfor thispurpose,itsu estoapplyLemma 3.
2
Given
s ∈ PerL(U, V )
, one denes!s ⊆ |!U | × |!V |
as in the standard relationalmodelbysetting!s = {([a
1
, . . . , a
n
], [b
1
, . . . , b
n
]) | n ∈ N, (a
i
, b
i
) ∈ s
fori = 1, . . . , n} .
Then,sin e
!s · x
!
= (s · x)
!
,wehave
!s
1
∼
!U⊸!V
!s
2
assoonass
1
∼
U ⊸V
s
2
(by Lemma 6); in parti ular, ifs ∈ PerL(U, V )
,onehas!s ∈ PerL(!U, !V )
andso theoperations 7→ !s
isanendofun toronPerL
.Onedenes
d
U
⊆ |!U| × |U |
asd
U
= {([a], a) | a ∈ |U |}
,and sin ed
U
· x
!
=
x
for allx ⊆ |U |
, we get easilyd
U
∈ PerL(!U, U )
. Similarly, one denesp
U
⊆ |!U | × |!!U |
asp
U
= {(m
1
+ · · · + m
k
, [m
1
, . . . , m
k
]) | m
1
, . . . , m
k
∈ |!U |}
. Sin ep
U
· x
!
= x
!!
, we getp
U
∈ PerL(!U, !!U)
. The naturality inU
of these morphisms is lear (it holds in the relational model), and!
_ equipped with these two naturaltransformations is a omonad. Moreover, the fundamental isomorphismalsoholdsinthissetting.2.2.6 Fundamentalisomorphismand artesian loseness. Let
U
andV
bePER-obje ts. Letθ : |!(U & V )| → |!U ⊗ !V |
betheusualbije tiondened byθ([(1, a
1
), . . . , (1, a
l
), (2, b
1
), . . . , (2, b
r
)]) = ([a
1
, . . . , a
l
], [b
1
, . . . , b
r
])
UsingLemma6,oneshowseasilythat
θ ∈ PerL(!(U & V ), !U ⊗ !V )
(asa rela-tion). Forshowingthatθ
−1
∈ PerL(!U ⊗ !V , !(U & V ))
,oneappliesLemma4 andthen Lemma6,twi e. Thisshowsthat
θ
isastrongisomorphismof PER-obje ts.stru tureexplainedabove)isanew-Seely ategory,in thesense of[Bie95℄. Theasso iatedKleisli ategory
PerL
!
is artesian losed. Theobje tof mor-phismsfromU
toV
isU ⇒ V = !U ⊸ V
andwehaveseenthattheasso iated PER∼
U⇒V
issu hthat,giventwoelementss
1
ands
2
ofPerL
!
(U, V )
,onehass
1
∼
U
⇒V
s
2
is
1
(x
1
) ∼
V
s
2
(x
2
)
forallx
1
, x
2
⊆ |U |
su h thatx
1
∼
U
x
2
. The evaluationmorphismisEv
,asdened in2.1.2.2.3 The partially ordered lass of PER-obje ts
Let
U
andV
bePERobje ts. WesaythatU
isasubobje tofV
andwriteU ⊑
V
if|U | ⊆ |V |
,andmoreoverη
|U|,|V |
∈ PerL(U, V )
andρ
|U|,|V |
∈ PerL(V, U )
. Thismeansthatthetwofollowing onditionsaresatised∀x
1
, x
2
⊆ |U | x
1
∼
U
x
2
⇒ x
1
∼
V
x
2
and
∀y
1
, y
2
⊆ |V | y
1
∼
V
y
2
⇒ y
1
∩ |U | ∼
U
y
2
∩ |U | .
Observethat
⊑
apartialorder relationandletPerC
bethepartially ordered lassofPER-obje tsorderedby⊑
.Oneofthemainfeaturesofthisdenitionisthatlinearnegationis ovariant withrespe tto thesubobje tpartial order.
Lemma7 If
U ⊑ V
thenU
⊥
⊑ V
⊥
. Proof. Wehave|U
⊥
| = |U | ⊆ |V | = |V
⊥
|
. Moreovert
η
|U|,|V |
= ρ
|U|,|V |
andt
ρ
|U|,|V |
= η
|U|,|V |
. Theresultfollows.2
2.3.1 Completeness.
Lemma8 Let
Γ
beadire tedsetandlet(U
γ
)
γ∈Γ
beadire tedfamilyofPERs (meaningthatγ ≤ δ ⇒ U
γ
⊑ U
δ
). We deneU =
F
γ∈Γ
U
γ
by|U | =
S
γ∈Γ
|U
γ
|
and, for
x
1
, x
2
⊆ |U |
,x
1
∼
U
x
2
ix
1
∩ |U
γ
| ∼
U
γ
x
2
∩ |U
γ
|
for allγ ∈ Γ
. ThenU
is aPER-obje t. MoreoverU
⊥
=
F
γ∈Γ
U
γ
⊥
.Proof. Let
U
′
=
F
γ∈Γ
U
γ
⊥
, it will be enough to show thatU = U
′⊥
. Let