refactor(polynomial): make trivariate axes explicit - #790
Conversation
🤖 PR SummaryThe overview is written as a self-contained, objective summary of the PR's changes, organized under relevant headers. It highlights the core refactoring in Statistics
Lean Declarations ✏️ Added: 25 declaration(s)
✏️ Affected: 5 declaration(s) (line number changed)
📋 **Additional Analysis**The PR introduces a 📄 **Per-File Summaries**
Last updated: 2026-09-01 02:06 UTC. |
Build Timing Report
Incremental Rebuild Signal
This compares a clean project build against an incremental rebuild in the same CI job; it is a lightweight variability signal, not a full cross-run benchmark. Slowest Current Clean-Build FilesShowing 20 slowest current targets, with comparison against the selected baseline when available.
|
fe1a3f9 to
17e1a8b
Compare
quangvdao
left a comment
There was a problem hiding this comment.
Thanks, Alexander — I reviewed the axis semantics and the downstream migrations, rebased this onto current main, and validated the rebased head locally. Making the trivariate axes explicit removes a real ambiguity in degree reasoning, and the compatibility bridge plus migrated call sites look coherent. Approved.
Confirmed defect fixed
Trivariate.eval_on_Zwas opaque, so downstream proofs could not unfold it andExtraction.leanhad grown a duplicatepg_eval_on_Z. This replaces it with the transparent, axis-explicitevalAtZdefinition and keeps deprecated compatibility aliases.Bivariate.totalDegreeonF[Z][X][Y]measures only the structural(X, Y)projection. It is not the(Y, Z)degree and it ignoresZ. The asymmetric regression polynomialZ^5 X^7 Y^3proves the distinction:degreeXY = 10,degreeYZ = 8, andtotalDegreeXYZ = 15.No incorrect mathematical statement on current
mainwas found or changed.Preventive API hardening
evalAtX,evalAtY, andevalAtZ.degreeInX,degreeInY,degreeInZ,degreeXY,degreeYZ, andtotalDegreeXYZ, with bridge lemmas and docstrings.D_YandD_YZdefinitions from fields to commutative semirings while preserving their definitions.Audit scope
Reviewed trivariate uses of
Bivariate.evalX,evalY,degreeX,natDegreeY,totalDegree, swaps, and nested coefficient access across BCIKS20 list decoding, Polishchuk-Spielman and affine-line code, and the rational-function Hensel package. The swap sites inspected are genuinely bivariate. Remaining raw Hensel operations are on actual bivariate coefficients, on results after trivariate specialization, or are definitionally correct middle-Xevaluation inside proof-heavy implementation code; the package and wiki documentation record why they are correct.External finding and remaining obligation
PR #787 at head
54e2e918adds Claim 5.8 hypotheses of the formBivariate.totalDegree (R : F[Z][X][Y]) <= D_YZ Q. The asymmetric regression confirms that the left side is the(X, Y)projection, not the intended(Y, Z)projection. This main-based PR deliberately does not mutate #787. After rebasing, #787 should express those hypotheses withTrivariate.degreeYZ R <= D_YZ Qand revalidate the downstream proof obligations.Validation
Trivariate, BCIKS20Agreement, and HenselWeightdependency closure./scripts/validate.sh./scripts/validate.sh --axioms(fixture matrix passed; 10,479 declarations checked; no new axiom/sorry taint; no non-standard axiom taint)./scripts/validate.sh --docspython3 ./scripts/check-docs-integrity.pyafter staging the new wiki pagegit diff --cached --checkAll requested validation passed.