feat(sparse-poly): Phase-2 review fixes and the Phase-3 conformance suite - #9399
Merged
Conversation
kim-em
force-pushed
the
sparse-poly-eval
branch
from
August 22, 2026 04:36
42856e8 to
27eb9bb
Compare
kim-em
force-pushed
the
sparse-poly-conformance
branch
from
August 22, 2026 04:36
05e2159 to
acb2bcf
Compare
kim-em
force-pushed
the
sparse-poly-eval
branch
from
August 22, 2026 05:17
27eb9bb to
6bfc005
Compare
kim-em
force-pushed
the
sparse-poly-conformance
branch
from
August 22, 2026 05:17
acb2bcf to
dc746be
Compare
kim-em
force-pushed
the
sparse-poly-eval
branch
from
August 23, 2026 12:38
6bfc005 to
c81f78a
Compare
kim-em
force-pushed
the
sparse-poly-conformance
branch
from
August 23, 2026 12:38
dc746be to
a7909bd
Compare
kim-em
force-pushed
the
sparse-poly-eval
branch
from
August 23, 2026 13:05
c81f78a to
93ba36e
Compare
kim-em
force-pushed
the
sparse-poly-conformance
branch
from
August 23, 2026 13:05
a7909bd to
64a496e
Compare
kim-em
force-pushed
the
sparse-poly-eval
branch
from
August 23, 2026 13:28
93ba36e to
4dfa555
Compare
kim-em
force-pushed
the
sparse-poly-conformance
branch
from
August 23, 2026 13:28
64a496e to
6dfa24b
Compare
kim-em
force-pushed
the
sparse-poly-eval
branch
from
August 23, 2026 13:55
4dfa555 to
f58a983
Compare
kim-em
force-pushed
the
sparse-poly-conformance
branch
from
August 23, 2026 13:55
6dfa24b to
8a54d8f
Compare
…uite Independent scaffolding review performed and its four gaps fixed (pow_zero/pow_succ recurrences, full decide-closure KernelTests coverage, foldl_max_le cleanup, CommRing placement noted for the Phase-4 SPEC write-back); mul's kernel-facing specification routed through the term Lists so it reduces under decide as the SPEC requires; DecidableEq (ZMod64 p) promoted from HexPolyFp to HexModArith so the sparse conformance pin list matches the SPEC. Phase 3 lands the core conformance module with the SPEC's invariant, round-trip-necessity, and differential cases, the emit driver with a committed JSONL snapshot, the sparsepoly fixture schema, the SymPy sparse-ring oracle (51/51 green locally), and the run_oracles tuple. done_through: 3. Progress: progress/20260822T042821Z_sparse-poly-conformance.md Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014CvkL7tZHMnLN53fXCAjiq
…om factor-sweep staleness Cost-model derivations for the bundled bench registrations (the declared complexity of every setup_benchmark model): - sparse add: one linear merge of the two term lists, O(t) in the common term count and independent of degree (exponents are only compared, never iterated), hence the degree-independence check. - sparse mul (sort route): t^2 pairwise products then a mergeSort of the t^2 terms, O(t^2 log t^2) dominates; again degree-independent. - mul selection: sort route as above; ExtTreeMap accumulation is t^2 tree inserts, O(t^2 log t) worst case; Johnson heap merge is O(s t log s) with a large constant. All three declared with their own models on low- and high-collision inputs. - crossover: sparse side linear (add) and quadratic-with-sort (mul) in t at fixed degree; dense side constant in t at fixed degree, so the dense registrations declare constant models. - evaluation: gap Horner does O(t) coefficient multiplies plus binary powering across exponent gaps, O(t log(n/t)) multiplies; dense Horner is linear in the degree, constant in t. - substitution-power: substPow multiplies each stored exponent, O(t) and flat in k, the declared constant model in k. - convert-gcd: linear, not quadratic; the sparse-remainder pair does a constant number of bounded-quotient divisions and the generic pair divides by a fixed degree-7 divisor, so the dense division work is O(n); conversion share registers the O(n) conversions alone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014CvkL7tZHMnLN53fXCAjiq
kim-em
force-pushed
the
sparse-poly-conformance
branch
from
August 23, 2026 14:19
8a54d8f to
f5ba714
Compare
kim-em
enabled auto-merge (squash)
August 23, 2026 14:20
auto-merge was automatically disabled
August 23, 2026 14:22
Pull request was closed
kim-em
enabled auto-merge (squash)
August 23, 2026 14:23
With python-flint installed, SymPy's QQ ground type is flint's fmpq, whose numerator and denominator are fmpz rather than numbers.Rational, and CPython's Fraction constructor rejects those; convert through int. Reproduced with sympy 1.14.0 + python-flint and verified green there and under the nix-shell sympy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014CvkL7tZHMnLN53fXCAjiq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR complete Phases 2 and 3 for hex-sparse-poly. An independent agent session performed the Phase-2 skeptical review (verdict pass-with-gaps) and its four gaps are fixed here: the
pow_zero/pow_succrecurrences that fully characterise the binary powering, KernelTests probes for the rest of the SPEC'sdecideclosure (add,mul,ofDense), removal of a vacuousfoldl_max_lehypothesis, and the transported-laws placement note recorded for the Phase-4 SPEC write-back; the review token lands atstatus/hex-sparse-poly.scaffolding-reviewed. Along the waymul's kernel-facing specification now builds the pairwise products through the termLists (Array.flatMapstalls kernel reduction, and the SPEC requiresmulin thedecideclosure — the value is unchanged), andDecidableEq (ZMod64 p)moves from HexPolyFp to HexModArith, which is what lets the sparse conformance project pin only hex-mod-arith as the SPEC states. Phase 3 landsconformance/HexSparsePoly/Conformance.leancovering every SPEC operation with typical/edge/adversarial cases plus all the SPEC's invariant, round-trip-necessity, and cross-library differential checks; the shared fixtures module; the emit driver with a committed 120-record JSONL snapshot; thesparsepolyfixture schema in the shared emit helper andcommon.py; the SymPy sparse-ring oracle (51/51 checks green locally); and the ORACLES tuple. Bumpsdone_throughto 3.🤖 Prepared with Claude Code