feat(num): primitive-element tier in real_roots for compositum fields #56
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "worktree-spike+calcium-pe-merge"
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?
Adds a primitive-element tier to
Num.real_rootsfor axiom-6/7 polynomials whose algebraic coefficients span a field — a compositum of independent folds. The tier expresses every coefficient over one generator γ (via FLINTqqbar_express_in_field) and eliminates with a single resultantR = Res_x(μ_γ, F̃)of degree3·[ℚ(γ):ℚ], then keeps only the candidates that pass the exacteval_p = 0qqbar check. This replaces, for that case, the old path where FLINT's qqbar root-finder was either slow (~9s) or bailed out to a hopeless degree-3·d³resultant.Gated behind the existing FLINT-first fast path. Every failure mode — non-mergeable field,
express_in_fieldbit-limit, degenerateR— falls through to the unchanged Mpoly multi-generator path, so correctness never regresses. FLINT re-verifiesres(γ) = xexactly before reporting success, so the precision heuristic can only cause a falseNone(clean fallback), never a wrong polynomial.Measured on this branch: a cubic with a single degree-8 coefficient (
√(√2+√3)) — ~9s via qqbar-native root-finding in the spike — now solves in ~0.5s. The #33 round-4 tripling-stack case (coefficients over a degree-9 field), previously>300s killed, is estimated at ~0.5–2s — extrapolated from the spike's degree-scaling curve, not yet directly benchmarked. Independent-fold and degree-≥4 cases route through the tier and verify exactly.Calcium (
ca_t) was evaluated as an alternative backend and rejected — it caps out below the status quo. Seenotes/2026-07-03-calcium-pe-spike.mdfor the spike andnotes/2026-07-03-33-verdict.mdfor the ceiling analysis.New surface:
Qqbar.express_over,lib/field_merge.ml. Full suite green (beloch-num 51/51,cube-root.belgolden byte-identical).Note: this branch also carries the throwaway spike probes under
scratch/(normally gitignored, force-committed here as evidence) plus the design spec/plan underdocs/superpowers/— drop before squash-merge if you don't want them inmain.https://claude.ai/code/session_01TinroyhVWz1RBZtXMZoLdd