The Theory of Differential Categories Lecture 2: Cartesian Differential

The Theory of Differential Categories Lecture 2: Cartesian Differential

The Theory of Differential Categories Lecture 2: Cartesian Differential Categories JS Pacaud Lemay The Differential Category World: It's all connected! Restriction Differential Categories Cockett, Cruttwell, Gallagher - 2011 Total Maps coKleisli Cartesian ⊂ Differential Differential Categories Categories Blute, Cockett, Seely - 2006 Blute, Cockett, Seely - 2009 Embedding ⊂ Differential Objects Manifold Completion co-Eilenberg-Moore Tangent Categories Rosicky - 1984 Cockett, Cruttwell - 2014 Today's Story: Differential Categories Cartesian Differential Categories: Formalize differentiation in multivariable calculus of Euclidean spaces. Provide the categorical semantics of the differential λ-calculus. Main Reference: R. Blute, R. Cockett, R.A.G. Seely, Cartesian Differential Categories Cartesian Differential Categories - Definition A Cartesian differential category is: (i) A Cartesian left additive category; (ii) With a differential combinator. Cartesian Differential Categories - Definition A Cartesian differential category is: (i) A Cartesian left additive category; (ii) With a differential combinator. Cartesian Left Additive Category - Definition A left additive category is a category X which is skew-enriched over commutative monoids: Campbell, A., 2018. Skew-enriched categories. Explicitly, every homset is a commutative monoid, so we can add maps and have zero maps: + : X(A; B) × X(A; B) ! X(A; B) 0 2 X(A; B) such that composition preserves the addition in the following sense: (f + g) ◦ x = f ◦ x + g ◦ x 0 ◦ x = 0 A map f is additive if f ◦ (x + y) = f ◦ x + f ◦ y and f ◦ 0 = 0. A Cartesian left additive category (CLAC) is a left additive category with finite products such that the projection maps π0 : A × B ! A and π1 : A × B ! B are additive. Cartesian Left Additive Categories - Examples Example Every category with finite biproducts is a CLAC where every map is additive. For example, VECk the category of k-vector spaces and k-linear maps is a CLAC. ! VECk the category of k-vector spaces and arbitrary set functions is a CLAC, where the sum of set functions is defined point-wise (f + g)(x) = f (x) + g(x). Let Polyk be the Lawvere theory of polynomials, that is, the category whose objects are n 2 N and where a map P : n ! m is a tuple of polynomials: P = hp1;:::; pmi pi 2 R[x1;:::; xn] Then Polyk is a CLAC (where n × m = n + m). Let SMOOTH be the category of smooth real functions, that is, the category whose objects n n m are the Euclidean vector spaces R and whose maps are smooth function F : R ! R , which is actually an m-tuple of smooth functions: n F = hf1;:::; fni fi : R ! R Then SMOOTH is a CLAC. Note that Poly is a sub-CLAC of SMOOTH. R Cartesian Differential Categories - Definition A Cartesian differential category is: (i) A Cartesian left additive category; (ii) With a differential combinator. 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! Differential Combinator - Main Example Example SMOOTH is a Cartesian differential category where the differential combinator is defined as the n m directional derivative of a smooth function. A smooth function F : R ! R is in fact a tuple: F = hf1;:::; fmi n n of smooth functions fi : R ! R. Then the Jacobian matrix of F at vector ~x 2 R is the matrix r(F )(~x) of size m × n whose coordinates are the partial derivatives of the fi : 2 @f1 (~x) @f1 (~x) ::: @f1 (~x)3 @x1 @x2 @xn 6 @f2 @f2 @f2 7 6 @x (~x) @x (~x) ::: @x (~x)7 6 1 2 n 7 r(F )(~x) := 6 . 7 6 . 7 4 . 5 @fm (~x) @fm (~x) ::: @fm (~x) @x1 @x2 @xn n m n n m So for a smooth function F : R ! R , its derivative D[F ]: R × R ! R is then defined as: * n n + X @f1 X @fn D[F ](~x; ~y) := r(F )(~x) · ~y = (~x)yi ;:::; (~x)yi @x @x i=1 i i=1 i where · is matrix multiplication and ~y is seen as a n × 1 matrix. For example, Let f (x; y) = x2y. D[f ] ((x; y); (a; b)) = 2xya + x2b Cartesian Differential Categories - Other Main Examples Example Any category with finite biproduct ⊕ is a CDC, where for a map f : A ! B: π1 f D[f ] := A ⊕ A / A / B For example, VECk is a CDC where D[f ](x; y) = f (y). Example POLYk is a CDC where for a map P : n ! m with P = hp1;:::; pni, D[P]: n × n ! m is: * n n + X @p1 X @pn D[P] := yi ;:::; yi @x @x i=1 i i=1 i n P @p1 where @x yi 2 R[x1;:::; xn; y1;:::; yn]. Note that POLYR is a sub-CDC of SMOOTH. i=1 i 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: df (x) D[f ](a; b) := (a) · b dx Example The notation comes from SMOOTH: D[F ](~x; ~y) := r(F )(~x) · ~y. 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! 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) df (x) dg(x) d0 (a) · b = (a) · b + (a) · b (a) · b = 0 dx dx dx dx Additivity in Second Argument D[f ] ◦ ha; b + ci = D[f ] ◦ ha; bi + D[f ] ◦ ha; ci D[f ] ◦ hx; 0i = 0 df (x) df (x) df (x) df (x) (a) · (b + c) = (a) · b + (a) · c (a) · 0 = 0 dx dx dx dx CD.3 - Identities + Projections & CD.4 - Pairings Identities + Projections D[1] = π1 D[πi ] = πi ◦ π1 dx dxi (a) · b = b (a0; a1) · (b0; b1) = bi dx d(x0; x1) Pairings D[hf ; gi] = hD[f ]; D[g]i dhf (x); g(x)i df (x) dg(x) (a) · b = (a) · b; (a) · b dx dx dx Example In SMOOTH, if F = hf1;:::; fni, then D[F ](~x; ~y) := hD[f1](~x; ~y);:::; D[fn](~x; ~y)i. CD.5 - Chain Rule Chain Rule: D[g ◦ f ] = D[g] ◦ hf ◦ π0; D[f ]i dg(f (x)) dg(x) df (x) (a) · b = (f (a)) · (a) · b dx dx dx CD.6 - Linearity in Second Argument & CD.7 - Symmetry f : A ! B D[f ]: A × A ! B D [D[f ]] : (A × A) × (A × A) ! B Linearity in Second Argument D [D[f ]] ◦ ha; 0; 0; bi = D[f ] ◦ ha; bi df (x) d (y) · z df (x) dx (a; 0) · (0; b) = (a) · b d(y; z) dx Symmetry D [D[f ]] ◦ hha; bi; hc; dii = D [D[f ]] ◦ hha; ci; hb; dii d df (x) (y) · z d df (x) (y) · z dx (a; b) · (c; d) = dx (a; c) · (b; d) d(y; z) d(y; z) More on these axioms soon! Cartesian Differential Categories - Definition A Cartesian differential category is: (i) A Cartesian left additive category; (ii) With a differential combinator. f : A ! B D[f ]: A × A ! B Before we give some more examples: let's see what we can do within a CDC! 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: (1A×1B )×h1A;0i D[f ] D0[f ] := (A × B) × A / (A × B) × (A × B) / C df (x; b) df (x; y) D0[f ](a; b; c) := (a) · c := (a; b) · (c; 0) dx d(x; y) Similarly, define the partial derivative D1[f ]:(A × B) × B ! C as follows: (1A×1B )×h0;1B i D[f ] D1[f ] := (A × B) × B / (A × B) × (A × B) / C df (a; y) df (x; y) D1[f ](a; b; d) := (b) · d := (a; b) · (0; d) dy d(x; y) You can also do this with maps f : A0 × ::: × An ! B. 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. df (x;y) d (b) · d d df (x;y) (a) · c dy (a) · c = dx (b) · d dx dy 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) df (x; y) (a; b) · (c; d) = (a; b) · ((c; 0) + (0; d)) d(x; y) d(x; y) df (x; y) df (x; y) = (a; b) · (c; 0) + (a; b) · (0; d) d(x; y) d(x; y) df (x; b) df (a; y) = (a) · c + (b) · d dx dy Example n For a smooth map f : R ! R, D[f ] is the sum of its partial derivatives: n n n X @f D[f ]: R × R ! R D[f ](~v; w~ ) := r(f )(~v) · w~ = (~v)wi @x i=1 i Linear Maps I In a Cartesian differential category, there is a natural notion of linear maps.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    32 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us