Theory and Applications of Categories, Vol. 22, No. 23, 2009, pp. 622–672.

CARTESIAN DIFFERENTIAL CATEGORIES

R.F. BLUTE, J.R.B. COCKETT AND R.A.G. SEELY

Abstract. This paper revisits the authors’ notion of a differential category from a different perspective. A differential category is an additive symmetric monoidal category with a comonad (a “coalgebra modality”) and a differential combinator. The morphisms of a differential category should be thought of as the linear maps; the differentiable or smooth maps would then be morphisms of the coKleisli category. The purpose of the present paper is to directly axiomatize differentiable maps and thus to move the emphasis from the linear notion to structures resembling the coKleisli category. The result is a setting with a more evident and intuitive relationship to the familiar notion of calculus on smooth maps. Indeed a primary example is the category whose objects are Euclidean spaces and whose morphisms are smooth maps.

A Cartesian differential category is a Cartesian left additive category which possesses a Cartesian differential operator. The differential operator itself must satisfy a number of equations, which guarantee, in particular, that the differential of any map is “linear” in a suitable sense.

We present an analysis of the basic properties of Cartesian differential categories. We show that under modest and natural assumptions, the coKleisli category of a differential category is Cartesian differential. Finally we present a (sound and complete) term calculus for these categories which allows their structure to be analysed using essentially the same language one might use for traditional multi-variable calculus.

0. Introduction

Over the past few centuries, one of the most fundamental concepts in all of mathematics has been differentiation. In recent decades several attempts have been made to abstract this notion, including approaches based on geometric, algebraic, and logical intuitions. The approach of the current paper is categorical, insofar as we wish to consider axiomatizations of categories which have sufficient structure to define differentiation of maps. Any additional categorical structure, e.g. monoidal, Cartesian, or comonadic, exists in support of differentiation.

In [BCS 06], the current authors introduced the notion of a differential category to provide a basic axiomatization for differential operators in monoidal categories. The initial impetus for the definition came from work of Ehrhard and Regnier [Ehrhard & Regnier 05, Ehrhard & Regnier 03], who defined first a notion of differential λ-calculus

Received by the editors 2008-11-29 and, in revised form, 2009-12-08. Transmitted by Robert Paré. Published on 2009-12-10. 2000 Mathematics Subject Classification: 18D10,18C20,12H05,32W99. Key words and phrases: monoidal categories, differential categories, Kleisli categories, differential

operators.

\begin{matrix}c \\ ◯ \end{matrix} R.F. Blute, J.R.B. Cockett and R.A.G. Seely, 2009. Permission to copy for private use granted.

and subsequently differential proof nets. The differential λ-calculus is an extension of simply-typed λ-calculus with an additional operation allowing the differentiation of terms. Differential proof nets are a (graph-theoretic) syntax for linear logic extended with a differential operator on proofs. An important feature of their systems, not precluded in ours, is that in one setting, they combine the essence of both calculus and computability.

Their work grew out of the development of models of linear logic (examples of ∗- autonomous categories) in which there was a natural differential operator, such as Köthe spaces [Ehrhard 01]. Every model of linear logic comes equipped with a monad, the storage operator, from which the coKleisli category arises. One can then abstract away from models of linear logic, retaining the comonad as the key feature. From this perspective it is a very natural step to consider the coKleisli categories of such models, not least because it is this setting which supports a calculus which much more closely resembles the elementary differential calculus with which we are all familiar. The calculus one obtains from this perspective is quite different than the differential lambda-calculus of Ehrhard and Regnier, in that it is directly inspired by the coKleisli structure. And so this left open the question of how to characterize this situation.

The notion of a differential category provides a basic axiomatization for differential operators in monoidal categories, which not only generalizes the work of Ehrhard and Regnier but also captures the standard elementary models of differential calculus and provides a theoretical substrate for studying a number of less standard examples. The structure necessary to support differentiation in [BCS 06] is an additive, monoidal category with a coalgebra modality. (These terms will be reviewed below.) The morphisms in a differential category should be thought of as linear maps, with maps in the coKleisli category being the smooth maps. Then the differential operator is of the following type:

{f: SA [figure] B \atop D_{⊗}[f]: A ⊗ SA [figure] B}

One then writes down suitable axioms which such an operator must satisfy. In particular, we have the Leibniz rule, the chain rule, and other basic rules of differentiation expressed coalgebraically.

The goal of the present paper is to develop an axiomatisation which directly characterizes the smooth maps: in other words, to characterize the coKleisli structure of differential categories directly. This leads us to the notion of a Cartesian differential category. This notion embodies the multi-variable differential calculus which, being a fundamental tool of modern mathematics, is well worth studying in its own right. The basic structure needed for Cartesian differential categories is simpler than is needed for differential categories: just a left additive category with finite products. The differential operator takes on the following form

{X [figure: f] Y \atop X × X [figure: D_{×}[f]] Y}

However the necessary equations turn out to be more complicated, and the passage from the coKleisli category of a differential category to a Cartesian differential category turns out to be surprisingly subtle. While we do describe the conditions under which a differential category gives rise to a Cartesian differential category as its coKleisli category, a full characterization of this situation is left to a sequel. The main result in this direction is Proposition 3.2.1.

The organization of the paper is as follows. Fundamental to differentiation is the ability to add maps: however, the settings in which we are interested are not additively enriched. Therefore the first section is dedicated developing the general theory of left additive categories. In the second section we introduce the key notion of a Cartesian differential operator and the equations it satisfies. In this section, we also show how most of the axiomatization of these categories is determined by requiring that their “bundle categories” behave in the expected manner. These are fibrations which carry the differential structure, insofar as the composition of maps is just the chain rule. It is possible to develop higher-order bundle categories in which composition is determined by the higherorder (Faà di Bruno) chain rules. These higher-differential bundle categories completely determine all the axiomatization of Cartesian differential categories, but developing this would require more technical apparatus than seems justified in this paper, so will be presented elsewhere.

As always, we are interested in graphical representations of morphisms in free categories, an approach begun in [BCST 97]. But in this paper we focus more on a term calculus. This calculus can be seen as effectively reimagining the traditional differential calculus as a rewrite system. Section 4 of this paper is devoted to analyzing this system in detail. In particular, we show the system’s soundness and completeness. The term calculus allows for an elegant description of free Cartesian differential categories, which we shall present in a sequel.

The reader should keep one key simple example in mind when reading the paper: the category of smooth maps, which behaves just as one would expect from a first year calculus course. Objects are natural numbers and maps n [figure] m are smooth maps IR^{n} [figure] IR^{m}.

It is easiest to describe the differential operator via an example. Suppose we have a smooth map f: 3 [figure] 1, such as f(x, y, z) = xyz. The Jacobian of this map is [yz, xz, xy] which may be regarded as a smooth operator which assigns a linear operator to any point (x, y, z). This is how we get a smooth map D_{×}(f): IR^{3} × IR^{3} [figure] IR, which is linear in the first variable (in the first triple of coordinates):

D_{×}(f): ((u, v, w), (r, s, t)) ↦ (st, rt, rs) · (u, v, w) = stu + rtv + rsw

In fact, the notation we will introduce in our term calculus is slightly different than this, and keeps more careful track of free vs. bound variables. This leads to one of our axioms for Cartesian differential categories: the function D[f] is linear in its first n variables. The rest of the axioms express other aspects of differentiability.

The foundations for differential calculus may be approached in at least three fundamentally different ways. At one extreme is the synthetic approach where one wishes to create a calculus so deeply embedded into the underlying set theory that one is willing to turn the world of mathematics and philosophy upside down to ensure that everything becomes differentiable. Somewhere nearer the middle is the Platonic approach which takes the view that the ability to differentiate ultimately devolves onto the topological and limiting properties of a single crucial object: the real line. And then there is the mechanical approach. Devoid of overarching philosophy or greater purpose, it takes calculus as a system which, like any other, should immediately be taken apart to determine how the behavior of one part depends on structure in some other part. Dismembering calculus in this manner, it seeks to reuse these structures in outlandish configurations elsewhere.

This work belongs unapologetically to this last camp. It seeks to isolate some basic structural properties which give rise to behaviors reminiscent of the differential calculus. We believe abstracting differential calculus in this manner serves a useful purpose which also reflects developments in other areas. Differentials (over arbitrary base rings) are used non-trivially in various areas of algebraic geometry, and differentials also appear in different guises in both combinatorics and computer science. A framework unifying such notions is useful, and in particular allows one to distinguish clearly between what is generic and what is specific.

1. Left additive categories

The purpose of this section is to develop the basic theory of left additive categories which underlies the theory of Cartesian differential categories. As a basic example consider the category of commutative monoids with morphisms which are arbitrary maps which ignore the additive structure. Despite the fact that additive structure is being ignored, the maps between any two objects have a natural additive structure, given by pointwise addition (f +g)(x) = f(x)+g(x). Furthermore, this additive structure is preserved by composition on the left h(f + g) = hf + hg (throughout the paper we use the diagrammatic order of composition, sometimes denoted with a semicolon, often just by juxtaposition). A category with the property that each homset is a commutative monoid and for which composition on the left preserves this structure is called a left additive category.

This category may be viewed rather differently: it is the coKleisli category with respect to the comonad generated from the comonad on commutative monoids generated by the composite of the underlying functor and the free functor. This illustrates an important way in which left additive structure arises: any (non-additive) comonad on an additive (or indeed left-additive) category always has its coKleisli category left-additive.

Another basic example of a left additive category which is central to this paper consists of the category whose objects are finite dimensional real vector spaces and whose maps are (infinitely) differentiable maps. These maps allow pointwise addition and so certainly form a left additive category. In addition, this category has a differential structure which is the main subject matter of the paper and is discussed in the next section.

1.1. The basic definition.

1.1.1. Definition. A category 𝕏 is left additive^{1} in case each hom-set is a commutative monoid and f(g +h) = (fg)+(fh) and f0 = 0. A map h in a left additive category is said to be additive if it also preserves the additive structure of the hom-set on the right (f + g)h = (fh) + (gh) and 0h = 0.

In general additive maps will be the exception in a left additive category. However, the additive maps form an interesting subcategory:

1.1.2. Proposition. In any left additive category,

1. 0 maps are additive;

2. additive maps are closed under addition;

3. additive maps are closed under composition;

4. all identity maps are additive;

5. if m is an additive monic and fm is additive then f is additive;

6. if g is a retraction which is additive and the composite gh is additive then h is additive;

7. if r is a retraction with section m so that the idempotent rm is additive, then r is additive iff its section m is additive;

8. if f is an isomorphism which is additive, then f^{−1} is additive.

Proof. (1): (f + g)0 = 0 = 0 + 0 = f0 + g0.

(2): If f and g are additive then (x+y)(f +g) = (x+y)f +(x+y)g = xf +yf +xg+yg = x(f + g) + y(f + g).

(3): If f and g are additive then (x + y)fg = (xf + yf)g = xfg + yfg.

(4 ,5): Immediate.

(6): This is slightly more subtle: suppose g is additive and a retraction, so that there is a g′ with g′g = 1, and gh is additive then, as (x + y) = (xg′g + yg′g) = (xg′ + yg′)g then

(x + y)h = (xg′ + yg′)gh = xg′gh + yg′gh = xh + yh.

(7): Since rm is additive, by (5) if m is additive, then r is additive; and by (6) if r is additive then m is additive.

(8): If f is an isomorphism it is certainly a retraction and 1 = ff^{−1} is certainly additive so by the previous property f^{−1} is additive.

1We should emphasize that our “additive categories” are commutative monoid enriched categories, rather than Abelian group enriched; some people might prefer to call them “semi-additive”. Furthermore, we do not require biproducts as part of the structure at this stage. In particular, our definition is not the same as the one in [[M 71]].

Note that it is certainly not the case that all isomorphisms are additive. However, we can conclude:

1.1.3. Corollary. The additive maps of a left additive category 𝕏 form an additive subcategory whose inclusion I: 𝕏_{+} [figure] 𝕏 reflects isomorphisms.

1.1.4. Example. The category CMon of commutative monoids with “set maps” (i.e. without any preservation properties) is left additive, but generally its maps are not additive. Left additivity is easily shown:

f(g + h)(x) = (g + h)(f(x)) = g(f(x)) + h(f(x)) = (fg)(x) + (fh)(x) = (fg + fh)(x)

(and 0 is similar). As an example of the failure of additivity, however, consider that (0f)(x) = f(0(x)) = f(0), and we have explicitly not required f(0) = 0 (and similarly for addition). The additive maps in this setting are just the commutative monoid homomorphisms.

1.2. Cartesian left additive categories. Our main interest centres around left additive categories which have products which behave coherently with respect to the additive structure:

1.2.1. Definition. A Cartesian left additive category is a left additive category with products such that the structure maps π_{0}, π_{1}, and Δ are additive and that whenever f and g are additive then f × g is additive.

Notice that if f and g are additive then ⟨f, g⟩ is additive as

(x + y)⟨f, g⟩ = (x + y)Δ(f × g) = xΔ(f × g) + yΔ(f × g) = x⟨f, g⟩ + y⟨f, g⟩

Conversely one may replace the requirement that Δ is additive and that × preserves additivity by the single requirement that pairing preserves additivity as both can be expressed by pairing additive maps. Thus, equivalently, a category is Cartesian left additive in case it has products for which the projections are additive and whenever f and g are additive then ⟨f, g⟩ is additive. Cartesian left additive categories can be formulated in various other ways as well:

1.2.2. Proposition. The following are equivalent:

(i) A Cartesian left additive category;

(ii) A left additive category with products such that all projections and pairings of additive maps are additive.

(iii) A left additive category for which 𝕏_{+} has biproducts and the the inclusion I: 𝕏_{+} [figure] 𝕏 creates products;

(iv) A Cartesian category 𝕏 in which each object is equipped with a chosen commutative monoid structure compatible with products: (+_{A}: A × A [figure] A, 0_{A}: 1 [figure] A) satisfying +_{A×B} = ⟨(π_{0} × π_{0})+_{A}, (π_{1} × π_{1})+_{B}⟩ and 0_{A×B} = ⟨0_{A}, 0_{B}⟩.

Proof.

(i) ⇔ (ii) Above.

(ii) ⇒ (iii) Clearly as the product structure is additive the category of additive maps will have products (and so biproducts). Further, the inclusion functor will clearly create products.

(iii) ⇒ (iv) Define +_{A} = π_{0} + π_{1} and 0_{A} = 0 then this gives each object an additive structure. Note that

+_{A×B} = π_{0} + π_{1} = (π_{0} + π_{1})⟨π_{0}, π_{1}⟩
= ⟨π_{0}π_{0} + π_{1}π_{0}, π_{0}π_{1} + π_{1}π_{1}⟩
= ⟨(π_{0} × π_{0})+_{A}, (π_{1} × π_{1})+_{B}⟩

(iv) ⇒ (i) Define f + g = ⟨f, g⟩+_{B} then this certainly makes the category left additive. Furthermore, each π_{i} is additive as

(⟨f, f′⟩ + ⟨g, g′⟩)π_{0} = ⟨⟨f, f′⟩, ⟨g, g′⟩⟩(π_{0} × π_{0})+ = ⟨f, f′⟩π_{0} + ⟨g, g′⟩π_{0}.

Clearly maps are additive in case they are homomorphisms of the chosen additive structure: but this means if f and g are additive then ⟨f, g⟩ is additive as the additive structure on the product is the product additive structure!

The last characterization does rely on the choice of product structure. The equivalence to being Cartesian left additive informs us that the choice can be made up to additive isomorphism. For, seen as a left additive category, there is one global structure albeit it may be represented locally in a variety of coherent ways.

The fact that an additive map f: A [figure] B in a Cartesian left additive category is precisely a homomorphism of the additive structure

\xymatrix{A × A \ar[d]_{+_{A}} \ar[rr]^{f×f} &  & B × B \ar[d]^{+_{B}} \\ A \ar[rr]^{f} &  & B \\  & 1 \ar[ul]_{0} \ar[ur]_{0}}

suggests the simple test for additivity in part (ii) of the following technical lemma:

1.2.3. Lemma. In a Cartesian left additive category:

(i) ⟨f, g⟩ + ⟨f′, g′⟩ = ⟨f + f′, g + g′⟩ and 0 = ⟨0, 0⟩;

(ii) f is additive if and only if

(π_{0} + π_{1})f = π_{0}f + π_{1}f: A × A [figure] B and 0f = 0: 1 [figure] B;

(iii) g: A × X [figure] B is additive in its second argument if and only if

1×(π_{0}+π_{1})g = (1×π_{0})g+(1×π_{1})g: A×X ×X [figure] B and (1×0)g = 0: A×1 [figure] B.

Being additive in the second argument means ⟨x, y + z⟩g = ⟨x, y⟩g + ⟨x, z⟩g and ⟨x, 0⟩g = 0; being additive in an argument is a property which will become more central shortly.

Proof.

(i) We have the following calculation:

