code wiki / _hdl_build / nx_ncf_state_gate.nx
nx_ncf_state_gate.nx
buildroot/runtime/_hdl_build/nx_ncf_state_gate.nx
about
nx_ncf_state_gate.nx -- X-AUT-NCF-001 RUNG 5: SYNTHESIZE A TWO-STATE LINEAR RECURRENCE -- the QUALITATIVE
jump the Fibonacci boundary revealed. Every prior construct (rungs 1-4) has ONE accumulator; this is the
first with TWO registers (a,b) updated in parallel each step: (a,b) <- (paa*a+pab*b, pba*a+pbb*b); return a.
That makes it small-PROGRAM synthesis, not curve-fitting -- it covers Fibonacci/Lucas/Pell (order-2 linear
recurrences) that NO single-accumulator loop can express. Decisive negative control: rung-4 quadratic-index
(the strongest single-accumulator construct) PROVABLY FAILS on Fibonacci -> two-state is NECESSARY.
T1 linear FAILS on Fibonacci. T2 rung-4 quadratic-index loop FAILS on Fibonacci -> two-state necessary.
T3 two-state SYNTHESIZES Fib = a=0,b=1; (a,b)<-(b, a+b); return a.
T4 MATERIALIZE+GOD-BUILD+run HELD-OUT {8->21, 9->34} -> 21034. T5 unified ncf_synth routes Fib (kind=5).
Construct ladder: linear < conditional < simple-loop < affine-index < quadratic-index < TWO-STATE.
expect_exit: 0 license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_ncf_synth.nxnx_syscalls.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
| none |
functions
| 15 | func main() -> i64 |