Convenient Antiderivatives For Differential Linear Categories
aa r X i v : . [ m a t h . C T ] J a n Convenient Antiderivatives For Differential Linear Categories
Jean-Simon Pacaud LemayJanuary 6, 2020
Abstract
Differential categories axiomatize the basics of differentiation and provide categorical mod-els of differential linear logic. A differential category is said to have antiderivatives if a naturaltransformation K , which all differential categories have, is a natural isomorphism. Differentialcategories with antiderivatives come equipped with a canonical integration operator such thatgeneralizations of the Fundamental Theorems of Calculus hold. In this paper, we show thatBlute, Ehrhard, and Tasson’s differential category of convenient vector spaces has antideriva-tives. To help prove this result, we show that a differential linear category – which is a differentialcategory with a monoidal coalgebra modality – has antiderivatives if and only if one can integrateover the monoidal unit and such that the Fundamental Theorems of Calculus hold. We alsoshow that generalizations of the relational model (which are biproduct completions of completesemirings) are also differential linear categories with antiderivatives. Acknowledgements.
The author would like to thank Robin Cockett, Geoff Cruttwell, ThomasEhrhard, Christine Tasson, and the anonymous reviewers for useful discussions and editorial com-ments. The author also thanks Kellogg College, the Clarendon Fund, and the Oxford-GoogleDeepMind Graduate Scholarship for financial support.
In single-variable calculus, the relationship between differentiation and integration is captured bythe two Fundamental Theorems of Calculus, which in particular relates antiderivatives to definiteintegrals. The First Fundamental Theorem of Calculus states that the bounded integral of a smoothfunction is one of its antiderivatives, that is, the derivative of the integral of a function is equal tothe original function: d ( R ta f ( u ) d u ) d t ( x ) = f ( x )While the Second Fundamental Theorem of Calculus directly relates the derivative and the Riemannintegral in the following way: for any differential function f : R −→ R , the Riemann integral of itsderivative over an interval [ a, b ] is given by the difference at the endpoints of f : Z ba d f ( t ) d t ( s ) d s = f ( b ) − f ( a )1he generalization of the Second Fundamental Theorem of Calculus to the multivariable settingis given by the Fundamental Theorem of Line Integrals (also sometimes known as the GradientTheorem) which, as the names suggest, relates line integration to the gradient. Given a vector field F : R n −→ R n , recall that its line integral over a curve C parametrized by r : [0 , −→ R n is definedas follows: Z C F · dr := b Z a F ( r ( t )) · r ′ ( t ) d t Note that while line integration (and its iterated versions) is a concept for multivariable calculus,the line integral itself is computed as an integral over the real as in the single-variable setting.In a certain sense, even the notion of integrating differential forms over manifolds (a fundamentalconcept of integration in differential geometry) comes down simply to integrating over the real line(especially for Riemannian manifolds). This still true in categorical models of differential linearlogic, in that the concepts of integration and antiderivatives in this setting are solely dependent onthe ability to integrate over the monoidal unit.Differential categories were introduced by Blute, Cockett, and Seely in [4] to provide categoricalmodels of differential linear logic [10]. As such, differential categories provide an algebraic axioma-tization of the basic foundations of differentiation. The coKleisli category of a differential categoryis a Cartesian differential category [5], which axiomatizes the directional derivative and differentialcalculus on Euclidean spaces, and also provides categorical models of the differential λ -calculus, asintroduced by Ehrhard and Regnier in [11]. Differential categories now have a rich literature withmany interesting examples such as commutative algebras, C ∞ -rings, finiteness spaces, Rota-Baxteralgebras, K¨othe spaces, etc. One particular example with close ties to differential geometry is thedifferential category of convenient vector spaces, introduced by Blute, Ehrhard, and Tasson in [6].Convenient vector spaces, introduced by Fr¨olicher and Kriegl in [13], have been used to studydifferential geometry on infinite-dimensional manifolds since convenient vector spaces have manydesirable and well-behaved properties [19]. In particular, the category of convenient vector spacesand smooth maps between them, CON sm , is a Cartesian closed category [19, Theorem 3.12], un-like other categories related to differential geometry such as the category of smooth manifolds.Furthermore, CON sm is isomorphic to the coKleisli of a comonad on the category of convenientvector spaces and bounded linear maps, CON [6, Theorem 6.3]. In fact, this comonad is a coalgebramodality which has the Seely isomorphisms [6, Lemma 6.4] and a deriving transformation [6, The-orem 6.6]. Therefore
CON is a differential category, and as a consequence
CON sm is a Cartesiandifferential category. In their conclusion, Blute, Ehrhard, and Tasson state: “ . . . a next funda-mental question is the logical/syntactic structure of integration. One would like an integral linearlogic, which would again treat integration as an inference rule. It should not be a surprise at thispoint that convenient vector spaces are extremely well-behaved with regards to integration. Thecategory [of convenient vector spaces] will likely provide an excellent indicator of the appropriatestructure.” While such a categorical framework for integration has been developed, one has notyet gone back to check that the differential category of convenient vector spaces provides a modelof this integration.The notion of integration in a differential category was first introduced by Ehrhard [10], whilean axiomatization of integration separate from differentiation was later developed by Cockett andLemay with the introduction of integral categories [8]. Somewhat analogue to differential cate-gories, the axioms of an integral category are the basic rules of integration which include that2he integral of a constant function is a linear function and the Rota-Baxter rule [16], which isan expression of integration by parts using only integrals. The coKleisli categories of appropri-ate integral categories are known as Cartesian integral categories [7], which takes a more analyticapproach. Axiomatizing integration in this manner has also lead to studying the FundamentalTheorems of Calculus in the differential category setting. A calculus category [8, Definition 5.6]is a differential category which is also an integral category such that the differential structure andintegral structure are compatible in the sense of satisfying analogue versions of both Fundamen-tal Theorems of Calculus. In particular, as previously mentioned, the Fundamental Theorems ofCalculus link integrals to antiderivatives and vice-versa. This leads to the concept of a differentialcategory having antiderivatives [8, 10], which is a way of obtaining an integral structure from thedifferential structure. Explicitly, a differential category is said to have antiderivatives if a naturaltransformation K , which all differential categories have, is a natural isomorphism. Furthermore,every differential category with antiderivatives is a calculus category with respect to the integralconstructed using the inverse of K (Definition 3.3). The main objective of this paper is to show thatthe differential category of convenient vector spaces admits antiderivatives and therefore admits anintegral structure such that the Fundamental Theorems of Calculus hold.To help us show that convenient vector spaces provide a differential category with antideriva-tives, we will need to take a closer look at when differential linear categories have antiderivatives.Indeed, if one were to charge headfirst into proving that K was an isomorphism, one would have todeal with infinite-dimensional convenient vector spaces and many technical analytic nuances. How-ever for differential categories with a monoidal coalgebra modality, which we call here a differentiallinear category, one can give a simple sufficient condition for having antiderivatives. As discussedat the beginning of the introduction, it turns out that it is sufficient to be able to integrate over themonoidal unit and also check that the Second Fundamental Theorem of Calculus holds (Theorem4.8). This greatly simplifies showing that a differential linear category has antiderivatives, as oneonly needs to work with the monoidal unit. The idea here is the same as for line integration inthe sense that while one can define integration for any object, one is only really integrating overthe monoidal unit. In the case of convenient vector spaces, the monoidal unit is R , which is es-pecially well behaved and easy to work with. This general result for differential linear categoriesimplies that to be able to integrate and obtain antiderivatives for arbitrary smooth maps betweenconvenient vector spaces, one only needs to understand how to integrate smooth curves c : R −→ R ,which is a key concept in the theory of convenient vector spaces. In fact, for a convenient vectorspace, every smooth curve admits an antiderivative and also the Second Fundamental Theoremof Calculus holds. This observation and Theorem 4.8 is essentially the proof that the differentialcategory of convenient vector spaces admits antiderivatives (Section 7). Furthermore, as anotherapplication of Theorem 4.8, we are also able to show that weighted generalizations of the relationalmodel (which are biproduct completions of complete semirings) are also differential categories withantiderivatives (Section 6). Main Results:
The main technical result of this paper is the following:
Theorem 4.8
A differential linear category has antiderivatives if and only if for the monoidal unit R there is a map s R : ! R −→ ! R such that s R and the deriving transformation d R : ! R −→ ! R satisfythe Second Fundamental Theorem of Calculus, that is, s R d R + !(0) = 1 ! R . In the Cockett and Lemay sense, which implies Ehrhard’s notion of having antiderivatives
Theorem 7.7
CON , the category of convenient vector spaces and bounded linear maps betweenthem, is a differential linear category with antiderivatives.
Outline:
We begin with Section 2 which provides a recap of differential (linear) categories withantiderivatives. Afterwards, in Section 3 we briefly review differential categories with antideriva-tives. In Section 4 we study differential linear categories with antiderivatives and in particularprove Theorem 4.8, the main technical result of this paper. Sections 5, 6, and 7 are dedicated toproviding examples of differential linear categories with antiderivatives by applying Theorem 4.8.In particular, Section 7 is dedicated to the main goal of this paper of showing that the differentialcategory of convenient vector spaces has antiderivatives.
Conventions:
In these notes, we will use diagrammatic order for composition. Explicitly, thismeans that the composite map f g is the map which first does f then g . Also, to simplify workingin a symmetric monoidal category, we will instead work in a symmetric strict monoidal category[23], that is, the unit and associativity isomorphisms are identities. We denote symmetric monoidalcategories as quadruples ( X , ⊗ , R, σ ) where X is the base category, ⊗ is the tensor product, R for the monoidal unit (so in particular A ⊗ R = A = R ⊗ A ), and σ A,B : A ⊗ B −→ B ⊗ A is thesymmetry natural isomorphism. In this section, we give a brief overview of differential categories and differential linear categories.We begin by recalling the notion of coalgebra modalities (Definition 2.1) and the coderiving trans-formation (Definition 2.2). Then we review differential categories (Definition 2.4) and in particularwe also discuss the natural transformations K and J (Definition 2.6), both of which play fundamen-tal roles for the notion of antiderivatives (which we discuss in the next section). Afterwards, weconsider monoidal coalgebra modalities (Definition 2.8), the Seely isomorphisms (Definition 2.10),and differential linear categories (Definition 2.12). For a more complete story on differential (lin-ear) categories, including the relevant commutative diagrams and string diagram representations,we refer the reader to [3, 4].Coalgebra modalities [4] are comonads ! such that for each object A , ! A comes equipped with anatural cocommutative comonoid structure. Coalgebra modalities are strictly weaker structure thenwhat is required for a categorical model of the multiplicative and exponential fragment of linearlogic ( MELL ) [1, 25], for that one requires a monoidal coalgebra modality. However, coalgebramodalities are sufficient to axiomatize differentiation.
Definition 2.1 A coalgebra modality [4, Definition 2.1] on a symmetric monoidal category ( X , ⊗ , R, σ ) is a quintuple (! , δ, ε, ∆ , e ) consisting of a functor ! : X −→ X and four natural trans-formations ρ A : ! A −→ !! A , ε A : ! A −→ A , ∆ A : ! A −→ ! A ⊗ ! A and e A : ! A −→ R such that: (i) (! , δ, ε ) is a comonad on X , that is, the following equalities hold: ρ A ε ! A = 1 ! A = ρ A !( ε A ) ρ A ρ ! A = ρ A !( ρ A )4ii) (! A, ∆ A , e A ) is a cocommutative comonoid, that is, the following equalities hold: ∆ A (∆ A ⊗ ! A = ∆ A (1 ! A ⊗ ∆ A ) ∆ A ( e A ⊗ ! A ) = 1 ! A = ∆(1 ! A ⊗ e A )∆ A σ ! A, ! A = ∆ A (iii) δ A is a comonoid morphism, that is, the following diagram commutes: ∆ A ( ρ A ⊗ ρ A ) = ρ A ∆ ! A ρ A e ! A = e A CoKleisli maps of coalgebra modalities, that is, maps of type f : ! A −→ B , are of particularinterest as they should be thought of as smooth maps. This terminology is of no coincidence.Indeed, in a differential category, the differentiable maps are precisely the coKleisli maps, and theyare (in a certain way) infinitely differentiable and hence smooth. A subclass of these smooth mapsare the linear maps which are coKleisli maps of the form ε A g : ! A −→ B for some map g : A −→ B .Every coalgebra modality comes equipped with an important natural transformation known asthe coderiving transformation – which plays a central role in the integration side of the story. Definition 2.2
For a coalgebra modality (! , ρ, ε, ∆ , e ) , the coderiving transformation [8, Defi-nition 2.2] is the natural transformation d ◦ A : ! A −→ ! A ⊗ A defined as the following composite: d ◦ A := ! A ∆ A / / ! A ⊗ ! A ! A ⊗ ε A / / ! A ⊗ A (1)For a list of identities the coderiving transformation satisfies see [8, Proposition 2.1].Differential categories were introduced by Blute, Cockett, and Seely in [4] to provide an algebraicaxiomatization of the basic properties of the differentiation. Two of the basic properties of thederivative from classical differential calculus requires addition: that the derivative of a constantfunction is zero and the Leibniz rule for deriving a product of functions. Therefore, we must firstdiscuss the basic additive structure of a differential category which is captured by the notion ofadditive symmetric monoidal categories. Here we mean “additive” in the Blute, Cockett, and Seelysense of the term [4], that is, to mean enriched over commutative monoids. In particular, we do notassume negatives nor do we assume biproducts (which differs from other definitions of an additivecategory found in the literature). Definition 2.3 An additive category [3, Definition 3] is a commutative monoid enriched cate-gory, that is, a category X in which each hom-set X ( A, B ) is a commutative monoid with an additionoperation + : X ( A, B ) × X ( A, B ) −→ X ( A, B ) and a zero ∈ X ( A, B ) , and such that compositionpreserves the additive structure, that is: k ( f + g ) h = kf h + kgh k h = 0 An additive symmetric monoidal category [3, Definition 3] is a symmetric monoidal category ( X , ⊗ , R, σ ) such that X is also an additive category in which the tensor product ⊗ is compatiblewith the additive structure in the sense that: k ⊗ ( f + g ) ⊗ h = k ⊗ f ⊗ h + k ⊗ g ⊗ h k ⊗ ⊗ h = 05t is worth mentioning that every additive category can be completed to a category with finitebiproducts (which is itself an additive category), and similarly, every additive symmetric monoidalcategory can be completed to an additive symmetric monoidal category with finite biproducts. Forthis reason, it can be argued that that one should always assume a setting with finite biproducts,such as in [12]. The problem is that arbitrary coalgebra modalities do not necessarily extend to thefinite biproduct completion. On the other hand, monoidal coalgebra modalities induce monoidalcoalgebra modalities on the finite biproduct completion [3, Section 7]. However, finite biproductsdo not play an important technical role in this paper, so we will continue without them. Definition 2.4 A differential category [4, Definition 2.4] is an additive symmetric monoidalcategory ( X , ⊗ , R, σ ) with a coalgebra modality (! , ρ, ε, ∆ , e ) which comes equipped with a derivingtransformation [3, Definition 7], that is, a natural transformation d A : ! A ⊗ A −→ ! A such thatthe following equalities hold: [d.1] Constant Rule : d A e A = 0 [d.2] Leibniz Rule : d A ∆ A = (∆ A ⊗ A )(1 ! A ⊗ σ ! A,A )( d A ⊗ ! A ) + (∆ A ⊗ A )(1 ! A ⊗ d A ) [d.3] Linear Rule : d A ε A = e A ⊗ ! A [d.4] Chain Rule : d A ρ A = (∆ A ⊗ A )( ρ A ⊗ d A ) d ! A [d.5] Interchange Rule : ( d A ⊗ A ) d A = (1 ! A ⊗ σ A,A )( d A ⊗ A ) d A The derivative of a coKleisli map f : ! A −→ B (which recall are interpreted as smooth maps) isthe map D [ f ] : ! A ⊗ A −→ B , defined as the composite D [ f ] := d A f . The first deriving transformationaxiom, the constant rule [d.1] , states that the derivative of a constant map is zero. The secondaxiom [d.2] is the Leibniz rule for differentiation. The third axiom, the linear rule [d.3] , says thatthe derivative of a linear map (which recall are maps of the form ε A g ) is a constant. The fourthaxiom [d.4] is the chain rule, describing how to differentiate composition in the coKleisli category.And the last axiom, the interchange rule [d.5] , is the independence of differentiation, which naivelystates that differentiating with respect to x then y is the same as differentiation with respect to y then x . It should be noted that the interchange rule [d.5] was not part of the definition in [4,Definition 2.5] but was later added to ensure that the coKleisli category of a differential categorywas a Cartesian differential category [5, Proposition 3.2.1]. Many examples of differential categoriescan be found throughout the literature, such as in [3, Section 9].By the Leibniz Rule [d.2] and the Linear Rule [d.3] , the deriving transformation and coderivingtransformation (Definition 2.2) are compatible in the following sense: Proposition 2.5 [8, Proposition 4.1] In a differential category, the deriving transformation d andcoderiving transformation d ◦ satisfy the following equality: d A d ◦ A = ( d ◦ A ⊗ A )(1 A ⊗ σ A,A )( d A ⊗ A ) + (1 ! A ⊗ A ) (2)In every differential category, there are two important natural transformations which are con-structed using both the deriving transformation and coderiving transformation:6 efinition 2.6 In a differential category, define the natural transformations K A : ! A −→ ! A [8,Definition 4.2] and J A : ! A −→ ! A [10, Section 3.2] respectively as follows: K A := ! A d ◦ A / / ! A ⊗ A d A / / ! A ! + ! A !(0) / / ! A ! (3) J A := ! A d ◦ A / / ! A ⊗ A d A / / ! A ! + (cid:16) ! A ! A (cid:17) (4)For a list of identities which K and J satisfy see [8, Corollary 4.1, Proposition 4.4]. In particular, K and J are related by the following identities: Proposition 2.7 [8, Proposition 4.4] In a differential category, the following equalities hold: K A !(0) = !(0) = !(0) K A J A !(0) = !(0) = !(0) J A K A d ◦ A = d ◦ A ( J A ⊗ A ) d A K A = ( J A ⊗ A ) d A We now turn our attention to differential categories with monoidal coalgebra modalities. Letus first recall the notion of a monoidal coalgebra modality – also sometimes known as a linearexponential modality [28]. Monoidal coalgebra modalities are coalgebra modalities whose un-derlying comonad is also a symmetric monoidal comonad. Symmetric monoidal closed categorieswith a monoidal coalgebra are categorical models of
MELL – also known as linear categories [1, 25].
Definition 2.8 A monoidal coalgebra modality [3, Definition 2] on a symmetric monoidalcategory ( X , ⊗ , R, σ ) is a septuple (! , ρ, ε, ∆ , e , m , m R ) consisting of a coalgebra modality (! , ρ, ε, ∆ , e ) and a natural transformation m A,B : ! A ⊗ ! B −→ !( A ⊗ B ) , and a map m R : R −→ ! R such that: (i) (! , m , m R ) is a symmetric monoidal functor, that is, the following equalities hold: ( m A,B ⊗ ! C ) m A ⊗ B,C = (1 ! A ⊗ m B,C ) m A,B ⊗ C ( m R ⊗ ! A ) m R,A = 1 ! A = (1 ! A ⊗ m R ) m A,R σ ! A, ! B m B,A = m A,B !( σ A,B )(ii) ρ and ε are monoidal transformations, that is, the equalities hold: m A,B ρ A ⊗ B = ( ρ A ⊗ ρ B ) m ! A, ! B !( m A,B ) m A,B ε A ⊗ B = ε A ⊗ ε B m R ρ R = m R !( m R ) m R ε R = 1 R (iii) ∆ and e are monoidal transformations, that is, the following equalities hold: m A,B ∆ A ⊗ B = (∆ A ⊗ ∆ B )(1 ! A ⊗ σ ! A, ! B ⊗ ! B )( m A,B ⊗ m A,B ) m A,B e A ⊗ B = e A ⊗ e B m R ∆ R = m R ⊗ m R m R e R = 1 R and e are ! -coalgebra morphisms, that is, the following equalities hold: ρ A !(∆ A ) = ∆ A ( ρ A ⊗ ρ A ) m ! A, ! A ρ A !( e A ) = e A m R A linear category [3, Definition 2] is a symmetric monoidal category with a monoidal coalgebramodality. We should note that here we are using the term “linear category” in the sense of Blute, Cockett,and Seely as in [2], which is the same as Bierman’s definition in [1] but which drops the closedstructure requirement. Many examples of monoidal coalgebra modalities can be found throughoutthe literature, since every categorical model of
MELL admits a monoidal coalgebra modality. Forexample, Hyland and Schalk provide a nice list of examples in [17, Section 2.4]. Examples ofcoalgebra modalities that are not monoidal can be found in [3, Section 9].
Proposition 2.9 [8, Proposition 2.2] For a monoidal coalgebra modality (! , ρ, ε, ∆ , e , m , m R ) , itscoderiving transformation d ◦ (Definition 2.2) satisfies the following equalities: m A,B d ◦ A ⊗ B = ( d ◦ A ⊗ d ◦ B )(1 ! A ⊗ σ A, ! B ⊗ B )( m A,B ⊗ A ⊗ B ) m R d ◦ R = m R There are multiple equivalent ways of defining a linear category, some of which can be foundin [1, 24, 25, 28]. For example, a linear category can be defined as a symmetric monoidal cate-gory equipped with a comonad whose coEilenberg-Moore category is a Cartesian category (i.e. acategory with finite products) and such that the canonical adjunction between the base categoryand the coEilenberg-Moore category is a symmetric monoidal adjunction. Another way, which isof particular interest to this paper, is that in the presence of finite products, a monoidal coalgebramodality can be defined as a coalgebra modality that has the Seely isomorphisms.
Definition 2.10
A coalgebra modality (! , ρ, ε, ∆ , e ) on a symmetric monoidal category ( X , ⊗ , R, σ ) with finite products × and terminal object T is said to have the Seely isomorphisms [3, Definion10] if the natural transformation χ A,B : !( A × B ) −→ ! A ⊗ B defined as: χ A,B := !( A × B ) ∆ A × B / / !( A × B ) ⊗ !( A × B ) !( π ) ⊗ !( π ) / / ! A ⊗ ! B (5) is a natural isomorphism (where π : A × B −→ A and π : A × B −→ B are the projection maps ofthe product) and the map e T : !( T ) −→ R is an isomorphism. A monoidal storage category [2,Definition 3.1.4] is a symmetric monoidal category with finite products and a coalgebra modalitywhich has the Seely isomorphisms. Monoidal storage categories are also sometimes known as new Seely categories [1, 24].
Theorem 2.11 [2, Theorem 3.1.6] Every monoidal storage category is a linear category and con-versely, every linear category with finite products is a monoidal storage category.
In particular, the above theorem implies that, in the presence of finite products, every coalgebramodality with the Seely isomorphisms is a monoidal coalgebra modality and conversely that everymonoidal coalgebra modality has the Seely isomorphisms. To see how to construct one from theother see [2, Section 3.1]. Once again, there is multiple equivalent ways of defining a monoidal8torage category [1, 24, 25, 28]. For example, a monoidal storage category can be defined asa symmetric monoidal category with finite products equipped with a comonad whose coKleislicategory is a Cartesian category and such that the canonical adjunction between the base categoryand the coKleisli category is a symmetric monoidal adjunction. With this in mind, the abovetheorem may be derived by considering the fact that the canonical adjunction for the coKleislicategory factors through the coEilenberg-Moore category. In Sections 5, 6, and 7 we will explainwhy each coalgebra modality has the Seely isomorphisms and is therefore also a monoidal coalgebramodality.We now turn our attention back to differential categories:
Definition 2.12 A differential linear category is a differential category whose coalgebra modal-ity is a monoidal coalgebra modality. A differential storage category is a differential linearcategory with finite products. The definition of a differential linear category might seem a bit lacking. Indeed, one might expectsome compatibility coherences between the deriving transformation d and the symmetric monoidalendofunctor structure. However, this comes for free and said coherence is known as the monoidalrule [3, Theorem 4]. It is also worth mentioning that the differential structure of a differential linearcategory can be equivalent be axiomatized by a natural transformation η A : A −→ ! A known as the codereliction [4, 3, 12]. That said, it is the deriving transformation that plays the more importantrole when discussing integration and antiderivatives (though of course, the deriving transformationis built from a codereliction in a differential linear category [3, Theorem 4]).We conclude this section with a useful property of K and J for differential linear categories. Proposition 2.13 [8, Proposition 4.5] In a differential linear category, (i) K satisfies the following equality: ( K A ⊗ ! B ) m A,B = m A,B K A ⊗ B = (1 ! A ⊗ K B ) m A,B (ii) J satisfies the following equality: ( J A ⊗ ! B ) m A,B = m A,B J A ⊗ B = (1 ! A ⊗ J B ) m A,B
In classical single-variable calculus, differentiation and integration are related by the two Funda-mental Theorems of Calculus. Differential categories with antiderivatives were introduced to studyand interpret integration and the Fundamental Theorems of Calculus in the differential categorysetting. In this section we give a brief overview of differential categories with antiderivatives (Def-inition 3.1) and discuss and certain important consequences of having antiderivatives (Proposition3.4). For more details on the story of integration and antiderivatives, we refer the reader to [8, 10].
Definition 3.1
A differential categories is said to have antiderivatives [8, Definition 6.1] if K is a natural isomorphism. J be a natural transforma-tion instead. While this was sufficient to construct an integral and prove Poincar´e’s Lemma [10,Proposition 13], one does not necessarily obtain the Second Fundamental Theorem of Calculus forfree. On the other hand, K allows one to construct an integral which satisfies both the Poincar´e’sLemma as well as the Second Fundamental Theorem of Calculus (Proposition 3.4), and also impliesthat J is a natural isomorphism. To obtain the Second Fundamental Theorem of Calculus from J being a natural isomorphism, this required an extra assumption about the deriving transformationknown as the Taylor property. In fact, this Taylor property provides an equivalence between thetwo definitions of antiderivatives.
Proposition 3.2 [8, Proposition 6.1] For a differential category, the following are equivalent: (i) K is a natural isomorphism; (ii) J is a natural isomorphism and the deriving transformation d is Taylor [8, Definition 5.3],that is, if for maps f : ! A −→ B and g : ! A −→ B such that d A f = d A g , then: f + !(0) g = g + !(0) f To provide some intuition about the Taylor property, first note that precomposing with !(0) isto be thought of as evaluating a smooth map f : ! A −→ B at 0, which therefore results in a constantfunction. That the deriving transformation is Taylor says that two smooth maps with the samederivative differ simply by a constant.In a differential category with antiderivatives, the integral is constructed as follows (which isequal to the integral constructed in [10]): Definition 3.3
In a differential category with antiderivatives, the antiderivative integral trans-formation [8, Definition 6.2] is the natural transformation s A : ! A −→ ! A ⊗ A defined as follows: s A := ! A K − A / / ! A d ◦ A / / ! A ⊗ A (6)Similar to the deriving transformation, the antiderivative integral transformation satisfies thebasic axioms of integration from classical calculus such as the Rota-Baxter rule [16], the integralof a constant function is a linear function, and polynomial integration. The antiderivative integraltransformation is an example of the more general concept of an integral transformation [8, Definition3.4] which axiomatizes integration separate from differentiation. In particular, one can integratemaps of type f : ! A ⊗ A −→ B , where the integral is the smooth map S [ f ] : ! A −→ B defined asthe composite S [ f ] := s A f . For more intuition on how to interpret this integral and examples ofdifferential categories with antiderivatives, see [8, 10].Here is a list of important coherences between the differential and integral structure of a differ-ential category with antiderivatives: Proposition 3.4
In a differential category with antiderivatives: (i)
The antiderivative integral transformation satisfies the following equality: s A = d ◦ A ( J − A ⊗ A )10ii) The deriving transformation d and the antiderivative integral transformation s satisfy the Second Fundamental Theorem of Calculus [8, Definition 5.1], that is, the followingequality holds: s A d A + !(0) = 1 (7)(iii) The deriving transformation d and the antiderivative integral transformation s satisfy the Poincar´e Condition [8, Definition 5.5], that is, if a map f : ! A ⊗ A −→ B satisfies thefollowing equality: ( d A ⊗ A ) f = (1 ! A ⊗ σ A,A )( d A ⊗ A ) f then d A s A f = f . (iv) For the monoidal unit R , the deriving transformation d R : ! R −→ ! R and the antiderivativeintegral transformation s R : ! R −→ ! R satisfy the First Fundamental Theorem of Calculus [8, Definition 5.7], that is, the following equality holds: d R s R = 1 ! R (8)It might be useful to provide a bit of intuition here (for a more detailed explanation we againrefer the reader to [8, 10]). Recall that the Second Fundamental Theorem of Calculus (in the onevariable case) states that the integral of the derivative of a function on a closed interval is equal tothe difference of at the end points: Z ba d f ( t ) d t ( s ) d s = f ( b ) − f ( a )In a differential category with antiderivatives, every smooth map f : ! A −→ B satisfies the SecondFundamental Theorem of Calculus in the sense that S (cid:2) D [ f ] (cid:3) + !(0) f = f . Naively, using notationof single-variable calculus, this last identity should be interpreted as follows: Z x d f ( t ) d t ( s ) d s + f (0) = f ( x )where we had to do some rearranging since we do not necessarily have negatives. On the otherhand, recall that in single-variable calculus, the First Fundamental Theorem of Calculus states thatthe derivative of the integral of a function is equal to the original function: d ( R ta f ( u ) d u ) d t ( x ) = f ( x )In differential category with antiderivatives, the First Fundamental Theorem of Calculus does nothold in the sense that ds = 1. Instead the Poincar´e Condition gives necessary and sufficientconditions for a map f : ! A ⊗ A −→ B to satisfy the First Fundamental Theorem of Calculus inthe sense that D (cid:2) S [ f ] (cid:3) = f . However, a special case is the monoidal unit, where every coKleislimap f : ! R −→ B satisfies both Fundamental Theorems of Calculus – making the monoidal unita calculus object [8, Definition 5.7]. Finally, every differential category with antiderivativesis a calculus category [8, Definition 5.6] – which axiomatizes the compatible relation betweendifferentiation and integration via the Fundamental Theorems of Calculus.11 Differential Linear Categories with Antiderivatives
In this section, we turn our attention to studying when a differential linear category has antideriva-tives. In particular, we will prove Theorem 4.8 which provides necessary and sufficient conditionsfor when a differential linear category has antiderivatives. Briefly, for a differential linear category tohave integration and antiderivatives, it is sufficient to know how to integrate over the monoidal unit R and also that the Second Fundamental Theorem of Calculus holds. This observation will greatlysimplify showing that the differential linear categories of Sections 5, 6, and 7 have antiderivatives.It may be useful to first provide an outline of how we will obtain our desired result. While it ispossible to provide a direct proof that K is a natural isomorphism, the direct calculation is somewhattedious as it amounts simply too long strings of equations. Therefore, we will provide an alternativeproof with smaller intermediate steps, which for the reader is hopefully more informative andenjoyable to read. We will start by observing that a differential linear category has antiderivatives ifand only if K R is an isomorphism (Proposition 4.1). Then we will assume that we have an integrationmap for the monoidal unit s R which is compatible with d R in that the Second Fundamental Theoremof Calculus holds (Definition 4.3). Our objective will then be to construct K − R using s R . To do so,we will first show that J R is an isomorphism (Lemma 4.6). Then we will construct K − R using s R , d R ,and J − R (Lemma 4.7). From here, we will be able to easily prove Theorem 4.8 and conclude that K is a natural isomorphism. As a consequence, we can construct K − , J − , and the antiderivativeintegral transformation s in terms of s R .We begin, as promised, with the observation that for a differential linear category, havingantiderivatives is completely determined by the monoidal unit component of K . Proposition 4.1
A differential linear category has antiderivatives if and only if for the monoidalunit R , K R is an isomorphism. Proof:
Suppose that K is a natural isomorphism. Then by definition, K R is an isomorphism.Conversely, suppose that K R is an isomorphism. Define K − A : ! A −→ ! A as follows: K − A := ! A m R ⊗ ! A / / ! R ⊗ ! A K − R ⊗ ! A / / ! R ⊗ ! A m R,A / / ! A Then we have that: K − A K A = ( m R ⊗ ! A )( K − R ⊗ ! A ) m R,A K A = ( m R ⊗ ! A )( K − R ⊗ ! A )( K R ⊗ ! A ) m R,A (Prop 2.13.i)= ( m R ⊗ ! A ) m R,A = 1 ! A (Def 2.8.i) K A K − A = K A ( m R ⊗ ! A )( K − R ⊗ ! A ) m R,A = ( m R ⊗ ! A )( K − R ⊗ ! A )(1 ! R ⊗ K A ) m R,A = ( m R ⊗ ! A )( K − R ⊗ ! A )( K R ⊗ ! A ) m R,A (Prop 2.13.i)= ( m R ⊗ ! A ) m R,A = 1 ! A (Def 2.8.i)12o we conclude that K is a natural isomorphism. ✷ Before we start working with integration, we consider the following useful observations aboutthe monoidal unit components of K and J : Lemma 4.2
In a differential category, the following equalities hold for the monoidal unit R : (i) K R d ◦ R = d ◦ R J R (ii) d R K R = J R d R (iii) d R d ◦ R = J R Proof:
If the identities involving the monoidal unit look a bit off, recall that we are working ina strict monoidal category and so R ⊗ R = R . Therefore, ( i ) and ( ii ) are simply re-expressions ofProposition 2.7 with the strict monoidal structure in mind. While ( iii ) is re-expressing Proposition2.5, using that σ R,R = 1 R . ✷ We turn our attention now to working with integration on the monoidal unit R . Integration willbe captured by a map of type s R : ! R −→ ! R which is compatible with the deriving transformation d R : ! R −→ ! R in the sense that the Second Fundamental Theorem of Calculus as in Proposition 3.4holds. The idea here is that s R is the antiderivative integral transformation (Definition 3.3) at themonoidal unit. Once again, if the types of s R and d R look a bit off, recall that we are working in a strict monoidal category and so ! R ⊗ R = ! R . Definition 4.3
In a differential category, for the monoidal unit R , a map s R : ! R −→ ! R satisfies [ftc.2] if the following equality holds: s R d R + !(0) = 1 ! R (9) Lemma 4.4
In a differential category, if a map s R : ! R −→ ! R satisfies [ftc.2] , then the followingequality holds: s R J R = d ◦ R (10) Proof:
We prove the identity by the following calculation: s R J R = s R d R d ◦ R (Lem. 4.2.iii)= s R d R d ◦ R + 0= s R d R d ◦ R + d ◦ R (!(0) ⊗ s R d R d ◦ R + !(0) d ◦ R (Nat. d ◦ )= ( s R d R + !(0)) d ◦ R = d ◦ R (Def. 4.3) ✷ Corollary 4.5
In a differential category such that J R is an isomorphism, define the map s R : ! R −→ ! R as follows: s R := ! R d ◦ R / / ! R J − R / / ! R If s R satisfies [ftc.2] then it is the unique map which satisfies [ftc.2] . roof: Suppose that s R satisfies [ftc.2] and that there is another map s ′ R which satisfies [ftc.2] .Then we have that: s ′ R = s ′ R J R J − R = d ◦ R J − R (Lem 4.4)= s R So we conclude that s R is the unique map which satisfies [ftc.2] . ✷ Note that in the setting of the above corollary, uniqueness justifies the use of s R as appropriatenotation. It is important to note that J R being an isomorphism does not necessarily imply that d ◦ R J − R satisfies [ftc.2] . Next, we show that in the case of a differential linear category, having suchan s R implies that J R is an isomorphism. Lemma 4.6
In a differential linear category, if a map s R : ! R −→ ! R satisfies [ftc.2] , then J R isan isomorphism with inverse J − R defined as follows: J − R := ! R m R ⊗ ! R / / ! R ⊗ ! R s R ⊗ ! R / / ! R ⊗ ! R m R,R / / ! R and furthermore the following equality holds: s R = d ◦ R J − R (11) Proof:
We prove that J − R is the inverse of J R by the following calculations: J − R J R = ( m R ⊗ ! R )( s R ⊗ ! R ) m R,R J R = ( m R ⊗ ! R )( s R ⊗ ! R )( J R ⊗ ! R ) m R,R (Prop 2.13.i)= ( m R ⊗ ! R )( d ◦ R ⊗ ! R ) m R,R (Prop 4.4)= ( m R ⊗ ! R ) m R,R (Prop 2.9)= 1 ! R (Def 2.8.i) J R J − R = J R ( m R ⊗ ! R )( s R ⊗ ! R ) m R,R = ( m R ⊗ ! R )( s R ⊗ ! R )(1 ! R ⊗ J R ) m R,R = ( m R ⊗ ! R )( d ◦ R ⊗ ! R ) m R,R (Prop 4.4)= ( m R ⊗ ! R ) m R,R (Prop 2.9)= 1 ! R (Def 2.8.i)So we conclude that J R is an isomorphism. By Corollary 4.5, this implies that s R = d ◦ R J − R . ✷ It is worth pointing out that the formula for J − R in Lemma 4.6 does not come from out of theblue. Indeed, the construction of J − R is a specialization of the construction of J − from an integraltransformation s as found in [8, Theorem 3]. We are now in a position to construct K − R using using s R , d R , and J − R . Once again, it is worth pointing out that the construction of K − R in the lemmabelow is not as random as it appears. The construction of K − R is a re-expression of the constructionof K − using J − as found in [8, Proposition 20].14 emma 4.7 In a differential linear category, if a map s R : ! R −→ ! R satisfies [ftc.2] , then K R isan isomorphism with inverse K − R defined as follows: K − R := ! R s R / / ! R J − R / / ! R d R / / ! R ! + ! R !(0) / / ! R ! and furthermore the following equality holds: s R = K − R d ◦ R (12) Proof:
By Lemma 4.6, we know that J R is an isomorphism and that s R = d ◦ R J − R . We prove that K − R is the inverse of K R by the following calculations: K − R K R = (cid:16) s R J − R d R + !(0) (cid:17) K R = s R J − R d R K R + !(0) K R = s R J − R J R d R + !(0) (Lem ?? .ii + Prop 2.7)= s R d R + !(0)= 1 ! R (Def. 4.3) K R K − R = K R (cid:16) s R J − R d R + !(0) (cid:17) = K R s R J − R d R + K R !(0)= K R d ◦ R J − R J − R d R + !(0) (Lem 4.6 + Prop 2.7)= d ◦ R J R J − R J − R d R + !(0) (Lem ?? .i)= d ◦ R J − R d R + !(0)= s R d R + !(0) (Lem 4.6)= 1 ! R (Def. 4.3)So we conclude that K R is an isomorphism. We compute the other identity as follows: s R = d ◦ R J − R (Lem 4.6)= K − R K R d ◦ R J − R = K − R d ◦ R J R J − R (Lem 4.2.i)= K − R d ◦ R ✷ We may now easily prove the main technical result of this paper.
Theorem 4.8
A differential linear category has antiderivatives if and only if for the monoidal unit R there is a map s R : ! R −→ ! R which satisfies [ftc.2] . roof: Suppose that K is a natural isomorphism. Consider the component of the antiderivativeintegral transformation (Definition 3.3) s = Kd ◦ at the monoidal unit s R : ! R −→ ! R . By Proposition3.4.( iii ), s R satisfies [ftc.2] . Conversely, suppose that we have a map s R : ! R −→ ! R which satisfies [ftc.2] . Then by Lemma 4.7, it follows that K R is an isomorphism. And therefore by Proposition4.1 we conclude that K is a natural isomorphism. ✷ At this point, it may be worth briefly discussing the practical differences between Theorem 4.8and Proposition 4.1. From a purely computational point of view, when working with s R one needsto only check one identity (i.e. s R d R + !(0) = 1 ! R ) compared to the two identities one needs tocheck for K − R (i.e. K − R K R = 1 ! R and K R K − R = 1 ! R ). In practice, working with and computing K and J and their inverses may not be simple or obvious, see for example the complex formula for K − for real smooth functions in [9, Proposition 6.1]. On the other hand, working with s is muchmore intuitive as it is, in general, the expected line integration operator. In particular, integrationis even simpler for the monoidal unit as it amounts to integration in one variable which is very wellbehaved and easy to work with.We conclude this section by expressing K − , J − , and s in terms of s R . Corollary 4.9
In a differential linear category with antiderivatives, the following equalities holds: (i) K − A = ( m R ⊗ m R ⊗ ! A )( s R ⊗ s R ⊗ ! A )( m R,R ⊗ ! A )( d R ⊗ ! A ) m R,A + !(0) K − A := ! A m R ⊗ m R ⊗ ! A / / ! R ⊗ ! R ⊗ ! A s R ⊗ s R ⊗ ! A / / ! R ⊗ ! R ⊗ ! A m R,R ⊗ ! A / / ! R ⊗ ! A d R ⊗ ! A / / ! R ⊗ ! A m R,A / / ! A + ! A !(0) / / ! A ! (ii) J − A = ( m R ⊗ ! A )( s R ⊗ ! A ) m R,A J − A := ! A m R ⊗ ! A / / ! R ⊗ ! A s R ⊗ ! A / / ! R ⊗ ! A m R,A / / ! A (iii) s A = ( m R ⊗ A )( s R ⊗ d ◦ )( m R,A ⊗ A ) s A := ! A m R ⊗ ! A / / ! R ⊗ ! A s R ⊗ d ◦ A / / ! R ⊗ ! A ⊗ A m R,A ⊗ ! A / / ! A Before working with convenient vector spaces in Section 7, it might be useful to work with asimpler example. In this section, we will briefly review one of the most well-known examples ofa differential category, or rather, of a codifferential category (the dual of a differential category).This example is induced by the free symmetric algebra construction [22, Section 8, Chapter XVI ]and the differential structure corresponds to polynomial differentiation. This differential categorywas introduced in [4], and in certain circumstances was also shown to have antiderivatives in [8].While we do not go into full details, we will take advantage of Theorem 4.8 and focus mostly onthe monoidal unit. 16et R be a commutative semiring and MOD R the category of R -modules and R -linear mapsbetween them. We briefly explain how MOD opR is a differential linear category.
MOD R is anadditive symmetric monoidal category with the standard tensor product and additive enrichmentof R -modules. For an R -module M , the free commutative R -algebra over M is known as the thefree symmetric algebra over M and is denoted by Sym ( M ). By the universal property of the freesymmetric algebra, we obtain a monad Sym on MOD R which is also an algebra modality which hasthe Seely isomorphisms: Sym ( M × N ) ∼ = Sym ( M ) ⊗ Sym ( N ) Sym (0) ∼ = R Therefore,
Sym is a comonoidal algebra modality, that is,
Sym is a monoidal coalgebra modal-ity on
MOD opR . Furthermore,
Sym comes equipped with (the dual of) a deriving transforma-tion d M : Sym ( M ) −→ Sym ( M ) ⊗ M given by multivariable polynomial differentiation. Therefore, MOD opR is a differential linear category (see [3, 4] for more details).In particular for the monoidal unit, which is simply R itself, Sym ( R ) is isomorphic as R -algebrasto the polynomial ring R [ x ]. As a result, by abusing notation slightly, the deriving transformationcan be interpreted as d R : R [ x ] −→ R [ x ] and is given by the standard differentiation of polynomials: d R n X k =0 r k x k = n X k =1 ( k · r k ) x k − where on the right hand side, · is the multiplication in R and k is interpreted as the element of R which is the sum of the multiplicative unit k -times. Unsurprisingly, the desired integral s R willbe given by the standard integration of polynomials. For this, we need that all positive sums ofthe multiplicative unit of R are invertible, or equivalently, that there exists a (unique) semiringmorphism Q ≥ −→ R (where Q ≥ is the semiring of non-negative rational numbers). So supposethat for each k ∈ N , where N is the set of natural numbers, that k ∈ R is invertible with inverse k − . Define s R : R [ x ] −→ R [ x ] using the standard formula for polynomial integration: s R n X k =0 r k x k = n X k =0 (cid:16) ( k + 1) − · r k (cid:17) x k +1 On the other hand,
Sym (0) : R [ x ] −→ R [ x ] is precisely evaluating a polynomial at zero, whichamounts to giving the polynomial’s constant term: Sym (0) n X k =0 r k x k = r One can then easily check that d R and s R satisfy the Second Fundamental Theorem of Calculus: s R d R n X k =0 r k x k + Sym (0) n X k =0 r k x k = s R n X k =1 ( k · r k ) x k − + r = n X k =1 (cid:16) k · ( k − − · r k (cid:17) x k − + r n X k =1 (cid:16) k · k − · r k (cid:17) x k − + r = n X k =1 r k x k + r = n X k =0 r k x k And so d R s R + !(0) = 1 ! R . If this looks backwards, recall that MOD opR is the differential linearcategory.
Theorem 5.1
Let R be a commutative semiring such that all positive sums of the multiplicativeunit are invertible. Then MOD opR is a differential linear category with antiderivatives.
The induced (dual of) antiderivative integral transformation s M : Sym ( M ) ⊗ M −→ Sym ( M )gives a special kind of multivariable polynomial integration which is described in [8, Example 1]. Inparticular, this multivariable polynomial integration satisfies the Rota-Baxter rule and the SecondFundamental Theorem of Calculus for any number of finite variables. In this section, we will show that certain generalizations of the relational model give a differentialcategory with antiderivatives. By generalizations of the relation model, we mean the biproductcompletion of a complete semiring – which as the name indicates, gives a generalization of thecategory of sets and relations,
REL . In fact,
REL was one of the original examples of a differen-tial category [4] and of a differential category with antiderivatives [8, 10]. For more details ongeneralizations of the relational model, we invite the reader to see [20, 21, 27].Briefly, recall that a complete semiring is a semiring where one can have sums indexedby arbitrary sets I , which we denote by P i ∈ I , such that these summation operations satisfy certaindistributivity and partitions axioms (see [15, Chapter 22] for more details). Now let R be a completecommutative semiring. Define the category R Π whose objects are sets X and where a map from X to Y is a set function f : X × Y −→ R . Composition of maps f : X × Y −→ R and g : Y × Z −→ R is the map f g : X × Z −→ R defined as follows: f g ( x, z ) := X y ∈ Y f ( x, y ) · g ( y, z )where · is the multiplication in R . The identity is given by the Kronecker function δ : X × X −→ R ,which is defined as follows: δ ( x, y ) := ( x = y x = y For a bit more intuition, maps of R Π should be viewed as generalized R -matrices. Compositioncorresponds to matrix multiplication.While the identity is the diagonal matrix of 1’s on the diagonaland zero everywhere else. For an explicit example, consider the two-element Boolean algebra [14]18 = { , } , which is a complete commutative semiring. In this case, B Π is isomorphic to REL ,since every map f : X × Y −→ B can be equivalently be described as a subset of X × Y , which isprecisely a relation between X and Y . R Π is the biproduct completion of R viewed as a one object category. The biproduct of objectsis given by the disjoint union of sets ⊔ and the zero object is empty set ∅ . As such, R Π is anadditive category where the zero maps 0 : X × Y −→ R simply map everything to 0, while the sumof maps f + g : X × Y −→ R is defined by pointwise addition:( f + g )( x, y ) := f ( x, y ) + g ( x, y ) R Π is also a symmetric monoidal category where the monoidal unit is a chosen singleton {∗} andthe tensor product of objects is given by the standard Cartesian product of sets × . This structuremakes R Π an additive symmetric monoidal category. R Π is also a differential linear category. For each set X , let ! X be the free commutative monoidover X . Elements of ! X are are finite bags (also known as multisets) of elements of X : J x , . . . , x n | x i ∈ X K ∈ ! X and including the empty bag JK . In particular for the disjoint union of sets and empty set, we alsohave the following: !( X ⊔ Y ) ∼ = ! X × ! Y ! ∅ ∼ = {∗} This gives a coalgebra modality which satisfies the Seely isomorphisms, and therefore provides amonoidal coalgebra modality on R Π (for a full description of this monoidal coalgebra modality see[20, 21, 27]). This monoidal coalgebra modality is in fact a free exponential modality [26],making R Π a Lafont category [25]. The deriving transformation d X : (! X × X ) × ! X −→ R isdefined as putting single elements into bags: d X (( J x , . . . , x n K , x ) , J y , . . . , y m K ) = m · δ ( J x , . . . , x n , x K , J y , . . . , y m K )Multiplying by m = n + 1 takes into account that if we were in the unordered case, there would be n + 1 possible ways of putting an element into a bag of size n . Of course the n + 1 factor disappearsin the case that semiring is additively idempotent (i.e. 1 + 1 = 1), such as the two-element Booleanalgebra B . Which is why the n + 1 factor does not appear in the differential structure of REL asdescribed in [4].Focusing on the monoidal unit {∗} , ! {∗} is isomorphic as a commutative monoid to the set ofnatural numbers N . The deriving transformation, expressed as d {∗} : N × N −→ R , is then: d {∗} ( n, m ) = m · δ ( n + 1 , m )Therefore, as in the previous section, we will need inverse of all positive sums of the multiplicativeunit to define integration. So once again, assume that for each n ∈ N , that n ∈ R is invertible withinverse n − . Define s {∗} : N × N −→ R as follows: s {∗} ( n, k ) = ( n = 0 n − · δ ( n, m + 1) if n ≥ s {∗} d {∗} : ( s {∗} d {∗} )( n, k ) = X k ∈ N s {∗} ( n, k ) · d {∗} ( k, m )There is only one possible case for when s {∗} ( n, j ) · d {∗} ( j, k ) = 0: s {∗} ( n, k ) · d {∗} ( k, m ) = 0 ⇔ n = 0 and n = k + 1 and k + 1 = m ⇔ n = m = 0 and k = n − s {∗} d {∗} )( n, m ) = 0 if and only if n = m = 0, and in that case we obtain that:( s {∗} d {∗} )( n, n ) = X k ∈ N s {∗} ( n, k ) · d {∗} ( k, n ) = s {∗} ( n, n − · d {∗} ( n − , n ) = n − · n = 1And so we have that: ( s {∗} d {∗} )( n, m ) = ( n = 0 δ ( n, m ) if n ≥ N × N −→ R simply checks whether both inputs are zero:!(0)( n, m ) = δ ( n, · δ ( n, m )Therefore if n = 0, we have that:( s {∗} d {∗} )( n, m ) + !(0)( n, m ) = 0 + δ ( n, · δ ( n, m ) = δ ( n, m )While if n = 0, we have that:( s {∗} d {∗} )( n, m ) + !(0)( n, m ) = δ ( n, m ) + δ ( n, · δ ( n, m ) = δ ( n, m )And so we conclude that s {∗} d {∗} + !(0) = δ , where recall that δ is the identity in R Π . Theorem 6.1
Let R be a commutative complete semiring such that all positive sums of the mul-tiplicative unit are invertible. Then R Π is a differential linear category with antiderivatives. The resulting antiderivative integral transformation s X : ! X × (! X × X ) −→ R amounts to pullingout a single element from a bag: s X ( J y , . . . , y n K , ( J x , . . . , x m K , x )) = ( J y , . . . , y n K = JK n − · δ ( J y , . . . , y n K , J x , . . . , x m , x K ) o.w.If R is additively idempotent then n − = 1 and so the antiderivative integral transformation isprecisely the coderiving transformation (Definition 2.2). This is the case for REL [8, Example 2].20
Convenient Vector Spaces
In this section, we show that the differential category of convenient vector spaces [6] has antideriva-tives, which is the main goal of this paper. For a detailed introduction to the theory of convenientvector spaces, we invite the reader to see [13, 19]. Throughout this section, we follow mostly theterminology and notation used in [6].Recall that a locally convex space is a topological R -vector space (where R is the reals) whichis Hausdorff and such that 0 has a neighbourhood basis of convex sets or equivalently, an R -vectorspace with a family of seminorms which separates points (see [29] for more details). It shouldbe noted that in some definitions of locally convex spaces, the requirement that the topology isHausdorff is not necessary. However, following the conventions used in [6, 13, 19], we assumethat our locally convex spaces are Hausdorff to insure that all derivatives be unique. Playing afundamental role in the theory of convenient vector spaces is the notion of smooth curves. Definition 7.1
Let E be a locally convex space. (i) A curve is a function c : R −→ E . (ii) A curve c : R −→ E is differentiable if the limit: lim t −→ c ( x + t ) − c ( x ) t (13) exists for all x ∈ E . We define the derivative of c to be the curve c ′ : R −→ E where: c ′ ( x ) := lim t −→ c ( x + t ) − c ( x ) t (14)(iii) A curve is said to be smooth if all its iterated derivatives exists, that is, the curve is infinitelydifferentiable. Let C ∞ ( E ) denote the set of smooth curves of E . There are numerous equivalent ways of defining a convenient vector space, see for example [19,Theorem 2.14]. For the purpose of this paper, the main definition of interest is the one which statesthat every smooth curves admits an antiderivative:
Definition 7.2 A convenient vector space [13, 19] is a locally convex space E such that forevery smooth curve c ∈ C ∞ ( E ) there exists a smooth curve ˜ c ∈ C ∞ ( E ) such that ˜ c ′ = c . We saythat ˜ c is an antiderivative of c . One antiderivative in particular is the one provided by Riemann integrals:
Lemma 7.3 [19, Lemma 2.5] Let E be a convenient vector space. Then for every smooth curve c ∈ C ∞ ( E ) , there exists a unique smooth curve R c ∈ C ∞ ( E ) such that (cid:0)R c (cid:1) ′ = c and ( R c )(0) = 0 . Proof:
Given any antiderivative ˜ c of c , define R c : R −→ E as follows: Z c := ˜ c − ˜ c (0) (15)21here ˜ c (0) : R −→ E is viewed as a constant smooth curve. This definition is independent ofthe choice of antiderivative ˜ c [18], and clearly (cid:0)R c (cid:1) ′ = c and ( R c )(0) = 0. For a more explicitdescription, R c can also be defined as follows: (cid:18)Z c (cid:19) ( r ) = r Z c ( t ) d t (16)where b R a c ( t ) d t is the standard Riemann integral for topological vector spaces. ✷ We now wish to define the category of convenient vector spaces. The only remaining questionis which maps to take for this category. For convenient vector spaces, there are two important setsof maps: the smooth maps and the bounded linear maps. An equivalent definition of a convenientvector space can be expressed using the bornology of a locally convex space [6, 13, 19]. Recall thatin a locally convex space E , a subset B ⊆ E is bounded if for every open subset U ⊆ E containing0, there exists a positive real r > B ⊆ r · U . Definition 7.4
Let E and F be convenient vector spaces. (i) A bounded linear map is a linear map f : E −→ F which maps bounded sets to boundedsets, that is, if B ⊆ E is bounded, then f ( B ) ⊆ F is bounded. (ii) A smooth map is a function f : E −→ F which preserves smooth curves, that is, if c ∈ C ∞ ( E ) then c f ∈ C ∞ ( F ) . Let C ∞ ( E, F ) denote the set of smooth maps between E and F . We will soon see that smooth maps in this context are precisely the coKleisli maps of a certainmonoidal coalgebra modality. Note that every bounded linear map is smooth [13, 19] and since R is a convenient vector space, that C ∞ ( E, R ) = C ∞ ( E ). Furthermore, for every pair of convenientvector spaces E and F , C ∞ ( E, F ) is also a convenient vector space [6, Corollary 5.9].Let
CON be the category of convenient vector spaces and bounded linear maps between them.As shown in [6, Section 4],
CON is an additive symmetric monoidal closed category where theadditive structure is given by biproducts, the tensor product is given by the Mackey completion[19, Lemma 2.2] of the algebraic tensor product, and the monoidal unit is R . We should note thatwhile Mackey completion plays an important role in the theory of convenient vector spaces, it isnot crucial to the understanding of how to obtain an integral and antiderivatives in the differentialcategory context. For the purpose of this paper, one only needs to understand Lemma 7.3 and thatthere is a bijective correspondence between smooth maps and bounded linear maps which involvesthe smallest convenient vector space containing the image of a certain evaluation map. For moredetails on Mackey completeness and the category CON , see [6, 13, 19].We will now give an overview of the differential linear category structure of
CON . For everyconvenient vector space E , let E ∗ := CON ( E, R ) denote the set of bounded linear functionals.Define the smooth map ev E : E −→ C ∞ ( E ) ∗ [6, Lemma 6.1] as the evaluation map: ev E ( x )( c ) := c ( x ) (17) It is worth mentioning that a bounded linear map is the same thing as a continuous linear map. E [6, Definition 6.2] as the Mackey completion of the image ev E ( x ) in C ∞ ( E ) ∗ , inother words, ! E ⊂ C ∞ ( E ) ∗ is the smallest convenient vector space which contains ev E ( E ). Definethe resulting induced smooth map δ E : E −→ ! E as: δ E ( x ) := ev E ( x ) (18)This gives a coalgebra modality ! on CON which satisfies the Seely isomorphisms [6, Lemma 6.4]:!( E × F ) ∼ = ! E ⊗ ! F !(0) ∼ = R and therefore is also a monoidal coalgebra modality (for full details see [6, Section 6]). Furthermore,as promised, the coKleisi maps of this coalgebra modality are precisely the smooth maps betweenconvenient vector spaces [6, Theorem 6.3]: CON (! E, F ) ∼ = C ∞ ( E, F ) (19)In particular, the isomorphism in the direction
CON (! E, F ) −→ C ∞ ( E, F ) is given by precomposingwith δ E . This implies that for every smooth map f : E −→ F there exists a unique bounded linearmap g : ! E −→ F such that the following diagram commutes: E δ E / / f ' ' ❖❖❖❖❖❖❖❖❖❖❖❖❖❖ ! E g (cid:15) (cid:15) F (20)The deriving transformation d E : ! E ⊗ E −→ ! E is given by differentiating smooth maps in theclassical sense [6, Proposition 5.12]. In particular, one has that: d E (cid:0) δ E ( x ) ⊗ y (cid:1) := lim t −→ δ E ( x + t · y ) − δ ( x ) t (21)To help us understand the derivative of a smooth maps, note that every bounded linear map g : ! E ⊗ E −→ F can equivalently be described as a smooth map g : E × E −→ F which is linearin its second argument. Explicitly, g is the unique smooth map such that the following diagramcommutes: E × E δ E / / g + + ❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳❳ !( E × E ) χ / / ! E ⊗ ! E ! E ⊗ ε E / / ! E ⊗ E g (cid:15) (cid:15) F (22)where recall that χ is the Seely isomorphism (Definition 2.10). Then for a smooth map f : E −→ F ,its derivative D [ f ] = d E f : ! E ⊗ E −→ ! E can be seen as smooth map D [ f ] : E × E −→ F which islinear in its second argument and given by: D [ f ]( x, y ) := lim t −→ f ( x + t · y ) − f ( x ) t (23)23ote that this is the standard definition of the derivative in multivariable differential calculus. Thisis also precisely the Cartesian differential category structure of the coKleisli category of ! [5]. Inthis case, the coKleisli category of ! is isomorphic to the category of convenient vector spaces andsmooth maps between them.We will now show that we have antiderivatives in the differential category context, that is, wewish to apply Theorem 4.8. So we turn our attention to the monoidal unit. For the monoidal unit R , δ R : R −→ ! R is a smooth curve – which makes our work much easier since smooth curves behavevery nicely for convenient vector spaces. One can check that its derivative δ ′ R : R −→ ! R is given byevaluating derivatives of smooth curves: δ ′ R ( r )( c ) = c ′ ( r ) c ∈ C ∞ ( R )As a result, the deriving transformation d R : ! R −→ ! R is the unique bounded linear map such thatthe following diagram commutes: R δ R / / δ ′ R ' ' ❖❖❖❖❖❖❖❖❖❖❖❖❖❖ ! R d R (cid:15) (cid:15) ! R (24)To obtain the desired integral s R , we apply Lemma 7.3 to δ R to obtain its special antiderivative R δ R : R −→ ! R . By uniqueness of this antiderivative, one can easily check that R δ R is given byevaluating antiderivative of smooth curves: (cid:18)Z δ R (cid:19) ( r )( c ) = (cid:18)Z c (cid:19) ( r ) c ∈ C ∞ ( R )Define s R : ! R −→ ! R as the unique bounded linear map such that the following diagram commutes: R δ R / / R δ R ' ' ❖❖❖❖❖❖❖❖❖❖❖❖❖❖ ! R s R (cid:15) (cid:15) ! R (25)As usual, !(0) : ! R −→ ! R is given by evaluating at zero, that is, !(0) is the unique bounded linearmap such that the following diagram commutes: R δ R / / δ R (0) ' ' ❖❖❖❖❖❖❖❖❖❖❖❖❖❖ ! R !(0) (cid:15) (cid:15) ! R (26)That d R and s R satisfy the Second Fundamental Theorem of Calculus, that is, s R satisfies [ftc.2] ,follows mostly from the fact that the Second Fundamental Theorem of Calculus holds in the con-venient vector space context. Lemma 7.5 [19, Corollary 2.6.(6)] Let E be a convenient vector space. Then for every smoothcurve c ∈ C ∞ ( E ) , the following equality holds: Z c ′ = c − c (0) (27) where c (0) : R −→ E is viewed as a constant smooth function.
24e will also need the following lemma which allows us to pull bounded linear maps in and outof antiderivatives.
Lemma 7.6 [18, Proposition 2.3] Let E be a convenient vector space. Then for every smooth curve c ∈ C ∞ ( E ) and bounded linear map f : E −→ F , the following equality holds: Z ( c f ) = (cid:18)Z c (cid:19) f (28)Finally, to show that s R d R + !(0) = 1 ! R , it suffices to show that δ R s R d R = δ R − δ R !(0). δ R s R d R = (cid:18)Z δ (cid:19) d R (24)= (cid:18)Z δ d R (cid:19) (Lemma 7.6)= Z δ ′ R (22)= δ R − δ R (0) (Lemma 7.5)= δ R − δ R !(0) (26)And so we conclude that: Theorem 7.7
CON is a differential linear category with antiderivatives.
The antiderivative integral transformation s E : ! E −→ ! E ⊗ E is the unique bounded linear mapwhich when precomposing by δ E : E −→ ! E gives the following equality: s E ( δ E ( x )) = Z δ E ( t · x ) d t ⊗ x where R δ E ( t · x ) d t is Riemann integral of the smooth curve δ E ( − · x ) := R −→ E (similar to theintegral consider in [18, Proposition 3.1]). Recall that every bounded linear map f : ! E ⊗ E −→ F can be seen as a smooth map f : E × E −→ F which is linear in its second argument. Therefore, itsintegral S [ f ] : ! E −→ F is the unique bounded linear map which when precomposing by δ E gives: S [ f ]( δ E ( x )) = Z f ( tx, x ) d t Note that this integral is the same as the one discussed for smooth functions in [7, 9]. In particular,this integral satisfies the Rota-Baxter rule and the Second Fundamental Theorem of Calculus.25 eferences [1] Bierman, G.M.: What is a categorical model of intuitionistic linear logic? In: InternationalConference on Typed Lambda Calculi and Applications, pp. 78–93. Springer (1995)[2] Blute, R., Cockett, J.R.B., Seely, R.A.G.: Cartesian differential storage categories. Theoryand Applications of Categories (18), 620–686 (2015)[3] Blute, R.F., Cockett, J.R.B., Lemay, J.S.P., Seely, R.A.G.: Differential categories revisited.Applied Categorical Structures (2019). DOI 10.1007/s10485-019-09572-y[4] Blute, R.F., Cockett, J.R.B., Seely, R.A.G.: Differential categories. Mathematical structuresin computer science (06), 1049–1083 (2006)[5] Blute, R.F., Cockett, J.R.B., Seely, R.A.G.: Cartesian differential categories. Theory andApplications of Categories (23), 622–672 (2009)[6] Blute, R.F., Ehrhard, T., Tasson, C.: A convenient differential category. Cahiers de Top. etG´eom Diff LIII , 211–232 (2012)[7] Cockett, J., Lemay, J.S.P.: Cartesian integral categories and contextual integral categories.Electronic Notes in Theoretical Computer Science , 45 – 72 (2018). DOI https://doi.org/10.1016/j.entcs.2018.11.004. Proceedings of the Thirty-Fourth Conference on the MathematicalFoundations of Programming Semantics (MFPS XXXIV)[8] Cockett, J.R.B., Lemay, J.S.P.: Integral categories and calculus categories. MathematicalStructures in Computer Science pp. 1–66 (2018). DOI 10.1017/S0960129518000014[9] Cruttwell, G., Lemay, J.S.P., Lucyshyn-Wright, R.: Integral and differential structure on thefree c ∞ -ring modality. arXiv preprint arXiv:1902.04555 (2019)[10] Ehrhard, T.: An introduction to differential linear logic: proof-nets, models and antideriva-tives. Mathematical Structures in Computer Science pp. 1–66 (2017)[11] Ehrhard, T., Regnier, L.: The differential lambda-calculus. Theoretical Computer Science (1), 1–41 (2003)[12] Fiore, M.: Differential structure in models of multiplicative biadditive intuitionistic linearlogic. In: International Conference on Typed Lambda Calculi and Applications, pp. 163–177.Springer (2007)[13] Fr¨olicher, A., Kriegl, A.: Linear spaces and differentiation theory. Pure and Applied Mathe-matics (1988)[14] Givant, S., Halmos, P.: Introduction to Boolean algebras. Springer Science & Business Media(2008)[15] Golan, J.S.: Semirings and their Applications. Springer Science & Business Media (2013)[16] Guo, L.: An introduction to Rota-Baxter algebra, vol. 2. International Press Somerville (2012)2617] Hyland, M., Schalk, A.: Glueing and orthogonality for models of linear logic. Theoreticalcomputer science (1-2), 183–231 (2003)[18] Kock, A.: Calculus of smooth functions between convenient vector spaces. Citeseer (1985)[19] Kriegl, A., Michor, P.W.: The convenient setting of global analysis, vol. 53. American Math-ematical Soc. (1997)[20] Laird, J., Manzonetto, G., McCusker, G., Pagani, M.: Weighted relational models of typedlambda-calculi. In: Proceedings of the 2013 28th Annual ACM/IEEE Symposium on Logic inComputer Science, pp. 301–310. IEEE Computer Society (2013)[21] Lamarche, F.: Quantitative domains and infinitary algebras. Theoretical computer science (1), 37–62 (1992)[22] Lang, S.: Algebra, revised 3rd ed. Graduate Texts in Mathematics (2002)[23] Mac Lane, S.: Categories for the working mathematician. Springer-Verlag, New York, Berlin,Heidelberg (1971, revised 2013)[24] Mellies, P.A.: Categorical models of linear logic revisited (2003)[25] Mellies, P.A.: Categorical semantics of linear logic. Panoramas et syntheses27