Contents

# Contents

## Idea

In full linear logic/linear type theory there is assumed a (comonadic) modality denoted “!” and called the exponential modality, whose role is, roughly, to give linear types also a non-linear interpretation. This is also called the “of course”-modality or the storage modality, and sometimes the “bang”-operation.

In classical linear logic (meaning with involutive de Morgan duality), the de Morgan dual of “!” is denoted “?” and called the “why not”-modality.

In categorical semantics of linear type theory the !-modality typically appears as a kind of Fock space construction. If one views linear logic as quantum logic (as discussed there), then this means that the !-modality produces free second quantization.

## Categorical semantics

Everyone agrees that ! should be a comonad (and ? should be a monad, see also at monads in computer science), but there are different ways to proceed from there. The goal is to capture the syntactic rules allowing assumptions of the form $!A$ to be duplicated and discarded.

### Intuitionistic case

The original definition from Seely, adapted to the intuitionistic case and modernized, is:

###### Definition

Let $C$ be an symmetric monoidal category with cartesian products. A Seely comonad on $C$ is a comonad that is a strong monoidal functor from the cartesian monoidal structure to the symmetric monoidal structure, i.e. we have $!(A\times B)\cong !A \otimes !B$ and $!1\cong I$ coherently. (There is also an additional coherence axiom that should be imposed; see Mellies, section 7.3.)

(Note that in linear logic, the cartesian monoidal structure $\times$ is sometimes denoted by $\&$.) This implies that the Kleisli category of ! (i.e.\ the category of cofree !-coalgebras) is cartesian monoidal. If $C$ is closed symmetric monoidal then the Kleisli category of a cartesian closed category, which is a categorical version of the translation of intuitionistic logic into linear logic.

Of course, the above definition depends on the existence of the cartesian product. A different definition that doesn’t require the existence of $\times$ was given by Benton, Bierman, de Paiva, and Hyland:

###### Definition

Let $C$ be a symmetric monoidal category; a linear exponential comonad on $C$ is a lax monoidal comonad such that every cofree !-coalgebra naturally carries the structure of a comonoid object in the category of coalgebras (i.e. the cofree-coalgebra functor lifts to the category of comonoids in the category of coalgebras).

It follows automatically that all !-coalgebras are comonoids, and therefore that the category of all !-coalgebras (not just the cofree ones) is cartesian monoidal. Note that for a comonad on a poset, every coalgebra is free; thus the world of pure propositional “logic” doesn’t tell us whether to consider the Kleisli category or the Eilenberg-Moore category for the translation.

A more even-handed approach is the following (see Benton (1995) and Mellies (2009)), based on the observation that both Kleisli and Eilenberg-Moore categories are instances of adjunctions.

###### Definition

A linear-nonlinear adjunction is a monoidal adjunction $F \colon M \rightleftarrows L \colon G$ in which $L$ is symmetric monoidal and $M$ is cartesian monoidal. The induced !-modality is the comonad $F G$ on $L$.

This includes both of the previous definitions where $M$ is taken respectively to be the Kleisli category or the Eilenberg-Moore category of !. Conversely, in any linear-nonlinear adjunction the induced comonad $F G$ can be shown to be a linear exponential comonad. Moreover, if $!$ is a linear exponential comonad on a symmetric monoidal category $C$ with finite products, then the cofree !-coalgebra functor is a right adjoint and hence preserves cartesian products; but the cartesian products of coalgebras are the tensor product in $C$, so we have $!(A\times B) \cong !A \otimes !B$, the Seely condition.

### Classical case

For “classical” linear logic, we want $C$ to be not just (closed) symmetric monoidal but $\ast$-autonomous. If an $\ast$-autonomous category has a linear exponential comonad $!$ one can derive a ? from the ! by de Morgan duality, $?A = (!(A^*))^*$. The resulting relationship between ! and ? was axiomatized in a way not requiring the de Morgan duality by Blute, Cockett & Seely (1996):

###### Definition

Let $C$ be a linearly distributive category with tensor product $\otimes$ and cotensor product $\parr$. A (!,?)-modality on $C$ consists of:

1. a $\otimes$-monoidal comonad ! and a $\parr$-comonoidal monad ?
2. ? is a !-strong monad, and ! is a ?-strong comonad
3. all free !-coalgebras are naturally commutative $\otimes$-comonoids, and all free ?-algebras are naturally commutative $\parr$-monoids.

Here a functor $F$ is strong with respect to a lax monoidal functor $G$ if there is a natural transformation $F A \otimes G B \to F(A\otimes G B)$ satisfying some natural axioms, and we similarly require compatibility of the monad and comonad structure transformations. BCS96 showed that if $C$ is in fact $\ast$-autonomous, it follows from the above definition that $?A = \big(!(A^*)\big)^*$ as expected.