⟨f, g⟩ + ⟨f′, g′⟩ = (⟨f, g⟩ + ⟨f′, g′⟩)⟨π_{0}, π_{1}⟩
= ⟨(⟨f, g⟩ + ⟨f′, g′⟩)π_{0}, (⟨f, g⟩ + ⟨f′, g′⟩)π_{1}⟩
= ⟨⟨f, g⟩π_{0} + ⟨f′, g′⟩π_{0}, ⟨f, g⟩π_{1} + ⟨f′, g′⟩π_{1}⟩
= ⟨f + f′, g + g′⟩

and a similar calculation for the zero.

(ii) If f is additive this equality holds. Conversely

(h + k)f = ⟨h, k⟩(π_{0} + π_{1})f = ⟨h, k⟩(π_{0}f + π_{1}f) = hf + kf.

(iii) Similar.

One reason for demanding that the product structure be additive is the following (which uses the fact that products in additive categories are necessarily biproducts):

1.2.4. Corollary. For any Cartesian left additive category 𝕏 the subcategory of the additive maps I: 𝕏_{+} [figure] 𝕏 has biproducts.

Again we may consider the example CMon: it is clear that letting the product be the usual product of commutative monoids will ensure that we obtain a Cartesian left additive category. Note that an arbitrary monoid which has base set the product of the base sets of M_{1} and M_{2} will not work as the left additive product as π_{0} + π_{1} will no longer give the monoid operation.

1.3. Cartesian left additive functors.

1.3.1. Definition. A functor between Cartesian left additive categories is Cartesian left additive in case

• F (f + g) = F (f) + F (g) and F (0) = 0;

• F preserves products (i.e F (A) [figure: F (π_{0})] F (A × B) [figure: F (π_{1})] F (B) is a product).

Clearly the identity functor is left additive and we may compose Cartesian left additive functors, thus, this, together with natural transformations (whose components are additive) gives the data for a 2-category. Notice that Cartesian left additive functors preserve the additive structure maps A × A [figure: +] A [figure: 0] 1 so, crucially for the 2-dimensional structure, we have:

1.3.2. Lemma. A left additive functor is a Cartesian left additive functor if and only if it preserves additive maps.

Proof. A map is additive if and only if it is a homomorphism of the given additive structure: this property is preserved by Cartesian left additive functors. The converse follows as biproducts are equationally defined using the additive maps.

Suppose 𝕊 = (S, δ, ϵ) is any comonad (where S need not be Cartesian left additive) on

a Cartesian left additive category, 𝕏. Then clearly the coKleisli maps S(X) [figure: f] Y inherit an addition from 𝕏 and with this 𝕏_{𝕊} becomes left additive. (In the following calculation, we shall distinguish maps in the coKleisli category by setting them in boldface; maps in 𝕏 will be in ordinary type.)

f(g_{1} + g_{2}) = δS(f)(g_{1} + g_{2}) = δS(f)g_{1} + δS(f)g_{2} = fg_{1} + fg_{2}

As 𝕏_{𝕊} is a coKleisli category it has products inherited from 𝕏 with

X [figure: π_{0}] X × Y [figure: π_{1}] Y = X [figure: ϵπ_{0}] S(X × Y) [figure: ϵπ_{1}] Y.

Note that these projections are additive in 𝕏_{𝕊} as

(f + g)π_{0} = δS(f + g)ϵπ_{0} = (f + g)π_{0} = (fπ_{0}) + (gπ_{0}) = (fπ_{0}) + (gπ_{0})

Consider the pairing map:

Z [figure: ⟨f,g⟩] X × Y = S(Z) [figure: ⟨f,g⟩] X × Y

and suppose f and g are additive in 𝕏_{𝕊} then

(x + y)⟨f,g⟩ = δS(x + y)⟨f, g⟩ = ⟨δS(x + y)f, δS(x + y)g⟩
= ⟨(x + y)f, (x + y)g⟩ = ⟨xf + yf, xg + yg⟩
= ⟨xf, xg⟩ + ⟨yf, yg⟩ = x⟨f, g⟩ + y⟨f, g⟩

We therefore have:

1.3.3. Proposition. If 𝕊 = (S, δ, ϵ) is any comonad on a (Cartesian) left additive category 𝕏 then 𝕏_{𝕊} is (Cartesian) left additive. Furthermore the canonical right adjoint G_{𝕊}: 𝕏 [figure] 𝕏_{𝕊} is a Cartesian left additive functor.

Proof. The hard work was done above! It remains to check that G_{𝕊} is additive as it clearly preserves products; for this we need

G_{𝕊}(f + g) = ϵ(f + g) = ϵf + ϵg = G_{𝕊}(f) + G_{𝕊}(g) and G_{𝕊}(0) = ϵ0 = 0.

As an application of Proposition 1.3.3, we note that since a Cartesian left additive category 𝕏 has products, for each object A ∈ 𝕏 the functor × A is a comonad (using the fact that A is canonically a comonoid); the coKleisli category is sometimes known as the “simple slice category at A”; we shall denote it 𝕏[A]:

1.3.4. Definition. 𝕏[A] (called “the simple slice category at A”) has as objects the objects of 𝕏, and as morphisms f: X [figure] Y morphisms f: X ×A [figure] Y of 𝕏. Identities are

given by projections, and composition is the coKleisli composition: X [figure: f] Y [figure: g] Z =

X × A [figure: Δ×1] X × A × A [figure: 1×f] Y × A [figure: g] Z.

1.3.5. Corollary. Each simple slice 𝕏[A] of a Cartesian left additive category 𝕏 is a Cartesian left additive category.

Notice that the additive functions in 𝕏[A] are exactly the maps f: X × A [figure] Y which are additive in their first argument in the sense that ⟨x + y, z⟩f = ⟨x, z⟩f + ⟨y, z⟩f and ⟨0, z⟩f = 0.

1.4. Cartesian closed left additive categories. A left additive category is a Cartesian closed left additive category in case it is a Cartesian left additive category which is Cartesian closed, so A × is a left adjoint with right adjoint A ⇒ , such that the passage:

{A × X [figure: f] Y \atop X [figure: curry(f)] A ⇒ Y}

preserves the additive structure. That is curry(f+g) = curry(f)+curry(g) and curry(0) = 0.

1.4.1. Lemma. A Cartesian left additive category 𝕏 is a Cartesian closed left additive category if and only if 𝕏 is Cartesian closed and

\xymatrix{A ⇒ B × A ⇒ B \ar[d]_{k_{×}} \ar[r]^{+_{A⇒B}=π_{0}+π_{1}} & A ⇒ B & 1 \ar[r]^{0} \ar[d]_{k_{1}} & A ⇒ B \\ A ⇒ (B × B) \ar@{-->}[ur]_{A⇒+_{B}=A⇒(π_{0}+π_{1})} &  & A ⇒ 1 \ar[ur]_{A⇒0}}

commute.

Proof. “Only if” is obvious by considering adjoints. For the converse, we note that when the stated condition holds we have:

curry(f + g) = curry(⟨f, g⟩)(A ⇒ +_{B})
= ⟨curry(f), curry(g)⟩k_{×}(A ⇒ +_{B})
= ⟨curry(f), curry(g)⟩+_{A⇒B} = curry(f) + curry(g)

so that addition is preserved by currying: the preservation of zero is similar. Thus, the category is Cartesian closed left additive.

When a category is Cartesian closed then (A ⇒ , η, μ) is a monad for each object A where

{A × X [figure: π_{1}] X \atop X [figure: curry(π_{1})] A ⇒ Y} η

A × (A ⇒ (A ⇒ X)) [figure: Δ×1] A × A × (A ⇒ (A ⇒ X)) [figure: 1×eval] A × (A ⇒ X) [figure: eval] X A ⇒ (A ⇒ X) [figure: curry((Δ×1)(1×eval)eval)] A ⇒ X

μ

The Kleisli category for this monad is clearly isomorphic to 𝕏[A] and the coherence requirement for closedness ensures that the two additive structures inherited from 𝕏, regarding it as a Kleisli and coKleisli category respectively, coincide.

In particular note that in a Cartesian closed left additive category A × X [figure: f] Y is

additive in its second argument if and only if X [figure: curry(f)] A ⇒ Y is additive. Once again we may consider CMon: this is a Cartesian closed left additive category provided one endows the hom-sets with the pointwise additive structure f + g = λx.f(x) + g(x).

1.5. Additive bundle fibrations. Of course, there is a well-known fibration associated with the simple slice categories; we are interested in the subfibration whose fibres are just the additive parts of the simple fibres. We think of this fibration as the fibration of “additive bundles” over 𝕏, and so denote it by p: ABun(𝕏) [figure] 𝕏. The objects of ABun(𝕏) are pairs (X, A), its morphisms (X, A) [figure] (Y, B) are pairs (F, f) of morphisms of 𝕏, where F: X × A [figure] Y is additive in its first argument, and f: A [figure] B. Composition is defined by (F, f)(G, g) = (⟨F, π_{1}f⟩G, fg), and the identities are (π_{0}, 1_{A}). We shall check (below) that if F, G are additive in the first variable, so is ⟨F, π_{1}f⟩G.

ABun(𝕏) has additive structure, defined coordinate-wise: (F, f)+(G, g) = (F +G, f + g), 0 = (0, 0). It also has products: 1 = (1, 1) and

(X, A) [figure: (π_{0}π_{0},π_{0})] (X × Y, A × B) [figure: (π_{0}π_{1},π_{1})] (Y, B)

In fact:

1.5.1. Proposition. If 𝕏 is Cartesian left additive, then ABun(𝕏) is as well.

Proof. There are a number of things to check — here are those that are not perfectly obvious. Composition preserves additivity in the first component:

⟨x + y, z⟩⟨F, π_{1}f⟩G = ⟨⟨x + y, z⟩F, zf⟩G
= ⟨⟨x, z⟩F + ⟨y, z⟩F, zf⟩G
= ⟨⟨x, z⟩F, zf⟩G + ⟨⟨y, z⟩F, zf⟩G
= ⟨x, z⟩⟨F, π_{1}f⟩G + ⟨y, z⟩⟨F, π_{1}f⟩G

Addition is well-defined (i.e. F + G is additive in the first variable):

⟨x + y, z⟩(F + G) = ⟨x + y, z⟩F + ⟨x + y, z⟩G
= ⟨x, z⟩F + ⟨x, z⟩G + ⟨y, z⟩F + ⟨y, z⟩G
= ⟨x, z⟩(F + G) + ⟨y, z⟩(F + G)

(F + G, f + g) is left additive:

(H, h)(F + G, f + g) = (⟨H, π_{1}h⟩(F + G), h(f + g))
= (⟨H, π_{1}h⟩F + ⟨H, π_{1}h⟩G, hf + hg)
= (⟨H, π_{1}h⟩F, hf) + (⟨H, π_{1}h⟩G, hg)
= (H, h)(F, f) + (H, h)(G, g)

Products: Given

(X, A) [figure: (F,f)] (Z, C) [figure: (G,g)] (Y, B)

the induced map to the product is simply (Z, C) [figure: (⟨F,G⟩,⟨f,g⟩)] (X × Y, A × B). The point then is that this commutes as required, is unique, and finally that the projections are additive, and that pairing preserves additivity. One useful observation is that (F, f) is additive (in ABun(𝕏)) if and only if both F, f are additive (in 𝕏).

(⟨F, G⟩, ⟨f, g⟩)(π_{0}π_{0}, π_{0}) = (⟨⟨F, G⟩, π_{1}⟨f, g⟩⟩π_{0}π_{0}, ⟨f, g⟩π_{0})
= (F, f)

and similarly for the other composite. Note that this also shows uniqueness, since the typing of the “fill map” (Z, C) [figure] (X × Y, A × B) forces it to be (⟨F, G⟩, ⟨f, g⟩), provided that commutes as required. The projectives are additive:

((F, f) + (G, g))(π_{0}π_{0}, π_{0}) = (F + G, f + g)(π_{0}π_{0}, π_{0})
= (⟨F + G, π_{1}(f + g)⟩π_{0}π_{0}, (f + g)π_{0})
= ((F + G)π_{0}, (f + g)π_{0})
= (F π_{0} + Gπ_{0}, fπ_{0} + gπ_{0})
= (F π_{0}, fπ_{0}) + (Gπ_{0}, gπ_{0})
= (F, f)(π_{0}π_{0}, π_{0}) + (G, g)(π_{0}π_{0}, π_{0})

and similarly for π_{1}. Pairing preserves additivity: suppose (F, f), (G, g) are additive (so all F, f, G, g are). Then

((H, h) + (K, k))(⟨F, G⟩, ⟨f, g⟩)

= (H + K, h + k)(⟨F, G⟩, ⟨f, g⟩)
= (⟨H + K, π_{1}(h + k)⟩⟨F, G⟩, (h + k)⟨f, g⟩)
= (⟨H + K, π_{1}(h + k)⟩F, ⟨H + K, π_{1}(h + k)⟩G⟩, ⟨(h + k)f, (h + k)g⟩)
= (⟨(H, π_{1}h)F + (K, π_{1}k)F, (H, π_{1}h)G + (K, π_{1}k)G⟩, ⟨hf + kf, hg + kg⟩)
= (⟨(H, π_{1}h)F, (H, π_{1}h)G⟩, ⟨hf, hg⟩) + (⟨(K, π_{1}k)F, (K, π_{1}k)G⟩, ⟨kf, kg⟩)
= (H, h)(⟨F, G⟩, ⟨f, g⟩) + (K, k)(⟨F, G⟩, ⟨f, g⟩)

Next we consider the “projection” functor p: ABun(𝕏) [figure] 𝕏 which sends (X, A) ↦ A, (F, f) ↦ f; this is well-known to be a fibration, but there is more structure in our context: it is clear that p preserves ×, +, and so is a Cartesian left additive functor. Hence:

1.5.2. Proposition. If 𝕏 is Cartesian left additive, then p: ABun(𝕏) [figure] 𝕏 is a Cartesian left additive functor which is also a fibration, whose fibres are additive categories.

We can axiomatize the essence of this structure:

1.5.3. Definition. p: 𝕐 [figure] 𝕏 is a additive bundle fibration if it is a fibration satisfying these properties.

1. 𝕏 is left additive;

2. each fibre p^{−1}A is additive, for every object A of 𝕏;

3. f^{∗}: p^{−1}B [figure] p^{−1}A is additive, for every morphism A [figure: f] B of 𝕏;

4. there is an object function ˆ( , ): Obj(𝕏 × 𝕐) [figure] Obj(𝕐) so that for any morphism

A [figure: f] B of 𝕏, the Cartesian lifting of f to any object X over B is of the form \overline{f}: { \atop (X, A)} [figure] X, or in other words, f^{∗}X = { \atop (X, A)}, and does not depend on f but merely on X and the domain of f.

Note that in this definition we have not assumed that 𝕐 is left additive (even if from ABun(𝕏) we expect it to be), nor have we supposed that 𝕏 and 𝕐 are Cartesian. The first non-supposition turns out to be unnecessary, as the next Proposition shows. As for the second, we see that if 𝕏 and the fibres are Cartesian, then so must 𝕐 be also. (This is familiar territory from fibrations, of course.)

1.5.4. Proposition. If p: 𝕐 [figure] 𝕏 is an additive bundle fibration, then

1. 𝕐 is left additive with respect to the additive bundle addition, and

2. if each p^{−1}A is Cartesian additive and if 𝕏 is Cartesian left additive, then 𝕐 is Cartesian left additive as well.

Proof. We shall use the following notation: if f: Y [figure] X is a morphism of 𝕐 over the

morphism A [figure: pf] B in 𝕏, then its factorization into a fibre map followed by a Cartesian

map over pf will be written Y [figure: f′] { \atop (X, A)} [figure: \overline{pf}] X. Then we may define the additive structure as follows: 0 = 0; \overline{0}, where we use 0 to denote the 0-map in the fibre over A, as well as the 0-map in 𝕐 and 𝕏, and f +g = (f′+g′); (\overline{pf + pg}). This is clearly commutative; furthermore 0 is a unit for +, and + is associative:

f + 0 = (f′ + 0)(\overline{pf + 0})
= f′; \overline{pf} = f
(f + g) + h = (f′ + g′ + h′)(\overline{pf + pg + ph}) = f + (g + h)

We need to show 𝕐 is left additive.

f(h + k) = f; (h′ + k′); (\overline{ph + pk})
= f′; \overline{pf}; (h′ + k′); (\overline{ph + pk})
= f′; (f^{∗}h′ + f^{∗}k′); \overline{pf}; (\overline{ph + pk})
= (f′f^{∗}h′ + f′f^{∗}k′); (\overline{p(fh) + p(fk)})
= ((fh)′ + (fk)′); (\overline{p(fh) + p(fk)}) (by uniqueness of factorization)
= fh + fk
f0 = (f′\overline{pf})(0\overline{0})
= f′f^{∗}0(\overline{pf})(\overline{p0})
= f′0(\overline{p0}) = 0\overline{0}

Now, we suppose that the base category and the fibres are Cartesian; note that each f^{∗} is additive, so preserves products. Products in 𝕐 are defined in the standard manner, pulling back to a common fibre and forming the product there. We must show that the projections are additive, and that the pair of additive maps is additive. We shall find the following lemma useful here.

