feat(num): real-algebraic number kernel — replace the quadratic Ext tower #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/real-algebraic-kernel"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Slice 1 of axiom 7 (Justin ⑦, the Beloch fold): replaces
Num's quadraticExttower with an exact real-algebraic kernel, so creases of degree ≤ 3 — including the casus-irreducibilis cubics axiom 7 needs — become representable. No.belsurface change; axioms 1–6 are unchanged in behaviour.lib/poly.ml: ℚ-polynomials — arithmetic, Sylvester resultant, Euclidean gcd/squarefree, Sturm sequences, real-root isolation.[bpr2006]lib/num.mlrewritten:Rat of Q.t | Alg { poly; lo; hi }— the unique real root of a squarefree ℚ-polynomial in an isolating rational interval. Arithmetic builds the result's defining polynomial by resultant-via-interpolation (Alg±Rat/Alg×Ratfast paths);sqrtviapoly(y²); exactsign/compare/equalby interval refinement; newreal_roots. TheRatfast-path keeps axioms 1–4 in ℚ.Numinterface frozen (+real_roots), sogeom/isometry/fold_state/fold_emit/evalcompile unchanged.bpr2006(Basu–Pollack–Roy) added to the bibliography.The casus irreducibilis is why a
Cbrtgenerator won't do — three real roots that aren't real radicals — so the kernel stays on the real line via defining-polynomial + isolating interval, no complex arithmetic. Cost: √-heavy axioms 5/6 lose the closed-forma+b√dspeed; correctness over speed, as ADR 0010 already bargained.108/108 tests pass. Next slice: the axiom 7 statement surface (
map .p onto --d and .q onto --e) on top of this kernel.Design:
docs/superpowers/specs/2026-06-30-real-algebraic-kernel-design.md