## Examples

### Relation to Chu construction

###### Theorem

Suppose $F \colon M \rightleftarrows C : G$ is a linear-nonlinear adjunction, where $C$ is closed symmetric monoidal with finite limits and colimits, and $\bot\in C$ is an object. Then there is an induced linear-nonlinear adjunction $M \rightleftarrows Chu(C,\bot)$ where $Chu(C,\bot)$ is the Chu construction $Chu(C,\bot)$, which is $\ast$-autonomous with finite limits and colimits. Hence $Chu(C,\bot)$ admits a !-modality.

###### Proof

The embedding of $C$ in $Chu(C,\bot)$ as $A \mapsto (A, [A,\bot], ev)$ is coreflective: the coreflection of $(B^+, B^-, e_B)$ is $(B^+, [B^+,\bot], ev)$. Moreover, this subcategory is closed under the tensor product of $Chu(C,\bot)$, i.e. the embedding $C\hookrightarrow Chu(C,\bot)$ is strong monoidal, hence the adjunction is a monoidal adjunction. Therefore, the composite adjunction $M \rightleftarrows C \rightleftarrows Chu(C,\bot)$ is again a linear-nonlinear-adjunction.

Since a Chu construction is $\ast$-autonomous, this !-modality implies a dual ?-modality.

###### Corollary

If $C$ is a cartesian closed category with finite limits and colimits and $\bot\in C$ is an object, then there is a linear-nonlinear adjunction $C \rightleftarrows Chu(C,\bot)$, and hence $Chu(C,\bot)$ admits a !-modality.

###### Proof

Apply the previous theorem to the identity adjunction $C\rightleftarrows C$.

Note that the !-modality obtained from the corollary is idempotent, while that obtained from the theorem is idempotent if and only if the original one was. Other ways of constructing !-modalities, such as by cofree coalgebras, may produce examples that are not idempotent.

### Realization in linear homotopy type theory

In dependent linear homotopy type theory the “linear-nonlinear adjunction” is naturally identified (Ponto & Shulman (2012), Ex. 4.2, see also Schreiber (2014), Sec. 4.2) with the stabilization adjunction between homotopy types and stable homotopy types (Riley (2022), Prop. 2.1.31), whose left adjoint (forming suspension spectra $\Sigma^\infty_+$) is equivalently given (cf. Riley (2022), Rem. 2.4.13) by sending $B \,\colon\, Type$ to the linear dependent sum $\star_B \mathbb{1} \;\coloneqq\; (p_B)_! (p_B)^\ast \mathbb{1}$ over the monoidal unit in the context $B$. In terms of quantum modal logic this is forming the “linear randomization” of the given classical homotopy type (its “motive”):

Girard’s original presentation of linear logic involved rules that explicitly assumed the presence of $!$ on hypotheses or on entire contexts, such as , dereliction?, weakening and contraction:

$\frac{\Gamma, A \vdash B}{\Gamma, !A \vdash B} \qquad \frac{\Gamma \vdash B}{\Gamma, !A\vdash B} \qquad \frac{\Gamma,!A,!A \vdash B}{\Gamma, !A\vdash B}$

and “promotion”:

$\frac{!\Gamma \vdash A}{!\Gamma\vdash !A}$

If this is translated into a natural deduction style term calculus, the resulting rules are more complicated than those of most type formers. This can be avoided using adjoint type theory with two context zones, one “nonlinear” one where contraction and weakening are permitted (and admissible) and one “linear” one where they are not, with $!$ as a modality relating the two zones.

Such a “modal” presentation of linear logic was first introduced by Girard in his work on LU? and then developed by a number of other people such as Plotkin, Wadler, Benton, and Barber. See the references for details.

This presentation also generalizes naturally to dependent linear type theory, with the nonlinear type theory being dependent, and the linear types depending on the nonlinear ones but nothing depending on linear types. In this context, the $!$-modality decomposes into “context extension” and a “dependent sum”.

