Marrow: the algebraic core
6,963 words11 subsections11 tablesPlan version 1.1
On this page11
13.1 What it owns
frob-lie owns the Lie-theoretic vocabulary every other crate speaks: the LieGroup and LieAlgebra traits;
the groups SO(2), SO(3), SE(2), SE(3), SE₂(3) and SE₂₊ₖ(3); product groups; joint subgroups described by a screw
basis with their Hervé class (C-01); the two retractions and their derivatives (dexp, dcay and inverses); and
frame-typed transforms, twists and wrenches (C-02). It also owns the typed adjoint, wrench push-forward and
wrench pull-back maps of §13.3, the isometry type that carries reflections with their parity, and the predicate
classes of §13.7.
frob-algebra owns the non-Lie algebra: finite groups as signed permutations with closure, conjugacy classes,
character tables, isotypic projectors and the Reynolds operator (C-09); the Cone trait with the nonnegative
orthant, second-order and positive-semidefinite cones (C-06); posets and antichains for co-design (C-12); the
pseudo-inertia cone with its affine-invariant operations (C-03); and max-plus matrices, taken from
fs-tropical through the airlock (C-10). To these it adds five things: the computation of a design's
mechanical symmetry group and of its observation-preserving subgroup (§13.4); real and complex irreducible
blocks as a parameterization of equivariant linear maps (§13.5); subgroup lattices, orbit counting and orbit
representatives (§13.6); the four-dimensional contact cone as one more linear image of the second-order cone,
which §18 consumes; and the mass-support predicate on the inertia cone, which §14.5 consumes.
Both crates sit in layer 1 and depend only on frob-core and the airlock. Neither knows what a robot is: they
receive trees, screws, matrices and channel lists, and return groups, classes, projectors, signs and refusals.
13.2 Decisions
- ADR-MARROW-01: reuse
fs-gaas the host representation.So3,Se3,Twist,WrenchandMat6are FrankenSim's, with deterministic elementary functions already routed throughfs_math::det(FACT). FrankenSim itself has two vector vocabularies today, becausefs-mbddefines its ownVec3,UnitQuaternionandPosebesidefs-ga's (FACT). FrankenRobotics does not add a third.frob-lieadds traits, the groupsfs-galacks, and frame typing. - ADR-MARROW-02: Cayley on the batched tiers, exponential on the referee. Both retractions exist on every
tier and the choice is part of
ModelId. Reason: C-05. The Cayley map is refused when |ω|h exceeds 0.2 per substep (FROB-REF-212), which the step planner avoids by substepping. - ADR-MARROW-03: a revolute coordinate is a unit complex number. The update is z₊ = z · ((1 − a²/4) + i·a)/(1 + a²/4) with a = ωh, followed by one normalization. A turn counter is updated by a deterministic branch rule. Limits are tested on the half-angle tangent t = s/(1 + c), which is monotone in the angle, plus the turn count. Reason: no trigonometric call in the hot path, and observations in (cos, sin) form are what policies consume anyway.
- ADR-MARROW-04: packed single-precision layouts are generated, not typed. There is no
Se3f32struct.frob-kiremits structure-of-arrays layouts from the same algebraic description, so the host type and the kernel layout cannot disagree. - ADR-MARROW-05: there are two coadjoints, each with its own name, type and sign. The group coadjoint is the inverse transpose of Ad and moves wrenches between frames. The infinitesimal coadjoint ad* is the transpose of ad and appears in the Euler–Poincaré equation. Reason: an earlier draft of the conventions described ad* with a phrase that is true of the generator of the group coadjoint, which differs from ad* by a sign. §13.3 states both in components and §13.8 tests them with fixtures that a single reversed sign cannot pass.
- ADR-MARROW-06: two symmetry groups are computed and stored for every design in every task. The mechanical group Γ_mech preserves the body. Its subgroup Γ_obs also preserves everything the closed loop can see or is asked to do. Only Γ_obs may tie policy weights, augment data, deduplicate candidates or enumerate gaits. Reason: a robot with a forward-facing sensor is mechanically symmetric fore and aft and is not symmetric in closed loop; tying weights under the larger group constrains the policy to something false (§13.4).
- ADR-MARROW-07: equivariant linear maps are parameterized by real and complex irreducible blocks, and the Reynolds operator is their oracle. The blocks give exactly the free parameters of the commutant. Reynolds averaging gives the same subspace and is exact; it is kept as the test, not replaced as an error. A representation of quaternionic type is refused (FROB-REF-214): no group that arises here has one, so meeting one means the group computation is wrong.
- ADR-MARROW-08: a strict inequality that decides a discrete outcome is evaluated exactly. Such predicates run either in exact arithmetic on the host or in guarded single precision with an exact integer fallback (§13.7). Reason: two backends that agree to the last bit but one on a limit test will still disagree about whether the limit is active, and after that the two worlds are different worlds (§35).
- ADR-MARROW-09: a reflection is not a transform.
Transform<A, B>holds an element of SE(3). Mirror images are carried by a separateIsometrytype with an explicit determinant, and the parity rule of §13.3 is applied by that type alone. Reason: a mirrored limb needs sign changes on axial quantities that a rigid transform never applies, and hiding the sign inside a "transform" is how mirrored encoders end up reading backwards.
13.3 Conventions fixed here: the coadjoint, the wrench maps, reflections
§11 holds the conventions table. This section states the rows Marrow implements in components, so that no
sentence about them needs interpreting. Throughout, g = (R, p) is a_from_b, ξ = (ω, v) is a twist, w = (τ, f)
is a wrench and μ = (π, ℓ) is a body momentum.
| Object | Definition | In components | Type or method |
|---|---|---|---|
| Adjoint | Ad_g maps a twist in the source frame of g to its target frame | Ad_g(ω, v) = (Rω, Rv + p × Rω) | AdjointMap |
| Group coadjoint (wrench push-forward) | Ad*g := (Ad{g⁻¹})ᵀ = (Ad_g)⁻ᵀ, so that ⟨Ad*_g w, Ad_g ξ⟩ = ⟨w, ξ⟩ | Ad*_g(τ, f) = (Rτ + p × Rf, Rf) | WrenchPushforward; equals fs_ga::Se3::coadjoint (FACT: frankensim/crates/fs-ga/src/lie.rs) |
| Wrench pull-back | (Ad_g)ᵀ, the inverse of the row above | (Ad_g)ᵀ(τ, f) = (Rᵀ(τ − p × f), Rᵀf) | WrenchPullback |
| Bracket | ad_ξ η = [ξ, η] | (ω × ω′, ω × v′ + v × ω′) | LieAlgebra::bracket; equals fs_ga::Twist::bracket (FACT, same file) |
| Infinitesimal coadjoint | ad*_ξ := (ad_ξ)ᵀ, the dual map: ⟨ad*_ξ μ, η⟩ = ⟨μ, ad_ξ η⟩ | ad*_ξ(π, ℓ) = (π × ω + ℓ × v, ℓ × ω) | LieAlgebra::coad |
| Generator of the group coadjoint | d/dt Ad*_{exp(tξ)} at t = 0 | −ad*_ξ | Derived in tests, never stored |
| Euler–Poincaré, body frame | μ̇ = ad*_ξ μ + w for a left-invariant kinetic energy | π̇ = π × ω + ℓ × v + τ, ℓ̇ = ℓ × ω + f | Used by §16 |
The fix. ad* is the transpose of ad. The inverse transpose belongs to the group coadjoint Ad*. The phrase
"negative transpose" is true only of the generator in the sixth row and is withdrawn as a description of ad*:
read that way, a free body would obey μ̇ = −(ad_ξ)ᵀμ, which has the wrong sign. The three wrench and twist maps
are distinct newtypes so that the compiler rejects a push-forward where a pull-back is meant. fs-ga offers
Twist::ad and Se3::coadjoint and no infinitesimal coadjoint (FACT: frankensim/crates/fs-ga/src/lie.rs), so
coad is new code in frob-lie, and PO-MARROW-01 is extended to cover the first four rows bit for bit.
Why energy does not catch the error. Take a free body with rotational inertia diag(1, 2, 3) kg·m² and ω = (1, 1, 0) rad/s, so π = (1, 2, 0). The correct law gives π̇ = π × ω = (0, 0, −1). The reversed sign gives (0, 0, +1). Both conserve kinetic energy, because ω · π̇ = 0 either way. Only the correct one conserves spatial angular momentum: the body-frame rate π̇ + ω × π is (0, 0, 0) with the correct sign and (0, 0, 2) with the wrong one. A test suite that checks energy alone passes a simulator with this defect. The fixture is hand-checkable and is listed in §13.10.
Reflections. For an isometry x ↦ Px + t with P orthogonal and det P = −1:
- a twist maps by (ω, v) ↦ (det(P)·P·ω, P·v + t × det(P)·P·ω): polar vectors by P, axial vectors by det(P)·P;
- a wrench maps by (τ, f) ↦ (det(P)·P·τ + t × P·f, P·f);
- a pseudo-inertia maps by J ↦ G·J·Gᵀ with G = [[P, t], [0, 1]], which needs no parity sign because the second moment is a polar quantity;
- a revolute joint about axis a maps to a revolute joint about det(P)·P·a with the same coordinate. A design
that writes the mirrored axis as P·a instead must negate the coordinate, its limits, and its encoder and gear
signs. The
mirrorconstructor always emits the first form, so a mirrored limb shares its parent's kernels.
Small angles on the exponential lane. The coefficient functions sin θ/θ, (1 − cos θ)/θ² and (θ − sin θ)/θ³ are evaluated by even polynomials in θ² below a threshold and by deterministic elementary functions above it, with the two arms joined by a select. The degree and threshold are chosen so that the truncation error is below half a unit in the last place, and both are recorded in the kernel manifest (DESIGN: it removes the 0/0 forms without a branch). The Cayley lane needs no such rule.
Chart cuts. A logarithm or a derivative of a logarithm requested within a stated margin of a rotation by π, where the chart is cut, returns FROB-REF-213 with the offending element unless the caller supplies a second chart. No value is returned from the wrong side of a cut.
13.4 The mechanical group and the observation-preserving subgroup
What it is. S for the computation; F for its use in equivariant networks (§23).
- Γ_mech is the group of C-09: automorphisms of the labeled kinematic tree that are realized by an isometry of the body at its reference configuration and that preserve link Regions, fills and materials (hence masses and pseudo-inertias), joint screw bases under the parity rule, joint limits, transmissions with their signed ratios, actuator cards, end-effector contact laws with their interface cards, and the topology of the power bus.
- Γ_obs is the subgroup of Γ_mech whose elements also preserve: the sensor suite as a set (mount, field of view, scan pattern, rate, clock and noise card of each sensor); every payload; the direction of gravity at the reference configuration; and every observation, action, reward and requirement term of the task, each of which must declare how it transforms. An element under which some term has no declared transformation is excluded.
- For one particular world there is a third, smaller object: the stabilizer of the context, Stab(context) ≤ Γ_obs, whose elements also fix that world's terrain, material field, boundary conditions and current contact mode.
The three have different uses and they are not interchangeable.
| Use | Group required | Why |
|---|---|---|
| Block-diagonal mass and stiffness matrices at a symmetric stance (A-12) | Γ_mech ∩ Stab(configuration) | Mechanics only; sensors are irrelevant |
| Weight tying in policies and critics; data augmentation | Γ_obs, with the task's world and command distributions invariant in law | The closed loop must be symmetric, not only the body |
| Deduplicating candidate designs before a sweep (§13.6) | Γ_obs of the slot arrangement | Two candidates are the same experiment only if the closed loop cannot tell them apart |
| Gait enumeration by (H, K) pairs (C-10) | Γ_obs ∩ Stab(command) for the body; the declared clock-network group (ℤ₄ × ℤ₂ for a quadruped) for the phase patterns | A gait is a closed-loop object; the body group alone does not separate the six primary quadruped gaits |
| Exact reduction inside one world: symmetric orbit search, merging two worlds | Stab(context) | Augmentation may pair two different worlds; reduction needs the same world |
| Metamorphic test of the simulator (T-10) | Γ_mech with the world transformed along with the robot | The test transforms everything, so nothing is broken |
Algorithm. Owner: frob-algebra::symmetry. Determinism class D0. Verb: analyze.symmetry (A-03), which
prints both groups, their generators, the induced representations and the list of symmetry breakers.
- Colour every node of the tree with an isometry-invariant key: the canonical hash of its Region, fill and material; the coefficients of the characteristic polynomial of its pseudo-inertia (exact rationals, so no eigenvalues are sorted); joint class, pitch and limit widths; actuator card, absolute gear ratio and transmission kind; contact law and interface card; and the multiset of its children's keys.
- Compute the canonical form of the coloured rooted tree bottom-up, which identifies isomorphic subtrees in O(n log n) for n bodies.
- Enumerate candidate isometries, not candidate permutations. The abstract automorphism group of a tree can be
large; the isometries that realize it are few. With three or more non-collinear attachment points in one
class on the root body, an isometry is fixed, up to one reflection through their plane, by the images of
three of them. That gives at most 2·m·(m − 1)·(m − 2) candidates for m such points, each obtained from a 3×3
linear system solved exactly and kept only if PᵀP = I holds exactly. With fewer points (a biped's two hips, a
differential drive's two wheels) the candidates are the signed axis permutations of the root's principal
frame together with the generators the design's
mirrorandradialconstructors declare. A continuous stabilizer (a body of revolution with a single axial limb) is reported as such, and only its constructor-generated finite subgroup is used. - Verify each candidate by descending the tree: every body, screw basis (with parity), limit interval, signed ratio, card and contact law must map to its image. The descent yields the body permutation σ and the sign vector ε on joint coordinates. The first mismatch ends the descent and is recorded, with its field path and its size, for the near-symmetry report of A-03.
- Close the survivors under composition, check closure, and build the multiplication table, conjugacy classes and character table.
- Induce the representations: signed permutations on joint positions, velocities and actuator channels (the actuator sign includes gear direction); the twist rule of §13.3 on the base; and, for each observation term, the representation its declared kind implies (invariant scalar, polar vector, axial vector, joint-indexed, foot-indexed, sensor-indexed, or a scan with a ray permutation).
- Filter to Γ_obs. An element survives if it maps the sensor suite to itself with matching cards and scan patterns, maps every payload to a payload, fixes gravity, and has a representation on every task term. The first field that excludes an element is recorded as its breaker.
- Return both groups, the representations as integer signed permutations, the breakers, and for each breaker the smallest typed edit that would restore the element.
Data layout. A group is stored as its order, its generators, one record per element (body permutation as
u16 indices, coordinate signs as i8, the isometry in exact form), a multiplication table of |Γ|² bytes, a
class map and a character table in exact field elements. A representation on a channel space is one u16 index
and one i8 sign per channel per element. Nothing here is floating point.
Three routes to exactness. A symmetry is established (i) by construction, when the limbs are instances of one
subterm under mirror or radial and the check reduces to term equality plus integer arithmetic on mount indices
modulo n; (ii) by exact field arithmetic, with entries in ℚ for mirrors and in the real subfield of the cyclotomic
field of order lcm(n, 4) for n-fold rotations, n ≤ 12 (sin(2π/n) is in the n-th cyclotomic field only when 4 divides
n; for n = 3 the real subfield is ℚ and sin(2π/3) = √3/2 is outside it); or (iii) by tolerance, for imported designs,
in which case the result is classed Tested, the tolerance is recorded, and the near-symmetry report says how far
each failing field is from symmetric. Routes (i) and (ii) are D0 and classed Certified when the certificate is
emitted.
Counterexamples that fix the rules.
- A forward sensor. A quadruped built fore-aft and left-right symmetric has Γ_mech = C₂ × C₂ of order 4. Add one forward-facing lidar on the torso. The left-right mirror maps the lidar to itself; the fore-aft mirror and the half-turn do not. So Γ_obs = C₂ of order 2, and the breaker for the other two elements is the lidar mount. A policy tied under C₂ × C₂ would be required to walk backwards as the mirror image of walking forwards while seeing only forwards.
- A fixed observation forces a fixed action. Two identical latches, of which exactly one must be closed. At an
observation fixed by the mirror, a deterministic equivariant controller must issue an action fixed by the
mirror, so it commands both latches alike, and both matching commands fail. A controller that draws one latch
at random is equivariant in law and succeeds. A failed search over tied deterministic policies therefore
excludes only that policy class.
frob-algebraexposes the fixed subspace of any element in any representation so that A-03 can list the observations at which tying forces tied actions. - A world that is not symmetric. A quadruped crossing a patch that is slippery on one side only. The task's world distribution may still be mirror-invariant in law, which licenses augmentation, while no single world is mirror-invariant, which forbids reduction inside it. The policy must remain free to act asymmetrically.
- A material edit. Changing one foot's sole material leaves the encoder permutation intact and breaks the transition symmetry. Both facts are recorded: the representation still exists, the group element does not.
13.5 Equivariant linear maps by irreducible blocks
What it is. S for the decomposition; F for its payoff in learning, which is BET-07 and is tested in §23.
For real representations ρ_in on ℝ^{d_in} and ρ_out on ℝ^{d_out} of a finite group, the equivariant linear maps are the W with ρ_out(g)·W = W·ρ_in(g) for all g. Over the reals an irreducible representation has one of three types, read from the Frobenius–Schur indicator ι(χ) = |Γ|⁻¹·Σ_g χ(g²) of a complex irreducible character χ:
| ι(χ) | Real type | Real irreducible built from χ | Equivariant maps between m_in and m_out copies | Free parameters |
|---|---|---|---|---|
| +1 | Real | χ itself, dimension d_χ | Θ ⊗ I with Θ any real m_out × m_in matrix | m_out·m_in |
| 0 | Complex | χ and its conjugate together, dimension 2·d_χ | Blocks [[a, −b], [b, a]] ⊗ I: a complex m_out × m_in matrix | 2·m_out·m_in |
| −1 | Quaternionic | — | Refused (FROB-REF-214) | — |
So dim Hom_Γ(V_in, V_out) = Σ_i c_i·m_i^out·m_i^in with c_i = 1 for real type and 2 for complex type. Every irreducible representation of C₂, C₂ × C₂, the dihedral groups and S₄ is of real type. Complex type occurs for the cyclic groups Cₙ with n ≥ 3, which are the symmetry groups of radial designs without a mirror plane: a tri-wheel cluster with handed wheels, a hexapod whose legs are all the same chirality.
Algorithm. Owner: frob-algebra::irreps. Verb: algebra.irreps, which reports the decomposition, the type
of each constituent and the free-parameter count for a given pair of channel spaces.
- From the character table, compute ι for each character and pair each complex-type character with its conjugate.
- For each real irreducible, build a symmetry-adapted orthonormal basis of its isotypic component in the input and output spaces by applying the projector P_χ = (d_χ/|Γ|)·Σ_g χ(g)*·ρ(g) (summed with its conjugate for complex type) and the transfer operators that align the copies with one another.
- Store the two change-of-basis matrices Q_in and Q_out and the block list. A map is then W = Q_out·(⊕_i Θ_i)·Q_inᵀ, where Θ_i is the free block of constituent i.
- Biases are restricted to the fixed subspace of ρ_out. Hidden layers carry copies of the regular representation, on which pointwise nonlinearities commute with the group (GB-02).
The decomposition costs O(d³) once per model and channel space and is cached by ModelId. At run time a layer is
either applied in the block basis or expanded once per optimizer step into a dense W, so inference pays nothing.
What the blocks are and are not. They are a parameterization. The Reynolds operator W ↦ |Γ|⁻¹·Σ_g ρ_out(g)·W·ρ_in(g)⁻¹ projects any matrix onto the same subspace exactly, for every type; with signed-permutation representations it costs |Γ|·d_out·d_in operations, which is small. The blocks earn their place for three reasons: optimization runs on exactly the free parameters instead of projecting after every step; the free-parameter count is reported to the agent before training; and the same bases block-diagonalize the linearized dynamics for A-12.
Counterexample: treating a complex-type block as real. C₃ acts on ℝ³ by cyclic permutation of three legs. The equivariant maps ℝ³ → ℝ³ are the circulant matrices, with three free parameters. The space splits as the trivial representation plus one two-dimensional real irreducible of complex type, so the formula gives 1 + 2 = 3. A parameterization that gives the two-dimensional block a single scalar, as would be right for a real-type block, yields two parameters and spans only the symmetric circulants. Those are exactly the maps equivariant under D₃. The error silently imposes a mirror symmetry the robot does not have, and the map x ↦ (x₂ − x₃, x₃ − x₁, x₁ − x₂), which is equivariant under C₃, becomes unrepresentable.
13.6 Orbits, subgroup lattices and wreath products
- Orbit counting and representatives S. Before a combinatorial sweep that assigns one of k module types to
each of n slots,
frob-algebra::orbitscomputes the cycle index of the slot action of Γ_obs, counts the orbits, and generates one canonical representative per orbit. Verb:algebra.orbits. Worked count (FACT, recomputed for this plan): ten leg types on six slots of a radially symmetric hexapod under D₆ give (10⁶ + 2·10 + 2·10² + 10³ + 3·10⁴ + 3·10³)/12 = 86,185 orbits out of 10⁶ assignments. If the sensors leave only the sagittal mirror, the count is (10⁶ + 10³)/2 = 500,500. The saving is bounded by |Γ_obs| and is a factor of two for most sensed robots; it is stated before any sweep is priced. - Contact strata. The same counter sizes mode enumerations: four feet, each open, sticking or slipping, under C₂ × C₂ give (3⁴ + 3·3²)/4 = 27 strata (FACT, recomputed for this plan).
- Subgroup lattice and (H, K) pairs S. All subgroups up to conjugacy, their normalizers, and the pairs K ⊴ H with H/K cyclic that C-10 needs. The groups here have at most a few dozen elements, so enumeration is by closure of generating sets.
- Wreath products F. When each limb has an internal symmetry group K of its own and the hub permutes the limbs by H, the design's group contains K ≀ H provided every limb automorphism preserves the limb's attachment port and the hub action preserves the decorated ports. Both conditions are checked before nested tying is offered. The use is narrow: steer-and-drive modules on a swerve base, symmetric grippers on a symmetric arm.
13.7 Exact predicates and guarded single precision
What it is. S. A predicate is the sign of an expression where the sign selects between outcomes that
differ at the boundary. frob-lie and frob-kir classify every predicate into one of three classes, and the
class is part of the kernel manifest.
| Class | Arithmetic | Where it is used |
|---|---|---|
Exact |
Integers, rationals and field elements on the host (D0) | Group closure; bracket closure and Hervé class (T-11); the sign of an LDLᵀ pivot of a pseudo-inertia given in rationals; mobility rank at rational sample points; canonical orderings and digests |
Guarded |
Single precision with a certified error bound, and an exact integer fallback on the same stored inputs | Joint-limit activation on t = s/(1 + c); the turn-counter branch of ADR-MARROW-03; the gap sign that activates a contact at commit; cone membership ‖γₜ‖ ≤ μ·γₙ for stick or slip; event guards of the transactional step (§16); tie-breaks in sort keys; the Cayley admission bound, tested as (ω·ω)·h² ≤ 0.04 |
Plain |
Single precision | A select whose two arms agree at the boundary (clamp, max, a Huber kink), where a wrong sign moves the result continuously and changes no discrete outcome |
The guarded evaluation. For a predicate polynomial p of low degree in single-precision inputs:
- Evaluate p̂ in single precision, and in the same pass a bound E = c·u·S, where S is the sum of the absolute
values of the terms, u is the unit round-off and c is a constant that
frob-kirderives from the straight-line program by forward error analysis and stores in the manifest. - If |p̂| > E the sign of p̂ is the sign of p, and the predicate is done.
- Otherwise evaluate p exactly on the stored inputs. Every finite single-precision number is an integer of at most 24 bits times a power of two, so a polynomial in such numbers is an integer computation. It is carried out in 32-bit limbs with widening multiplies, which exist identically on the CPU, on CUDA and on Metal, and it belongs to the exact-integer kernel class of §35.
- The bit budget of step 3 is computed at derivation time from the declared ranges of the inputs. A predicate whose budget exceeds 256 bits is refused at build time (FROB-REF-215), which is a signal to rescale it (DESIGN: the cap keeps the fallback a fixed, small integer program on every backend).
The exact result is exact with respect to the stored single-precision inputs. That is what makes two backends with bit-equal inputs take the same branch. It says nothing about how well the inputs approximate real quantities, and under determinism class D3, where inputs differ within a tolerance, two tiers may still legitimately take different branches near a boundary; the decision-level equivalence test of §35 counts those.
The lint. A select whose arms differ at the boundary and whose predicate is Plain is a build error in
frob-kir. This is the rule that keeps the class assignment from decaying.
Counterexample (FACT, computed for this plan by emulating IEEE binary32 against exact rationals). Take the single-precision numbers nearest 0.3, 0.4 and 0.5 as x, y, z and test x² + y² ≤ z². In single precision the two sides are equal, so the plain test reports the point as inside the cone. For those same three stored numbers the exact value of x² + y² − z² is +1.19 × 10⁻⁸: the point is outside. A backend that contracts the expression into a fused multiply-add evaluates a different rounding sequence again, which is one reason contraction is off everywhere (§35). The fixture is in the negative-control registry of §38 as a predicate that plain arithmetic gets wrong.
13.8 Laws
Each law is a G0 property test over random inputs and a boundary set (identity, rotations by π, tiny angles, large translations, sign-equivalent quaternions, rotations approaching π from both sides). Tolerances are in units in the last place (ulp).
| Law | Statement |
|---|---|
| Group axioms | Associativity, identity, inverse for every group. |
| Retraction | τ(0) = identity; dτ(0) = identity; τ(x)·τ(−x) = identity for cay and exp. |
| Round trip | log(exp(x)) = x inside the injectivity radius; cay⁻¹(cay(x)) = x. |
| Adjoint | Ad(gh) = Ad(g)·Ad(h); Ad(exp x) = exp(ad x) to tolerance; the group coadjoint Ad* is the inverse transpose of Ad. |
| Coadjoint pair | ad*ξ = (ad_ξ)ᵀ; d/dt Ad*{exp(tξ)} at 0 equals −ad*_ξ; push-forward composed with pull-back is the identity. |
| Pairing | ⟨w, ξ⟩ is invariant under a change of frame: ⟨Ad*_g w, Ad_g ξ⟩ = ⟨w, ξ⟩. |
| Free body | With μ̇ = ad*_ξ μ the spatial momentum Ad*_g μ is constant. |
| Jacobians | dexp and dcay match fs-ad dual-number derivatives. |
| Subgroups | A classified screw basis is bracket-closed; the generated joint map composes like its subgroup. |
| Reflections | A mirror reflection applied twice is the identity on twists, wrenches and pseudo-inertias; the pairing is invariant under every isometry, proper or not; a mirrored revolute joint written with the axial image of its axis keeps its coordinate. |
| Representations | ρ(gh) = ρ(g)·ρ(h); characters are orthonormal; projectors are idempotent and sum to the identity. |
| Nested groups | Γ_obs is a subgroup of Γ_mech; every element of Γ_obs has a representation on every task term; removing every sensor, payload and task term gives Γ_obs = Γ_mech. |
| Blocks | The block-parameterized maps and the image of the Reynolds operator are the same subspace; its dimension is Σ c_i·m_i^out·m_i^in. |
| Orbits | The cycle-index count equals a brute-force count for every case with at most 10⁶ assignments. |
| Predicates | A Guarded predicate returns the sign of its exact evaluation on the stored inputs, for every input. |
| Curvature sign | With body velocities and reconstruction ξ = −𝔸(s)·ṡ, the curvature is (D𝔸)ᵢⱼ = ∂ᵢ𝔸ⱼ − ∂ⱼ𝔸ᵢ − [𝔸ᵢ, 𝔸ⱼ] and a small loop moves the body by about exp(−∬ D𝔸); the opposite bracket sign fails the holonomy fixture of A-09. |
| Cones | P(P(x)) = P(x); Moreau decomposition x = P_𝒦(x) + P_𝒦°(x) with the parts orthogonal; the four-dimensional contact cone is the image of the second-order cone under its stated linear map. |
Mutation rule. Each of eight planted single-sign or single-transpose mutations (reversed ad*, Ad* and its inverse exchanged, a pull-back in place of a push-forward, a missing parity sign on a mirrored axis, linear and angular parts exchanged in a twist, the bracket's arguments exchanged, the curvature bracket sign reversed, a conjugate missing in the projector) must be caught by at least three independent fixtures. A convention that one test guards is one refactor away from being wrong.
13.9 Refusals
| Code | Refused | Returned with the refusal |
|---|---|---|
| FROB-REF-212 | A Cayley update with ‖ω‖·h above 0.2 in one substep | The substep count that admits it |
| FROB-REF-213 | A logarithm or its derivative inside the stated margin of a chart cut, with no second chart supplied | The element, the margin and the charts that cover it |
| FROB-REF-214 | A representation with a constituent of quaternionic type, or a symmetry group outside the supported families | The character and its indicator; the group's order and generators |
| FROB-REF-215 | An exact evaluation whose bit budget exceeds its cap: a guarded predicate over 256 bits at build time, or a host computation over its declared rational size | The expression, the input ranges and the budget |
13.10 Proof obligations, known answers, gates, open questions
| ID | Statement | Verification |
|---|---|---|
| PO-MARROW-01 | frob-lie conventions equal fs-ga conventions (quaternion order, sign rule, twist order, adjoint direction, bracket, group coadjoint). |
A fixture of 1,000 transforms produced by fs-ga and consumed by frob-lie, bit-compared. |
| PO-MARROW-02 | Frame typing has zero run-time cost in batched kernels. | Emitted kernel source contains no frame identifiers. |
| PO-MARROW-03 | The turn counter of ADR-MARROW-03 never disagrees with an angle integrated in f64. |
Property test over 10⁹ random steps. |
| PO-MARROW-04 | Every element of Γ_obs fixes the sensor suite, the payloads, gravity and every task term; every element of Γ_mech outside Γ_obs has a recorded breaker. | Exact check per generator; the breaker is replayed as a failing equality. |
| PO-MARROW-05 | The block parameterization spans exactly the commutant. | Exact rank of the Reynolds projection against the dimension formula, and containment both ways, per group on file. |
| PO-MARROW-06 | The error bound E of each guarded predicate is valid for all inputs in the declared ranges. | Forward error analysis emitted with the kernel and re-checked by the derivation tool (Certified), plus the adversarial test of GATE-MARROW-05 (Tested). |
Known answers owned by this chapter (numbered in §38):
| Known answer | Expected | Guards against |
|---|---|---|
| Planar 2R arm, links 0.4 m and 0.3 m, angles 0 and π/2, tool force (10, 0) N, rates (0.2, −0.1) rad/s | J = [[−0.3, −0.3], [0.4, 0.0]] m/rad; joint torques (−3, −3) N·m; tool velocity (−0.03, 0.08) m/s; power −0.3 W by both routes | Taking the lower three rows of a space screw Jacobian as a point Jacobian, which gives torques (0, 0) |
| Free body, inertia diag(1, 2, 3), ω = (1, 1, 0) | π̇ = (0, 0, −1); spatial momentum rate zero | A reversed ad*, which energy conservation does not detect |
| Symmetric quadruped with one forward lidar | Γ_mech = C₂ × C₂, Γ_obs = C₂, breaker = the lidar mount | Tying weights under the mechanical group |
| C₃ on three legs | Commutant dimension 3; the antisymmetric circulant is representable | A complex-type block parameterized as real |
| Regular representation of C₂ × C₂, 64 copies in and out | 16,384 free weights (GB-02) | A miscounted commutant |
| Ten module types on six D₆ slots; same with the sagittal mirror only; four feet with three states under C₂ × C₂ | 86,185; 500,500; 27 | A wrong cycle index |
| Single-precision 0.3, 0.4, 0.5 in x² + y² ≤ z² | Exact sign positive (outside); plain single precision reports equality | An unguarded strict predicate |
| Cayley step angle | 2·atan(ωh/2) (GB-01) | A mislabelled retraction |
| A 1 kg part with principal moments 0.008 kg·m² each, declared inside a sphere of radius 0.10 m | Refused by the mass-support predicate: 0.012 m² needed, 0.010 m² available; a thin spherical shell of that radius meets the bound with equality | An inertia that passes positivity and that no body in the envelope could have |
| Gate | Threshold (TARGET) |
|---|---|
| GATE-MARROW-01 | All laws pass on 10⁶ cases each: at most 64 ulp in f64; at most 16 ulp in f32 for single operations. T-01, T-03, T-04 certified (GATE-LEMMA-00). |
| GATE-MARROW-02 | Character tables and isotypic projectors correct for Cₙ and Dₙ with n ≤ 12, their products with C₂, and S₄, against tables on file. |
| GATE-MARROW-03 | Γ_mech and Γ_obs equal the groups on file for all eighteen archetypes of §14.10 and for 24 planted asymmetries (a moved sensor, a one-sided payload, a changed sole material, a reversed gear), with the correct breaker named in every case; zero disagreements. |
| GATE-MARROW-04 | PO-MARROW-05 holds exactly for every group of GATE-MARROW-02 on 100 random pairs of channel spaces each; all eight mutations of §13.8 are caught by at least three fixtures each. |
| GATE-MARROW-05 | Zero sign errors of Guarded predicates against exact rational evaluation over 10⁹ adversarial inputs placed within 4 ulp of the zero set, on batch-cpu, CUDA and Metal; the fallback rate on the standard contact battery is recorded, with a target below 10⁻³ of evaluations. |
| ✖ KILL-MARROW-BLOCKS | Trigger: GATE-MARROW-04 fails after one repair cycle, or the exact field arithmetic for n ≤ 12 exceeds its bit budget. Fallback: equivariant layers are produced by Reynolds projection in f64 with an idempotence test, classed Tested; the free-parameter count is reported from the projection's rank. |
| ✖ KILL-MARROW-GUARD | Trigger: the fallback rate exceeds 10⁻² on the contact battery on either GPU backend, or the exact path cannot be made bit-identical across backends. Fallback: strict predicates are evaluated exactly only on the strict batch-cpu profile and the referee; GPU tiers mark worlds that came within E of a boundary and the sampled referee of §16 re-runs them. |
Frontier items in this chapter, with what must precede funding:
| Item | Ceiling of the benefit, stated before any measurement | Paper-scale pilot and its falsifier | Kill gate and fallback |
|---|---|---|---|
| Irreducible blocks for equivariant policies F | A factor equal to the order of Γ_obs in free parameters per layer and in trajectories per rollout: 2 for a robot with a forward sensor suite, 4 for a blind fore-aft-symmetric quadruped, 12 for a blind radial hexapod. Augmentation already recovers much of this, so the gain over augmentation may be nil (HYPOTHESIS; settled by BET-07's gate in §23). | By hand for C₃, C₂ × C₂ and D₆: commutant dimensions from the formula against the exact rank of the Reynolds projection. Falsifier: any mismatch. | KILL-MARROW-BLOCKS |
| Wreath-product tying F | A further factor equal to the order of a limb's own symmetry group, which is 1 or 2 for the archetypes on file | The swerve base of §14.10: count tied parameters with and without the nested group and verify both port conditions by hand. Falsifier: a nested element that fails the equivariance law. | Dropped without replacement; flat Γ_obs tying remains |
| Subgroup-lattice mobility F (C-01) | Correct mobility for exceptional over-constrained linkages (Sarrus) and an explicit undecided for paradoxical ones (Bennett); no speed benefit |
Sarrus (the lattice returns 1) and Bennett (the lattice returns undecided, the rank returns 1) by hand. Falsifier: a lattice answer that disagrees with the exact rank of A-01. |
Rank at exact rational sample points is the only mobility method |
| Affine-invariant steps on the inertia cone F (C-03) | Identification steps that cannot leave the feasible set; no speed benefit | The geodesic between two consistent pseudo-inertias stays positive definite, checked at ten points along it by hand for a diagonal pair. Falsifier: an indefinite intermediate. | Log-Cholesky parameterization with a positivity test |
- OPEN-MARROW-1. Whether to canonicalize quaternion sign in stored state. Default: no. State stays continuous; observations use sign-invariant features such as projected gravity. Decide at GATE-MARROW-01.
- OPEN-MARROW-2. Whether exact field arithmetic should extend to radial designs with n above 12. Default: no;
such designs are symmetric by construction through
radial, and imported ones use the tolerance route with aTestedlabel. Owner: Marrow lead. Blocks nothing. - OPEN-MARROW-3. Whether the exact fallback of §13.7 may use 64-bit integers where a backend offers them. Default: 32-bit limbs everywhere, so the three backends run the same integer program. Decide at GATE-MARROW-05.
13.11 A circle-valued joint needs periodic laws, or its turn count
What it is. S A typing rule for laws that read a revolute coordinate. The stored coordinate is a unit complex
number and an integer turn count (§11.1). A law is periodic if it reads only the unit complex number, and lifted
if it reads the angle θ = atan2(s, c) + 2π·k. These are different state spaces, and using the circle where a law is
lifted loses state.
Counterexample. A joint has a linear torsion spring of 0.5 N·m/rad with rest angle 0. Held stationary at θ = 0 and at θ = 2π it has identical link poses and zero velocity. At 2π the spring stores ½ × 0.5 × (2π)² = π² J, which is 9.8696 J, and exerts −π N·m. A state without the turn count cannot tell the two apart, and a replay from it creates or loses π² J.
Mechanism. DESIGN:
- Every element that reads a revolute coordinate declares
periodicorliftedin its card or constructor. Lifted elements include linear torsion springs, cable and hose wrap, multi-turn travel limits, lead screws and tether winding.design.checkstage 1 refuses a lifted law on a joint whose state omits the turn count (refusal: lifted law on a joint without turn state). - The turn count k is state. It is in the state layout, in every snapshot and digest, in replay and teleport, and in the settled-pose cache (§24.7). It changes by ±1 when the unit complex number crosses the cut c < 0, s = 0, which is an exact integer update; the Cayley bound ‖ω‖·h ≤ 0.2 rad (C-05) allows at most one crossing per substep.
- An encoder that reports the angle modulo one turn does not observe k. For a joint with a lifted law, the worlds
k = 0 and k = 1 at rest deliver identical observations and need holding torques that differ by π N·m in the
example, so
sense.alias(§20.12) returns an alias witness. The remedies it lists are a multi-turn encoder, a homing move and a torque reading.
Owner: frob-lie (coordinate and counter); frob-model (declarations); frob-actuate (springs).
Known answers. The spring example: energy 0 and π² J; torque 0 and −π N·m. A wheel with only periodic laws replays bit-identically from a state with k dropped, which is the control showing that the rule binds only lifted laws.
| GATE-MARROW-06 | Known answer. The spring fixture is exact to 10⁻¹² in double precision on the referee and within 10⁻⁵ relative on device tiers; snapshot, restore and teleport preserve k on 10⁴ random states; the mutant that omits k from the snapshot is caught by an energy jump of π² J; sense.alias returns the witness for a single-turn encoder and none for a multi-turn encoder. M1. |