1.5.5. Lemma. Any map f in 𝕐 is additive if and only if f′ and \overline{pf} are additive, in the following sense: for suitably typed maps h, k, the following equations hold: ((h + k)f)′ = (hf)′ + (kf)′ and \overline{p((h + k)f)} = \overline{p(hf + kf)}.

Proof. (of the lemma) The fibre-map factor of (h + k)f is (h′ + k′)(ph + pk)^{∗}f′ = ((h + k)f)′, and the Cartesian factor is \overline{(ph + pk)}\overline{pf} = \overline{(ph + pk)pf}. The fibre-map factor of hf+kf is h′(ph)^{∗}f′+k′(pk)^{∗}f′ = (hf)′+(kf)′, and the Cartesian factor is \overline{p(hf) + p(kf)}. The lemma is obvious from these factorizations.

So obviously the projections are additive; additionally ⟨f, g⟩ is additive if f, g are.

(⟨hf, hg⟩ + ⟨kf, kg⟩)′ = ⟨hf, hg⟩′ + ⟨kf, kg⟩′
= ⟨(hf)′, (hg)′⟩ + ⟨(kf)′, (kg)′⟩
= ⟨(hf)′ + (kf)′, (hg)′ + (kg)′⟩
= ⟨((h + k)f)′, ((h + k)g)′⟩
\overline{p(⟨hf, hg⟩ + ⟨kf, kg⟩)} = \overline{⟨p(hf), p(hg)⟩ + ⟨p(kf), p(kg)⟩}
= \overline{⟨p(hf) + p(kf), p(hg) + p(kg)⟩}
= \overline{⟨p(hf + kf), p(hg + kg)⟩}
= \overline{⟨p((h + k)f), p((h + k)g)⟩}

We have essentially already shown that ABun(𝕏) [figure] 𝕏 is an additive bundle fibration; Proposition 1.5.2 may be restated as follows:

1.5.6. Proposition. If 𝕏 is left additive, then p: ABun(𝕏) [figure] 𝕏 is an additive bundle fibration. Furthermore, if 𝕏 is Cartesian left additive, then p: ABun(𝕏) [figure] 𝕏 is a Cartesian left additive functor.

2. Cartesian differential categories

Having developed the structure of left additive categories we are now ready to introduce the notion of a Cartesian differential category. Fundamental to these categories is the (appropriate) notion of a differential operator.

Consider the category of finite dimensional vector spaces over (for example) the reals, with homomorphisms which are infinitely differentiable maps. This is left additive, it has products, and furthermore has a natural “differential operator” given by the Jacobian. For example, consider the map f(x_{1}, x_{2}) = x_{1}^{2} +x_{2}^{2}: IR^{2} [figure] IR. Its Jacobian is [ \begin{matrix}2x_{1} \\ 2x_{2} \end{matrix} ]. Note that the Jacobian produces from the point (x_{1}, x_{2}) a linear map from IR^{2} [figure] IR, and so (“uncurrying”) we get D_{×}(f): IR^{2} × IR^{2} [figure] IR. It is this property that we shall abstract with the notion of a “Cartesian differential operator”.

2.1. The basic definitions.

2.1.1. Definition. An operator D_{×} on the maps of a Cartesian left additive category

{X [figure: f] Y \atop X × X [figure: D_{×}[f]] Y}

is a Cartesian differential operator in case it satisfies the following:

[CD.1] D_{×}[f + g] = D_{×}[f] + D_{×}[g] and D_{×}[0] = 0 [CD.2] ⟨h + k, v⟩D_{×}[f] = ⟨h, v⟩D_{×}[f] + ⟨k, v⟩D_{×}[f] and ⟨0, v⟩D_{×}[f] = 0

[CD.3] D_{×}[1] = π_{0}, D_{×}[π_{0}] = π_{0}π_{0} and D_{×}[π_{1}] = π_{0}π_{1}

[CD.4] D_{×}[⟨f, g⟩] = ⟨D_{×}[f], D_{×}[g]⟩

[CD.5] D_{×}[fg] = ⟨D_{×}[f], π_{1}f⟩D_{×}[g]

[CD.6] ⟨⟨g, 0⟩, ⟨h, k⟩⟩D_{×}[D_{×}[f]] = ⟨g, k⟩D_{×}[f]

[CD.7] ⟨⟨0, h⟩, ⟨g, k⟩⟩D_{×}[D_{×}[f]] = ⟨⟨0, g⟩, ⟨h, k⟩⟩D_{×}[D_{×}[f]]

Note that the nullary case of [CD.4], D_{×}[⟨⟩] = ⟨⟩, automatically holds, since 1 is terminal. [CD.6] may equivalently be stated as

(⟨1, 0⟩ × 1)D_{×}[D_{×}[f]] = (1 × π_{1})D_{×}[f]

Somewhat less obviously (but rather crucially for what follows):

2.1.2. Lemma. [CD.7] is equivalent to [CD.7′]:

⟨⟨⟨0, 0⟩, ⟨h, 0⟩⟩, ⟨⟨0, g⟩, ⟨k_{1}, k_{2}⟩⟩⟩D_{×}[D_{×}[f]] = ⟨⟨⟨0, 0⟩, ⟨0, g⟩⟩, ⟨⟨h, 0⟩, ⟨k_{1}, k_{2}⟩⟩⟩D_{×}[D_{×}[f]]

Proof. It is clear that this is implied by [CD.7]; to establish the converse, consider that by [CD.7′]

⟨⟨0, ⟨h, 0⟩⟩, ⟨⟨0, g⟩, ⟨0, k⟩⟩⟩D[D[(π_{0} + π_{1})f]] = ⟨⟨0, ⟨0, g⟩⟩, ⟨⟨h, 0⟩, ⟨0, k⟩⟩⟩D[D[(π_{0} + π_{1})f]]

But

D[D[(π_{0} + π_{1})f]] = ((π_{0} + π_{1}) × (π_{0} + π_{1})) × ((π_{0} + π_{1}) × (π_{0} + π_{1}))D[D[f]]

since (anticipating Definition 2.2.1 and Lemma 2.2.2) (π_{0} + π_{1}) is linear, and so we obtain [CD.7].

2.1.3. Remark. Some comments on these axioms might help the reader with their meanings. [CD.1] says D is linear; [CD.2] that it is additive in its first coordinate. [CD.3,4] assert that D behaves coherently with the product structure, and [CD.5] is the chain rule. We shall see from the proof of Lemma 2.2.2 (v) that [CD.6] is essentially requiring that D_{×}[f] be linear (in the sense of Definition 2.2.1) in its first variable (more precisely, that ⟨1, 0⟩D_{×}[f] is linear).

[CD.7] will be clearer when we restate it with a term logic: at that time it will be clear that [CD.7] is just “independence of order of partial differentiation”: \frac{∂^{2}f}{∂x∂y} = \frac{∂^{2}f}{∂y∂x}.

2.1.4. Definition. A Cartesian left additive category which has a Cartesian differential operator is a Cartesian differential category.

The category of finite dimensional vector spaces with smooth maps is an example. ^{2} Here we can define a smooth differential operator via the Jacobi matrix:

D_{s}[(f_{1}, .., f_{n})](x̃, ỹ) = [(∂_{x_{i}}f_{j})(ỹ)]_{i=1,j=1}^{m,n} x̃

where x̃ = (x_{1}, ..., x_{m}) and ỹ = (y_{1}, .., y_{m}).

2.2. The subcategory of linear maps. In a Cartesian differential category, not only is there a subcategory of additive maps but there is also a subcategory of maps whose differential is constant, that is maps which are “linear”:

2.2.1. Definition. A map in a Cartesian differential category is said to be linear in case D_{×}[f] = π_{0}f.

The following lemma establishes the basic properties of the linear maps in a Cartesian differential category.

2.2.2. Lemma. In any Cartesian differential category

(i) Every linear map is additive;

(ii) 0 is a linear map, and if f and g are linear then f + g is linear;

(iii) Linear maps compose, and include the identity maps;

(iv) Projections are linear and pairings of linear maps are linear;

(v) ⟨1, 0⟩D_{×}[f] is linear;

(vi) If a and b are linear and if the lefthand square commutes then the righthand square also commutes.

[figure: A; a; f; B; b; A′; f′; B′; ⟹; A × A; a×a; D_{×}[f]; B; b; A′ × A′; D_{×}[f′]; B′]

(vii) If g is a retraction and linear and gh is linear then h is linear;

(viii) If f is an isomorphism and linear then f^{−1} is linear.

2Indeed this is true of any differential theory over a rig [BCS 06], and so this gives a large class of examples.

CARTESIAN DIFFERENTIAL CATEGORIES  639

Proof.

(i) Consider (f + g)h where D_{×}[h] = π_{0}h then (f + g)h = ⟨f + g, f⟩D_{×}[h] = ⟨f, f⟩D_{×}[h] + ⟨g, f⟩D_{×}[h] = fh + gh.

(ii) D_{×}[0] = 0 = π_{0}0 so the zero map is linear. When f and g are linear then

D_{×}[f + g] = D_{×}[f] + D_{×}[g] = π_{0}f + π_{0}g = π_{0}(f + g).

(iii) Identity maps by definition are linear. Suppose f and g are linear, then

D_{×}[fg] = ⟨D_{×}[f], π_{1}f⟩D_{×}[g] = ⟨π_{0}f, π_{1}f⟩π_{0}g = π_{0}fg. (iv) Projections are linear by definition. The pairing of two linear maps is linear as

D_{×}[⟨f, g⟩] = ⟨D_{×}[f], D_{×}[g]⟩ = ⟨π_{0}f, π_{0}g⟩ = π_{0}⟨f, g⟩.

(v) We have the following calculation:

D_{×}[⟨1, 0⟩D_{×}[f]] = ⟨D_{×}[⟨1, 0⟩], π_{1}⟨1, 0⟩⟩D_{×}[D_{×}[f]]
= ⟨π_{0}⟨1, 0⟩, π_{1}⟨1, 0⟩⟩D_{×}[D_{×}[f]]
= (1 × ⟨1, 0⟩)(⟨1, 0⟩ × 1)D_{×}[D_{×}[f]]
= (1 × ⟨1, 0⟩)(1 × π_{1})D_{×}[f]
= π_{0}⟨1, 0⟩D_{×}[f].

(vi) If af′ = fb then D_{×}[af′] = D_{×}[fb] but now

D_{×}[af′] = ⟨D_{×}[a], π_{1}a⟩D_{×}[f′] = ⟨π_{0}a, π_{1}a⟩D_{×}[f′] = (a × a)D_{×}[f′]
D_{×}[fb] = ⟨D_{×}[f], π_{1}f⟩D_{×}[b] = ⟨D_{×}[f], π_{1}f⟩π_{0}b = D_{×}[f]b

showing that the above inference holds. (vii) Let g′g = 1 we need to determine the value of D_{×}[h] for this we have:

D_{×}[h] = (g′ × g′)(g × g)D_{×}[h] = (g′ × g′)⟨π_{0}g, π_{1}g⟩D_{×}[h]
= (g′ × g′)⟨D_{×}[g], π_{1}g⟩D_{×}[h] = (g′ × g′)D[gh]
= (g′ × g′)π_{0}gh = π_{0}g′gh = π_{0}h.

(viii) This follows easily from the property above.

From Lemma 2.2.2 we may conclude:

2.2.3. Corollary. The linear maps of a Cartesian differential category form an additive category 𝕏_{lin} which has biproducts. The inclusion I: 𝕏_{lin} [figure] 𝕏 reflects isomorphisms and creates products.

2.3. An additive interlude!. In a Cartesian differential category the additive maps play second fiddle to the linear maps. Nonetheless they are an important class which have many of the properties of the linear maps. Below we develop some of the special properties of additive maps before turning our attention to the linear maps.

As a consequence (Corollary 2.3.3), we shall also show that axiom [CD.6] is independent of the other axioms. (A proof that axiom [CD.7] is independent of the other axioms may be constructed from a modification of the construction of the free Cartesian differential category; that will appear in a sequel which develops the technical tools needed for that construction.)

2.3.1. Proposition. In a Cartesian differential category if f is additive then D_{×}[f] is additive and, furthermore, D_{×}[f] = π_{0}D_{0}[f] where D_{0}[f] = ⟨1, 0⟩D_{×}[f].

Proof. Suppose f is additive so that π_{0}f + π_{1}f = (π_{0} + π_{1})f then

π_{0}D_{×}[f] + π_{1}D_{×}[f] = ex(⟨π_{0}π_{0}, π_{1}π_{0}⟩D_{×}[f] + ⟨π_{0}π_{1}, π_{1}π_{1}⟩D_{×}[f])
= ex(⟨D_{×}[π_{0}], π_{1}π_{0}⟩D_{×}[f] + ⟨D_{×}[π_{1}], π_{1}π_{1}⟩D_{×}[f])
= ex(D_{×}[π_{0}f] + D_{×}[π_{1}f]) = exD_{×}[π_{0}f + π_{1}f] = exD_{×}[(π_{0} + π_{1})f]
= ex⟨D_{×}[π_{0} + π_{1}], π_{1}(π_{0} + π_{1})⟩D_{×}[f]
= ex⟨π_{0}(π_{0} + π_{1}), π_{1}(π_{0} + π_{1})⟩D_{×}[f]
= (π_{0} + π_{1})D_{×}[f]

where ex = ⟨⟨π_{0}π_{0}, π_{1}π_{0}⟩, ⟨π_{0}π_{1}, π_{1}π_{1}⟩⟩ is the “exchange” map.

Now, when f is additive, we can use the fact D_{×}[f] is additive to conclude:

D_{×}[f] = ⟨π_{0}, π_{1}⟩D_{×}[f]
= ⟨0 + π_{0}, π_{1} + 0⟩D_{×}[f]
= (⟨0, π_{1}⟩ + ⟨π_{0}, 0⟩)D_{×}[f]
= ⟨0, π_{1}⟩D_{×}[f] + ⟨π_{0}, 0⟩D_{×}[f]
= ⟨π_{0}, 0⟩D_{×}[f]
= π_{0}⟨1, 0⟩D_{×}[f]

so that D_{×}[f] = π_{0}⟨1, 0⟩D_{×}[f] = π_{0}D_{0}[f].

In the extremal situation when every map is additive we may now conclude that the differential D_{×}[f] = π_{0}D_{0}[f] is given by D_{0} which is an additive endofunctor stationary on objects and linear maps and delivers linear maps and so is idempotent.

2.3.2. Corollary. In a Cartesian differential category 𝕏 in which all maps are additive D_{0}: 𝕏 [figure] 𝕏 is an additive endofunctor which is stationary on all objects and linear maps and has image the linear maps. Conversely, an endofunctor D_{0} which is stationary on objects and idempotent endows such a category with a differential operator D_{×}[f] = π_{0}D_{0}[f].

Proof. If f is linear then D_{0}[f] = ⟨1, 0⟩D_{×}[f] = ⟨1, 0⟩π_{0}f = f. As

D_{0}[f+g] = ⟨1, 0⟩D_{×}[f+g] = ⟨1, 0⟩(D_{×}[f]+D_{×}[g]) = ⟨1, 0⟩D_{×}[f]+⟨1, 0⟩D_{×}[g] = D_{0}[f]+D_{0}[g]

so that D_{0} preserves addition, it also clearly preserves the zero. D_{0} preserves composition as:

D_{0}[fg] = ⟨1, 0⟩D_{×}[fg] = ⟨1, 0⟩⟨D_{×}[f], π_{1}f⟩D_{×}[g] = ⟨⟨1, 0⟩D_{×}[f], 0⟩D_{×}[g] = D_{0}[f]D_{0}[g].

For the converse suppose D_{0}: 𝕏 [figure] 𝕏 is a functor which is additive, stationary on objects, and has is idempotent. It preserves the biproduct structure as all additive functors do. Now define D_{×}[f] = π_{0}D_{0}(f) then it is easy to check that this is a Cartesian differential operator.

These observations yield some unexpected examples of Cartesian differential categories.

First consider the category of matrices over the complex numbers (the objects being natural numbers and the maps being matrices) then there is an obvious endofunctor which takes the complex conjugate of each matrix entry. This leaves the product structure untouched. This makes it a (non-trivial) additive endo functor which however is not idempotent. By treating this as the D_{0} of corollary 2.3.2 we get a structure D_{×}[f] = π_{0}D_{0}[f] which satisfies all the equations except [CD.6]. This means:

2.3.3. Corollary. [CD.6] is independent of the rest of the axioms.

To get an example of a structure which also satisfies this axiom it suffices to consider a ring with a retraction: for example the polynomial ring over the complex numbers retract onto the complexes by assigning the indeterminate to any number:

r_{x:=0}: ℂ[x] [figure] ℂ.

This extends to an additive idempotent endofunctor on the category of the matrices over ℂ[x] which can serve as the endofunctor D_{0} in the above. This makes the matrices with entries in ℂ the linear maps and the rest have a differential which collapses back to ℂ.

