A Categorical Semantics
for Linear Logical Frameworks
Abstract
A type theory is presented that combines (intuitionistic) linear types with type dependency, thus properly generalising both intuitionistic dependent type theory and full linear logic. A syntax and complete categorical semantics are developed, the latter in terms of (strict) indexed symmetric monoidal categories with comprehension. Various optional type formers are treated in a modular way. In particular, we will see that the historically muchdebated multiplicative quantifiers and identity types arise naturally from categorical considerations. These new multiplicative connectives are further characterised by several identities relating them to the usual connectives from dependent type theory and linear logic. Finally, one important class of models, given by families with values in some symmetric monoidal category, is investigated in detail.
Matthijs Vákár
1 Introduction
Starting from Church’s simply typed calculus (or intuitionistic propositional type theory), two extensions in perpendicular directions depart:

following the CurryHoward propositionsastypes interpretation dependent type theory (DTT) [1] extends the simply typed calculus from a proofcalculus of intuitionistic propositional logic to one for predicate logic;

linear logic [2] gives a more detailed resource sensitive analysis, exposing precisely how many times each assumption is used in proofs.
A combined linear dependent type theory is one of the interesting directions to explore to gain a more finegrained understanding of homotopy type theory [3] from a computer science point of view, explaining its flow of information. Indeed, many of the usual settings for computational semantics are naturally linear in character, either because they arise as coKleisli categories (coherence space and game semantics) or for more fundamental reasons (quantum computation).
Combining dependent types and linear types is a nontrivial task, however, and despite some work by various authors that we shall discuss, the precise relationship between the two systems remains poorly understood. The discrepancy between linear and dependent types is the following.

The lack of structural rules in linear type theory forces us to refer to each variable precisely once  for a sequent , occurs uniquely in .

