SLIDE 1 Tutorial: Differential Categories and Cartesian Differential Categories
JS Pacaud Lemay FMCS 2019
Thanks for the invitation!
SLIDE 2 The Differential Category World: The Four Tomes
Differential Categories
Blute, Cockett, Seely - 2006
Cartesian Differential Categories
Blute, Cockett, Seely - 2009
Restriction Differential Categories
Cockett, Cruttwell, Gallagher - 2011
Tangent Categories
Rosicky - 1984 Cockett, Cruttwell - 2014
SLIDE 3 The Differential Category World: A Taster
Differential Categories
Blute, Cockett, Seely - 2006
Cartesian Differential Categories
Blute, Cockett, Seely - 2009
Restriction Differential Categories
Cockett, Cruttwell, Gallagher - 2011
Tangent Categories
Rosicky - 1984 Cockett, Cruttwell - 2014
SDG Smooth Manifolds Differential Geometry Algebraic Foundations of Differentiation Algebraic De Rham Cohomology Differential Linear Logic Euclidean Spaces Multivariable Differential Calculus De Rham Cohomology Open Subsets Smooth Functions Partial Smooth Functions Vector Bundles K¨ ahler Differentials Differential Algebras Directional Derivative Differential λ-calculus Tangent Bundles Algebraic Geometry
SLIDE 4 The Differential Category World: It’s all connected!
Differential Categories
Blute, Cockett, Seely - 2006
Cartesian Differential Categories
Blute, Cockett, Seely - 2009
Restriction Differential Categories
Cockett, Cruttwell, Gallagher - 2011
Tangent Categories
Rosicky - 1984 Cockett, Cruttwell - 2014
coKleisli ⊗-Representation Manifold Completion ⊂ ⊂ T
a l M a p s Differential Objects c
i l e n b e r g
e
SLIDE 5 Main References
- R. Blute, R. Cockett, R.A.G. Seely, Differential Categories, Mathematical Structures in
Computer Science Vol. 1616, pp 1049-1083, 2006.
- R. Blute, R. Cockett, R.A.G. Seely, Cartesian Differential Categories , Theory and
Applications of Categories 23, pp. 622-672, 2009
SLIDE 6 Where do Differential Categories come from?
A short history from the horse’s mouth: “More recently, in a series of papers:
- T. Ehrhard, L. Regnier The differential λ-calculus. Theoretical Computer Science 309(1-3)
(2003) 1-41.
- 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 and Regnier introduced the differential λ-calculus and differential proof nets. Their work began with Ehrhard’s construction of models of linear logic in the category of K¨
finiteness spaces. They notes that these models had a natural notion of differential operator and made the key observation that the logic notion of linear (using arguments exactly once) coincided with the mathematical notion of linear transformation (which is essential to the notion of derivative, as the best linear approximation of a function). This observation is central to the decision to situate a categorical semantics for differential in appropriately endowed monoidal categories. Our aim in this paper is to provide a categorical reconstruction of the Ehrhard-Regnier differential
- structure. In order to achieve this we introduce the notion of differential category which captures
the key structural components required for a basic theory of differentiation. ”
SLIDE 7
Differential Categories vs. Codifferential Categories
To start we will go over the definition of the dual notion of a differential category: a codifferential category. Why? The intuition for codifferential categories is more closely related to commutative algebra.
SLIDE 8 Codifferential Categories - Definition
A codifferential category (dual of a differential category) is:
(i)
An additive symmetric monoidal category,
(ii)
With an algebra modality,
(iii)
Equipped with a deriving transformation.
SLIDE 9 Codifferential Categories - Definition
A codifferential category (dual of a differential category) is:
(i)
An additive symmetric monoidal category,
(ii)
With an algebra modality,
(iii)
Equipped with a deriving transformation.
SLIDE 10 Additive Symmetric Monoidal Categories - Definition
Additive symmetric monoidal categories are symmetric commutative monoid enriched monoidal categories.
1Composition is written diagrammatically, so fg is the map that does f then g
SLIDE 11 Additive Symmetric Monoidal Categories - Definition
Additive symmetric monoidal categories are symmetric commutative monoid enriched monoidal categories. An additive category is a category X such that each hom-set X(A, B) is a commutative monoid with binary operation + and zero 0, that is, we can add parallel maps f + g and there is a zero map 0, and such that composition 1 preserves the additive structure: f (g + h)k = fgk + fhk f 0 = 0 = 0f An additive symmetric monoidal category is a symmetric monoidal category which is also an additive category, such that the tensor product ⊗ preserves the additive structure: f ⊗ (g + h) = f ⊗ g + f ⊗ h (f + g) ⊗ h = f ⊗ h + g ⊗ h f ⊗ 0 = 0 0 ⊗ f = 0 Note that this definition does not assume biproducts or negatives.
1Composition is written diagrammatically, so fg is the map that does f then g
SLIDE 12
Additive Symmetric Monoidal Categories - Examples
Example
Let REL be the category of sets and relations. Objects are sets X, and maps R : X → Y are subsets R ⊆ X × Y . REL is an additive symmetric monoidal category wher The monoidal structure is given by the Cartesian product of sets.
Unit: {∗} Tensor product of objects X ⊗ Y := X × Y Tensor product of relations R ⊂ X × Y and S ⊆ A × B is R ⊗ S := {((x, a), (y, b)) | (x, y) ∈ R, (y, b) ∈ S} ⊆ (X × A) × (Y × B).
The sum of maps R, S ⊆ X × Y is their union R + S := R ∪ S ⊆ X × Y . The zero maps are the empty subsets 0 := ∅ ⊆ X × Y .
Example
Let K be a field and and let VECK to be the category of all K-vector spaces and K-linear maps between them. VECK is additive symmetric monoidal category where: The monoidal structure is given by the tensor product of vector spaces ⊗ and the unit is K. The sum of K-linear maps f , g : V → W is the standard pointwise sum of linear maps, (f + g)(v) := f (v) + g(v). The zero maps 0 : V → W are the K-linear maps which map everything to zero. The additive structure in both examples are induced from finite biproducts.
SLIDE 13 Codifferential Categories - Definition
A codifferential category (dual of a differential category) is:
(i)
An additive symmetric monoidal category,
(ii)
With an algebra modality,
(iii)
Equipped with a deriving transformation.
SLIDE 14 Algebra Modality - Definition
An algebra modality on a (strict) symmetric monoidal category is a monad (S, µ, η) SSA
µ
SA
A
η
SA
equipped with two natural transformations m and u (where K is the unit): SA ⊗ SA
m
SA
K
u
SA
such that for every object A, (SA, m, u) is a commutative monoid (where σ is the symmetry): SA
u⊗1
m
m⊗1 1⊗m
m
m
m
m
SA
SA ⊗ SA
m
SA
SA and µ is a monoid morphism: SSA ⊗ SSA
m
SA ⊗ SA
m
u
SSA
µ
µ
SA
SA
SLIDE 15
Algebra Modality - Example I
Example
Define the algebra modality M on REL as follows: for a set X, let MX be the free commutative monoid over a set X, equivalently the free N-module over X, or equivalently the set of finite multisets of X.
SLIDE 16
Algebra Modality - Example I
Example
Define the algebra modality M on REL as follows: for a set X, let MX be the free commutative monoid over a set X, equivalently the free N-module over X, or equivalently the set of finite multisets of X. Explicitly, for a function f : X → N define supp(f ) := {x ∈ X| f (x) = 0}. Then define MX as: MX = {f : X → N| |supp(f )| < ∞} The monoid structure on MX is defined by point-wise addition, (f + g)(x) = f (x) + g(x), while the unit is u : X → N which maps everything to zero, u(x) = 0. For each x ∈ X, let ηx : X → N which maps y to 1 if x = y and 0 otherwise.
SLIDE 17 Algebra Modality - Example I
Example
Define the algebra modality M on REL as follows: for a set X, let MX be the free commutative monoid over a set X, equivalently the free N-module over X, or equivalently the set of finite multisets of X. Explicitly, for a function f : X → N define supp(f ) := {x ∈ X| f (x) = 0}. Then define MX as: MX = {f : X → N| |supp(f )| < ∞} The monoid structure on MX is defined by point-wise addition, (f + g)(x) = f (x) + g(x), while the unit is u : X → N which maps everything to zero, u(x) = 0. For each x ∈ X, let ηx : X → N which maps y to 1 if x = y and 0 otherwise. Define the following natural transformations: η = {(x, ηx)| x ∈ X} ⊆ X × MX µ = (F,
f )| F ∈ MMX ⊆ MMX × MX u = {(∗, u)} ⊆ {∗} × MX m = {((f , g), f + g) | f , g ∈ MX} ⊆ (MX × MX) × MX
SLIDE 18 Algebra Modality - Example I
Example
Define the algebra modality M on REL as follows: for a set X, let MX be the free commutative monoid over a set X, equivalently the free N-module over X, or equivalently the set of finite multisets of X. Explicitly, for a function f : X → N define supp(f ) := {x ∈ X| f (x) = 0}. Then define MX as: MX = {f : X → N| |supp(f )| < ∞} The monoid structure on MX is defined by point-wise addition, (f + g)(x) = f (x) + g(x), while the unit is u : X → N which maps everything to zero, u(x) = 0. For each x ∈ X, let ηx : X → N which maps y to 1 if x = y and 0 otherwise. Define the following natural transformations: η = {(x, ηx)| x ∈ X} ⊆ X × MX µ = (F,
f )| F ∈ MMX ⊆ MMX × MX u = {(∗, u)} ⊆ {∗} × MX m = {((f , g), f + g) | f , g ∈ MX} ⊆ (MX × MX) × MX Alternatively, f ∈ MX can be seen as a monomial in variables supp(f ) = {x1, . . . , xn}, specifically xf (x1)
1
xf (x2)
2
. . . xf (xn)
n
. Therefore, µ and η correspond to composition of monomials, while m and u correspond to monomial multiplication.
SLIDE 19 Algebra Modality - Example II
Example
A commutative monoid in VECK is better known as a commutative K-algebra. Define the algebra modality Sym on VECK as follows: for a K-vector space V let Sym(V ) be the free commutative K-algebra over V , also known as the free symmetric algebra on V . Sym(V ) := K ⊕ V ⊕ (V ⊗sym V ) ⊕ . . . =
V ⊗sym . . . ⊗sym V where ⊗sym is the symmetrize tensor power of V .
SLIDE 20 Algebra Modality - Example II
Example
A commutative monoid in VECK is better known as a commutative K-algebra. Define the algebra modality Sym on VECK as follows: for a K-vector space V let Sym(V ) be the free commutative K-algebra over V , also known as the free symmetric algebra on V . Sym(V ) := K ⊕ V ⊕ (V ⊗sym V ) ⊕ . . . =
V ⊗sym . . . ⊗sym V where ⊗sym is the symmetrize tensor power of V . If X = {x1, x2, . . .} is a basis of V , then Sym(V ) ∼ = K[X]. Note that K[X] is the free K-vector space over MX. In particular for Kn, Sym(Kn) ∼ = K[x1, . . . , xn].
SLIDE 21 Algebra Modality - Example II
Example
A commutative monoid in VECK is better known as a commutative K-algebra. Define the algebra modality Sym on VECK as follows: for a K-vector space V let Sym(V ) be the free commutative K-algebra over V , also known as the free symmetric algebra on V . Sym(V ) := K ⊕ V ⊕ (V ⊗sym V ) ⊕ . . . =
V ⊗sym . . . ⊗sym V where ⊗sym is the symmetrize tensor power of V . If X = {x1, x2, . . .} is a basis of V , then Sym(V ) ∼ = K[X]. Note that K[X] is the free K-vector space over MX. In particular for Kn, Sym(Kn) ∼ = K[x1, . . . , xn]. Then the algebra modality structure can be described in terms of polynomials as: η : V → K[X] µ : K[MX] → K[X] xi → xi P (p1( x1), . . . , pn( xn)) → P (p1( x1), . . . , pn( xn)) u : K → K[X] m : K[X] ⊗ K[X] → K[X] 1 → 1 p( x) ⊗ q( y) → p( x)q( y) which we extend by linearity. Therefore, µ and η correspond to polynomial composition, while m and u correspond to polynomial multiplication.
SLIDE 22 Codifferential Categories - Definition
A codifferential category (dual of a differential category) is:
(i)
An additive symmetric monoidal category,
(ii)
With an algebra modality,
(iii)
Equipped with a deriving transformation.
SLIDE 23 Deriving Transformation - Definiton
A deriving transformation for an algebra modality is a natural transformation: SA
d
SA ⊗ A
whose axioms are based on the basic identities from differential calculus. IDEA: f (x) → f ′(x) ⊗ dx
(i)
Constant rule: c′ = 0
(ii)
Product rule: (f · g)′(x) = f ′(x)g(x) + f (x)g′(x)
(iii)
Linear rule: x′ = 1
(iv)
Chain rule: (f ◦ g)′(x) = f ′(g(x))g′(x)
(v)
Interchange rule:
d2f (x,y) dxdy
= d2f (x,y)
dydx
SLIDE 24 Deriving Transformation - Definiton
A deriving transformation for an algebra modality is a natural transformation: SA
d
SA ⊗ A
whose axioms are based on the basic identities from differential calculus. IDEA: f (x) → f ′(x) ⊗ dx
(i)
Constant rule: c′ = 0
(ii)
Product rule: (f · g)′(x) = f ′(x)g(x) + f (x)g′(x)
(iii)
Linear rule: x′ = 1
(iv)
Chain rule: (f ◦ g)′(x) = f ′(g(x))g′(x)
(v)
Interchange rule:
d2f (x,y) dxdy
= d2f (x,y)
dydx
Let’s see some examples first!
SLIDE 25 Deriving Transformation - Examples
Example
In REL, for the set X the deriving transformation is the subset: d := {(f , (f − ηx, x)) | x ∈ supp(f )} ⊂ MX × (MX × X) Note that for x ∈ supp(f ), f − ηx is well defined since if y = x, f (y) − ηx(y) = f (y), while for x, f (x) = 0 which implies that f (x) = n + 1 for some n, and therefore f (x) − ηx(x) = n. In terms of monomials, the deriving transformation is the relation which relates: xk1
1 xk2 2 . . . xkn n
∼ (xk1
1 xk2 2 . . . xki −1 i
. . . xkn
n , xi)
Example
Let V be a K-vector space with basis X = {x1, x2, . . .}. The deriving transformation can be described in terms of polynomials as follows: d : K[X] → K[X] ⊗ V p(x1, . . . , xn) →
n
∂p ∂xi (x1, . . . , xn) ⊗ xi
SLIDE 26 D.1 - Constant Rule
K
u
d
Example
In VecK, consider Kn, so Sym(Kn) ∼ = K[x1, . . . , xn]. For a constant polynomial p(x1, . . . , xn) = r:
n
∂p ∂xi (x1, . . . , xn) ⊗ xi = 0
SLIDE 27 D.2 - Product Rule
SA ⊗ SA
m
SA ⊗ SA ⊗ A
m⊗1
d
SA ⊗ A Example
In VecK, consider Kn, so Sym(Kn) ∼ = K[x1, . . . , xn]. For polynomials p(x1, . . . , xn) and q(x1, . . . , xn):
n
∂pq ∂xi (x1, . . . , xn) ⊗ xi =
n
p(x1, . . . , xn) ∂q ∂xi (x1, . . . , xn) ⊗ xi +
n
∂p ∂xi (x1, . . . , xn)q(x1, . . . , xn) ⊗ xi
SLIDE 28 D.3 - Linear Rule
A
η
d
Example
In VecK, consider Kn, so Sym(Kn) ∼ = K[x1, . . . , xn]. For a monomial of degree 1, p(x1, . . . , xn) = xj:
n
∂xj ∂xi (x1, . . . , xn) ⊗ xi = 1 ⊗ xj
SLIDE 29 D.4 - Chain Rule
SSA
d
SA
d
µ⊗d
SA ⊗ SA ⊗ A
m⊗1
SA ⊗ A Example
In VecK, consider Kn, so Sym(Kn) ∼ = K[x1, . . . , xn]. For polynomials p(x1, . . . , xn) and q(x):
n
∂q(p(x1, . . . , xn)) ∂xi (x1, . . . , xn) ⊗ xi =
n
∂q ∂x (p(x1, . . . , xn)) ∂q ∂xi (x1, . . . , xn) ⊗ xi
SLIDE 30 D.5 - Interchange Rule
SA
d
SA ⊗ A
d⊗1
SA ⊗ A ⊗ A
1⊗σ
d⊗1
SA ⊗ A ⊗ A Example
In VecK, consider Kn, so Sym(Kn) ∼ = K[x1, . . . , xn]. For a polynomial p(x1, . . . , xn):
n
n
∂p ∂xi
∂xj (x1, . . . , xn) ⊗ xj ⊗ xi =
n
n
∂p ∂xi
∂xj (x1, . . . , xn) ⊗ xi ⊗ xj
SLIDE 31 Deriving Transformation - Definiton
K
u
d
η
d
SA ⊗ A SA ⊗ SA
m
SA ⊗ SA ⊗ A
m⊗1
d
SA ⊗ A
SSA
d
SA
d
d
SA ⊗ A
d⊗1 SA ⊗ A ⊗ A 1⊗σ
µ⊗d SA ⊗ SA ⊗ A m⊗1 SA ⊗ A
SA ⊗ A
d⊗1
SA ⊗ A ⊗ A
SLIDE 32 Codifferential Category Example: Smooth Functions
Example
A C∞-ring is commutative R-algebra A such that for each for smooth map f : Rn → R there is a function Φf : An → A and such that the Φf satisfy certain coherences between them.
- Ex. For a smooth manifold M, C∞(M) = {f : M → R| f smooth} is a C∞-ring.
For every R-vector space V , there is a free C∞-ring over V , S∞(V ). This induces an algebra modality which has a deriving transformation. In particular, S∞(Rn) = C∞(Rn), and: d : C∞(Rn) → C∞(Rn) ⊗ Rn f − →
∂f ∂xi ⊗ xi Cruttwell, G.S.H., Lemay, J.S. and Lucyshyn-Wright, R.B.B., 2019. Integral and differential structure on the free C ∞-ring modality. arXiv preprint arXiv:1902.04555.
SLIDE 33
Codifferential Categories - What We Can Do With Them
Lot’s of interesting stuff can be done with S-algebras.
SLIDE 34 Codifferential Categories - What We Can Do With Them
Lot’s of interesting stuff can be done with S-algebras.
Example
Generalized K¨ ahler differentials for S-algebras, in particular for SA, the deriving transformation d : SA → SA ⊗ A is the universal derivation for these generalized K¨ ahler differentials. When S = Sym ⇒ Classical K¨ ahler differentials for commutative algebras. When S = S∞ ⇒ Differential 1-forms from differential geometry. Blute, R., Lucyshyn-Wright, R.B.B. and O’NeilL, K. 2016. Derivations in codifferential
- categories. Cahiers de Topologie et Geometrie Differentielle Categorique Vol LVII.
Example
Hochschild complex, de Rham complex, and (co)homology for S-algebras. O’Neill, K., 2017. Smoothness in codifferential categories (PhD Thesis).
Example
Differentials algebras in a codifferential category, which are S-algebra with a derivation which is axiomatized by the chain rule instead of the product rule. Lemay, J.S.P., 2019. Differential algebras in codifferential categories. Journal of Pure and Applied Algebra.
SLIDE 35 Differential Categories - Definition
A differential category is: An additive symmetric monoidal category A coalgebra modality which is a comonad (!, δ, ε): !A
δ
!!A
!A
ε
A
which comes equipped with two natural transformations: !A
∆
!A ⊗ !A
!A
e
K
such that (SA, ∆, e) is a cocommutative comonoid and δ is a comonoid morphism. A deriving transformation 2 !A ⊗ A
d
!A
which satisfies the dual identities. The dual of a differential category is a coddiferential category.
2The term deriving transformation is used for both differential categories and codifferential categories... Terminology oops!
SLIDE 36
Differential Categories - Examples
Example
RELop with M, VECop
K with Sym, and VECop R with S∞ are all differential categories.
SLIDE 37 Differential Categories - Examples
Example
RELop with M, VECop
K with Sym, and VECop R with S∞ are all differential categories.
Example
REL, being a self-dual category, can be made into a differential category. Define a coalgebra modality structure on M as follows: ε = {(ηx, x)| x ∈ X} ⊆ MX × X δ = (f , F)|
g = f ⊆ MX × MMX e = {(u, ∗)} ⊆ MX × {∗} ∆ = {(f , (g, h)) | g + h = f } ⊆ MX × (MX × MX) and a deriving transformation as follows: d := {((f , x), f + ηx) | x ∈ X, f ∈ MX} ⊂ (MX × X) × MX
SLIDE 38 Differential Categories - Examples
Example
RELop with M, VECop
K with Sym, and VECop R with S∞ are all differential categories.
Example
REL, being a self-dual category, can be made into a differential category. Define a coalgebra modality structure on M as follows: ε = {(ηx, x)| x ∈ X} ⊆ MX × X δ = (f , F)|
g = f ⊆ MX × MMX e = {(u, ∗)} ⊆ MX × {∗} ∆ = {(f , (g, h)) | g + h = f } ⊆ MX × (MX × MX) and a deriving transformation as follows: d := {((f , x), f + ηx) | x ∈ X, f ∈ MX} ⊂ (MX × X) × MX
Example
Categorial models of differential linear logic (as introduced by Ehrhard and Regnier) !A ⊢ B !A, A ⊢ B
SLIDE 39 Differential Categories - More Examples
Example
Ehrhard provides a differential linear category (amongst others) whose objects are linearly topologized vector spaces generated by finiteness spaces. The differential structure corresponds to differentiating multivariable power series. Ehrhard, T., 2018. An introduction to differential linear logic: proof-nets, models and
- antiderivatives. Mathematical Structures in Computer Science, 28(7), pp.995-1060.
Example
Blute, Ehrhard, and Tasson showed that the category of convenient vector spaces and bounded linear maps between them is a differential linear category. The differential structure is induced by the limit definition of the derivative in locally convex vector spaces. Blute, R., Ehrhard, T. and Tasson, C., 2012 A convenient differential category, Cahiers de Topologie et Geometrie Differentielle Categorique Vol LIII.
Example
Clift and Murfet showed that the category of vector spaces where !V is the cofree cocommutative coalgebra over V is a differential category – more on this by D. Murfet in his talk! (In fact every Lafont category with additive structure is a differential category [BLO]) Clift, J. and Murfet, D., 2018. Derivatives of Turing machines in Linear Logic. arXiv preprint arXiv:1805.11813.
SLIDE 40 A quick word on the Seely Isomorphisms
A coalgebra modality on a symmetric monoidal category with finite products is said to have the Seely isomorphisms if: !(A × B)
∆
!(A × B) ⊗ !(A × B)
!(π0)⊗!(π1) !A ⊗ !B
!⊤
e
K
are isomorphisms, that is, !(A × B) ∼ = !A ⊗ !B and !⊤ ∼ = K. In this case, the differential structure can equivalently be axiomatized by a natural transformation: A
η
!A
known as a codereliction. (Idea: evaluating the derivative at zero) Blute, R.F., Cockett, J.R.B., Lemay, J.S. and Seely, R.A.G., 2018. Differential categories
- revisited. arXiv preprint arXiv:1806.04804.
SLIDE 41
Differential Categories - Smooth Maps
Every differential category has a notion of a smooth map.
SLIDE 42
Differential Categories - Smooth Maps
Every differential category has a notion of a smooth map. A smooth map A → B is a coKleisli map, that is, a map !A → B.
SLIDE 43
Differential Categories - Smooth Maps
Every differential category has a notion of a smooth map. A smooth map A → B is a coKleisli map, that is, a map !A → B.
Example
Let’s consider our C∞-ring codifferential category example, where !(Rn) := C∞(Rn).
SLIDE 44
Differential Categories - Smooth Maps
Every differential category has a notion of a smooth map. A smooth map A → B is a coKleisli map, that is, a map !A → B.
Example
Let’s consider our C∞-ring codifferential category example, where !(Rn) := C∞(Rn). f : Rn → R f is a smooth function
SLIDE 45
Differential Categories - Smooth Maps
Every differential category has a notion of a smooth map. A smooth map A → B is a coKleisli map, that is, a map !A → B.
Example
Let’s consider our C∞-ring codifferential category example, where !(Rn) := C∞(Rn). f : Rn → R f is a smooth function f ∈ C∞(Rn)
SLIDE 46
Differential Categories - Smooth Maps
Every differential category has a notion of a smooth map. A smooth map A → B is a coKleisli map, that is, a map !A → B.
Example
Let’s consider our C∞-ring codifferential category example, where !(Rn) := C∞(Rn). f : Rn → R f is a smooth function f ∈ C∞(Rn) pf : R → C∞(Rn) pf linear map in VECR, pf (1) = f
SLIDE 47
Differential Categories - Smooth Maps
Every differential category has a notion of a smooth map. A smooth map A → B is a coKleisli map, that is, a map !A → B.
Example
Let’s consider our C∞-ring codifferential category example, where !(Rn) := C∞(Rn). f : Rn → R f is a smooth function f ∈ C∞(Rn) pf : R → C∞(Rn) pf linear map in VECR, pf (1) = f C∞(Rn) → R map in VECop
R
SLIDE 48
Differential Categories - Smooth Maps
Every differential category has a notion of a smooth map. A smooth map A → B is a coKleisli map, that is, a map !A → B.
Example
Let’s consider our C∞-ring differential category example, where !(Rn) := C∞(Rn). f : Rn → R f is a smooth function f ∈ C∞(Rn) pf : R → C∞(Rn) pf linear map in VECR, pf (1) = f C∞(Rn) → R map in VECop
R
!(Rn) → R
SLIDE 49
Differential Categories - Smooth Maps
Amongst the smooth maps we have: The constant maps: !A
e
K B
The linear maps: !A
ε
A B
The product of smooth maps: !A
∆
!A ⊗ !A
f ⊗g
B ⊗ C
The composition of smooth maps: !A
δ
!!A
!(f )
!B
g
C
SLIDE 50
Differential Categories - Smooth Maps
Amongst the smooth maps we have: The constant maps: !A
e
K B
The linear maps: !A
ε
A B
The product of smooth maps: !A
∆
!A ⊗ !A
f ⊗g
B ⊗ C
The composition of smooth maps: !A
δ
!!A
!(f )
!B
g
C
The differential of a smooth map f : !A → B is then: !A ⊗ A
d
!A
f
B
So the deriving transformation axioms describe differentiation of constants, identity maps, composition, etc. in the coKleisli category! So next we will take a closer look at the coKleisli category of a differential category: Cartesian Differential Categories!
SLIDE 51 Cartesian Differential Categories - Definition
A Cartesian differential category is:
(i)
A Cartesian left additive category;
(ii)
With a differential combinator.
SLIDE 52 Cartesian Differential Categories - Definition
A Cartesian differential category is:
(i)
A Cartesian left additive category;
(ii)
With a differential combinator.
SLIDE 53 Cartesian Left Additive Category - Definition
A left additive category is a category X such that each hom-set X(A, B) is a commutative monoid with binary operation + and zero 0, that is, we can add parallel maps f + g and there is a zero map 0, and such that composition 3 on the left preserves the additive structure: f (g + h) = fg + fh f 0 = 0 A map f is additive if it preserves the additive structure by composition on the right: (g + h)f = gf + hf 0f = 0 A Cartesian left additive category is a left additive category with finite products such that the projection maps are additive.
3Composition is written diagrammatically, so fg is the map that does f then g
SLIDE 54 Cartesian Left Additive Category - Examples
Example
Every category with finite biproducts (equivalent to an additive category with finite products) is a Cartesian left additive category where every map is additive.
Example
Define the category SMOOTHR where: Objects: Rn Maps: Smooth maps F : Rm → Rn. Composition is given by the composition of smooth maps, additive structure is given by the sum
- f smooth maps, and the product structure on objects is the standard Cartesian product.
SLIDE 55 Cartesian Differential Categories - Definition
A Cartesian differential category is:
(i)
A Cartesian left additive category;
(ii)
With a differential combinator.
SLIDE 56
Differential Combinator - Definition
A differential combinator on a Cartesian left additive category X is a combinator D, which is a family of functions X(A, B) → X(A × A, B), which written as an inference rule: f : A → B D[f ] : A × A → B
SLIDE 57
Differential Combinator - Definition
A differential combinator on a Cartesian left additive category X is a combinator D, which is a family of functions X(A, B) → X(A × A, B), which written as an inference rule: f : A → B D[f ] : A × A → B Before giving the axioms, let’s look at some examples!
SLIDE 58 Differential Combinator - Examples
Example
For a category with finite biproducts, for a map f : A → B: D[f ] := A ⊕ A
π1
A
f
B
where π1 is the second projection.
Example
For a smooth map f : Rn → R recall that the gradient of f is: ∇(f ) : Rn → Rn ∇(f )( v) := ∂f ∂x1 ( v), . . . , ∂f ∂xn ( v) Then the differential combinator is defined as the directional derivative: D[f ] : Rn × Rn → R D[f ]( v, w) := ∇(f )( v) · w =
n
∂f ∂xi ( v)wi For a smooth map F : Rm → Rn, F = f1, . . . , fn, the differential combinator is defined as: D[F] : Rn × Rn → Rm D[F] := D[f1], . . . , D[fn] which can also be defined using the Jacobian of F: D[F]( v, w) = J(F)( v) wT
SLIDE 59
Differential Combinator - Definition
A differential combinator on a Cartesian left additive category X is a combinator D, which is a family of functions X(A, B) → X(A × A, B), which written as an inference rule: f : A → B D[f ] : A × A → B
SLIDE 60
Differential Combinator - Definition
A differential combinator on a Cartesian left additive category X is a combinator D, which is a family of functions X(A, B) → X(A × A, B), which written as an inference rule: f : A → B D[f ] : A × A → B To help us with the axioms, we will use the following notation/proto-term logic: D[f ](a, b) := df (x) dx (a) · b
Remark
There is a sound and complete term logic for Cartesian differential categories. In short: anything we can prove using the term logic, holds in any Cartesian differential category. So doing proofs in the term logic is super useful!
SLIDE 61
CD.1 - Additivity of Combinator & CD.2 - Additivity in Second Argument
Additivity of Combinator: D[f + g] = D[f ] + D[g] D[0] = 0 df (x) + g(x) dx (a) · b = df (x) dx (a) · b + dg(x) dx (a) · b d0 dx (a) · b = 0 Additivity in Second Argument a, b + cD[f ] = a, bD[f ] + a, cD[f ] a, 0D[f ] = 0 df (x) dx (a) · (b + c) = df (x) dx (a) · b + df (x) dx (a) · c df (x) dx (a) · 0 = 0
SLIDE 62
CD.3 - Identities + Projections & CD.4 - Pairings
Identities + Projections D[1] = π1 D[πi] = π1πi dx dx (a) · b = b dxi d(x0, x1) (a0, a1) · (b0, b1) = bi Pairings D[f , g] = D[f ], D[g] df (x), g(x) dx (a) · b = df (x) dx (a) · b, dg(x) dx (a) · b
SLIDE 63
CD.5 - Chain Rule
Chain Rule: D[fg] = π0f , D[f ]D[g] dg(f (x)) dx (a) · b = dg(x) dx (f (a)) · df (x) dx (a) · b
SLIDE 64
CD.6 - Linearity in Second Argument & CD.7 - Symmetry
Linearity in Second Argument a, 0, 0, bD [D[f ]] = D[f ] d df (x)
dx (y) · z
d(y, z) (a, 0) · (0, b) = df (x) dx (a) · b Symmetry a, b, c, dD [D[f ]] = a, c, b, dD [D[f ]] d df (x)
dx (y) · z
d(y, z) (a, b) · (c, d) = d df (x)
dx (y) · z
d(y, z) (a, c) · (b, d) More on these axioms soon!
SLIDE 65 Cartesian Differential Categories - Definition
A Cartesian differential category is:
(i)
A Cartesian left additive category;
(ii)
With a differential combinator. Before giving more example: let’s see what we can do with the differential combinator!
SLIDE 66
Partial Derivatives I
Suppose we have a map f : A × B → C and we only want to differentiate with respect to A.
SLIDE 67
Partial Derivatives I
Suppose we have a map f : A × B → C and we only want to differentiate with respect to A. We can zero out in D[f ] : (A × B) × (A × B) → C to obtain a partial derivative!
SLIDE 68
Partial Derivatives I
Suppose we have a map f : A × B → C and we only want to differentiate with respect to A. We can zero out in D[f ] : (A × B) × (A × B) → C to obtain a partial derivative! Define the partial derivative D0[f ] : (A × B) × A → C as follows: D0[f ] := (A × B) × A
(1A×1B )×1A,0 (A × B) × (A × B) D[f ]
C
D0[f ](a, b, c) := df (x, b) dx (a) · c := df (x, y) d(x, y) (a, b) · (c, 0)
SLIDE 69
Partial Derivatives I
Suppose we have a map f : A × B → C and we only want to differentiate with respect to A. We can zero out in D[f ] : (A × B) × (A × B) → C to obtain a partial derivative! Define the partial derivative D0[f ] : (A × B) × A → C as follows: D0[f ] := (A × B) × A
(1A×1B )×1A,0 (A × B) × (A × B) D[f ]
C
D0[f ](a, b, c) := df (x, b) dx (a) · c := df (x, y) d(x, y) (a, b) · (c, 0) Similarly, define the partial derivative D1[f ] : (A × B) × B → C as follows: D1[f ] := (A × B) × B
(1A×1B )×0,1B (A × B) × (A × B) D[f ]
C
D1[f ](a, b, d) := df (a, y) dy (b) · d := df (x, y) d(x, y) (a, b) · (0, d) You can also do this with maps f : A0 × . . . × An → B.
SLIDE 70
Partial Derivatives II
A consequence of symmetry rule, CD.7, is that for f : A × B → C, doing the partial derivative with respect to A then B is the same as doing the partial derivative with respect to B then A. d df (x,y)
dy
(b) · d dx (a) · c = d df (x,y)
dx
(a) · c dy (b) · d
SLIDE 71 Partial Derivatives II
A consequence of symmetry rule, CD.7, is that for f : A × B → C, doing the partial derivative with respect to A then B is the same as doing the partial derivative with respect to B then A. d df (x,y)
dy
(b) · d dx (a) · c = d df (x,y)
dx
(a) · c dy (b) · d Additivity in the second argument, CD.2, tells us that for f : A × B → C, D[f ] is the sum of the partial derivatives! df (x, y) d(x, y) (a, b) · (c, d) = df (x, y) d(x, y) (a, b) · ((c, 0) + (0, d)) = df (x, y) d(x, y) (a, b) · (c, 0) + df (x, y) d(x, y) (a, b) · (0, d) = df (x, b) dx (a) · c + df (a, y) dy (b) · d
Example
For a smooth map f : Rn → R, D[f ] is the sum of its partial derivatives: D[f ] : Rn × Rn → R D[f ]( v, w) := ∇(f )( v) · w =
n
∂f ∂xi ( v)wi
SLIDE 72 Linear Maps I
In a Cartesian differential category, there is a natural notion of linear maps.
4(That said, in the above examples: Additive ⇒ Linear)
SLIDE 73 Linear Maps I
In a Cartesian differential category, there is a natural notion of linear maps. A map f : A → B is said to be linear if: D[f ] := A × A
π1
A
f
B
df (x) dx (a) · b = f (b)
Example
In a category with finite biproducts, every map is linear (by definition!).
Example
In SMOOTHR, F : Rm → Rn is linear in the Cartesian differential sense if and only if F is linear in the classical sense.
4(That said, in the above examples: Additive ⇒ Linear)
SLIDE 74 Linear Maps I
In a Cartesian differential category, there is a natural notion of linear maps. A map f : A → B is said to be linear if: D[f ] := A × A
π1
A
f
B
df (x) dx (a) · b = f (b)
Example
In a category with finite biproducts, every map is linear (by definition!).
Example
In SMOOTHR, F : Rm → Rn is linear in the Cartesian differential sense if and only if F is linear in the classical sense. Linear ⇒ Additive, but not necessarily the converse! 4 Identity maps and projection maps are linear by CD.3
4(That said, in the above examples: Additive ⇒ Linear)
SLIDE 75
Linear Maps II
A map f : A × B → C can also be linear in its second argument if it is linear with respect to its partial derivative: D1[f ] := (A × B) × B
π0×1
A × B
f
C
df (a, y) dy (b) · c = f (a, c)
SLIDE 76 Linear Maps II
A map f : A × B → C can also be linear in its second argument if it is linear with respect to its partial derivative: D1[f ] := (A × B) × B
π0×1
A × B
f
C
df (a, y) dy (b) · c = f (a, c) The linearity in the second argument rule, CD.6, says that for any f : A → B, D[f ] is linear in its second argument: d df (x)
dx (a) · y
dy (b) · c = df (x) dx (a) · c
Example
For a smooth map f : Rn → R, D[f ] is linear in its second argument: D[f ] : Rn × Rn → R D[f ]( v, w) := ∇(f )( v) · w =
n
∂f ∂xi ( v)wi
SLIDE 77
Cartesian Differential Categories - Other Examples
Example
Every model of the differential λ-calculus induces a Cartesian differential category. Conversly, every Cartesian differential category which is Cartesian closed such that the evaluation maps are linear in their second argument gives rises to a model of the differential λ-calculus. Manzonetto, G., 2012. What is a Categorical Model of the Differential and the Resource λ-Calculi?. Mathematical Structures in Computer Science, 22(3), pp.451-520.
Example
Bauer, Johnson, Osborne, Riehl, and Tebbe (BJORT) constructed an Abelian functor calculus model of a Cartesian differential category. Bauer, K., Johnson, B., Osborne, C., Riehl, E. and Tebbe, A., 2018. Directional derivatives and higher order chain rules for abelian functor calculus. Topology and its Applications, 235, pp.375-427.
Example
There is a couniversal construction of Cartesian differential categories, known as the Faa di Bruno construction, that is, for every Cartesian left additive category X there is a cofree Cartesian differential category over X. Cockett, J.R.B. and Seely, R.A.G., 2011. The Faa di bruno construction. Theory and applications of categories, 25(15), pp.394-425.
SLIDE 78 The Differential Category World: It’s all connected!
Differential Categories
Blute, Cockett, Seely - 2006
Cartesian Differential Categories
Blute, Cockett, Seely - 2009
Restriction Differential Categories
Cockett, Cruttwell, Gallagher - 2011
Tangent Categories
Rosicky - 1984 Cockett, Cruttwell - 2014
coKleisli ⊗-Representation Manifold Completion ⊂ ⊂ T
a l M a p s Differential Objects c
i l e n b e r g
e
SLIDE 79
The coKleisli Category of a Differential Category I
Consider a differential category X with a coalgebra modality !: !A
δ
!!A
!A
ε
A
!A
∆
!A ⊗ !A
!A
e
K
and deriving transformation: !A ⊗ A
d
!A
and finite products × (which are actually biproducts by the additive structure of X).
SLIDE 80
The coKleisli Category of a Differential Category I
Consider a differential category X with a coalgebra modality !: !A
δ
!!A
!A
ε
A
!A
∆
!A ⊗ !A
!A
e
K
and deriving transformation: !A ⊗ A
d
!A
and finite products × (which are actually biproducts by the additive structure of X). Let X! be the coKleisli category and we are going to use interpretation brackets −. f : A → B in X! f : !A → B 1 = !A
ε
A
fg = !A
δ
!!A
!(f )
!B
g
C
So how do we make X! into a Cartesian differential category?
SLIDE 81
The coKleisli Category of a Differential Category II
For the product structure: On objects, A × B Projections: πi := !(A0 × A1)
ε
A0 × A1
πi
Ai
For a comonad on a category with finite products, the coKleisli category has finite products.
SLIDE 82
The coKleisli Category of a Differential Category II
For the product structure: On objects, A × B Projections: πi := !(A0 × A1)
ε
A0 × A1
πi
Ai
For a comonad on a category with finite products, the coKleisli category has finite products. For the additive structure: The sum of maps: f + g := f + g Zero maps: 0 := 0 For a comonad on an additive category, the coKleisli category is left additive category: f (g +h) = δ!(f )g +h = δ!(f )(g+h) = δ!(f )g+δ!(f )h = fg+fh = fg +fh
SLIDE 83
The coKleisli Category of a Differential Category II
For the product structure: On objects, A × B Projections: πi := !(A0 × A1)
ε
A0 × A1
πi
Ai
For a comonad on a category with finite products, the coKleisli category has finite products. For the additive structure: The sum of maps: f + g := f + g Zero maps: 0 := 0 For a comonad on an additive category, the coKleisli category is left additive category: f (g +h) = δ!(f )g +h = δ!(f )(g+h) = δ!(f )g+δ!(f )h = fg+fh = fg +fh (f + g)h = δ!(f + g)h = δ!(f + g)h
SLIDE 84
The coKleisli Category of a Differential Category II
For the product structure: On objects, A × B Projections: πi := !(A0 × A1)
ε
A0 × A1
πi
Ai
For a comonad on a category with finite products, the coKleisli category has finite products. For the additive structure: The sum of maps: f + g := f + g Zero maps: 0 := 0 For a comonad on an additive category, the coKleisli category is left additive category: f (g +h) = δ!(f )g +h = δ!(f )(g+h) = δ!(f )g+δ!(f )h = fg+fh = fg +fh (f + g)h = δ!(f + g)h = δ!(f + g)h Every coKleisli map of the form εf is additive.
SLIDE 85
The coKleisli Category of a Differential Category II
For the product structure: On objects, A × B Projections: πi := !(A0 × A1)
ε
A0 × A1
πi
Ai
For a comonad on a category with finite products, the coKleisli category has finite products. For the additive structure: The sum of maps: f + g := f + g Zero maps: 0 := 0 For a comonad on an additive category, the coKleisli category is left additive category: f (g +h) = δ!(f )g +h = δ!(f )(g+h) = δ!(f )g+δ!(f )h = fg+fh = fg +fh (f + g)h = δ!(f + g)h = δ!(f + g)h Every coKleisli map of the form εf is additive. For a comonad on an additive category with finite products, the coKleisli category is a Cartesian left additive category.
SLIDE 86
The coKleisli Category of a Differential Category III
Recall that earlier we defined the differential of f : !A → B as: !A ⊗ A
d
!A
f
B
But this is not a coKleisli map! The differential combinator D[f ] : !(A × A) → B is defined as follows: !(A × A)
∆
!(A × A) ⊗ !(A × A)
!(π0)⊗!(π1)
!A ⊗ !A
1⊗ε
!A ⊗ A
d
!A
f
B
SLIDE 87
The coKleisli Category of a Differential Category III
Recall that earlier we defined the differential of f : !A → B as: !A ⊗ A
d
!A
f
B
But this is not a coKleisli map! The differential combinator D[f ] : !(A × A) → B is defined as follows: !(A × A)
∆
!(A × A) ⊗ !(A × A)
!(π0)⊗!(π1)
!A ⊗ !A
1⊗ε
!A ⊗ A
d
!A
f
B Theorem
For a differential category with finite products, its coKleisli category is a Cartesian differential category. Every coKleisli map of the form εf is linear! (This is an if and only if when one has the Seely isomorphisms)
SLIDE 88
The other direction: Cartesian differential storage categories
Blute, R., Cockett, J.R.B. and Seely, R.A., 2015. Cartesian differential storage categories. Theory and Applications of Categories, 30(18), pp.620-686. “... it was not obvious how to pass from Cartesian differential categories back to monoidal differential categories.This paper provides natural conditions under which the linear maps of a Cartesian differential category form a monoidal differential category. ... The purpose of this paper is to make precise the connection between the two types of differential categories. ” Main idea: While not every Cartesian differential category is the coKleisli category of a differential category, Cartesian differential storage categories are precisely the coKleisli categories of differential categories.
Theorem
For a Cartesian differential storage category, its category of linear maps form a differential category with finite products and the Seely isomorphisms. Conversly, for a differential category with finite products and the Seely isomorphisms, it’s coKleisli category is a Cartesian differential storage category.
SLIDE 89 The Differential Category World: It’s all connected!
Differential Categories
Blute, Cockett, Seely - 2006
Cartesian Differential Categories
Blute, Cockett, Seely - 2009
Restriction Differential Categories
Cockett, Cruttwell, Gallagher - 2011
Tangent Categories
Rosicky - 1984 Cockett, Cruttwell - 2014
Hope you enjoyed it! Thanks for listening! Merci! coKleisli ⊗-Representation Manifold Completion ⊂ ⊂ T
a l M a p s Differential Objects c
i l e n b e r g
e