code wiki / _hdl_build / nx_softtissue_rot_gate.nx

nx_softtissue_rot_gate.nx

buildroot/runtime/_hdl_build/nx_softtissue_rot_gate.nx

15607 B336 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic softtissue
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_gate_verdict.nx nx_softtissue.nx nx_softtissue_rot_gate.nx

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

main gv_ctr sys_mmap gv_head gv_puts sys_write sys_mmap ↻ rg_build_rots gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_check gv_puts ↻ st_new sys_mmap ↻ st_profile st_profile_seeded st_hash pg_sample pg_has_bound pg_bound pg_bound ↻ st_span st_hash ↻ st_profile ↻ st_inside st_wall_drop st_abs st_isqrt st_six_vol st_div_r st_layer_alpha_vol st_add_edge st_isqrt ↻ st_layer_alpha_dist st_run st_substep st_div_r ↻

structs

none

consts

38const RG_DT_US: i64 = 4167
39const RG_ITERS: i64 = 2
40const RG_STEPS: i64 = 300
41const RG_G: i64 = 4096
42const RG_NROT: i64 = 24
45const RG_TX: i64 = 7000
46const RG_TY: i64 = 3000
47const RG_TZ: i64 = 11000

functions

50func rg_pick(a: i64, b: i64, c: i64, k: i64) -> i64
59func rg_build_rots(RT: *i64) -> i64
called by 1: main
114func rg_apply(W: *i64, RT: *i64, r: i64) -> i64
called by 1: main calls 1: rg_pick
151func rg_diff_r(WA: *i64, WB: *i64, RT: *i64, r: i64, worst: *i64) -> i64
called by 1: main calls 1: rg_pick
187func rg_shift(W: *i64, tx: i64, ty: i64, tz: i64) -> i64
called by 1: main
205func rg_diff_t(WA: *i64, WB: *i64, tx: i64, ty: i64, tz: i64, worst: *i64) -> i64
called by 1: main
231func main(argc: i64, argv: *i64) -> i64