code wiki / _hdl_build / nx_softtissue_rot_gate.nx
nx_softtissue_rot_gate.nx
buildroot/runtime/_hdl_build/nx_softtissue_rot_gate.nx
about
nx_softtissue_rot_gate.nx -- THE INVARIANCE SEAT FOR THE VOLUMETRIC TIER.
WHY THIS EXISTS. nx_softtissue's 19 teeth are all BEHAVIOURAL (does it droop, does it flatten,
does it dimple). Not one of them is an INVARIANCE, and the two council seats built 2026-08-03
target the 3-point shipping solver and the 2D ring -- neither had ever run against this, the best
tier. The modelling workstream named the gap and the claim in one line: XPBD driven by a gravity
UNIT VECTOR should be EXACTLY rotation-equivariant, and nothing has ever tested it. Debt 1785786068.
V2 (this file): the first cut tested ONE element of the cube group (180 about z). This version
enumerates ALL 24 proper rotations (signed permutation matrices, det=+1) and asserts bit-exactness
for every one, plus exact translation equivariance. The enumeration itself is a tooth (T0): a
partition is a claim, so the generator must produce exactly 24 or the sweep is measuring a subset
while claiming the group. The identity element is deliberately IN the sweep -- it doubles as a
determinism tooth (two independent builds+runs of the same world must agree bit-for-bit).
WHY THE CLAIM SURVIVES THE RIBCAGE. It looks false at first: st_wall_drop uses st_abs(xm) and the
header says the wall curves in x and NOT in y, so the model is deliberately anisotropic. But the
wall is applied ONCE, at build, into the initial z of each particle (nx_softtissue.nx:500) -- it is
GEOMETRY, not a runtime constraint. Every runtime constraint here is distance or signed volume,
both rotation- and translation-invariant, plus gravity, which is a vector we rotate with the cage.
SCOPE: the touch-sphere constraint (ST_W_TON, absolute center TCX/TCY/TCZ) is a genuine absolute
anchor, but st_new zeroes it and no run here enables it -- equivariance WITH touch enabled would
need the touch center rotated too, and is deliberately out of scope of this gate.
WHY SIGNED PERMUTATIONS SURVIVE THE ARITHMETIC. Axis permutations relabel identical code paths
(constraint order is index-based, never coordinate-based), and negations survive st_div_r because
it rounds half AWAY FROM ZERO (sign-symmetric by construction). Mirrors (det=-1) are excluded: a
mirror flips the sign of every tet's 6V and fights the inversion barrier -- a RED that would say
nothing about equivariance.
MEMORY: 27 worlds x ~3.6MB (no st_free exists; a gate process releases everything at exit) --
~100MB transient, declared here so nobody reads the mmap total as a leak.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_softtissue.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 38 | const RG_DT_US: i64 = 4167 |
| 39 | const RG_ITERS: i64 = 2 |
| 40 | const RG_STEPS: i64 = 300 |
| 41 | const RG_G: i64 = 4096 |
| 42 | const RG_NROT: i64 = 24 |
| 45 | const RG_TX: i64 = 7000 |
| 46 | const RG_TY: i64 = 3000 |
| 47 | const RG_TZ: i64 = 11000 |
functions
| 50 | func rg_pick(a: i64, b: i64, c: i64, k: i64) -> i64 |
| 59 | func rg_build_rots(RT: *i64) -> i64 called by 1: main |
| 114 | func rg_apply(W: *i64, RT: *i64, r: i64) -> i64 |
| 151 | func rg_diff_r(WA: *i64, WB: *i64, RT: *i64, r: i64, worst: *i64) -> i64 |
| 187 | func rg_shift(W: *i64, tx: i64, ty: i64, tz: i64) -> i64 called by 1: main |
| 205 | func rg_diff_t(WA: *i64, WB: *i64, tx: i64, ty: i64, tz: i64, worst: *i64) -> i64 called by 1: main |
| 231 | func main(argc: i64, argv: *i64) -> i64 |