In dependent type theory, types can have free variables  , where is free in . Crucially, if , may also be free in .
What does it mean for to occur uniquely in in a dependent setting? Do we count its occurrence in ? The usual way out, which we shall follow too, is to restrict type dependency on intuitionistic terms. Although this seems very limiting  for instance, we do not obtain an equivalent of the Girard translation, embedding DTT in the resulting system , it is not clear that there is a reasonable alternative. Moreover, as even this limited scenario has not been studied extensively, we hope that a semantic analysis, which was so far missing entirely, may shed new light on the old mystery of linear type dependency.
Historically, Girard’s early work in linear logic already makes movements to extend a linear analysis to predicate logic. Although it talks about firstorder quantifiers, the analysis appears to have stayed rather superficial, omitting the identity predicates which, in a way, are what make firstorder logic tick. Closely related is that an account of internal quantification, or a linear variant of MartinLöf’s type theory, was missing, let alone a CurryHoward correspondence.
Later, linear types and dependent types were first combined in a Linear Logical Framework [4], where a syntax was presented that extends a Logical Framework with linear types (that depend on terms of intuitionistic types). This has given rise to a line of work in the computer science community [5, 6, 7]. All the work seems to be syntactic in nature, however, and seems to be mostly restricted to the asynchronous fragment in which we only have , , , and types. An exception is the Concurrent Logical Framework [8], which treats synchronous connectives resembling our , , , and types. An account of additive disjunctions and identity types is missing entirely.
On the other hand, similar ideas, this time at the level of categorical semantics and specific models (from homotopy theory, algebra, and physics), have emerged in the mathematical community [9, 10, 11, 12]. In these models, as with Girard, a notion of comprehension was missing and, with that, a notion of identity type. Although, in the past year, some suggestions have been made on the nLab and nForum of possible connections between the syntactic and semantic work, no account of the correspondence was published, as far as the author is aware.
The point of this paper^{1}^{1}1This paper is based on the technical report [13] where proofs and more discussion can be found. Independently, Krishnaswami et al. [14] developed a roughly equivalent syntax and gave an operational rather than a denotational semantics. There, type dependency is added to Benton’s LNL calculus, rather than to DILL. is to close this gap between syntax and semantics and to pave the way for a proper semantic analysis of linear type dependency, treating a range of type formers including the crucial types^{2}^{2}2To be precise: extensional types. Intensional types remain a topic of investigation, due to the subtlety of dependent elimination rules in a linear setting.
. Firstly, in section 2, we present a syntax, intuitionistic linear dependent type theory (ILDTT), a natural blend of the dual intuitionistic linear logic (DILL) [15] and dependent type theory (DTT) [16] which generalises both. Secondly, in section 3, we present a complete categorical semantics, an obvious combination of linear/nonlinear adjunctions [15] and comprehension categories [17]. Finally, in section 4, an important class of models is studied: families with values in a symmetric monoidal category.2 Syntax
We assume the reader has some familiarity with the formal syntax of dependent type theory and linear type theory. In particular, we will not go into syntactic details like conversion, name binding, capturefree substitution of for in (write ), and presyntax. Details on all of these topics can be found in [16].
We next present the formal syntax of ILDTT. We start with a presentation of the judgements that will represent the propositions in the language and then discuss its rules of inference: first its structural core, then the logical rules for a series of optional type formers. We conclude this section with a few basic results about the syntax.
Judgements
We adopt a notation for contexts, where is ‘an intuitionistic region’ and is ‘a linear region’, as in DILL [15]. The idea will be that we have an empty context and can extend an existing context with both intuitionistic and linear types that are allowed to depend on .
Our language will express judgements of the following six forms.
Structural Rules
We will use the following structural rules, which are essentially the structural rules of dependent type theory where some rules appear in both an intuitionistic and a linear form. We present the rules per group, with their names, from lefttoright, toptobottom.
Logical Rules
We describe some (optional) type and term formers, for which we give type formation (denoted F), introduction (I), elimination (E), computation rules (C), and (judgemental) uniqueness principles (U). We also assume the obvious rules to hold that state that the type formers and term formers respect judgemental equality. Moreover, , , , and are name binding operators, binding free occurences of within their scope.
We demand Urules for the various type formers in this paper, as this allows us to give a natural categorical semantics. This includes types: we study extensional identity types. In practice, when building a computational implementation of a type theory like ours, one would probably drop some of these rules to make the system decidable, which would correspond to switching to weak equivalents of the categorical constructions presented here.^{3}^{3}3In that case, in DTT, one would usually demand some stronger ‘dependent’ elimination rules, which would make propositional equivalents of the Urules provable, adding some extensionality to the system, while preserving its computational properties. Such rules are problematic in ILDTT, however, both from a syntactic and semantic point of view and a further investigation is warranted here.
Finally, we add rules that say we have all the possible commuting conversions, which from a syntactic point of view restore the subformula property and from a semantic point of view say that our rules are natural transformations (between homfunctors), which simplifies the categorical semantics significantly. We represent these schematically, following [15]. That is, if is a linear program context, i.e. a context built without using , then (abusing notation and dealing with all the constructors in one go) the following rules hold.
Remark 1
Note that all type formers that are defined contextwise (, , , , , , , and ) are automatically preserved under the substitutions from IntTySubst (up to canonical isomorphism^{4}^{4}4By an isomorphism of types and in context , we here mean a pair of terms and together with a pair of judgemental equalities and .), in the sense that is isomorphic to for an ary type former . Similarly, for or , we have that is isomorphic to and is isomorphic to . This gives us BeckChevalley conditions in the categorical semantics.
Remark 2
The reader can note that the usual formulation of universes for DTT transfers very naturally to ILDTT, giving us a notion of universes for linear types. This allows us to write rules for forming types as rules for forming terms, as usual. We do not choose this approach and define the various type formers in the setting without universes.
Some Basic Results
As the focus of this paper is the syntaxsemantics correspondence, we will only briefly state a few syntactic results. For some standard metatheoretic properties for (a system equivalent to) the fragment of our syntax, we refer the reader to [4]. Standard techniques and some small adaptations of the system should be enough to extend the results to all of ILDTT.
We will only note the consistency of ILDTT both as a type theory (not, for all , ) and as a logic (ILDTT does not prove that every type is inhabited).
Theorem 2.1 (Consistency)
ILDTT with all its type formers is consistent, both as a type theory and as a logic.
Proof (sketch)
This follows from modeltheoretic considerations. Later, in section 3, we shall see that our model theory encompasses that of DTT, for which we have models exhibiting both types of consistency.
To give the reader some intuition for these linear  and types, we suggest the following two interpretations.
Theorem 2.2 ( and as Dependent and )
Suppose we have types. Let , where is not free in . Then,

is isomorphic to , if we have types and types;

is isomorphic to , if we have types and types.
In particular, we have the following stronger version of a special case.
Theorem 2.3 ( as )
Suppose we have  and types. Let . Then, satisfies the rules for . Conversely, if we have  and types, then satisfies the rules for .
A second interpretation is that and generalise and . Indeed, the idea is that that (or their infinitary equivalents) is what they reduce to when taken over discrete types. The subtlety in this result is the definition of a discrete type. The same phenomenon is observed in a different context in section 4.
For our purposes, a discrete type is a strong sum of (a sum with a dependent Erule). Let us for simplicity limit ourselves to the binary case. For us, the discrete type with two elements will be , where has a strong/dependent Erule (note that this is not our E). Explicitly, is a type with the following F, I, and Erules (and the obvious C and Urules):
Theorem 2.4 ( and as Infinitary NonDiscrete and )
If we have a discrete type and a type family , then