Clearly, an interesting case is when the linear maps and additive maps coincide. One may express this by the requirement that D_{0} is the identity functor on the additive maps. The example above shows that this, if desired, is an extra requirement.

2.3.4. Corollary. There are Cartesian differential categories where the additive maps are not all linear.

It seems appropriate to make one further remark about the operator D_{0}[f] = ⟨1, 0⟩D_{×}[f]. One should think of it as giving the differential at 0. Of course, when one fixes the point at which one takes the differential one obtains an additive map. Therefore, let 𝕏_{0} be the subcategory of 𝕏 determined by those maps which preserve the zero (0f = 0). Clearly any D_{×}[f] preserves the 0 by [CD.2], thus 𝕏_{0} is itself a Cartesian differential subcategory which will usually strictly include all the additive maps.

2.3.5. Corollary. If 𝕏 is a Cartesian differential category then 𝕏_{0}, consisting of the maps which preserve 0 (i.e. satisfying 0f = 0), is a Cartesian differential subcategory.

A further class of maps should be mentioned namely the constant maps, that is those with differential zero. Classically they are important as the differential of a map will not be changed by adding constant maps to it.

2.4. Cartesian differential operators and the bundle fibration. Recall (Section 1.5) that if 𝕏 is Cartesian left additive, then p: ABun(𝕏) [figure] 𝕏 is an additive bundle fibration, and p: ABun(𝕏) [figure] 𝕏 is a Cartesian left additive functor.

Suppose p: ABun(𝕏) [figure] 𝕏 has some further structure: suppose p has a left additive section D: 𝕏 [figure] ABun(𝕏). Some interesting consequences follow from this supposition, consequences which one may take as motivation for the axioms of a Cartesian differential operator.

First, some notation: let’s write D(A) = (d_{0}(A), A) and D(f) = (D_{×}[f], f), for A an object of 𝕏, and f: A [figure] B a map of 𝕏. (The assumption that D is a section forces the second component to be as given.) Note then that D_{×}[f]: d_{0}(A) × A [figure] d_{0}(B) is additive in its first component. Also, that D is a functor forces the following equation:

⟨D_{×}[f], π_{1}f⟩D_{×}[g] = D_{×}[fg]

because the lefthand side is the first component of D(f)D(g) and the righthand side is the first component of D(fg). (In each case the second component is just fg.) Our view will be that ABun(𝕏) captures differential structure of 𝕏, and that composition in ABun(𝕏) should then be governed by the chain rule — this is exactly what the equation above expresses.

In addition, that D preserves identities means that 1 = (π_{0}, 1) = (D_{×}[1], 1), and so

D_{×}[1] = π_{0}

Also D(π_{0}) = (π_{0}π_{0}, π_{0}), so

D_{×}[π_{0}] = π_{0}π_{0}

Similarly

D_{×}[π_{1}] = π_{0}π_{1}

D preserves +: D(f + g) = D(f) + D(g), and so

D_{×}[f + g] = D_{×}[f] + D_{×}[g]

So what we see here is that part of the definition of Cartesian differential operator (Definition 2.1.1), specifically [CD.1-5], follows immediately from the existence of a left additive section D to p.

But we can in fact push this analysis of the additive bundle fibration further: we can define the notion of “linear map” in this context. We say a map f of 𝕏 is linear if D_{×}[f] = π_{0}g for some g. Then we note that the basic properties of linear maps hold in this generality, with more or less the same proofs.

• g is uniquely determined by f (since π_{0}: d_{0}A × A [figure] d_{0}A is epi, having a section ⟨1, 0⟩). We shall denote the map g by d_{0}(f).

• d_{0} so defined is an endo-functor on 𝕏, and linear maps form an additive subcategory of 𝕏.

– D_{×}[1] = π_{0}, so identities are linear;

– if D_{×}[f] = π_{0}d_{0}f and D_{×}[g] = π_{0}d_{0}g, then D_{×}[fg] = ⟨D_{×}[f], π_{1}f⟩D_{×}[g] = ⟨π_{0}f_{0}f, π_{1}f⟩π_{0}d_{0}g = π_{0}d_{0}fd_{0}g, so linear maps are closed under composition;

– if f, g are linear, then D_{×}[f + g] = D_{×}[f] + D_{×}[g] = π_{0}d_{0}f + π_{0}d + 0g = π_{0}(d_{0}f + d_{0}g), so f + g is linear as well.

• If f is additive, then so is d_{0}f:

(x + y)d_{0}f = ⟨x + y, 0⟩π_{0}d_{0}f
= ⟨x + y, 0⟩D_{×}[f]
= ⟨x, 0⟩D_{×}[f] + ⟨y, 0⟩D_{×}[f]
= ⟨x, 0⟩π_{0}d_{0}f + ⟨y, 0⟩π_{0}d_{0}f
= xd_{0}f + yd_{0}f

• Projections are linear; pairs of linear maps are linear.

The special case which concerns us is when the functor d_{0} is the identity (we suggest calling D stationary in this case). When that is so, then we have the rest of the basic properties:

• If a and b are linear and if the lefthand square commutes then the righthand square also commutes.

[figure: A; a; f; B; b; A′; f′; B′; ⟹; A × A; a×a; D_{×}[f]; B; b; A′ × A′; D_{×}[f′]; B′]

• If g is a retraction and linear and gh is linear then h is linear.

• Hence, if f is an isomorphism and linear then f^{−1} is linear.

A proper analysis in this fashion of [CD.6,7] involves higher order differential structure: just as the chain rule essentially characterizes composition in additive bundle fibrations, the higher order chain rules induce a family of such fibrations, the Faà di Bruno fibrations, corresponding to higher order differential structure — a well-behaved composition in the second order Faà di Bruno fibration will motivate [CD.6,7] in a similar manner (the details are somewhat technical, and will be presented in a sequel).

3. The coKleisli category of a differential category

First, we shall recall some definitions from [BCS 06], and set our notation.

3.1. Differential categories. A coalgebra modality on an additive (i.e. commutative monoid enriched) symmetric monoidal category 𝕏 is a comonad (S, δ, ϵ) so that each object S(X) is a coalgebra or comonoid (S(X), Δ, e) and δ is a comonoid morphism.

Δ: S(X) [figure] S(X) ⊗ S(X) e: S(X) [figure] ⊤
[figure: S(X); Δ; S(X); S(X) ⊗ S(X); 1⊗e; e⊗1; S(X); S(X); Δ; Δ; S(X) ⊗ S(X); Δ⊗1; S(X) ⊗ S(X); 1⊗Δ; S(X) ⊗ S(X) ⊗ S(X)]

\xymatrix{S(X) \ar[rr]^{δ} \ar[dr]_{e} &  & S(S(X)) \ar[dl]^{e} & S(X) \ar[r]^{δ} \ar[d]_{Δ} & S(S(X)) \ar[d]^{Δ} \\  & ⊤ &  & S(X) ⊗ S(X) \ar[r]_{δ⊗δ} & S(S(X)) ⊗ S(S(X))}

(We wrote ! instead of S in [BCS 06]; S will fit better with the rest of this paper.) Note that we do not require 𝕏 to have biproducts. On such a category, a differential combinator D_{⊗}: 𝕏(S(A), B) [figure] 𝕏(A ⊗ S(A), B) is a natural combinator satisfying four axioms (we suppress structural isomorphisms):

[D.1] (Constant maps) D_{⊗}[e_{A}] = 0

[D.2] (Product rule) D_{⊗}[Δ(f ⊗ g)] = (1 ⊗ Δ)(D_{⊗}[f] ⊗ g) + (1 ⊗ Δ)(c ⊗ 1)(f ⊗ D_{⊗}[g]), where f: S(A) [figure] B, g: S(A) [figure] C, and c is the commutativity isomorphism

[D.3] (Linearity) D_{⊗}[ϵ_{A}f] = (1 ⊗ e_{A})f, where f: A [figure] B

[D.4] (Chain rule) D_{⊗}[δ S(f) g] = (1 ⊗ Δ)(D_{⊗}[f] ⊗ δS(f))D ⊗ [g] where f: S(A) [figure] B and g: S(B) [figure] C.

A differential category is an additive symmetric monoidal category with a coalgebra modality and a differential combinator. The structure of the differential combinator may also be described in slightly simpler terms using a “deriving transformation” d_{⊗}: = D_{⊗}[1].

(The four axioms have a slightly simpler formulation in terms of d_{⊗}.) In [BCS 06] we used the notation D and d; in this paper we also have similar “Cartesian” operations D_{×}, d_{×} for Cartesian differential categories, so we shall use the subscripted D_{⊗}, d_{⊗} to distinguish the differential combinator and deriving transformation of a differential category from their counterparts in a Cartesian differential category.

In [BCS 06], we also define several “richer” variants of differential categories: for example, if 𝕏 has biproducts, we define a differential storage category as an additive storage category with a deriving transformation such that the “∇-rule” (d⊗1)∇ = (1⊗∇)d is satisfied, (∇ being the codiagonal, part of the bialgebra structure). Being a storage category means that the coalgebra modality is symmetric monoidal, and the comonoid structure is a morphism for the coalgebras. This is equivalent to the induced tensor on the coalgebras being a product, and in fact in this setting we obtain the storage (or Seely) isomorphisms which mediate a canonical bialgebra structure on the cofree objects by transporting the bialgebra structure on the biproduct. The point about differential storage categories from our present viewpoint is that the deriving transformation is given by the bialgebra structure: d_{X} = (η_{X} ⊗ 1)∇, for a natural map η.

The reader should consult [BCS 06] for the details of this and the other variants.

3.2. The coKleisli category of a differential category. Our principle example of a Cartesian differential category arises as the coKleisli category of a differential category. In fact, under reasonable conditions, we may represent Cartesian differential categories as the coKleisli categories of differential categories; in order to do that, we need to consider abstract coKleisli categories in general, which will be the main focus of a sequel to this paper. But for now, let us consider this example of Cartesian differential categories. As before, to distinguish maps in the coKleisli category, we shall represent them in boldface.

The key this example is that, given a differential category 𝕏 with products (and so biproducts), it is possible to define a differential combinator on the coKleisli category:

given X [figure: f] Y in the coKleisli category (and so S(X) [figure: f] Y in the underlying category), we construct D_{×}[f]: X × X [figure] Y in the coKleisli category as the arrow (in the underlying category)

D_{×}[f] =

S(X × X) [figure: Δ] S(X × X) ⊗ S(X × X) [figure: Sπ_{0}⊗Sπ_{1}] S(X) ⊗ S(X) [figure: ϵ⊗1] X ⊗ S(X) [figure: D_{⊗}[f]] Y

We remark that the arrow

s_{2}: = S(X × X) [figure: Δ] S(X × X) ⊗ S(X × X) [figure: Sπ_{0}⊗Sπ_{1}] S(X) ⊗ S(X)

is the canonical (inverse) storage isomorphism, in a category which has the storage isomorphism — for example, for a storage modality. However, we are not supposing this is an isomorphism here. In fact, having s (and its nullary version) amounts to having a coalgebra modality.

3.2.1. Proposition. The coKleisli category of a differential storage category (with biproducts) is a Cartesian differential category, whose Cartesian differential combinator is defined as above.

We must prove the axioms [CD.1-7] hold with this defined D_{×}. In fact, we may relax the conditions somewhat for [CD.1-6]: only [CD.7] requires something like storage.

3.2.2. Lemma. [CD.1-6] are valid in the coKleisli category of a differential category with biproducts.

Proof.

[CD.1] follows from left additivity.

[CD.2] For Z [figure: ⟨h_{1}+h_{2},v⟩] X × X, consider

⟨h + k, v⟩D_{×}[f]
= δ; S(⟨h + k, v⟩); Δ; S(π_{0}) ⊗ S(π_{1}); ϵ ⊗ 1; D_{⊗}[f]
= δ; Δ; ϵ ⊗ 1; (h + k) ⊗ S(v); D_{⊗}[f]
= δ; Δ; ϵ ⊗ 1; (h ⊗ S(v) + k ⊗ S(v)); D_{⊗}[f]
= (δ; Δ; ϵ ⊗ 1; h ⊗ S(v)D_{⊗}[f]) + (δ; Δ; ϵ ⊗ 1; k ⊗ S(v)D_{⊗}[f])
= (δ; S(⟨h, v⟩); Δ; S(π_{0}) ⊗ S(π_{1}); ϵ ⊗ 1; D_{⊗}[f])
+ (δ; S(⟨k, v⟩); Δ; S(π_{0}) ⊗ S(π_{1}); ϵ ⊗ 1; D_{⊗}[f])
= ⟨h, v⟩D_{×}[f] + ⟨k, v⟩D_{×}[f]

[CD.3] Notice that D_{×}[1], being in the coKleisli category, is S(X × X) [figure] X, π_{0} is really ϵ; π_{0}: S(X × X) [figure] X × X [figure] X, and so we consider the following (we have suppressed the use of the unit isomorphism).

D_{×}[1] = Δ; S(π_{0}) ⊗ S(π_{1}); ϵ ⊗ 1; D_{⊗}[ϵ]
= Δ; S(π_{0}) ⊗ S(π_{1}); ϵ ⊗ 1; 1 ⊗ e
= Δ; S(π_{0}) ⊗ S(π_{1}); 1 ⊗ e; ϵ
= Δ; 1 ⊗ e; S(π_{0}); ϵ
= S(π_{0}); ϵ = ϵ; π_{0}

Next, note that π_{0}π_{0} is really ϵπ_{0}π_{0}, so we need the following (again suppressing the use of the unit isomorphism).

D_{×}[π_{0}] = Δ; S(π_{0}) ⊗ S(π_{1}); ϵ ⊗ 1; D_{⊗}[ϵπ_{0}]
= Δ; S(π_{0}) ⊗ S(π_{1}); ϵ ⊗ 1; π_{0} ⊗ e
= Δ; S(π_{0}) ⊗ S(π_{1}); (ϵπ_{0}) ⊗ e
= Δ; (ϵπ_{0}π_{0}) ⊗ e = ϵπ_{0}π_{0}

and similarly for π_{1}.

[CD.4] It suffices to show that D_{×}[⟨f, g⟩]π_{0} = D_{×}[f] and D_{×}[⟨f, g⟩]π_{1} = D_{×}[g]. We notice first that similar equations hold for D_{⊗}, via the chain rule:

D_{⊗}[f] = D_{⊗}[⟨f, g⟩π_{0}]
= 1 ⊗ Δ; D_{⊗}[⟨f, g⟩] ⊗ δS(⟨f, g⟩); D_{⊗}[ϵπ_{0}]
= 1 ⊗ Δ; D_{⊗}[⟨f, g⟩] ⊗ δS(⟨f, g⟩); π_{0} ⊗ e
= 1 ⊗ Δ; (D_{⊗}[⟨f, g⟩]π_{0}) ⊗ e
= D_{⊗}[⟨f, g⟩]π_{0}

and similarly for g. Then we see

D_{×}[⟨f, g⟩]π_{0} = Δ; S(π_{0}) ⊗ S(π_{1}); ϵ ⊗ 1; D_{⊗}[⟨f, g⟩]; π_{0}
= Δ; S(π_{0}) ⊗ S(π_{1}); ϵ ⊗ 1; D_{⊗}[f]
= D_{×}[f]

and similarly for g.

[CD.5] Translating from the coKleisli category to the underlying category, we show the following equation. This is moderately complex as a categorical diagram, and so to illustrate the comparative simplicity of the circuits, we shall also prove this with circuits in Figures 1 and 2.

δ; S(⟨Δ, S(π_{1})f⟩); S((Sπ_{0} ⊗ Sπ_{1}) × 1); S((ϵ ⊗ 1) × 1); S(D_{⊗}[f] × 1); Δ; Sπ_{0} ⊗ Sπ_{1}; ϵ ⊗ 1; D_{⊗}[g]

