Writeup
The geometry begins with smooth manifolds, tangent vectors and the tangent bundle as Lee defines them, fixes a basis of each tangent space by a convention that need not be smooth, and only then defines a retraction; every later note speaks in tangent coordinates alone.
Context#
The order of the first two notes#
The Mathematics section opens with Retractions and tangent charts (geometry, 1) and comes back to Derivatives in tangent charts (geometry, 3), after the note on automatic differentiation. The first defines a retraction as a smooth map with
“with identified with ”. The third defines , the derivative of a map between manifolds, by reading the map in the charts that retractions provide.
So the derivative a retraction is defined by is not defined until two notes later, and when it is, it is defined through retractions. The definition rests on a derivative in some chart, which the notes never name. Neither do they define what is, or what it means for a map on it to be smooth. Both definitions are standard and short, and the notes need them.
The identification of tangent spaces#
The first note handles the tangent spaces in one paragraph: each “is identified with by a basis chosen smoothly in ”. It then concedes that the sphere has no such basis, by the hairy ball theorem, and asks a computation to stay where the basis is smooth. That assumption carries more weight than it looks. First-order notions (the derivative at a point, the chain rule, the tangent chart at a point) need a basis at each point and nothing more. Second-order notions (the mirror identity, the chart Hessian, densities read in the chart at a moving point) compare bases at nearby points, and they do need the bases to vary smoothly. The note does not say which is which.
skoro itself works only in coordinates. Every space’s tangent is a Vector of the space’s
dimension, as the doc comment of crates/skoro-core/src/retraction.rs says (read at d90aa47):
//! The tangent of every space is a `Vector` of the space's dimension.Its sphere, the embedded type of the acceptance test, carries exactly the data in question
(crates/skoro/tests/common/sphere.rs, at d90aa47):
//! The unit sphere `S²` of the acceptance test: storage 3, dimension 2, with the basis `B(x)`
//! smooth off the south pole and the inverse stereographic retraction scaled so that its
//! derivative at 0 is `B(x)`.is a basis of the tangent space at each point but the south pole, smooth where it is defined. The retraction is built so that, read through , its derivative at is the identity. The mathematics should say this in its own terms: a basis of each tangent space, how regular that basis is, and a retraction defined independently of it.
Decision#
The note keeps its slug, retraction, so that the links to it stay valid. Its sections follow,
in order.
Smooth manifolds and smooth maps#
The note cites [Lee13, Chapters 1 and 2] for a cohesive theory, and recalls what it uses. is a smooth manifold of dimension : a topological manifold with a smooth structure, that is, a maximal atlas of charts whose transition maps are smooth. A map , between smooth manifolds of dimensions and , is of class when it is continuous and, for every chart of and every chart of , the coordinate representation
is of class . Continuity makes open, so the representation is a map between open subsets of Euclidean spaces. Because the transition maps are smooth, it suffices to check this for the charts of any atlas. The set of these maps is , and a smooth map is one of class .
Tangent vectors and the tangent bundle#
The note cites [Lee13, Chapter 3] for these, and recalls:
- the tangent space , a real vector space of dimension , and the differential of a smooth map, which is linear and satisfies the chain rule ;
- that a chart around gives a basis of , its coordinate basis, in which has the Jacobian of the coordinate representation as its matrix;
- that a vector space has each identified with itself, canonically, so that on the differential is the Jacobian;
- the tangent bundle , a smooth manifold of dimension whose charts are built from those of , a point paired with the components of a vector in that chart’s coordinate basis; and its zero section .
This is everything the definition of a retraction needs, and the note needs nothing more from Lee.
A basis of each tangent space#
The note then fixes, for each point , a linear isomorphism
a basis of the tangent space at . Its columns are the basis vectors. The coordinate basis of a chart around is one choice, and every choice is the coordinate basis of some chart. In these bases, the derivative of a smooth map is a matrix:
On the convention is the identity, under the canonical identification, so of a map between Euclidean spaces is its Jacobian. The chain rule becomes the product of matrices, , because the bases at cancel. This is Proposition 3, which the third note used to prove and the first note now proves in one line.
No regularity in is asked of the convention, and it need not be defined everywhere. It may be given on an open subset only, and everything below is then said of points of , with every computation kept inside it. The sphere is the example. No convention on is smooth everywhere, by the hairy ball theorem, and the basis above is defined everywhere except the south pole and smooth where it is defined. On the rotations, a group’s left translations give a convention that is defined and smooth everywhere.
A convention without regularity is enough for everything at one point: the derivative, the chain rule and the tangent chart at . It is not enough for what compares the bases at nearby points: the mirror identity, the chart Hessian and the second-order half of the passes, and densities read in the chart at a moving point. For example, is measured in the basis at , and if that basis jumps, the mirror identity fails at first order. Those results assume that the convention is smooth near : that is smooth from to on an open , which says that its columns form a smooth local frame on ([Lee13, Chapter 8]). The retractions section shows that this is the same as being smooth near , which is how later notes state it.
Retractions#
With the tangent bundle and the differential in hand, a retraction is defined without any basis, as in optimization on manifolds (Absil, Mahony and Sepulchre, Optimization Algorithms on Matrix Manifolds, Section 4.1):
A retraction on is a smooth map such that, for every , its restriction to satisfies and , where is identified with as in item 3.
The condition on the differential is coordinate-free, so it holds whatever the convention. Read in the bases (1), the retraction at is a map from :
and its two conditions become, for every convention,
“The derivative at the origin is the identity” now has a meaning, given by (2), before it is used.
The note also shows that the convention is smooth on an open set if and only if is smooth on . If the convention is smooth, is the composite of with a smooth map. Conversely, the retraction’s condition on its differential gives
the velocity of a curve that depends smoothly on when does. So later notes can state the regularity they need as ” is smooth near ”, and never need to mention the basis.
The note keeps the two examples, rewritten to show the two pieces apart. On , , with the identity convention. On the positive reals, with canonically, the retraction is , and the convention measures relative change. Together they give .
Tangent charts#
is smooth and its differential at is , an isomorphism. The inverse
function theorem for manifolds ([Lee13, Chapter 4]) makes it a diffeomorphism from an open
neighbourhood of onto an open neighbourhood of . Its inverse, , is a smooth chart
centred at , compatible with the smooth structure because it is a diffeomorphism onto an
open subset of . Its coordinate basis at is : the tangent chart
reproduces the convention at its centre, and nowhere else need it agree with any other chart. The
equations (3) and roundtrip keep their tags.
Derivatives through the retraction#
Because and, by the inverse function theorem, , the chain rule gives the formula every later note computes with. For smooth and ,
the Jacobian at of a map between open subsets of Euclidean spaces. The derivative that (2) defines from the differential and the derivative read through the retraction are the same matrix. This is the statement the third note now makes as a definition, together with the recipe for deriving a Jacobian by hand: perturb, push through, solve for the tangent, and differentiate.
The mirror identity#
The mirror identity stays in this note, with its hypothesis made explicit: the convention is smooth near . Its proof differentiates in , which moves the basis.
From here on#
The note ends with an index of every place where later notes abuse notation, each standing for an object of this note read through the convention. A later note never writes , or . It treats a tangent vector as a column of numbers attached to a point, as skoro does, and keeps writing for the space of those columns, so that it is visible which point a vector belongs to. Inside this note is the space of derivations. After it, is its coordinate space, and the index says so first.
| written later as | stands for | first used in |
|---|---|---|
| , the tangent space at | , through | every later note |
| , a column of numbers | the tangent vector | every later note |
| a frame, a matrix of tangent vectors at | tangent vectors, each through | automatic differentiation; gradients and Hessians |
| a cotangent , a column acting by | the covector on | gradients and Hessians |
| the differential , by (2) | this note, and every later one | |
| , applied to a cotangent | the pull-back of a covector by | gradients and Hessians |
| the gradient | the differential , not a Riemannian gradient | gradients and Hessians |
| , , , | and its local inverse | this note, and every later one |
| pairs with | the tangent bundle over the convention’s domain | this note |
| ” is smooth near ” | the convention is a smooth local frame near | this note; gradients and Hessians; chart volume |
| , stacked columns | the direct sum, with the convention that is each factor’s on its block | product manifolds |
| the Lebesgue measure on , and densities with respect to it | Lebesgue measure on , carried to by , which depends on the convention | chart volume; the normal |
The last row is the one where the convention matters most. A density on a tangent space changes by of a change of basis, so a density “on ” is always one in the coordinates the convention gives.
Gradients and Hessians in tangent charts#
The derivative, its formula through the retraction and the chain rule move into the first note, as
above. The third note keeps the rest under its slug, derivatives-in-charts, retitled Gradients
and Hessians in tangent charts: the gradient (1), the chart
Hessian (2), and the statement that the passes of
automatic differentiation compute them. These cannot move into the first note: the passes rest on automatic differentiation (geometry, 2), and the build
refuses a note that depends on a later one. Keeping the slug keeps the archive’s references to the
gradient, the chart Hessian and the passes valid. Only the references to derivative and to the
chain rule follow those results into the first note. The chart Hessian and the second-order half of
the passes now state their hypothesis, that is smooth near .
Consequences#
The definitions come in order. Every symbol in the definition of a retraction is defined before it. The regularity the bases need is stated once and invoked where it is used, rather than assumed for every point and then conceded for the sphere.
Later notes stay in coordinates. After the table, a reader works with , , and vectors in alone, as the code does. Two notes speak of an action that “carries
the basis at to the basis at” its image: the quotient and the chart volume. That is the matrix statement under (2), and at publish they restate it that
way. The regularity they need becomes ” is smooth”. A rule
goes into authoring.md, under “The math notes”, so that new notes keep to it: past the first
note, the geometry is written in tangent coordinates.
The first note gets longer, and reads quickly. It adds four short sections of recalled definitions, each a paragraph citing Lee, and proves only what is new: the coordinate form of the retraction’s conditions, the tangent charts, and the derivative through the retraction.
References to keep true. At publish:
eq:math/retraction/oplusandroundtripkeep their tags in the first note. The heading## The definition, cited fromarchive/core/mathasmath/retraction/#the-definition, is kept or the reference is amended, since the build does not check anchors.eq:math/derivatives-in-charts/derivative, cited fromarchive/core/math,archive/core/implementationandarchive/rotations/statements/first-order, moves to the first note, and those references are amended and listed underamends: toeq:math/retraction/derivativewhere they cite the definition, and toeq:math/retraction/directional, the derivative written through the retraction, where they cite the formula a finite difference checks.statement:math/derivatives-in-charts/chain-rulemoves to the first note, and the proof of the passes cites it there.derivatives-in-chartskeeps its slug and its place, geometry 3, retitled Gradients and Hessians in tangent charts. Each note that lists it independs_onis reread. One that used it for the derivative alone depends onretractioninstead.quotient-manifold, which cites the chart Hessian, keeps it.- The notes after the first that rely on the old wording are reread:
product-manifold(its stacking of tangent spaces),quotient-manifoldandchart-volume(the action on bases, restated as , and the smoothness of that their densities need), androtations(its retraction, smooth everywhere). \basisbecomes a site-wide macro insite/katex.config.ts, and Absil, Mahony and Sepulchre enterreferences.bib.
No code changes. The library already works this way, so the entry changes only the notes, and
the pages that link to them, concepts/spaces and concepts/queries, need at most new link text.
Alternatives#
Keep the order, and assume a smooth basis. This is today’s note. It defines a retraction with a derivative not yet defined, and its assumption is false on the sphere, which it then has to concede.
A chart at each point. One could fix a chart centred at each point and define as the Jacobian at of . That gives the same derivatives as (1): only the chart’s differential at its centre is ever used, and that differential is a basis. A chart carries second-order information that nothing reads, and suggests that the second-order notions are fixed by it, when they depend on how the bases vary from point to point. The basis is exactly the data used.
A retraction defined in coordinates. One could skip and define a retraction as a smooth . That requires a basis smooth everywhere, which only parallelizable manifolds have, and so rules out the sphere. It also hides the fact that the retraction and the basis are separate choices, a fact the positive reals’ example shows.
The exponential map of a metric. A Riemannian structure gives a canonical retraction and orthonormal bases. The notes have avoided a metric so far, and nothing here needs one: a retraction is only required to agree with the exponential map to first order.
Tangent spaces as subspaces of an ambient space. For a manifold embedded in , is a subspace of and needs no derivations. Not every space of the notes is embedded as it is stored (the rotations are stored up to the sign of a quaternion), and the ambient coordinates have entries rather than , while every tangent in skoro is a vector of the space’s dimension.
Revisions#
2026-11-17. The publish moved the chain-rule statement into the first note, so this writeup’s
reference to it, written while it was still in the third, no longer resolved. The reference now
points to statement:math/retraction/chain-rule. The list of moved labels also said that the
archive’s references to the derivative would all go to eq:math/retraction/derivative. Most of
them cite the derivative as a finite difference checks it, so the publish sent them to eq:math/retraction/directional, and the list now says so.
References
- [Lee13] John M. Lee. Introduction to Smooth Manifolds. Second edition. Springer, 2013.