| name | pullback-metric |
| description | Computes pullback metrics under smooth maps and coordinate changes using the local_coordinates JAX library, including Jacobian-based component formulas and general (k,l) tensor transformation laws. Use when the user applies a coordinate change to a metric, pulls a metric back through an immersion or a learned map, or works with induced metrics on submanifolds. |
Pullback metric
Use this skill when a metric on one space is induced on another through a smooth map.
Core formula
Given f: M -> N and a metric h on N, the pullback metric f*h on M has components
(f*h)_{ij}(x) = (df^a/dx^i) h_{ab}(f(x)) (df^b/dx^j)
or in matrix form g = (Df)^T h (Df) where Df is the Jacobian of f.
Tensor transformation under coordinate change
For a general (k, l) tensor under x -> z,
T'^{i_1...i_k}_{j_1...j_l} = G^{i_1}_{a_1}...G^{i_k}_{a_k} J^{b_1}_{j_1}...J^{b_l}_{j_l} T^{a_1...a_k}_{b_1...b_l}
with G^i_a = dz^i/dx^a for contravariant indices and J^b_j = dx^b/dz^j for covariant indices. The metric is the (0, 2) case of this rule.
Special cases worth remembering
- Identity map: pullback leaves the metric unchanged.
- Linear map
f(x) = Ax with identity metric on the target: pullback is A^T A.
- Polar to Cartesian: pullback of the Euclidean metric is
diag(1, r^2).
For all component formulas and worked examples, see references/REFERENCE.md. The script at scripts/sanity_check.py verifies the identity, linear, and polar special cases.