= Δ; δ ⊗ δ; S(⟨Δ, S(π_{1})f⟩)^{⊗^{2}}; S((Sπ_{0} ⊗ Sπ_{1}) × 1)^{⊗^{2}}; S((ϵ ⊗ 1) × 1)^{⊗^{2}}; S(D_{⊗}[f] × 1)^{⊗^{2}};
Sπ_{0} ⊗ Sπ_{1}; ϵ ⊗ 1; D_{⊗}[g]
= Δ; δ ⊗ δ; S(⟨Δ, S(π_{1})f⟩)^{⊗^{2}}; S((Sπ_{0} ⊗ Sπ_{1}) × 1)^{⊗^{2}}; S((ϵ ⊗ 1) × 1)^{⊗^{2}}; S(D_{⊗}[f] × 1)^{⊗^{2}};
ϵ ⊗ 1; π_{0} ⊗ Sπ_{1}; D_{⊗}[g]
= Δ; 1 ⊗ δ; (Δ ⊗ SS(π_{1})f)^{⊗^{2}}; ((Sπ_{0} ⊗ Sπ_{1}) × 1)^{⊗^{2}}; ((ϵ ⊗ 1) × 1) ⊗ S((ϵ ⊗ 1) × 1);
(D_{⊗}[f] × 1) ⊗ S(D_{⊗}[f] × 1); π_{0} ⊗ Sπ_{1}; D_{⊗}[g]
= Δ; 1 ⊗ δ; Δ ⊗ SS(π_{1})f; (Sπ_{0} ⊗ Sπ_{1}) ⊗ 1; (ϵ ⊗ 1) ⊗ 1; D_{⊗}[f] ⊗ 1; D_{⊗}[g]
= Δ; 1 ⊗ Δ; 1 ⊗ 1 ⊗ δ; 1 ⊗ 1 ⊗ SS(π_{1})f; (Sπ_{0} ⊗ Sπ_{1}) ⊗ 1; (ϵ ⊗ 1) ⊗ 1; D_{⊗}[f] ⊗ 1; D_{⊗}[g]
= Δ; 1 ⊗ Δ; (Sπ_{0} ⊗ Sπ_{1}) ⊗ Sπ_{1}; (ϵ ⊗ 1) ⊗ 1; D_{⊗}[f] ⊗ δS(f); D_{⊗}[g]
= Δ; Sπ_{0} ⊗ Sπ_{1}; 1 ⊗ Δ; (ϵ ⊗ 1) ⊗ 1; D_{⊗}[f] ⊗ δS(f); D_{⊗}[g]
= Δ; Sπ_{0} ⊗ Sπ_{1}; ϵ ⊗ 1; D_{⊗}[δS(f)g]

As mentioned above, the corresponding circuit manipulations are shown in Figures 1 and 2. We should point out that we use two different types of circuit boxes in these circuits: those with a half-oval marking the principal port are storage boxes (much like Girard’s original boxes for ! [G 87]), and the box without the half-oval in the first circuit is a product box (like our linear functor boxes [CS 99]).

648  R.F. BLUTE, J.R.B. COCKETT AND R.A.G. SEELY

[CD.6] In 𝕏_{S} (1 × π_{1})D_{×}[f] is the 𝕏 map

(1 × π_{1})D_{×}[f]
= S(1 × π_{1}); Δ; S(π_{0}) ⊗ S(π_{1}); ϵ ⊗ 1; D_{⊗}[f]
= Δ; S(π_{0}) ⊗ S(π_{1}π_{1}); ϵ ⊗ 1; D_{⊗}[f]
= Δ; (ϵπ_{0} ⊗ S(π_{1}π_{1})); d_{⊗}; f

This is displayed as a circuit in Figure 3. Before we deal with the coKleisli map (⟨1, 0⟩ × 1)D_{×}[D_{×}[f]], we simplify the map D_{⊗}[D_{×}[f]] (needed to “decode” D_{×}[D_{×}[f]] in the coKleisli category):

D_{⊗}[D_{×}[f]]