satisfies the rules for ;

satisfies the rules for .
3 Categorical Semantics
We now introduce a notion of categorical model for which soundness and completeness results hold with respect to the syntax of ILDTT in presence of  and types^{5}^{5}5In case we are interested in the case without  and types, the semantics easily generalises to strict indexed symmetric multicategories with comprehension.. This notion of model will prove to be particularly useful when thinking about various (extensional) type formers.
Definition 1
By a strict indexed symmetric monoidal category with comprehension, we will mean the following data.

A category with a terminal object .

A strict indexed symmetric monoidal category over , i.e. a contravariant functor into the category of (small) symmetric monoidal categories and strong monoidal functors We will also write for the action of on a morphism of .

A comprehension schema, i.e. for each and a representation for the functor
We will write its representing object^{6}^{6}6Really, would be a better notation, where we think of as an adjunction inducing , but it would be very verbose. and universal element . We will write for the isomorphism , if .
Remark 3
Note that this notion of model reduces to a standard notion of model for DTT in the case the monoidal structures on the fibre categories are Cartesian: a reformulation of split comprehension categories with  and types. To get a precise fit with the syntax, the extra demand called “fullness” is usually put on these [17]. The fact that we leave out this last condition precisely allows for nontrivial types (i.e. ones such that ) in our models of ILDTT. Every model of DTT is, in particular, a (degenerate) model of ILDTT, though. We will see that the type formers of ILDTT also generalise those of DTT.
Theorem 3.1 (Soundness)
We can soundly interpret ILDTT with  and types in a strict indexed symmetric monoidal category with comprehension.
Proof (sketch)
The idea is that a context will be (inductively) interpreted by a pair of objects , , a type in context by an object of , and a term in context by a morphism . Generally, the interpretation of the propositional linear type theory in intuitionistic context will happen in as would be expected.
The crux is that IntCExt (), IntVar (), and IntSubst (by ) are interpreted through the comprehension, as is IntWeak (through of the obvious morphism in ).
Finally, Soundness is a trivial verification.
Theorem 3.2 (Completeness)
In fact, this interpretation is complete.
Proof (sketch)
We see this through the construction of a syntactic category.
In fact, we would like to say that the syntax is even an internal language for such categories. This is almost true, can be made entirely true by either putting the restriction on our notion of model that excludes any nontrivial morphisms into objects that are not of the form . Alternatively, we can extend the syntax to talk about context morphisms explicitly [18]. Following the DTT tradition, we have opted against the latter.
We will next characterise the categorical description of the various type formers. First, we note the following.
Theorem 3.3 (Comprehension Functor)
A comprehension schema on a strict indexed symmetric monoidal category defines a morphism of indexed categories, where is the full subindexed category of (by making a choice of pullbacks) on the objects of the form and where
{diagram}M_Δ(A⟶aB):=p_Δ,A & \rTo^⟨p_Δ,A,a{p_Δ,A}∘v_Δ,A⟩ & p_Δ,B.
Note that is a display map category and hence a model of DTT [17]. We will think of it as the intuitionistic content of . We will see that the comprehension functor will give us a unique candidate for types: , where is a monoidal adjunction. We conclude that, in ILDTT, the modality is uniquely determined by the indexing. This is worth noting, because, in propositional linear type theory, we might have many different candidates for types.
Theorem 3.4 (Semantic Type Formers)
For the other type formers, we have the following. A model of ILDTT with  and types…

…supports types iff all the pullback functors have left adjoints that satisfy the BeckChevalley condition in the sense that the canonical map is an iso, where and , and that satisfy Frobenius reciprocity in the sense that the canonical morphism is an isomorphism , for all , .

…supports types iff all the pullback functors have right adjoints that satisfy the dual BeckChevalley condition for pullbacks of the form : the canonical is an iso.

…supports types iff factors over the category of symmetric monoidal closed categories and their homomorphisms.

…supports  and types iff factors over the category of Cartesian categories with symmetric monoidal structure and their homomorphisms.

…supports  and types iff factors over the category of coCartesian categories with a distributive symmetric monoidal structure and their homomorphisms.

…that supports types, supports types iff all the comprehension functors have a strong monoidal left adjoint and is a morphism of indexed categories: for all , . Then interprets the comodality in context .

… that supports types, supports Idtypes iff for all , we have left adjoints that satisfy a BeckChevalley condition: is an iso. Now, interprets . Above, {diagram}Δ.A & \rTo^diag_Δ,A:=⟨id_Δ.A,v_Δ,A⟩ & Δ.A.A{p_Δ,A}.
The semantics of suggests an alternative definition for the notion of a comprehension: if we have types in a strong sense, it is a derived notion!