$\phantom{-}$symbol$\phantom{-}$$\phantom{-}$in logic$\phantom{-}$
$\phantom{A}$$\in$$\phantom{A}$element relation
$\phantom{A}$$\,:$$\phantom{A}$typing relation
$\phantom{A}$$=$$\phantom{A}$equality
$\phantom{A}$$\vdash$$\phantom{A}$$\phantom{A}$entailment / sequent$\phantom{A}$
$\phantom{A}$$\top$$\phantom{A}$$\phantom{A}$true / top$\phantom{A}$
$\phantom{A}$$\bot$$\phantom{A}$$\phantom{A}$false / bottom$\phantom{A}$
$\phantom{A}$$\Rightarrow$$\phantom{A}$implication
$\phantom{A}$$\Leftrightarrow$$\phantom{A}$logical equivalence
$\phantom{A}$$\not$$\phantom{A}$negation
$\phantom{A}$$\neq$$\phantom{A}$negation of equality / apartness$\phantom{A}$
$\phantom{A}$$\notin$$\phantom{A}$negation of element relation $\phantom{A}$
$\phantom{A}$$\not \not$$\phantom{A}$negation of negation$\phantom{A}$
$\phantom{A}$$\exists$$\phantom{A}$existential quantification$\phantom{A}$
$\phantom{A}$$\forall$$\phantom{A}$universal quantification$\phantom{A}$
$\phantom{A}$$\wedge$$\phantom{A}$logical conjunction
$\phantom{A}$$\vee$$\phantom{A}$logical disjunction
symbolin type theory (propositions as types)
$\phantom{A}$$\to$$\phantom{A}$function type (implication)
$\phantom{A}$$\times$$\phantom{A}$product type (conjunction)
$\phantom{A}$$+$$\phantom{A}$sum type (disjunction)
$\phantom{A}$$0$$\phantom{A}$empty type (false)
$\phantom{A}$$1$$\phantom{A}$unit type (true)
$\phantom{A}$$=$$\phantom{A}$identity type (equality)
$\phantom{A}$$\simeq$$\phantom{A}$equivalence of types (logical equivalence)
$\phantom{A}$$\sum$$\phantom{A}$dependent sum type (existential quantifier)
$\phantom{A}$$\prod$$\phantom{A}$dependent product type (universal quantifier)
symbolin linear logic
$\phantom{A}$$\multimap$$\phantom{A}$$\phantom{A}$linear implication$\phantom{A}$
$\phantom{A}$$\otimes$$\phantom{A}$$\phantom{A}$multiplicative conjunction$\phantom{A}$
$\phantom{A}$$\oplus$$\phantom{A}$$\phantom{A}$additive disjunction$\phantom{A}$
$\phantom{A}$$\&$$\phantom{A}$$\phantom{A}$additive conjunction$\phantom{A}$
$\phantom{A}$$\invamp$$\phantom{A}$$\phantom{A}$multiplicative disjunction$\phantom{A}$
$\phantom{A}$$\;!$$\phantom{A}$$\phantom{A}$exponential conjunction$\phantom{A}$

## References

### General

Brief survey in a context of computer science/linear type theory:

• Daniel Mihályi, Valerie Novitzká, Section 2.2 of: What about Linear Logic in Computer Science?, Acta Polytechnica Hungarica 10 4 (2013) 147-160 [pdf, pdf]

On the semantics of exponential conjunction as a comonad:

Construction of such comonads based on cofree comonoids can be found in (among other places):

• Mellies and Tabareau and Tasson, An explicit formula for the free exponential modality of linear logic. Mathematical Structures in Computer Science, 28(7), 1253-1286. doi:10.1017/S0960129516000426

• Sergey Slavnov, On Banach spaces of sequences and free linear logic exponential modality, Math. Struct. Comp. Sci. 29 (2019) 215-242, arXiv:1509.03853

The relation to Fock space is discussed in:

The interpretation of $\Omega^\infty \Sigma^\infty_+$ as an exponential in the context of Goodwillie calculus is due to

• Gregory Arone, Marja Kankaanrinta, The Goodwillie tower of the identity is a logarithm, 1995 (web)

based on

The modal approach to a term calculus for the $!$-modality can be found in:

• Jean-Yves Girard. On the unity of logic. Annals of Pure and Applied Logic, 59:201-217, 1993.

• G. Plotkin. Type theory and recursion. In Proceedings of the Eigth Symposium of Logic in Computer Science, Montreal , page 374. IEEE Computer Society Press, 1993.

• Nick Benton, A mixed linear and non-linear logic: Proofs, terms and models, in Computer Science Logic. CSL 1994, Lecture Notes in Computer Science 933 [doi:10.1007/BFb0022251, pdf]

• Gavin Bierman, On Intuitionistic Linear Logic, Cambridge (1993) [pdf]

• Philip Wadler. A syntax for linear logic. In Ninth International Coference on the Mathematical Foundations of Programming Semantics , volume 802 of LNCS . Springer Verlag, April 1993

• Andrew Barber, Dual Intuitionistic Linear Logic, Technical Report ECS-LFCS-96-347, University of Edinburgh, Edinburgh (1996), web

A quantum programming language based on this linear/non-linear type theory adunction is QWIRE:

theoretical background:

applied to verified programming after implementation in Coq:

and using ambient homotopy type theory:

### In dependent linear type theory

Discussion of the exponential modality via stabilization in dependent linear homotopy type theory:

category: logic

Last revised on November 11, 2022 at 20:53:32. See the history of this page for a list of all contributions to it.