Repository navigation
Reduce BKW dominance queries with exact structural prepasses - #123
PerAlexandersson wants to merge 1 commit into
Conversation
|
Reviewed and ported to the workspace tree, which generates Review. The mathematics checks out:
Two follow-ups in the port:
Benchmark (automatic compiler, Z3 5.4.1, 60 s): all 21 cases are decided, with no timeouts. Nine get exact certificates and twelve get solver answers in 10–30 ms. Every answer agrees with the earlier runs. For future changes: |
Port of public polytool PR #123 ("Reduce BKW dominance queries with exact structural prepasses", commit cb719f2) onto the workspace tree, so it reaches public main through the regular sync. - Rotational symmetry: a characteristic exponent gcd > 1 after structural zeros gives equal-modulus root orbits at every parameter. - Trinomial certificate for t^d + B t^m + C (gcd(d, m) = 1, d >= 3) from the nonreal zeros of B^d - (-1)^(d(m+1)) C^(d-m) away from zeros of C, with an exact verifier. - Reciprocal parameter with uniform root scaling exposes degree-gap certificates for further non-pencil inputs. - Pencil quotients drop their common power of w; linear and quadratic quotients use direct closed-disk predicates; the first-order fallback reuses its radial minors; sparse products reserve by operand sizes. - Replay distinguishes independent contradictions (ParameterContradicts, LevelContradicts; inconclusive) from unavailable checks; a positive verdict requires a sat answer. - Docs: benchmark table, and a reviewed note on a complete univariate quadratic route (not implemented). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Released in public main 31f185e (31f185e). Public main is generated from the workspace tree, so this PR was ported there instead of being merged here.
Lean coverage of the new prepass steps is tracked in PerAlexandersson/RealRooted#2708. Thank you for the contribution. |
Why
Automatic BKW dominance analysis can construct large multivariate formulas even when a short exact structural argument decides the input. On the existing benchmark set, a cubic pencil took 6.6 seconds in Z3, and a degree-eight pencil aborted during symbolic construction while attempting an 11,005,853,712-byte allocation.
This change runs additional exact reductions before elimination and reduces the formulas that remain. It advances #121 and builds on the rational-scaling fix and general pencil-level replay already on main in
aac299d.Changes
LevelConfirmedreplay and distinguish an independent contradiction from an unavailable check.ParameterContradictsandLevelContradictsremain inconclusive, and positive replay verdicts require a SAT solver answer.The complete univariate quadratic-characteristic decision procedure in
doc/quadratic-dominance.mdis a reviewed mathematical and implementation note; that further algorithm is not implemented by this PR.Measurements
Individual runs on the same host, Rust 1.82.0 and Z3 5.4.1, compared with
aee68ce:t^3-(x+1)t^2+x*t-xt^4-x*t^2-1t^5-x*t^4-1t^8-x*t^7-1The initial optimized sweep completed all 21 cases: nine exact structural certificates and twelve solver answers in 10–32 ms. After integrating current main's broader level replay, a fresh sweep retained the same nine certificates and twelve answers in 10–91 ms, with no contradictory replay; the first cubic took 20 ms in that run. These are individual timings, not a uniform speedup claim.
The spectral result contract is unchanged: amplitudes, BKW nondegeneracy, and real-rootedness of every row are separate questions. Algebraic solver models keep their unreplayed status, and UNSAT remains solver-backed.
Validation
After reconciling with
mainatd652a0b:EXACT_STABILITY_Z3enabled.Before integration, the 63 polytool-core doctests and 3 root doctests also passed. Broader strict Clippy encountered pre-existing warnings in
crates/polytool-core/src/digest.rs,src/bin/polytool/bench_kernels.rs, andsrc/bin/polytool/oeis/evidence.rs; this PR leaves those files unchanged.