= D_{⊗}[Δ; (S(π_{0})ϵ) ⊗ S(π_{1}); D_{⊗}[f]]
= d_{⊗}; Δ; (S(π_{0})ϵ) ⊗ S(π_{1}); d_{⊗}; f
= (1 ⊗ Δ); (d_{⊗} ⊗ 1); ϵπ_{0} ⊗ S(π_{1}); d_{⊗}; f
+(1 ⊗ Δ); (c ⊗ 1); (1 ⊗ d_{⊗}); ϵπ_{0} ⊗ S(π_{1}); d_{⊗}; f
= (1 ⊗ Δ); (1 ⊗ e ⊗ 1); (π_{0} ⊗ S(π_{1})); d_{⊗}; f
+(1 ⊗ Δ); (c ⊗ 1); (1 ⊗ (π_{1} ⊗ S(π_{1})); (ϵπ_{0} ⊗ d_{⊗}); d_{⊗}; f
= π_{0} ⊗ S(π_{1}); d_{⊗}; f + (1 ⊗ Δ); (c ⊗ 1); (1 ⊗ (π_{1} ⊗ S(π_{1})); (ϵπ_{0} ⊗ d_{⊗}); d_{⊗}; f

In circuits, this is displayed in Figure 4. Finally, we may complete the proof with the following calculation.

(⟨1, 0⟩ × 1)D_{×}[D_{×}[f]]

= S(⟨1, 0⟩ × 1); Δ; S(π_{0}) ⊗ S(π_{1}); ϵ ⊗ 1; D_{⊗}[D_{×}[f]]
= Δ; ϵπ_{0}⟨1, 0⟩ ⊗ S(π_{1}); π_{0} ⊗ S(π_{1}); d_{⊗}; f
+ Δ; ϵπ_{0}⟨1, 0⟩ ⊗ S(π_{1}); (1 ⊗ Δ); (c ⊗ 1); (1 ⊗ (π_{1} ⊗ S(π_{1})); (ϵπ_{0} ⊗ d_{⊗}); d_{⊗}; f
= Δ; ϵπ_{0} ⊗ S(π_{1}π_{1}); d_{⊗}; f
+ Δ; (ϵ0 ⊗ Δ); (c ⊗ 1); (1 ⊗ S(π_{1}π_{1})); (ϵ ⊗ d_{⊗}); (π_{1}π_{0} ⊗ 1); d_{⊗}; f
= Δ; ϵπ_{0} ⊗ S(π_{1}π_{1}); d_{⊗}; f + 0
= Δ; ϵπ_{0} ⊗ S(π_{1}π_{1}); d_{⊗}; f
= (1 × π_{1})D_{×}[f]

as hoped for. This calculation is displayed in Figure 5.

CARTESIAN DIFFERENTIAL CATEGORIES  649

[figure: g; f; Δ; Δ; ϵ; ϵ; f; π_{0}; π_{0}; π_{1}; π_{1}; π_{1}; ϵ; ϵ; ϵ; ϵ; ϵ; S(X × X); S(X × X); S(X × X); S(Y × Y); S(X × X); S(Y × Y); S(X × X); X × X; Y × Y; X × X; Y × Y; X × X; S(X); S(Y); S(X); S(Y); S(X); S(Y); S(X); X; Y; Y; Y; Z; Y × Y; S(Y × Y); X; Y; X; Y; X; =]

Figure 1: [CD.5] in 𝕏_{S}, continued in Figure 2

[figure: g; f; Δ; Δ; ϵ; f; π_{0}; π_{1}; π_{1}; ϵ; ϵ; ϵ; ϵ; =; g; f; Δ; Δ; f; π_{0}; π_{1}; π_{1}; ϵ; ϵ; ϵ; =]

[figure: g; f; Δ; Δ; f; π_{0}; π_{1}; π_{1}; ϵ; ϵ; ϵ; =; g; f; Δ; Δ; f; π_{0}; π_{1}; ϵ; ϵ; =]

[figure: g; f; Δ; ϵ; π_{0}; π_{1}; ϵ; ϵ]

Figure 2: [CD.5] in 𝕏_{S}, continued from Figure 1

f Δ ϵ π_{0}  S(π_{1}π_{1})

Figure 3: (1 × π)D_{×}[f] in 𝕏

\overline{\begin{matrix}f Δ S(π_{0}) ϵ  S(π_{1}) & ^{f}  ^{f}^{Δ}  ^{Δ}^{ϵ}  ^{ϵ}^{π_{0}}  ^{π_{0}}^{S(π_{1})}  ^{S(π_{1})} + = \\ ^{f} & ^{f} & ^{Δ} & ^{ϵ} & ^{π_{0}} & ^{π_{0}} & ^{S(π_{1})} & ^{π_{1}} & ^{S(π_{1})} & + & = \end{matrix}}

Figure 4: D_{⊗}[D_{×}[f]] in 𝕏

\overline{\begin{matrix}f & f & Δ & Δ & Δ & ϵ & ⟨1, 0⟩ & ⟨1, 0⟩ & ϵ & ϵ & π_{0} & π_{0} & π_{0} & π_{0} & S(π_{1}) & S(π_{1}) & S(π_{1}) & π_{1} & S(π_{1}) & + & = \\ ^{f}^{Δ}^{ϵ}^{π_{0}}  ^{S(π_{1}π_{1})}  ^{f}^{Δ}^{Δ}^{ϵ}^{ϵ}^{π_{1}π_{0}}  ^{0} ^{S(π_{1}π_{1})} +  = & ^{f}^{Δ}^{ϵ}^{π_{0}}  ^{S(π_{1}π_{1})} \end{matrix}}

Figure 5: (⟨1, 0⟩ × 1)D_{×}[D_{×}[f]] in 𝕏

[figure: =; ∇; ∇; ∇; ∇; η; η; η; η; =]^{Figure 6: 1 ⊗ d_{⊗}; d_{⊗} = c ⊗ 1; 1 ⊗ d_{⊗}; d_{⊗}}

3.2.3. Lemma. In a differential category satisfying the equation 1 ⊗ d_{⊗}; d_{⊗} = c ⊗ 1; 1 ⊗ d_{⊗}; d_{⊗}, [CD.7] is valid.

Proof. The necessary equation is illustrated in Figure 6.

It will be clear that these proofs are more simply presented using the circuit diagrams; the diagrams for this lemma may be found in Figures 7 and 8. In the diagrams, ▲ denotes the Cartesian Δ, and the boxes without half-ovals are Cartesian boxes. Note that we have expanded D_{×}[D_{×}[f]] into a sum, similar to what we did in Figures 4, 5.

The proof of Proposition 3.2.1 then follows from the remark that a differential storage category has the required property, since there d_{⊗} = η ⊗ 1; ∇, and ∇ is cocommutative and coassociative, as shown in Figure 6.

3.2.4. Remark. We should note here the following property of the coKleisli category of a differential category with biproducts, viz that ϵ and S(f) (for any f) are linear:

• D_{×}[ϵ] = π_{0}ϵ
• D_{×}[S(f)] = π_{0}S(f)

To see the first, recall that ϵ = ϵϵ and π_{0}ϵ = δS(ϵπ_{0})ϵϵ = ϵπ_{0}ϵ, so D_{×}[ϵ] = s(ϵ ⊗ 1)D_{⊗}[ϵϵ] = s(ϵ⊗1)(1⊗e)ϵ = Δ(Sπ_{0} ⊗Sπ_{1})(ϵ⊗e)ϵ = Δ(Sπ_{0} ⊗e)ϵϵ = Sπ_{0} ϵϵ = ϵπ_{0}ϵ = π_{0}ϵ.

To see the second, recall that S(f) = ϵδS(f), so D_{×}[S(f)] = Δ(Sπ_{0} ⊗ Sπ_{1})(ϵ ⊗ 1)D_{⊗}[ϵδS(f)] = Δ(Sπ_{0} ⊗ Sπ_{1})(ϵ ⊗ e)δS(f) = ϵπ_{0}δS(f) = δS(ϵπ_{0})ϵδS(f) = π_{0}S(f).

These equations are central in arriving at an abstract characterization of coKleisli categories of differential categories, the subject of a sequel to this paper.

4. A term calculus for Cartesian differential categories

It is useful to develop a term logic for Cartesian differential categories not only so that the manipulation of maps is facilitated but also to illustrate the extent to which the intuitions from the ordinary calculus of differentiation are captured. The purpose of this section is to provide an account of this term logic.

[figure: f; f; Δ; Δ; Δ; π_{0}; π_{0}; π_{0}; π_{0}; π_{0}; ϵ; ϵ; ϵ; ϵ; ϵ; π_{0}; π_{0}; π_{1}; π_{1}; π_{1}; +; 0; h; g; k; ▲; ▲; ▲; f; Δ; Δ; h; k; g; +; 0; =]

[figure: f; Δ; Δ; h; k; g; =; f; Δ; Δ; g; k; h; =]

Figure 7: ⟨⟨0, h⟩, ⟨g, k⟩⟩D_{×}[D_{×}[f]]

[figure: f; f; Δ; Δ; Δ; π_{0}; π_{0}; π_{0}; π_{0}; π_{0}; ϵ; ϵ; ϵ; ϵ; ϵ; π_{0}; π_{0}; π_{1}; π_{1}; π_{1}; +; 0; g; h; k; ▲; ▲; ▲; =]

Figure 8: ⟨⟨0, g⟩, ⟨h, k⟩⟩D_{×}[D_{×}[f]]

Given a map f: X [figure] Y; x ↦ t, we shall denote the map D_{×}[f]: X × X [figure] Y by the term

(u, s) ↦ \frac{∂t}{∂x}(s) · u

where x is a variable of type X, t is a term (representing f) of type Y, and s, u are terms of type X. \frac{∂}{∂x} binds occurrences of x in any operator to which it is applied. So in particular in \frac{∂t}{∂x}, all occurrences of x in t are bounded. The intention is that \frac{∂t}{∂x}(s) should determine a linear transformation, so that in a higher-order system it would be typed as \frac{∂t}{∂x}(s): X −∘ Y. In a first-order system we have to use the uncurried form, and so insist that the argument to which it is applied be specified, thus obtaining the term \frac{∂t}{∂x}(s)·u: Y of type Y; this term is assumed to be linear in u. Of course, we think of this as the x-differential of f, evaluated at x = s. In an “Euler-style” notation, this might be represented by a term like D[x ↦ t](s) · u. The usual “Leibniz-style” notation is something like \frac{∂t}{∂x} _{x:=s}. Remember our convention is that D_{×}[f] is linear in its first variable, by [CD.2], which we have been denoting u here. We denote the function application in this case by “·” (as in “dot product”); in the standard example (“high-school differentiation”) it is in fact matrix multiplication.

For example, if we take for f the function from X: = IR^{3} to Y: = IR^{2} given by f(x, y, z) = (x^{2} + xyz, z^{3} − xy), we have \frac{∂⟨x^{2}+xyz,z^{3}−xy⟩}{∂(x,y,z)}(r, s, t), a linear transformation from IR^{3} to IR^{2}, given by the matrix:

( \begin{matrix}2r + st & rt & rs \\ −s & −r & 3t^{2} \end{matrix} )

i.e. by the Jacobian evaluated at (r, s, t). We apply this Jacobian to a vector to obtain a point in IR^{2}:

( \begin{matrix}2r + st & rt & rs \\ −s & −r & 3t^{2} \end{matrix} ) · (u, v, w) = ((2r + st)u + rtv + rsw, −su − rv + 3t^{2}w)

To summarize: this is what we would write in our term logic as

\frac{∂(x^{2} + xyz, z^{3} − xy)}{∂(x, y, z)}(r, s, t) · (u, v, w)

(compare this to the categorical notation, D_{×}[f]: IR^{3} × IR^{3} [figure] IR^{2} which takes the pair ((u, v, w), (r, s, t)) to ((2r + st)u + rtv + rsw, −su − rv + 3t^{2}w)). To help keep in mind which variables are which, remember that this is supposed to be linear in (u, v, w) (the first variable), not necessarily in the second (r, s, t). Of course, a “variable” may be in fact a tuple of variables, since we are in a Cartesian category.

4.1. Definition of the term calculus. Explicit term formation rules for the (Cartesian) differential term logic are given in table 1. The term logic is built assuming that one has a set of primitive types, 𝕋, and that we have a supply Ω of function symbols each with

Γ, x: T ⊢ x: T Proj  {Γ ⊢ t′: T′ \atop Γ, x: T ⊢ t′: T′} Weak

{Γ ⊢ t′: T′ \atop Γ, (): 1 ⊢ t′: T′} Unit  {Γ, x: T_{1}, y: T_{2} ⊢ t′: T′ \atop Γ, (x, y): T_{1} × T_{2} ⊢ t′: T′} Pair

\begin{matrix}Γ ⊢ t_{1}: T_{1} & Γ ⊢ t_{2}: T_{2} \\ Γ ⊢ (t_{1}, t_{2}): T_{1} × T_{2} \end{matrix} Tuple Γ ⊢ (): 1 UnitTuple

\begin{matrix}Γ ⊢ t_{1}: T & Γ ⊢ t_{2}: T \\ Γ ⊢ t_{1} + t_{2}: T \end{matrix} Add  Γ ⊢ 0: T Zero

\begin{matrix}\{Γ ⊢ t_{i}: T_{i}\}_{i=1,..,n} & f ∈ Ω(T_{1}, ..., T_{n}; T) \\ Γ ⊢ f(t_{1}, ..., t_{n}): T \end{matrix} Fun

\begin{matrix}Γ, x: S ⊢ t: T & Γ ⊢ s: S & Γ ⊢ u: S \\ Γ ⊢ \frac{∂t}{∂x}(s) · u: T \end{matrix} Diff

\begin{matrix}Γ ⊢ t_{1}: T & Γ, x: T ⊢ t_{2}: T′ \\ Γ ⊢ t_{2}[t_{1}/x]: T′ \end{matrix} Cut

Table 1: Terms for Cartesian differential logic

a type in 𝕋^{∗} × T, we write f ∈ Ω(T_{1}, ..., T_{n}; T) to indicate a primitive function symbol of type ([T_{1}, ..., T_{n}], T). Here we assume that a context Γ consists of a bag of pattern type pairs. The patterns are created by pairing variables or the unit pattern. In a variable context it is always assumed no variable can occurs more than once (i.e. it is linear).

We shall feel free to use n-fold products: these should be interpreted as being constructed from the binary product using X_{1} × X_{2} × ... × X_{n} = (… (X_{1} × X_{2}) × …) × X_{n} where the association is to the left.

The differential operator \frac{∂t}{∂x} binds the variable x in t; we assume the usual rules on bound and free variables, which in general means it is best not to use the same variable both freely and bound in the same term, and to change bound variables as necessary to maintain that distinction.

The addition is assumed to be a commutative, associative operation with unit 0. Each type therefore contains a 0 and for the final type we have 0: 1 = (): 1

4.1.1. Substitution. The notion t[t′/x] is an explicit substitution term. These terms can be eliminated by the following rewrites which define substitution in this calculus:

[Subst.1] x[t/x] ⇒ t and y[t/x] ⇒ y if x, y are distinct variables;

658  R.F. BLUTE, J.R.B. COCKETT AND R.A.G. SEELY

[Subst.2] t[(t_{1}, t_{2})/(p_{1}, p_{2})] ⇒ (t[t_{1}/p_{1}])[t_{2}/p_{2}] and t[()/()] ⇒ t; [Subst.3] (t_{1}, t_{2})[t/p] ⇒ (t_{1}[t/p], t_{2}[t/p]) and ()[t/p] ⇒ (); [Subst.4] f(t_{1}, ..., t_{n})[t/p] ⇒ f(t_{1}[t/p], .., t_{n}[t/p]); [Subst.5] t_{1} + t_{2}[t/p] ⇒ t_{1}[p/t] + t_{2}[p/t] and 0[t/p] ⇒ 0; [Subst.6] (\frac{∂t′}{∂p′} (s) · u)[t/p] ⇒ \frac{∂t′[t/p]}{∂p′}(s[t/p]) · u[t/p]; 4.1.2. Equations of terms. There is an equality defined on the differential term logic, given by the smallest congruence satisfying the following identities.

[Dt.1] \frac{∂(t_{1} + t_{2})}{∂p}(s) · u = \frac{∂t_{1}}{∂p} (s) · u + \frac{∂t_{2}}{∂p} (s) · u and \frac{∂0}{∂p}(s) · u = 0;

[Dt.2] \frac{∂t}{∂p}(s) · (u_{1} + u_{2}) = \frac{∂t}{∂p}(s) · u_{1} + \frac{∂t}{∂p}(s) · u_{2} and \frac{∂t}{∂p}(s) · 0 = 0;

[Dt.3] \frac{∂x}{∂x}(s) · u = u, \frac{∂t}{∂(p, p′)}(s, s′) · (u, 0) = \frac{∂t[s′/p′]}{∂p}(s) · u and \frac{∂t}{∂(p, p′)}(s, s′) · (0, u′) =

\frac{∂t[s/p]}{∂p′}(s′) · u′;

[Dt.4] \frac{∂(t_{1}, t_{2})}{∂p}(s) · u = (\frac{∂t_{1}}{∂p} (s) · u, \frac{∂t_{1}}{∂p} (s) · u);

[Dt.5] \frac{∂t[t′/p′]}{∂p}(s) · u = \frac{∂t}{∂p′} (t′[s/p]) · (\frac{∂t′}{∂p} (s) · u) (This is the chain rule; we require that no variable of p occur in t);

[Dt.6] \frac{∂ \frac{∂t}{∂p}(s) · p′}{∂p′} (r) · u = \frac{∂t}{∂p}(s) · u.

[Dt.7] \frac{∂ \frac{∂t}{∂p_{1}} (s_{1}) · u_{1}}{∂p_{2}} (s_{2}) · u_{2} = \frac{∂ \frac{∂t}{∂p_{2}} (s_{2}) · u_{2}}{∂p_{1}} (s_{1}) · u_{1}

In all these identities we make the usual assumption that they are valid relative to the variable context consisting of those variables mentioned in the identity. 4.2. Basic properties of the term logic. The following lemma provides some basic equalities:

CARTESIAN DIFFERENTIAL CATEGORIES  659

4.2.1. Lemma.

(i) \frac{∂t}{∂()}() · () = 0; (ii) \frac{∂t}{∂p}(s) · u = 0 when no variable in p occurs in t; (iii) \frac{∂t}{∂(p,p′)}(s, s′) · (u, u′) = \frac{∂t}{∂p}(s) · u when no variable in p′ occurs in t and similarly

\frac{∂t}{∂(p,p′)}(s, s′) · (u, u′) = \frac{∂t}{∂p′} (s′) · u when t contains no variable from p; (iv) \frac{∂t}{∂(p,p′)}(s, s′) · (u, u′) = \frac{∂t[s′/p′]}{∂p}(s) · u + \frac{∂t[s/p]}{∂p′}(s′) · u′.

(v) \frac{∂t}{∂(p,p′)}(s, s′) · (u, u′) = \frac{∂t}{∂(p′,p)}((s′, s)) · (u′, u); Proof.

(i) \frac{∂t}{∂()}() · () = \frac{∂t}{∂()}(0) · 0 = 0 as () = 0. (ii)

\frac{∂t}{∂p}(s) · u = \frac{∂t[0/()]}{∂p}(s) · u = \frac{∂t}{∂()}(0) · \frac{∂0}{∂p}(s) · u = \frac{∂t}{∂()}(0) · 0 = 0

where after the substitution we use the chain rule and then the additivity of the differential twice.

(iii)

\frac{∂t}{∂(p, p′)}(s, s′) · (u, u′) = \frac{∂t}{∂(p, p′)}(s, s′) · (0, u′) + \frac{∂t}{∂(p, p′)}(s, s′) · (u, 0)
= \frac{∂t[s/p]}{∂p′}(s′) · u′ + \frac{∂t[s′/p′]}{∂p}(s) · u
= 0 + \frac{∂t[s′/p′]}{∂p}(s) · u = \frac{∂t}{∂p}(s) · u

as t contains no variables from p′. The second observation follows by symmetry. (iv)

\frac{∂t}{∂(p, p′)}(s, s′) · (u, u′) = \frac{∂t}{∂(p, p′)}(s, s′) · (u, 0) + \frac{∂t}{∂(p, p′)}(s, s′) · (0, u′)
= \frac{∂t[s′/p′]}{∂p}(s) · u + \frac{∂t[s/p]}{∂p′}(s′) · u′

(v) Immediate from the previous identity.

Notice that the differential of a map

X_{1} × ... × X_{n} [figure] Y_{1} × ... × Y_{m}; (x_{1}, ..., x_{n}) ↦ (t_{1}, .., t_{m})

can be simplified into the form:

\frac{∂(t_{1}, ..., t_{m})}{∂(x_{1}, ..., x_{n})}(x_{1}, ..., x_{n}) · (u_{1}, ..., u_{n})

= (\frac{∂t_{1}}{∂(x_{1}, ..., x_{n})}(x_{1}, ..., x_{n}) · u_{1}, ..., \frac{∂t_{m}}{∂(x_{1}, ..., x_{n})}(x_{1}, ..., x_{n}) · u_{n})
= (\frac{∂t_{1}}{∂x_{1}} (x_{1}) · u_{1} + ... + \frac{∂t_{1}}{∂x_{n}} (x_{n}) · u_{n}, ..., \frac{∂t_{m}}{∂x_{1}} (x_{1}) · u_{1} + ... + \frac{∂t_{m}}{∂x_{n}} (x_{n}) · u_{n})

If we were in a higher order setting we could rewrite this as a matrix calculation:

[ \begin{matrix}\frac{∂t_{1}}{∂x_{1}} (x_{1}) & ... & \frac{∂t_{1}}{∂x_{n}} (x_{n}) \\ ... & & ... \\ \frac{∂t_{m}}{∂x_{1}} (x_{1}) & ... & \frac{∂t_{m}}{∂x_{n}} (x_{n}) \end{matrix} ] [ \begin{matrix}u_{1} \\ ... \\ u_{n} \end{matrix} ]

where a tuple is interpreted as a column vector. This gives the Jacobi form of the differential in terms of the partial derivatives.

Our aim is now to prove the soundness and completeness of this term logic. To prove soundness we must translate the terms into the categorical maps and show that all the equalities hold. To establish completeness we shall build a classifying category for a differential theory.

4.3. Soundness. A differential theory consists of some types 𝔸, some function symbols Ω, and some equations E between terms of the same type in the same variable context. An interpretation of a differential theory into a Cartesian differential category consists of an assignment of the types in 𝔸 to objects, M: 𝔸 [figure] Obj𝕏 of the function symbols f ∈ Ω(X_{1}, ..., X_{n}; X) to maps M(f): M(X_{1}) × ... × M(X_{n}) [figure] M(X), so that under the extension of the interpretation to all terms, as defined below, all equations in E are satisfied.

The interpretation is extended to all terms as follows.

[TC.1] [ ; [x: A ⊢ x] ; ] = 1_{M(A)};

[TC.2] [ ; [p ⊢ 0] ; ] = 0;

[TC.3] [ ; [p ⊢ t_{1} + t_{2}] ; ] = [ ; [p ⊢ t_{1}] ; ] + [ ; [p ⊢ t_{2}] ; ];

[TC.4] [ ; [p ⊢ f(t_{1}, .., t_{n})] ; ] = [ ; [p ⊢ (t_{1}, .., t_{n})] ; ]M(f);

[TC.5] [ ; [p ⊢ (t_{1}, .., t_{n})] ; ] = ⟨[ ; [p ⊢ t_{1}] ; ], ..., [ ; [p ⊢ t_{n}] ; ]⟩;

[TC.6] [[(p, p′) ⊢ x]] = \{ \begin{matrix}π_{0} [ ; [p ⊢ x] ; ] & x ∈ p \\ π_{1} [[p′ ⊢ x]] & x ∈ p′ \end{matrix}

[TC.7] [ ; [p ⊢ \frac{∂t}{∂p′} (s) · u] ; ] = ⟨⟨[ ; [p ⊢ u] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[[(p′, p) ⊢ t]]].

Example: Consider the term

\begin{matrix}a: A, y: B, x: D ⊢ f(x, y): C & a: A, y: B ⊢ g(a, y): A & a: A, y: B ⊢ a: A \\ a: A, y: B ⊢ \frac{∂f(x,y)}{∂x}(g(a, y)) · a \end{matrix}

Note that

[ ; [((a, y), x) ⊢ f(x, y)] ; ] = [ ; [((a, y), x) ⊢ (x, y)] ; ]M(f)
= ⟨[ ; [((a, y), x) ⊢ x] ; ], [ ; [((a, y), y) ⊢ y] ; ]⟩M(f)
= ⟨π_{1}, π_{0}π_{1}⟩M(f)

and so

[ [(a, y) ⊢ \frac{∂f(x, y)}{∂x}(g(a, y)) · a] ]

= ⟨⟨[ ; [(a, y) ⊢ a] ; ], 0⟩, ⟨[ ; [(a, y) ⊢ g(a, y)] ; ], 1⟩⟩D_{×}[[ ; [((a, y), x) ⊢ f(x, y)] ; ]]
= ⟨⟨π_{0}, 0⟩, ⟨M(g), 1⟩⟩D_{×}[⟨π_{1}, π_{0}π_{1}⟩M(f)]

The remainder of this section is given to the proof of the following proposition.

4.3.1. Proposition. The interpretation of terms into a Cartesian differential category is sound.

The translation of the Cartesian terms is standard. We shall therefore concentrate on the soundness of the translation of the differential terms. To establish the soundness we need to check the identities [Dt.1-7].

[Dt.1]

[ ; [p ⊢ \frac{∂(t_{1} + t_{2})}{∂p′}(s) · u] ; ] = ⟨⟨[ ; [p ⊢ u] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[[(p′, p) ⊢ t_{1} + t_{2}]]]
= ⟨⟨[ ; [p ⊢ u] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩(D_{×}[[[(p′, p) ⊢ t_{1}]]]D_{×}[[[(p′, p) ⊢ t_{2}]]])
= ⟨⟨[ ; [p ⊢ u] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[[(p′, p) ⊢ t_{1}]]]

+ ⟨⟨[ ; [p ⊢ u] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[[(p′, p) ⊢ t_{2}]]]

= [ ; [p ⊢ \frac{∂t_{1}}{∂p′} (s) · u] ; ] + [ ; [p ⊢ \frac{∂t_{2}}{∂p′} (s) · u] ; ]
= [ ; [p ⊢ \frac{∂t_{1}}{∂p′} (s) · u + \frac{∂t_{2}}{∂p′} (s) · u] ; ]
[ ; [p ⊢ \frac{∂0}{∂p′} (s) · u] ; ] = ⟨⟨[ ; [p ⊢ u] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[[(p′, p) ⊢ 0]]]
= ⟨⟨[ ; [p ⊢ u] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[0]

[Dt.2]

[ ; [p ⊢ \frac{∂t}{∂p′} (s) · (u_{1} + u_{2})] ; ] = ⟨⟨[ ; [p ⊢ u_{1} + u_{2}] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[[(p′, p) ⊢ t]]]
= ⟨⟨[ ; [p ⊢ u_{1}] ; ] + [ ; [p ⊢ u_{2}] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[[(p′, p) ⊢ t]]]
= ⟨⟨[ ; [p ⊢ u_{1}] ; ], 0⟩ + ⟨[ ; [p ⊢ u_{2}] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[[(p′, p) ⊢ t]]]
= ⟨⟨[ ; [p ⊢ u_{1}] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[[(p′, p) ⊢ t]]]

+ ⟨⟨[ ; [p ⊢ u_{2}] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[[(p′, p) ⊢ t]]]

= [ ; [p ⊢ \frac{∂t}{∂p′} (s) · u_{1} + \frac{∂t}{∂p′} (s) · u_{2}] ; ]
[ ; [p ⊢ \frac{∂t}{∂p′} (s) · 0] ; ] = ⟨⟨[ ; [p ⊢ 0] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[[(p′, p) ⊢ t]]]
= ⟨⟨0, 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[[(p′, p) ⊢ t]]]
= ⟨0, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[[(p′, p) ⊢ t]]]
= 0

[Dt.3]

[ ; [p ⊢ \frac{∂x}{∂x}(s) · u] ; ] = ⟨⟨[ ; [p ⊢ u] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[[ ; [(x, p) ⊢ x] ; ]]
= ⟨⟨[ ; [p ⊢ u] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩D_{×}[π_{0}]
= ⟨⟨[ ; [p ⊢ u] ; ], 0⟩, ⟨[ ; [p ⊢ s] ; ], 1⟩⟩π_{0}π_{0}]
= [ ; [p ⊢ u] ; ]

[ [q ⊢ \frac{∂t}{∂(p, p′)}(s, s′) · (u, 0)] ]

= ⟨⟨[ ; [q ⊢ (u, 0)] ; ], 0⟩, ⟨[[q ⊢ (s, s′)]] , 1⟩⟩D_{×}[[[((p, p′), q) ⊢ t]]]
= ⟨⟨⟨[ ; [q ⊢ u] ; ], 0⟩, 0⟩, ⟨⟨[ ; [q ⊢ s] ; ], [[q ⊢ s′]]⟩, 1⟩⟩D_{×}[[[((p, p′), q) ⊢ t]]]
= ⟨⟨[ ; [q ⊢ u] ; ], ⟨0, 0⟩⟩, ⟨[ ; [q ⊢ s] ; ], ⟨[[q ⊢ s′]] , 1⟩⟩⟩D_{×}[[[(p, (p′, q)) ⊢ t]]]
= ⟨⟨0, ⟨[ ; [q ⊢ u] ; ], 0⟩⟩, ⟨[[q ⊢ s′]] , ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟩D_{×}[[[(p′, (p, q)) ⊢ t]]]
= ⟨⟨⟨0, 1⟩D_{×}[[[q ⊢ s′]]], ⟨[ ; [q ⊢ u] ; ], 0⟩⟩, ⟨[[q ⊢ s′]] , ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟩D_{×}[[[(p′, (p, q)) ⊢ t]]]
= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟨⟨⟨π_{0}π_{1}, π_{1}π_{1}⟩D_{×}[[[q ⊢ s′]]], π_{0}⟩, π_{1}⟨π_{1} [[q ⊢ s′]] , 1⟩⟩

D_{×}[[[(p′, (p, q)) ⊢ t]]]

= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟨⟨D_{×}[π_{1} [[q ⊢ s′]]], π_{0}⟩, π_{1}⟨π_{1} [[q ⊢ s′]] , 1⟩⟩

D_{×}[[[(p′, (p, q)) ⊢ t]]]

= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟨D_{×}[⟨π_{1} [[q ⊢ s′]] , 1⟩], π_{1}⟨π_{1} [[q ⊢ s′]] , 1⟩⟩

D_{×}[[[(p′, (p, q)) ⊢ t]]]

= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟨D_{×}[[[(p, q) ⊢ (s′, (p, q))]]], π_{1} [[(p, q) ⊢ (s′, (p, q))]]⟩

D_{×}[[[(p′, (p, q)) ⊢ t]]]

= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[[[(p, q) ⊢ (s′, (p, q))]] [[(p′, (p, q)) ⊢ t]]]
= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[[[(p, q) ⊢ t[s′/p′]]]] = [ ; [q ⊢ \frac{∂t[s′/p′]}{∂p}(s) · u] ; ]

[ [q ⊢ \frac{∂t}{∂(p, p′)}(s, s′) · (0, u′)] ]

= ⟨⟨[[q ⊢ (0, u′)]] , 0⟩, ⟨[[q ⊢ (s, s′)]] , 1⟩⟩D_{×}[[[((p, p′), q) ⊢ t]]]
= ⟨⟨⟨0, [[q ⊢ u′]]⟩, 0⟩, ⟨⟨[ ; [q ⊢ s] ; ], [[q ⊢ s′]]⟩, 1⟩⟩D_{×}[[[((p, p′), q) ⊢ t]]]
= ⟨⟨0, ⟨[[q ⊢ u′]] , 0⟩⟩, ⟨[[q ⊢ s′]] , ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟩D_{×}[[[(p, (p′, q)) ⊢ t]]]
= ⟨⟨⟨0, 1⟩D_{×}[[ ; [q ⊢ s] ; ]], ⟨[[q ⊢ u′]] , 0⟩⟩, ⟨[[q ⊢ s′]] , ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟩D_{×}[[[(p, (p′, q)) ⊢ t]]]
= ⟨⟨[[q ⊢ u′]] , 0⟩, ⟨[[q ⊢ s′]] , 1⟩⟩⟨⟨⟨π_{0}π_{1}, π_{1}π_{1}⟩D_{×}[[ ; [q ⊢ s] ; ]], π_{0}⟩, π_{1}⟨π_{1} [ ; [q ⊢ s] ; ], 1⟩⟩

D_{×}[[[(p, (p′, q)) ⊢ t]]]

= ⟨⟨[[q ⊢ u′]] , 0⟩, ⟨[[q ⊢ s′]] , 1⟩⟩⟨⟨D_{×}[π_{1} [ ; [q ⊢ s] ; ]], π_{0}⟩, π_{1}⟨π_{1} [ ; [q ⊢ s] ; ], 1⟩⟩

D_{×}[[[(p, (p′, q)) ⊢ t]]]

= ⟨⟨[[q ⊢ u′]] , 0⟩, ⟨[[q ⊢ s′]] , 1⟩⟩⟨D_{×}[⟨π_{1} [[q ⊢ s′]] , 1⟩], π_{1}⟨π_{1} [[q ⊢ s′]] , 1⟩⟩

D_{×}[[[(p, (p′, q)) ⊢ t]]]

= ⟨⟨[[q ⊢ u′]] , 0⟩, ⟨[[q ⊢ s′]] , 1⟩⟩⟨D_{×}[[[(p′, q) ⊢ (s, (p′, q))]]], π_{1} [[(p′, q) ⊢ (s, (p′, q))]]⟩

D_{×}[[[(p, (p′, q)) ⊢ t]]]

= ⟨⟨[[q ⊢ u′]] , 0⟩, ⟨[[q ⊢ s′]] , 1⟩⟩D_{×}[[[(p′, q) ⊢ (s, (p′, q))]] [[(p, (p′, q)) ⊢ t]]]
= ⟨⟨[[q ⊢ u′]] , 0⟩, ⟨[[q ⊢ s′]] , 1⟩⟩D_{×}[[[(p′, q) ⊢ t[s/p]]]] = [ ; [q ⊢ \frac{∂t[s/p]}{∂p′}(s′) · u′] ; ]

[Dt.4]

[ ; [q ⊢ \frac{∂(t_{1}, t_{2})}{∂p}(s) · u] ; ] = ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[[ ; [(p, q) ⊢ (t_{1}, t_{2})] ; ]]
= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[⟨[ ; [(p, q) ⊢ t_{1}] ; ], [ ; [(p, q) ⊢ t_{2}] ; ]⟩]
= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟨D_{×}[⟨[ ; [(p, q) ⊢ t_{1}] ; ]], D_{×}[[ ; [(p, q) ⊢ t_{2}] ; ]]⟩
= ⟨⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[⟨[ ; [(p, q) ⊢ t_{1}] ; ]],

⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[[ ; [(p, q) ⊢ t_{2}] ; ]]⟩

= [ ; [q ⊢ (\frac{∂t_{1}}{∂p} (s) · u, \frac{∂t_{1}}{∂p} (s) · u)] ; ]

[Dt.5] For the chain rule no variable of p can occur in t:

[ [q ⊢ \frac{∂t[t′/p′]}{∂p}(s) · u] ]

= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[[[(p, q) ⊢ t[t′/p′]]]]
= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[[[(p, q) ⊢ (t′, (p, q))]] [[(p′, (p, q)) ⊢ t]]]
= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟨D_{×}[[[(p, q) ⊢ (t′, (p, q))]]], π_{1} [[(p, q) ⊢ (t′, p, q)]]⟩

D_{×}[[[(p′, (p, q)) ⊢ t]]]

= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟨D_{×}[[[(p, q) ⊢ (t′, (p, q))]]], π_{1} [[(p, q) ⊢ (t′, (p, q))]]⟩

D_{×}[(1 × π_{1}) [[(p′, q) ⊢ t]]]

= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟨⟨D_{×}[[[(p, q) ⊢ t′]]], π_{0}⟩, π_{1}⟨[[(p, q) ⊢ t′]] , 1⟩⟩

((1 × π_{1}) × (1 × π_{1}))D_{×}[[[(p′, q) ⊢ t]]]

= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟨⟨D_{×}[[[(p, q) ⊢ t′]]], π_{0}π_{1}⟩, π_{1}⟨[[(p, q) ⊢ t′]] , π_{1}⟩⟩

D_{×}[[[(p′, q) ⊢ t]]]

= ⟨⟨⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[[[(p, q) ⊢ t′]]], 0⟩, ⟨⟨[ ; [q ⊢ s] ; ], 1⟩ [[(p, q) ⊢ t′]] , 1⟩⟩

D_{×}[[[(p′, q) ⊢ t]]]

= ⟨⟨⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[[[(p, q) ⊢ t′]]], 0⟩, ⟨[ ; [q ⊢ (s, q)] ; ][[(p, q) ⊢ t′]] , 1⟩⟩

D_{×}[[[(p′, q) ⊢ t]]]

= ⟨⟨⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[[[(p, q) ⊢ t′]]], 0⟩, ⟨[[q ⊢ t′[s/p]]] , 1⟩⟩D_{×}[[[(p′, q) ⊢ t]]]
= ⟨⟨[ ; [q ⊢ \frac{∂t′}{∂p} (s) · u] ; ] , 0⟩, ⟨[[q ⊢ t′[s/p]]] , 1⟩⟩D_{×}[[[(p′, q) ⊢ t]]]
= [ ; [q ⊢ \frac{∂t}{∂p′} (t′[s/p]) · \frac{∂t′}{∂p} (s) · u] ; ]

[Dt.6]

[ [q ⊢ \frac{∂ \frac{∂t}{∂p}(s) · p′}{∂p′} (s) · u] ]

= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[[ ; [(p′, q) ⊢ \frac{∂t}{∂p}(s) · p′] ; ]]
= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[⟨⟨[[(p′, q) ⊢ p′]] , 0⟩, ⟨[[(p′, q) ⊢ s]] , 1⟩⟩D_{×}[[[(p, (p′, q)) ⊢ t]]]]
= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[⟨⟨π_{0}, 0⟩, ⟨[[(p′, q) ⊢ s]] , 1⟩⟩((1 × π_{1}) × (1 × π_{1}))D_{×}[[ ; [(p, q) ⊢ t] ; ]]]
= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[⟨⟨π_{0}, 0⟩, ⟨π_{1} [ ; [q ⊢ s] ; ], π_{1}⟩⟩D_{×}[[ ; [(p, q) ⊢ t] ; ]]]
= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟨⟨⟨π_{0}π_{0}, 0⟩, ⟨(π_{1} × π_{1})D_{×}[[ ; [q ⊢ s] ; ]], π_{0}π_{1}⟩⟩,

π_{1}⟨⟨π_{0}, 0⟩, ⟨π_{1} [ ; [q ⊢ s] ; ], π_{1}⟩⟩⟩D_{×}[D_{×}[[ ; [(p, q) ⊢ t] ; ]]]

= ⟨⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨⟨0, 1⟩D_{×}[[ ; [q ⊢ s] ; ]], 0⟩⟩, ⟨⟨[ ; [q ⊢ s] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟩D_{×}[D_{×}[[ ; [(p, q) ⊢ t] ; ]]]
= ⟨⟨⟨[ ; [q ⊢ u] ; ], 0⟩, 0⟩, ⟨⟨[ ; [q ⊢ s] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟩D_{×}[D_{×}[[ ; [(p, q) ⊢ t] ; ]]]
= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨⟨[ ; [q ⊢ s] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟩(⟨1, 0⟩ × 1)D_{×}[D_{×}[[ ; [(p, q) ⊢ t] ; ]]]
= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨⟨[ ; [q ⊢ s] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩⟩(1 × π_{1})D_{×}[[ ; [(p, q) ⊢ t] ; ]]
= ⟨⟨[ ; [q ⊢ u] ; ], 0⟩, ⟨[ ; [q ⊢ s] ; ], 1⟩⟩D_{×}[[ ; [(p, q) ⊢ t] ; ]]
= [ ; [q ⊢ \frac{∂t}{∂p}(s) · u] ; ]

[Dt.7]

[ [p ⊢ \frac{∂ \frac{∂t}{∂x_{1}} (s_{1}) · u_{1}}{∂x_{2}} (s_{2}) · u_{2}] ]

= ⟨⟨[ ; [p ⊢ u_{2}] ; ], 0⟩, ⟨[ ; [p ⊢ s_{2}] ; ], 1⟩⟩D_{×}[[ ; [(x_{2}, p) ⊢ \frac{∂t}{∂x_{1}} (s_{1}) · u_{1}] ; ]]
= ⟨⟨[ ; [p ⊢ u_{2}] ; ], 0⟩, ⟨[ ; [p ⊢ s_{2}] ; ], 1⟩⟩D_{×}[⟨⟨[ ; [(x_{2}, p) ⊢ u_{1}] ; ], 0⟩, ⟨[ ; [(x_{2}, p) ⊢ s_{1}] ; ], 1⟩⟩

⟨⟨π_{1} [ ; [(x_{2}, p) ⊢ u_{1}] ; ], 0⟩, ⟨π_{1} [ ; [(x_{2}, p) ⊢ s_{1}] ; ], π_{1}⟩⟩⟩D_{×}[[ ; [(x_{1}, (x_{2}, p)) ⊢ t] ; ]]]

= ⟨⟨[ ; [p ⊢ u_{2}] ; ], 0⟩, ⟨[ ; [p ⊢ s_{2}] ; ], 1⟩⟩⟨⟨⟨D_{×}[[ ; [(x_{2}, p) ⊢ u_{1}] ; ]], 0⟩, ⟨D_{×}[[ ; [(x_{2}, p) ⊢ s_{1}] ; ]], π_{0}⟩⟩,

⟨⟨π_{1} [ ; [(x_{2}, p ⊢ u_{1}] ; ], 0⟩, ⟨π_{1} [ ; [(x_{2}, p) ⊢ s_{1}] ; ], π_{1}⟩⟩⟩D_{×}[D_{×}[[ ; [(x_{1}, (x_{2}, p)) ⊢ t] ; ]]]

= ⟨⟨[ ; [p ⊢ u_{2}] ; ], 0⟩, ⟨[ ; [p ⊢ s_{2}] ; ], 1⟩⟩⟨⟨⟨D_{×}[π_{1} [ ; [p ⊢ u_{1}] ; ]], 0⟩, ⟨D_{×}[π_{1} [ ; [p ⊢ s_{1}] ; ]], π_{0}⟩⟩,

⟨⟨π_{1}π_{1} [ ; [p ⊢ u_{1}] ; ], 0⟩, ⟨π_{1}π_{1} [ ; [p ⊢ s_{1}] ; ], π_{1}⟩⟩⟩D_{×}[D_{×}[[ ; [(x_{1}, (x_{2}, p)) ⊢ t] ; ]]]

= ⟨⟨[ ; [p ⊢ u_{2}] ; ], 0⟩, ⟨[ ; [p ⊢ s_{2}] ; ], 1⟩⟩⟨⟨⟨⟨π_{0}π_{1}, π_{1}π_{1}⟩D_{×}[[ ; [p ⊢ u_{1}] ; ]], 0⟩, ⟨⟨π_{0}π_{1}, π_{1}π_{1}⟩D_{×}[[ ; [p ⊢ s_{1}] ; ]], π_{0}⟩⟩,

⟨⟨π_{1}π_{1} [ ; [p ⊢ u_{1}] ; ], 0⟩, ⟨π_{1}π_{1} [ ; [p ⊢ s_{1}] ; ], π_{1}⟩⟩⟩D_{×}[D_{×}[[ ; [(x_{1}, (x_{2}, p)) ⊢ t] ; ]]]

= ⟨⟨⟨0, 1⟩D_{×}[[ ; [p ⊢ u_{1}] ; ]], 0⟩, ⟨⟨0, 1⟩D_{×}[[ ; [p ⊢ s_{1}] ; ]], ⟨[ ; [p ⊢ u_{1}] ; ], 0⟩⟩⟩,

⟨⟨[ ; [p ⊢ u_{2}] ; ], 0⟩, ⟨[ ; [p ⊢ s_{1}] ; ], 0⟩, ⟨[ ; [p ⊢ s_{1}] ; ], ⟨[ ; [p ⊢ s_{2}] ; ], 1⟩⟩⟩D_{×}[D_{×}[[ ; [(x_{1}, (x_{2}, p)) ⊢ t] ; ]]]

= ⟨⟨⟨0, 0⟩, ⟨0, ⟨[ ; [p ⊢ u_{2}] ; ], 0⟩⟩⟩, ⟨⟨[ ; [p ⊢ u_{1}] ; ], 0⟩, ⟨[ ; [p ⊢ s_{1}] ; ], ⟨[ ; [p ⊢ s_{2}] ; ], 1⟩⟩⟩⟩

D_{×}[D_{×}[[ ; [(x_{1}, (x_{2}, p)) ⊢ t] ; ]]]

= ⟨⟨⟨0, 0⟩, ⟨0, ⟨[ ; [p ⊢ u_{1}] ; ], 0⟩⟩⟩, ⟨⟨[ ; [p ⊢ u_{2}] ; ], 0⟩, ⟨[ ; [p ⊢ s_{1}] ; ], ⟨[ ; [p ⊢ s_{2}] ; ], 1⟩⟩⟩⟩

D_{×}[D_{×}[[ ; [(x_{1}, (x_{2}, p)) ⊢ t] ; ]]] by [CD.7′]

= ⟨⟨⟨0, 0⟩, ⟨0, ⟨[ ; [p ⊢ u_{1}] ; ], 0⟩⟩⟩, ⟨⟨[ ; [p ⊢ u_{2}] ; ], 0⟩, ⟨[ ; [p ⊢ s_{1}] ; ], ⟨[ ; [p ⊢ s_{2}] ; ], 1⟩⟩⟩⟩

D_{×}[D_{×}[⟨π_{1}π_{0}, ⟨π_{0}π_{0}, π_{1}π_{1}⟩⟩ [ ; [(x_{2}, (x_{1}, p)) ⊢ t] ; ]]]

= ⟨⟨⟨0, 0⟩, ⟨0, ⟨[ ; [p ⊢ u_{1}] ; ], 0⟩⟩⟩, ⟨⟨[ ; [p ⊢ u_{2}] ; ], 0⟩, ⟨[ ; [p ⊢ s_{1}] ; ], ⟨[ ; [p ⊢ s_{2}] ; ], 1⟩⟩⟩⟩

D_{×}[D_{×}[[ ; [(x_{1}, (x_{2}, p)) ⊢ t] ; ]]]

= [ ; [p ⊢ \frac{∂ \frac{∂t}{∂x_{2}} (s_{2}) · u_{2}}{∂x_{1}} (s_{1}) · u_{1}] ; ]

where the second-last equation uses the fact that if f is linear (as all projections and pairings of linears are), then D_{×}[fg] = (f × f)D_{×}[g], and so D_{×}[D_{×}[fg]] = (f × f × f × f)D_{×}[D_{×}[g]].

4.4. Completeness. For completeness we form the classifying Cartesian differential category of a theory. In general here we can permit arbitrary equations. A map T_{1} [figure] T_{2} in the classifying category corresponds to a sequent with one type on the left hand side:

p: T_{1} ⊢ t: T_{2}

we shall write this in the suggestive notation:

p ↦ t: T_{1} [figure] T_{2}

CARTESIAN DIFFERENTIAL CATEGORIES  667

or even p ↦ t when the types may be inferred from the context. Objects: Products of primitive types. Maps: p ↦ t: T_{1} [figure] T_{2} as above up to provable equality; Composition: Uses substitution: (p ↦ t)(p′ ↦ t′) = p ↦ t′[t/p′]; Differential: D_{×}[p ↦ t: X [figure] Y] = (p′, p) ↦ \frac{∂t}{∂p}(p) · p′: X × X [figure] Y.

It is now straightforward to verify that this is a Cartesian differential category. That it is a category is clear, so we only need to verify the axioms [CD.1-7]. [CD.1,2] are obvious. [CD.3]: D_{×}[1] = π_{0} follows from

D_{×}[x ↦ x] = (x′, x) ↦ \frac{∂x}{∂x}(x) · x′
= (x′, x) ↦ x′ = π_{0}

D_{×}[π_{1}] = π_{0}π_{1} follows from

D_{×}[(x, y) ↦ y] = ((x′, y′), (x, y)) ↦ \frac{∂y}{∂(x, y)}(x, y) · (x′, y′)
= ((x′, y′), (x, y)) ↦ \frac{∂y}{∂(x, y)}(x, y) · (x′, 0) + \frac{∂y}{∂(x, y)}(x, y) · (0, y′)
= ((x′, y′), (x, y)) ↦ \frac{∂y}{∂x}(x) · x′ + \frac{∂y}{∂y} (y) · y′
= ((x′, y′), (x, y)) ↦ 0 + y′ = y′ = π_{0}π_{1}

(and D_{×}[π_{0}] = π_{0}π_{0} similarly). [CD.4]:

D_{×}[⟨f, g⟩] = D_{×}[p ↦ (f, g)]
= (p′, p) ↦ \frac{∂(f, g)}{∂p}(p) · p′
= (p′, p) ↦ (\frac{∂f}{∂p} (p) · p′, \frac{∂g}{∂p}(p) · p′)
= ⟨D_{×}[f], D_{×}[g]⟩

[CD.5]:

D_{×}[(p ↦ t)(q ↦ s)] = D_{×}[p ↦ s[t/q]]
= (p′, p) ↦ \frac{∂s[t/q]}{∂p}(p) · p′
= (p′, p) ↦ \frac{∂s}{∂q}(t) · (\frac{∂t}{∂p}(p) · p′) (chain rule)
= ((p′, p) ↦ (\frac{∂t}{∂p}(p) · p′, t)) ((q′, q) ↦ \frac{∂s}{∂q}(q) · q′)
= ⟨D_{×}[p ↦ t], π_{1}(p ↦ t)⟩D_{×}[q ↦ s]

[CD.6]:

(⟨1, 0⟩ × 1)D_{×}[D_{×}[p ↦ f]] = (⟨1, 0⟩ × 1)D_{×}[(q, p) ↦ \frac{∂f}{∂p} (p) · q]
= (⟨1, 0⟩ × 1)(((q′, p′), (q, p)) ↦ \frac{∂ \frac{∂f}{∂p}(p) · q}{∂(q, p)} (q, p) · (q′, p′))

= (q′, (q, p)) ↦ \frac{∂ \frac{∂f}{∂p}(p) · q}{∂(q, p)} (q, p) · (q′, 0)

= (q′, (q, p)) ↦ \frac{∂ \frac{∂f}{∂p}(p) · q}{∂q} (q) · q′
= (q′, (q, p)) ↦ \frac{∂f}{∂p} (p) · q′
= (1 × π_{1})(q′, p) ↦ \frac{∂f}{∂p} (p) · q′
= (1 × π_{1})D_{×}[p ↦ f]

[CD.7]:

We actually prove [CD.7′]:

⟨⟨⟨0, 0⟩, ⟨h, 0⟩⟩, ⟨⟨0, g⟩, ⟨k_{1}, k_{2}⟩⟩⟩D_{×}[D_{×}[(x_{1}, x_{2}) ↦ f(x_{1}, x_{2})]]

= z ↦ (((0, 0), (h(z), 0)), ((0, g(z)), (k_{1}(z), k_{2}(z))))D_{×}[D_{×}[(x_{1}, x_{2}) ↦ f(x_{1}, x_{2})]]
= z ↦ (((0, 0), (h(z), 0)), ((0, g(z)), (k_{1}(z), k_{2}(z))))

D_{×}[((u_{1}, u_{2}), (s_{1}, s_{2})) ↦ \frac{∂f(x_{1}, x_{2})}{∂(x_{1}, x_{2})}(s_{1}, s_{2}) · (u_{1}, u_{2})]

= z ↦ (((0, 0), (h(z), 0)), ((0, g(z)), (k_{1}(z), k_{2}(z))))

(((v_{1}, v_{2}), (v_{3}, v_{4})), ((r_{1}, r_{2}), (r_{3}, r_{4}))) ↦

\frac{∂ (\frac{∂f(x_{1},x_{2})}{∂(x_{1},x_{2})}(s_{1}, s_{2}) · (u_{1}, u_{2}))}{∂((u_{1}, u_{2}), (s_{1}, s_{2}))}((r_{1}, r_{2}), (r_{3}, r_{4})) · ((v_{1}, v_{2}), (v_{3}, v_{4}))

= z ↦ \frac{∂ (\frac{∂f(x_{1},x_{2})}{∂(x_{1},x_{2})}(s_{1}, s_{2}) · (u_{1}, u_{2}))}{∂((u_{1}, u_{2}), (s_{1}, s_{2}))}(((0, g(z)), (k_{1}(z), k_{2}(z)))) · ((0, 0), (h(z), 0))

= z ↦ \frac{∂ (\frac{∂f(x_{1},x_{2})}{∂(x_{1},x_{2})}(s_{1}, s_{2}) · (0, g(z)))}{∂(s_{1}, s_{2})}(k_{1}(z), k_{2}(z)) · (h(z), 0)

= z ↦ \frac{∂ (\frac{∂f(x_{1},x_{2})}{∂(x_{1},x_{2})}(s_{1}, k_{2}(z)) · (0, g(z)))}{∂s_{1}}(k_{1}(z)) · h(z)

= z ↦ \frac{∂ (\frac{∂f(s_{1},x_{2})}{∂x_{2}}(k_{2}(z)) · g(z))}{∂s_{1}}(k_{1}(z)) · h(z)

= z ↦ \frac{∂ (\frac{∂f(x_{1},x_{2})}{∂x_{2}}(k_{2}(z)) · g(z))}{∂x_{1}}(k_{1}(z)) · h(z)

= z ↦ \frac{∂ (\frac{∂f(x_{1},x_{2})}{∂x_{1}}(k_{1}(z)) · h(z))}{∂x_{2}}(k_{2}(z)) · g(z)
= …
= ⟨0, ⟨0, g⟩⟩⟨⟨h, 0⟩, k⟩D_{×}[D_{×}[(x_{1}, x_{2}) ↦ f(x_{1}, x_{2})]]

This shows that the theory is complete. We can summarize this as follows. For a differential theory 𝕋, let Mod_{𝕋} be the models of 𝕋 in a Cartesian differential category 𝕏. Let D(𝕋) be the classifying Cartesian differential category, as constructed above. Then:

4.4.1. Proposition. There is a bijection between Cartesian differential functors D(𝕋) [figure] 𝕏 and models in Mod_{𝕋}.

4.5. Slice categories. As a corollary of the completeness of the term logic we obtain the result that a slice of a Cartesian differential category is again a Cartesian differential category, since it is easy to observe that the proof of completeness above did not depend on all variables being explicitly mentioned (in other words, there could be other variables acting as “parameters” in the proof). Translating this observation to the categorical context, this says that we could be acting in a simple slice of a Cartesian differential category, and so such slices must be Cartesian differential categories themselves. Let’s look at this in more detail.

Partial differentials in a Cartesian differential category are obtained rather simplistically from the full differentials by “ignoring” (or “zeroing out”) the components on which the differential is not required. Specifically, we define D_{×,0}, D_{×,1} as follows:

{A × B [figure: f] C \atop A × (A × B) [figure: (⟨1,0⟩×1)D_{×}[f]] C} D_{×,0}

{A × B [figure: f] C \atop B × (A × B) [figure: (⟨0,1⟩×1)D_{×}[f]] C} D_{×,1}

We first observe an obvious but rather important fact:

4.5.1. Lemma. In any Cartesian differential category the full differential can be reconstructed from its partial derivatives:

D_{×}[f] = (π_{0} × 1)D_{×,0}[f] + (π_{1} × 1)D_{×,1}[f].

Proof. We have the following calculation using the fact that the derivative is additive in its first argument:

(π_{0} × 1)D_{×,0}[f] + (π_{1} × 1)D_{×,1}[f] = (π_{0} × 1)(⟨1, 0⟩ × 1)D_{×}[f] + (π_{1} × 1)(⟨0, 1⟩ × 1)D_{×}[f]
= ⟨⟨π_{0}π_{0}, 0⟩, π_{1}⟩D_{×}[f] + ⟨⟨0, π_{0}π_{1}⟩, π_{1}⟩D_{×}[f]
= ⟨⟨π_{0}π_{0}, π_{0}π_{1}⟩, π_{1}⟩D_{×}[f] = D_{×}[f]

This allows us to decompose differentials into the partial components as is usual in elementary calculus for many dimensional functions. The importance of partial differentials, however, comes from the following fundamental observation, which is a direct consequence of the proof of the completeness theorem (as pointed out above).

4.5.2. Corollary. If 𝕏 is a Cartesian differential category then 𝕏[A] is a Cartesian differential category with respect to the partial derivative D_{×}^{[A]}[f] = c′_{×}D_{×,1}[f], where c′_{×} = ⟨π_{1}π_{0}, ⟨π_{0}, π_{1}π_{1}⟩⟩.

4.5.3. Remark. It might be amusing to examine the representation of the partial derivative in the term calculus. Given f: A × B [figure] C, and variables z of type A and x of type B, then a literal translation of the partial D_{×}^{[A]}[f]: B × B [figure] C (over A) would be the term (with free variables u, s ∈ B and a parameter a ∈ A)

\frac{∂^{[A]}f(a, x)}{∂x}(s) · u = \frac{∂f(z, x)}{∂(z, x)}(a, s) · (0, u)

where f(a, x) is f(z, x)[a/z]. However, this is equal to \frac{∂f(a,x)}{∂x}(s) · u, so that (as expected) the partial derivative is just an ordinary differential term with a parameter a ∈ A. This is not surprising, since terms with a parameter a ∈ A may be thought of as terms in the slice over A.

We illustrate this with a simple example. Take f(z, x) = z^{2}e^{3x}: IR × IR [figure] IR. We may also think of this as a map IR [figure] IR over IR, in which case we shall replace the z with a parameter a. The full derivative D_{×}[f]: IR^{4} [figure] IR is given by

D_{×}[f]: = ⟨⟨b, u⟩, ⟨a, s⟩⟩ ↦ \frac{∂z^{2}e^{3x}}{∂(z, x)}(a, s) · (b, u) = 2abe^{3s} + 3a^{2}ue^{3s}

and the partial derivative D_{×}^{A}[f]: IR^{2} [figure] IR (over IR, i.e. with a parameter a ∈ IR) is given by

D_{×}^{A}[f]: = ⟨u, s⟩ ↦ \frac{∂^{[A]}a^{2}e^{3x}}{∂x} (s) · u = 3a^{2}ue^{3s}

So we see that

\frac{∂^{[A]}a^{2}e^{3x}}{∂x} (s) · u = \frac{∂z^{2}e^{3x}}{∂(z, x)}(a, s) · (0, u) = 3a^{2}ue^{3s} = \frac{∂a^{2}e^{3x}}{∂x} (s) · u

References

[BCS 96] R.F. Blute, J.R.B. Cockett, R.A.G. Seely. “ ! and ? : Storage as tensorial strength”. Mathematical Structures in Computer Science 6 (1996), 313–351.

[BCST 97] R.F. Blute, J.R.B. Cockett, R.A.G. Seely, T. Trimble Natural deduction and coherence for weakly distributive categories. Journal of Pure and Applied Algebra 113 (1996) 229–296.

[BCS 06] R.F. Blute, J.R.B. Cockett, R.A.G. Seely. “Differential Categories”. Mathematical Structures in Computer Science 16 (2006), 1049–1083.

[Ehrhard 01] T. Ehrhard. On Köthe sequence spaces and linear logic. Mathematical Structures in Computer Science 12 (2001), 579-623.

[Ehrhard 04] T. Ehrhard Finiteness spaces. Mathematical Structures in Computer Science, 2004.

[Ehrhard & Regnier 05] T. Ehrhard, L. Regnier Differential interaction nets Workshop on Logic, Language, Information and Computation (WoLLIC), invited paper. Electronic Notes in Theoretical Computer Science, vol. 123, March 2005, Elsevier.

[Ehrhard & Regnier 03] T. Ehrhard, L. Regnier The differential λ-calculus. Theoretical Computer Science 309(1-3) (2003) 1-41.

[M 71] S. Mac Lane. Categories for the Working Mathematician. Graduate Texts in Mathematics, Springer-Verlag, Berlin, Heidelberg, New York, 1971.

[CS 99] J.R.B. Cockett, R.A.G. Seely. “Linearly distributive functors”. Journal of Pure and Applied Algebra 143 (1999) 155–203.

[G 87] J.-Y. Girard. “Linear Logic”. Theoretical Computer Science 50 (1987) 1–102.

Department of Mathematics, University of Ottawa, 585 King Edward St., Ottawa, ON, K1N 6N5, Canada Department of Computer Science, University of Calgary, 2500 University Drive, Calgary, AL, T2N 1N4, Canada Department of Mathematics and Statistics, McGill University, 805 Sherbrooke St., Montréal, QC, H3A 2K6, Canada

Email: rblute@uottawa.ca
      robin@ucalgary.ca
      rags@math.mcgill.ca

This article may be accessed at http://www.tac.mta.ca/tac/ or by anonymous ftp at

ftp://ftp.tac.mta.ca/pub/tac/html/volumes/22/23/22-23.{dvi,ps,pdf}

THEORY AND APPLICATIONS OF CATEGORIES (ISSN 1201-561X) will disseminate articles that significantly advance the study of categorical algebra or methods, or that make significant new contributions to mathematical science using categorical methods. The scope of the journal includes: all areas of pure category theory, including higher dimensional categories; applications of category theory to algebra, geometry and topology and other areas of mathematics; applications of category theory to computer science, physics and other mathematical sciences; contributions to scientific knowledge that make use of categorical methods. Articles appearing in the journal have been carefully and critically refereed under the responsibility of members of the Editorial Board. Only papers judged to be both significant and excellent are accepted for publication. Full text of the journal is freely available in .dvi, Postscript and PDF from the journal’s server at http://www.tac.mta.ca/tac/ and by ftp. It is archived electronically and in printed paper format.

Subscription information. Individual subscribers receive abstracts of articles by e-mail as they are published. To subscribe, send e-mail to tac@mta.ca including a full name and postal address. For institutional subscription, send enquiries to the Managing Editor, Robert Rosebrugh, rrosebrugh@mta.ca.

Information for authors. The typesetting language of the journal is TEX, and L^{A}TEX2e strongly encouraged. Articles should be submitted by e-mail directly to a Transmitting Editor. Please obtain detailed information on submission format and style files at http://www.tac.mta.ca/tac/.

Managing editor. Robert Rosebrugh, Mount Allison University: rrosebrugh@mta.ca

TEXnical editor. Michael Barr, McGill University: barr@math.mcgill.ca

Assistant TEX editor. Gavin Seal, McGill University: gavin seal@fastmail.fm

Transmitting editors.

Clemens Berger, Université de Nice-Sophia Antipolis, cberger@math.unice.fr Richard Blute, Université d’ Ottawa: rblute@uottawa.ca Lawrence Breen, Université de Paris 13: breen@math.univ-paris13.fr Ronald Brown, University of North Wales: ronnie.profbrown (at) btinternet.com Aurelio Carboni, Università dell Insubria: aurelio.carboni@uninsubria.it Valeria de Paiva, Cuill Inc.: valeria@cuill.com Ezra Getzler, Northwestern University: getzler(at)northwestern(dot)edu Martin Hyland, University of Cambridge: M.Hyland@dpmms.cam.ac.uk P. T. Johnstone, University of Cambridge: ptj@dpmms.cam.ac.uk Anders Kock, University of Aarhus: kock@imf.au.dk Stephen Lack, University of Western Sydney: s.lack@uws.edu.au F. William Lawvere, State University of New York at Buffalo: wlawvere@acsu.buffalo.edu Tom Leinster, University of Glasgow, T.Leinster@maths.gla.ac.uk Jean-Louis Loday, Université de Strasbourg: loday@math.u-strasbg.fr Ieke Moerdijk, University of Utrecht: moerdijk@math.uu.nl Susan Niefield, Union College: niefiels@union.edu Robert Paré, Dalhousie University: pare@mathstat.dal.ca Jiri Rosicky, Masaryk University: rosicky@math.muni.cz Brooke Shipley, University of Illinois at Chicago: bshipley@math.uic.edu James Stasheff, University of North Carolina: jds@math.unc.edu Ross Street, Macquarie University: street@math.mq.edu.au Walter Tholen, York University: tholen@mathstat.yorku.ca Myles Tierney, Rutgers University: tierney@math.rutgers.edu Robert F. C. Walters, University of Insubria: robert.walters@uninsubria.it R. J. Wood, Dalhousie University: rjwood@mathstat.dal.ca