code wiki / _hdl_build / nx_chaos_logistic_gate.nx

nx_chaos_logistic_gate.nx

buildroot/runtime/_hdl_build/nx_chaos_logistic_gate.nx

4788 B100 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic chaos
docsdependenciesstructsconstsfunctions

about

nx_chaos_logistic_gate.nx -- resumes the nishi-library SIM workstream's stated next step: "no-float determinism UNDER CHAOS = live proof of the Reproducibility-EXCEEDS axis." Vehicle = the canonical discrete chaotic system, the LOGISTIC MAP x' = r*x*(1-x), in pure integer/no-float fixed point (micro-scale S=1e6, r scaled by RD=1e3). Reordered to avoid i64 overflow: x*(S-x) <= 2.5e11, *R <= ~1e15, / (RD*S=1e9). Stays in [0,S] for r<=4. THREE properties, each MEASURED, with a liar-kill so GREEN means something: (1) SENSITIVE DEPENDENCE: two seeds 1 micro-unit apart (0.200000 vs 0.200001) DIVERGE to O(S) at r=3.9 (chaotic) -- the butterfly effect, measured as max separation after burn-in. (2) DETERMINISM / REPRODUCIBILITY: the SAME integer trajectory recomputed gives a BIT-IDENTICAL divergence number -- no-float => exactly reproducible even in the chaotic regime (the EXCEEDS property an IEEE-754 sim cannot guarantee under reordering). (3) NEGATIVE CONTROL (liar-kill): the SAME 1-unit-apart seeds at r=2.5 (non-chaotic, converges to the fixed point 0.6) do NOT diverge -- so the gate cannot be fooled into calling order "chaos". GREEN requires chaos-diverges AND order-does-not AND chaos-is-reproducible. Sovereign: imports only nx_syscalls. Additive. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_chaos_logistic_gate.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main cl_p cl_len sys_write cl_divmax cl_iter cl_pn sys_mmap sys_write ↻ sys_exit

structs

none

consts

21const CL_S: i64 = 1000000 // micro-scale for x in [0,1]
22const CL_RD: i64 = 1000 // r scaled by 1000 (r=3.9 -> R=3900)
23const CL_BIG: i64 = 100000 // chaos threshold: max separation must EXCEED S/10
24const CL_SMALL: i64 = 10000 // order threshold: separation must stay BELOW S/100

functions

26func cl_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: cl_p
27func cl_p(s: *u8) -> i64 { let n: i64 = cl_len(s); sys_write(1, s, n); return 0 }
called by 1: main calls 2: cl_lensys_write
28func cl_pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
39func cl_iter(X: i64, R: i64) -> i64
called by 1: cl_divmax
47func cl_divmax(x0a: i64, x0b: i64, R: i64, n: i64, burn: i64) -> i64
called by 1: main calls 1: cl_iter
65func main() -> i64