Lecture 11: Categorical model of LL and Eilenberg-Moore category of $!$
Teacher: Thomas Ehrhard
Lecture 11
\[\newcommand\xto\xrightarrow \newcommand\xfrom\xleftarrow \newcommand{\Tr}{\mathop{\mathrm{Tr}}}\]Model of linear logic:
\[⟨ \underbrace{\underbrace{ℒ, 1, ⊗, λ, ρ, α, σ}_{\text{SMC category}}, ⊥}_{\star\text{-autonomous and cartesian}}, !, der, dig, m^0, m^2⟩\]Derived structures
For any $X ∈ ℒ$, $!X$ has a structure of symmetric comonoid.
\[!X \overset{w_X}{⟶} 1\\ \; \\ !X \overset{c_X}{⟶} !X ⊗ !X\\\] \[\begin{xy} \xymatrix{ !X \ar[r]^{ c_X } \ar[d]_{ λ_X^{-1} } & !X ⊗ !X \\ 1 ⊗ !X \ar@{<-}[ru]_{ w_X ⊗ !X } & } \end{xy}\] \[\begin{xy} \xymatrix{ !X \ar[r]^{ c_X } \ar[d] & !X ⊗ !X \ar[r]^{ c_X ⊗ !X } & (!X ⊗ !X) ⊗ !X \ar[d]^{ α_{!X,!X,!X}} \\ !X ⊗ !X \ar[rr]_{ !X ⊗ c_X } & & !X ⊗ (!X ⊗ !X) } \end{xy}\] \[\begin{xy} \xymatrix{ !X \ar[r]^{ c_X } \ar[d]_{ c_X } & !X ⊗ !X \\ !X ⊗ !X \ar@{<-}[ru]_{ σ_{!X, !X} } & } \end{xy}\]defined by
\[X \overset{t_X}{⟶} ⊤\]the unique element of $ℒ(X, ⊤)$ ($⊤$ is terminal):
\[!X \overset{!t_X}{⟶} !⊤ \overset{(m^0)^{-1}}{⟶} 1\] \[X \overset{⟨id,id⟩}{⟶} X \& X\\ !X \overset{!⟨id,id⟩}{⟶} !(X \& X) \overset{(m^2)^{-1}}{⟶} !X ⊗ !X\] \[μ^0: 1 ⟶ !1 \\ μ^2_{X,Y}: !X ⊗ !Y ⟶ !(X ⊗ Y) \text{ natural in } X, Y\]defined by:
\[μ^0: 1 \overset{m^0}{\overset{≃}{⟶}} ! ⊤ \overset{dig_⊤}{⟶} !!⊤ \overset{(!m^0)^{-1}}{\overset{≃}{⟶}} !1\\ \; \\ μ^2_{X,Y}: !X ⊗ !Y \overset{m_{X,Y}^2}{⟶} !(X \& Y) \overset{dig_{X \& Y}}{⟶} !!(X \& Y) \overset{!((m_{X,Y}^2)^{-1})}{⟶} !(!X ⊗ !Y) \overset{!(der_X ⊗ der_Y)}{⟶} !(X ⊗ Y)\] \[μ^n_{X_1, …, X_n}: !X_1 ⊗ ⋯ ⊗ !X_n ⟶ !(X_1 ⊗ ⋯ ⊗ X_n)\] \[\begin{xy} \xymatrix{ !X_1⊗!X_2⊗!X_3 \ar[r]^{!X_1⊗μ^2} \ar[d]_{μ^2⊗!X_3} & !X_1⊗!(X_2⊗X_3) \ar[d]^{μ^2_{X_1,X_2⊗X_3}} \\ !(X_1⊗X_2)⊗!X_3 \ar[r]_{μ^2_{X_1⊗X_2,X_3}} & !(X_1⊗X_2⊗X_3) } \end{xy}\]One has:
\[\begin{xy} \xymatrix{ 1⊗!X \ar[r]^{ μ^0 ⊗ !X} \ar[rdd]_{ λ_{!X}^{-1} } & !1⊗!X \ar[d]^{ μ^2_{1,X} } \\ & !(1 ⊗ X) \ar[d]^{!(λ_X^{-1})} \\ & !X } \end{xy}\] \[\begin{xy} \xymatrix{ (!X_1⊗!X_2)⊗!X_3 \ar[r] \ar[d]_{α} & !(X_1⊗X_2)⊗!X_3 \ar[d] \\ !X_1⊗(!X_2⊗!X_3) \ar[d] & !((X_1⊗X_2)⊗X_3) \ar[d]^{!α} \\ !X_1⊗!(X_2⊗X_3) \ar[r] & !(X_1⊗(X_2⊗X_3)) } \end{xy}\]Promotion: the only rule which gives rise to infinite computations (the most complicated one)
\[\cfrac{!C_1^⊥, …, !C_n^⊥ ⊢ A}{!C_1^⊥, …, !C_n^⊥ ⊢ !A}\]given
\[f ∈ ℒ(!X_1 ⊗ ⋯ ⊗ !X_n, Y) \\ ⟹ f^! ∈ ℒ(!X_1 ⊗ ⋯ ⊗ !X_n, !Y)\] \[!X_1 ⊗ ⋯ ⊗ !X_n \overset{dig_{X_1} ⊗ ⋯ ⊗ dig_{X_n}}{⟶} !!X_1 ⊗ ⋯ ⊗ !!X_n \overset{μ^n_{!X_1, …, !X_n}}{⟶} !(!X_1 ⊗ ⋯ ⊗ !X_n)\]Cut-elimination between promotion and contraction:
\[\infer[cut]{⊢ ?Γ, Δ}{ \infer[prom]{⊢ ?Γ, !A}{⊢ ?Γ, A} & \infer{⊢ Δ, ?A^⊥}{⊢ Δ, ?A^⊥, ?A^⊥} }\]turned into
\[\infer[contr]{⊢ ?Γ, Δ}{ \infer{\vdots}{ \infer{⊢ ?Γ, ?Γ, Δ}{ \infer{⊢ ?Γ, !A}{⊢ ?Γ, A} & \infer{⊢ ?Γ, Δ, ?A^⊥}{ \infer{⊢ ?Γ, !A}{⊢ ?Γ, A} & \infer{⊢ Δ, ?A^⊥, ?A^⊥}{} } } } }\]cf. pictures
For proof nets:
\[π ⟶ π'\\ [π] ⟶ [π']\]The Eilenberg-Moore category of $!$: $ℒ^!$
- A coalgebra of $!$ is:
-
a pair $P \; ≝ \; (\underline P, h_P)$ where
- $\underline P ∈ ℒ$
- $h_P ∈ ℒ(\underline P, !\underline P)$
such that
\[\begin{xy} \xymatrix{ \underline P \ar[r]^{ h_P } \ar[d]_{ id } & ! \underline P \\ \underline P \ar@{<-}[ru]_{ der_{\underline P} } & } \end{xy}\]and
\[\begin{xy} \xymatrix{ \underline P \ar[r]^{h_P} \ar[d]_{h_P} & ! \underline P \ar[d]^{!h_P} \\ ! \underline P \ar[r]_{dig_{\underline P}} & !! \underline P } \end{xy}\]commute
Intuition: a coalgebra is a “formula” together with “structural rules” for this formula
\[\widetilde w_P: \underline P \overset{h_P}{⟶} ! \underline P \overset{w_{\underline P}}{⟶} 1\\ \widetilde c_P: \underline P \overset{h_P}{⟶} ! \underline P \overset{c_{\underline P}}{⟶} ! \underline P ⊗ ! \underline P \overset{der_{\underline P} ⊗ der_{\underline P}}{⟶} \underline P ⊗ \underline P\]$(\underline P, \widetilde w_P, \widetilde c_P)$ is a commutative comonoid.
- Morphisms from $P ≝ (\underline P, h_P)$ to $Q ≝ (\underline Q, h_Q)$:
-
$f ∈ ℒ(\underline P, \underline Q)$ such that
\[\begin{xy} \xymatrix{ \underline P \ar[r]^{f} \ar[d]_{h_P} & \underline Q \ar[d]^{h_Q} \\ ! \underline P \ar[r]_{! f} & ! \underline Q } \end{xy}\]commutative
$ℒ^!$ is cartesian
$ℒ^!$ is a category which is cartesian, where
- the terminal object is $1$
-
the cartesian product of $P$ and $Q$ is $(P ⊗ Q, π_1, π_2)$, where
\[\underline P ⊗ \underline Q \overset{h_P ⊗ h_Q}{⟶} !\underline P ⊗ !\underline Q \overset{μ^2_{\underline P, \underline Q}}{⟶} !(\underline P ⊗ \underline Q)\]
Then you have
\[\underline {P ⊗ Q} = \underline P ⊗ \underline Q \overset{\underline P ⊗ \widetilde w_Q}{⟶} \underline P ⊗ 1 \overset{ρ_{\underline P}}{⟶} \underline P\]and if $f ∈ ℒ^!(R, P), g ∈ ℒ^!(R, Q)$:
\[\underline R \overset{\widetilde c_R}{⟶} \underline R ⊗ \underline R \overset{f ⊗ g}{⟶} \underline P ⊗ \underline Q\]NB: this comes from the fact that the Kleisli category preserves products
$ℒ^!$ is cocartesian
\[P ⊕ Q = (\underline P ⊕ \underline Q, h_{P ⊕ Q})\] \[\underline P ⊕ \underline Q \overset{h_{P ⊕ Q} \; ≝ \; [!in_1 h_P, !in_2 h_Q]}{\quad ⟶ \quad} !(\underline P ⊕ \underline Q)\]NB: this comes from the fact that the Eilenberg-Moore category preserves coproducts
cf. pictures
And $⊗$ distributes over $⊕$
$ℒ^!$ is “never” a ccc
If $X ∈ ℒ$:
\[(!X, dig_X) ∈ ℒ^! \qquad !X \overset{dig_X}{⟶} !!X\] \[f ∈ ℒ(X, Y) \qquad !f ∈ ℒ^!((!X, dig_X), (!Y, dig_Y))\] \[E: ℒ ⟶ ℒ^!\]The Kleisli category of $!$, $ℒ_!$, is “the image” of $ℒ$ in $ℒ^!$ by the functor $E$.
\[Obj(ℒ_!) = Obj(ℒ)\\ ℒ_!(X, Y) = ℒ^!((!X, dig_X), (!Y, dig_Y)) ≅ ℒ(!X, Y)\]where
\[ℒ(!X, Y) \ni f ⟼ f^! ∈ ℒ^!((!X, dig_X), (!Y, dig_Y)) \qquad \text{(promotion)}\] \[id_X \; ≝ \; der_X ∈ ℒ_!(X, X) = ℒ(!X, X)\]and if $f ∈ ℒ_!(X, Y)$ and $g ∈ ℒ_!(Y, Z)$:
\[g \circ f \; ≝ \; !X \overset{dig_X}{⟶} !!X \overset{!f}{⟶} !Y \overset{g}{⟶} Z\]$ℒ_!$ is cartesian closed
Girard’s CBN representation of JL in LL:
- $ℒ_!$ has $⊤$ as terminal object
-
Cartesian product:
\[(X \& Y, pr_1 der_{X \& Y}, pr_2 der_{X \& Y})\] \[!(X \& Y) \overset{der_{X,Y}}{⟶} X \& Y \overset{pr_1}{⟶} X\]and if
- $f ∈ ℒ_!(Z,X) \qquad f ∈ ℒ(!Z,X)$
- $g ∈ ℒ_!(Z,Y) \qquad g ∈ ℒ(!Z,Y)$
then
\[⟨f, g⟩ ∈ ℒ(!Z, X \& Y)\]
cf pictures
It is not cocartesian: it has fix point operators, and you can’t have these and coproduct at the same time.
Closure:
\[X ⇒ Y \; ≝ \; !X ⊸ Y\]cf. pictures
A concrete Model of LL
1960’s Christopher Strachey
1969: Strachey met Dana Scott in Oxford ⟶ Denotational semantics
Category of complete lattices and continuous functions ⟶ models of the pure $λ$-calculus:
\[D_∞ = (D_∞ ⇒ D_∞)\]Account for the determinism of computations:
- In the 70’s: Gérard Berry introduced stable semantics ($dI$-domains)
- In the 80’s: Berry and P-L. Curien: sequential algorithms ⟹ game semantics
85: Girard rediscovered stable semantics in coherence spaces (a “small” subcategory of $dI$-domains) ⟶ LL
$PoL$ (Preorder linear functions):
-
Objects: preorders $S \; ≝ \; (\underbrace{\vert S \vert}_{\text{web}}, \underbrace{≤_S}_{\text{transitive reflexive}})$
- why a preorder relation? Because of the exponential (we will see later)
- Complete lattice $ℐ(S)$ from a preorder $S$:
-
Initial segments: \(ℐ(S) \; ≝ \; \lbrace u ⊆ \vert S \vert \; \mid \; ∀ a ∈ u, ∀ a' ∈ \vert S \vert, a' ≤_S a ⟹ a' ∈ u \rbrace\)
$(ℐ(S), ⊆)$ is a complete lattice, that is:
if $(u_i)_{i ∈ I}$ is a family of elements of $ℐ(S)$, then \(\bigcup\limits_{i ∈ I} u_i ∈ ℐ(S)\)
$∅ ∈ ℐ(S), \vert S \vert ∈ ℐ(S)$
Linear maps
$f: S ⟶ T$ in $PoL$ if $f: ℐ(S) ⟶ ℐ(T)$ s.t.
\[∀ (u_i)_{i ∈ I} ∈ ℐ(S)^I, \quad f(\bigcup\limits_{i∈I} u_i) = \bigcup\limits_{i∈I} f(u_i)\]i.e. $f$ is a linear function on initial segments. In particular:
\[f(∅) = ∅ \\ f(u ∪ v) = f(u) ∪ f(v)\]NB:
-
note that we don’t have $f(\vert S \vert) = \vert T \vert$
-
we commute with all unions: for all $A ⊆ ℐ(S)$, \(f(\bigcup A) = \bigcup\limits_{u ∈ A} f(u)\) not only directed unions! (that’s the difference with Scott-continuous functions: for example, commuting with the empty family yields $f(∅) = ∅$, which we have not with Scott-continuous functions)
- Least element of $ℐ(S)$ containing $a$:
- \[↓ a \; ≝ \; \lbrace a' ∈ \vert S \vert \; \mid \; a' ≤_S a\rbrace\]
Trace
If $f∈ PoL(S, T)$, define
\[tr(f) \; ≝ \; \lbrace (a,b) ∈ \vert S \vert × \vert T \vert \; \mid \; b ∈ f(↓a)\rbrace ⊆ \vert S \vert × \vert T \vert\]Lolipop
$S, T$ are preorders
\[S ⊸ T = (\vert S \vert × \vert T \vert, ≤_{S ⊸ T})\] \[(a,b) ≤_{S ⊸ T} (a',b') ⟺ a' ≤_S a \; ∧ \; b ≤_T b'\] \[≤_{S ⊸ T} \; ≝ \; ≥_S × ≤_T\]Let $s ∈ ℐ(S ⊸ T)$:
\[fun(s): \begin{cases} ℐ(S) &⟶ 𝒫(\vert T \vert) \\ u &⟼ \lbrace b ∈ \vert T \vert \; \mid \; ∃ a ∈ u \quad (a, b) ∈ s\rbrace \end{cases}\]-
$fun(s)(u) ∈ ℐ(T) \qquad ∀ u ∈ ℐ(S)$:
if $b ∈ fun(s)(u)$ and $b’ ∈ \vert T \vert$ st $b’ ≤_T b$: we have some $a ∈ u, (a,b) ∈ s$:
\[(a, b') ≤_{S ⊸ T} (a,b)\]so $(a, b’) ∈ s$, so $b’ ∈ fun(s)(u)$
-
$fun(s)$ is linear: let $A ⊆ ℐ(S)$
\[fun(s)(\bigcup A) = \bigcup\limits_{u ∈ A} fun(s)(u)\]
If $f ∈ PoL(S, T)$, then $tr(f) ∈ ℐ(S ⊸ T)$.
NB: $f$ is monotonic: if $u, v ∈ ℐ(S), u ⊆ v$, then $f(v) = f(u ∪ v) = f(u) ∪ f(v)$ and so $f(u) ⊆ f(v)$.
-
$tr(f) ∈ ℐ(S ⊸ T)$:
Let $(a, b) ∈ tr(f)$.
\[(a',b') ∈ \vert S ⊸ T \vert = \vert S \vert × \vert T \vert \quad \text{ with } (a', b') ≤_{S ⊸ T} (a,b)\]that is:
\[b' ≤_T b \qquad a ≤_S a'\]Since $(a,b) ∈ tr(f)$, $b ∈ f(↓ a)$.
$a ≤_S a’$, so \(↓a ⊆ ↓a'\)
On top of that:
\(b ∈ f(↓a) ⊆ f(\underbrace{↓a'}_{∈ ℐ(T)})\) because $f$ is monotonic. So
\[b' ≤_T b ∈ f(↓a')\]So $b’ ∈ f(↓a’)$, that is
\[(a',b') ∈ tr(f)\]
Lastly: one has
\[tr \circ fun = id \\ fun \circ tr = id\]Let’s show
-
$fun \circ tr = id$:
Let $f ∈ PoL(S, T)$, let $s = tr(f)$.
We want to show that $fun(s) = f$.
Let $u ∈ ℐ(S)$: we show that $fun(s)(u) = f(u)$.
-
$⊆$:
Let $b ∈ fun(s)(u), a ∈ u$ s.t.
\[(a,b) ∈ s = tr(f)\]i.e.
\[b ∈ f(↓a)\]but $a ∈ u$, so
\[↓a ⊆ u\]$f$ is monotonic, so $b ∈ f(↓a) ⊆ f(u)$, so $b ∈ f(u)$
-
$\supseteq$:
Let $b ∈ f(u)$. One has
\[u = \bigcup\limits_{a ∈ u} ↓ a\]because $u ∈ ℐ(S)$.
\[b ∈ f(u) = \bigcup\limits_{a ∈ u} f(↓a)\]because $f$ is linear.
So there exists $a ∈ u$ st $b ∈ f(↓a)$, i.e.
\[(a, b) ∈ tr(f) = s\]so
\[b ∈ fun(s)(u)\]
-
NB:
-
$f ∈ PoL(S, T), g ∈ PoL(T, U), g \circ f ∈ PoL(S, U)$:
\[tr(g \circ f) = tr(g) tr(f) \; ≝ \; \lbrace (a, c) ∈ \vert S \vert × \vert U \vert \; \mid \; ∃ b ∈ \vert T \vert ; (a, b) ∈ tr(f) ∧ (b, c) ∈ tr(g)\rbrace\\ id ∈ PoL(S, S)\\ tr(id) \; ≝ \; \lbrace (a,a') ∈ \vert S \vert \; \mid \; a' ≤_S a\rbrace\] -
$s ∈ ℐ(S ⊸ T) \quad t ∈ ℐ(T ⊸ U)$:
\[ts \; ≝ \; \lbrace (a,c) \; \mid \; ∃ b ∈ \vert T \vert ; (a,b) ∈ s ∧ (b, c) ∈ t\rbrace\]then $ts ∈ ℐ(S, U)$ (easy)
\[fun(ts) = fun(t) \circ fun(s)\]if
\[id_S = \lbrace (a, a') ∈ \vert S \vert × \vert S \vert \; \mid \; a ≤_S a'\rbrace\]then
\[id_S ∈ ℐ(S ⊸ S) \text{ and } fun(id_S) = id\]
⟶ functorial correspondence
Leave a comment