code wiki / _hdl_build / nx_softtissue_conserve_gate.nx
nx_softtissue_conserve_gate.nx
buildroot/runtime/_hdl_build/nx_softtissue_conserve_gate.nx
about
nx_softtissue_conserve_gate.nx -- CONSERVATION + DISSIPATION SEAT (metrology council member 6),
2026-08-03. Sibling of nx_softtissue_mr_gate (member 2) and DELIBERATELY DISJOINT FROM IT: member 2
asks whether the solver respects symmetries, this one asks whether it respects ENERGY AND VOLUME.
A wrong dynamics can be perfectly equivariant -- that is member 2's declared blind spot, and this
is the member that covers it. Per the council's own rule, a seat earns its place by covering a
blind spot no other member can see, never by raising the seat count.
REGIME SPLIT, which is the whole point (conservation is the WRONG invariant for soft tissue):
RIGID/AUTONOMOUS regime -> a damped solver with no input must reach a FIXED POINT and stay there.
SOFT/OCCLUDED regime -> volume (here: ring cross-section area) is the conserved quantity, and
it must be conserved AT EVERY INDENTATION DEPTH, not at one tuned depth.
★THE EXACT INVARIANT THIS SEAT IS BUILT ON, chosen to need NO tolerance and NO oracle:
an autonomous damped INTEGER solver must converge to a BIT-IDENTICAL FIXED POINT.
Integer arithmetic makes this decidable in a way float never could: "at rest" is not "small", it is
state[t+1] == state[t] byte for byte, and it must then HOLD. A solver that never freezes is either
injecting energy or grinding in a truncation limit cycle -- both are real defects, both invisible
to every symmetry relation in member 2.
T1 SD FIXED POINT kicked 3-pt solver freezes exactly, and HOLDS
T2 SD BITE undamped (C=0) must NOT freeze -- proves T1's detector can fail
T3 SR FIXED POINT perturbed 48-node region freezes exactly, and HOLDS
T4 SR BITE undamped region (damp=0) must NOT freeze
T5 SR GRAVITY REST under load the region still reaches a fixed point (sag equilibrium)
T6 AREA CONSERVATION cross-section area within band of rest at EVERY indentation depth
T7 AREA BITE voldist=0 (occlusion law OFF) must LEAVE the band -- proves T6 can fail
T8 BULGE MONOTONIC deeper indentation never produces a smaller far-side bulge
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_softbind.nxnx_softbody_region.nxnx_gate_verdict.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
| 34 | const CG_SD_WORDS: i64 = 18 // SB_PTS(3) * stride(6) |
| 35 | const CG_SD_STRIDE: i64 = 6 |
| 36 | const CG_RING_N: i64 = 16 |
| 37 | const CG_RING_R: i64 = 800 |
| 38 | const CG_SR_WORDS: i64 = 256 // CG_RING_N * 16 slots per node |
| 39 | const CG_LONG: i64 = 20000 // generous convergence budget |
| 40 | const CG_HOLD: i64 = 500 // a fixed point must HOLD, not just occur once |
| 41 | const CG_SETTLE: i64 = 400 // ticks for an indentation to reach steady state |
| 44 | const CG_K: i64 = 60 |
| 45 | const CG_C: i64 = 100 |
| 46 | const CG_MAXD: i64 = 64 |
| 47 | const CG_KICK: i64 = 400 |
| 50 | const CG_P_DAMP: i64 = 7 |
| 51 | const CG_P_GMULY: i64 = 9 |
| 52 | const CG_P_VOLDIST: i64 = 12 |
| 53 | const CG_DAMP_DEF: i64 = 30 |
| 54 | const CG_CAPR: i64 = 350 |
| 55 | const CG_CAPHALF: i64 = 400 |
| 56 | const CG_PERTURB: i64 = 200 |
| 66 | const CG_AREA_REST: i64 = 100 |
functions
| 68 | func cg_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } |
| 69 | func cg_isqrt(v: i64) -> i64 { if v <= 0 { return 0 } var x: i64 = v; var y: i64 = (x+1)/2; while y < x { x = y; y = (x + v/x)/2 } return x } called by 1: cg_bulge |
| 70 | func cg_snap(src: *i64, dst: *i64, n: i64) -> i64 { var i: i64 = 0; while i < n { dst[i] = src[i]; i = i + 1 } return 0 } |
| 71 | func cg_same(a: *i64, b: *i64, n: i64) -> i64 { var i: i64 = 0; while i < n { if a[i] != b[i] { return 0 } i = i + 1 } return 1 } |
| 75 | func cg_freeze_sd(K: i64, C: i64) -> i64 |
| 99 | func cg_freeze_sr(damp: i64, gmuly: i64) -> i64 |
| 128 | func cg_area_pct(depth: i64, voldist: i64) -> i64 |
| 147 | func cg_bulge(depth: i64) -> i64 |
| 164 | func main() -> i64 |