Repository navigation
chore: bump Lean and Mathlib to v4.36.0 - #417
Conversation
Moves the toolchain and the Mathlib pin to v4.36.0 and adapts the sources. Most fixes follow from Mathlib making `Polynomial R` an abbrev for `AddMonoidAlgebra R ℕ`. See the PR description for the full list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 PR Summary
Mechanical Bump to Lean and Mathlib v4.36.0All modifications in this PR are purely mechanical adaptations required to compile the Library Version Pins
Mathematical Formalization / Proof AdaptationUpstream Change:
|
| Metric | Count |
|---|---|
| 📝 Files Changed | 56 |
| ✅ Lines Added | 139 |
| ❌ Lines Removed | 138 |
Lean Declarations
✏️ Affected: 1 declaration(s) (line number changed)
@[simp] theorem natDegree_poly : P.poly.natDegree = P.dinCompPoly/Fields/Extension/Defs.leanmoved from L67 to L67
sorry Tracking
- No
sorrys were added, removed, or affected.
📋 **Additional Analysis**
No findings.
📄 **Per-File Summaries**
- CompPoly/Bivariate/Deriv.lean: Two proofs in
CompPoly/Bivariate/Deriv.leanwere refactored to use theexttactic with an explicit: 2binder instead of explicitly openingPolynomial.extwithintro j. InpartialDerivX_mul, the lineapply Polynomial.ext; intro jwas replaced byext j : 2. InshiftX_toPoly, the linesapply Polynomial.extandintro jwere collapsed into a singleext j : 2. This changes only the proof style, not the stated theorems or their signatures. - CompPoly/Bivariate/Factor.lean: In
divByLinearY_spec, the proof is refactored by replacingapply Polynomial.extandintro nwith the single callext n : 2. This change shortens the proof without altering the theorem's statement or its logical content. - CompPoly/Bivariate/GuruswamiSudan/CoreCorrectness.lean: Refactored the proof of
coeff_coeffwise_hasseDeriv_sumto usePolynomial.coeff_monomial_applyinstead of the now-removed lemmaPolynomial.coeff_monomial. All three invocations ofcoeff_monomialin the proof were replaced, adapting to an API change in Mathlib (thecoeff_monomiallemma was removed or renamed in favor ofcoeff_monomial_apply). Nosorryoradmitwere introduced. - CompPoly/Bivariate/GuruswamiSudan/Interpolation/ApproximantBasis/ModularData.lean: The diff refactors three uses of
Polynomial.coeff_monomialtoPolynomial.coeff_monomial_applyin the proof of the private theoremtoPoly_ofCoeffRow_eq_sum. The new lemmacoeff_monomial_applyis presumably a more convenient or correctly-typed form of the existingcoeff_monomial; this is a purely mechanical replacement that does not affect the statement of the theorem or any other declarations in the file. Nosorryoradmitis introduced. - CompPoly/Bivariate/GuruswamiSudan/Interpolation/Correctness.lean: The proof of
hasseDerivative_zero_xOrder_toPoly_of_map_Cwas refactored: two nested calls toPolynomial.extwith explicitintrobinders were replaced by a singleext j : 2followed by anext i : 2. This uses Lean'sexttactic with depth arguments, making the goal expansion more concise without changing the subsequent rewriting steps. - CompPoly/Bivariate/GuruswamiSudan/Interpolation/LeeOSullivan/Correctness/Combinations.lean: In
hasseDerivativeEval_ofYConstant_mul_eq_eval_mul_of_lower, the induction binder in theNat.strong_induction_onblock was renamed fromh n ihtoind n ih. This is a purely cosmetic refactor that does not affect the theorem's statement, proof structure, or any other declaration in the file. - CompPoly/Bivariate/GuruswamiSudan/Interpolation/LeeOSullivan/Correctness/Divisibility.lean: In the private theorem
lee_coeff_coeffwise_hasseDeriv_sum, three uses ofPolynomial.coeff_monomialwere replaced withPolynomial.coeff_monomial_apply. This updates the proof to match a renamed lemma in the polynomial library and does not alter the theorem's logical content. - CompPoly/Bivariate/GuruswamiSudan/PolynomialCorrectness.lean: In the private lemma
coeff_coeffwise_hasseDeriv_sum, three uses ofPolynomial.coeff_monomialare replaced byPolynomial.coeff_monomial_applyin order to adapt to a change in Mathlib's API (the lemmacoeff_monomialhas been renamed or superseded bycoeff_monomial_apply). The theorem statement and the overall logic of the proof remain unchanged; the adjustment is purely mechanical to keep the proof compiling against the current Mathlib revision. - CompPoly/Bivariate/GuruswamiSudan/Root/Alekhnovich/Correctness.lean: Renamed the strong induction case binder in
alekhnovichRootCandidatesWithFuel_completefromh fuel ihtoind fuel ihfor consistency with the naming convention used elsewhere in the project. - CompPoly/Bivariate/ToPoly.lean: The diff refines several lemmas in
ToPoly.lean:
- In
ofPoly_monomial,support_toPoly_outer,evalX_toPoly_coeff, andevalX_toPoly_eval_commute_converse, thesimpcalls are supplemented withFinsupp.single_applyto improve simplification of monomial coeffs. ofPoly_coeffrewritesPolynomial.toImpl (Polynomial.coeff p j)asPolynomial.toImpl (p.coeff j)for brevity.ofPoly_addandevalX_toPoly_eval_commutereplacecontrapose!withcontrapose, altering the structure of a case analysis.toPoly_eq_mapchanges itsconverttarget fromPolynomial.ext _toAddMonoidAlgebra.ext (Finsupp.ext _), adjusting to a lower-level extension lemma.natDegreeY_toPolyupdates the lemma name fromPolynomial.natDegree_mem_support_of_nonzerotoPolynomial.natDegree_mem_support_of_ne_zero.toPoly_eq_map,evalX_toPoly_coeff, andevalX_toPoly_eval_commute_converseaddFinsupp.single_applytosimpexpressions that already usedPolynomial.coeff_monomial.
- CompPoly/Data/Classes/CanonicalNat.lean: The
all_goals assumptiontactic block in the proof ofofNat?_eq_none_iffis replaced by a singleassumptioncall. Since thesplitreduces the goal to a single case (thenonebranch ofofNat?), theall_goalscombinator was unnecessary and this change simplifies the proof without affecting the theorem's statement or its logical content. - CompPoly/Data/Polynomial/MonomialBasis.lean: The proof of
monomialBasisOfDegreeLTwas updated to fix the application ofcoeffafter a recent API change. Previously, the expressioncoeff (Finsupp.linearCombination ...).val iwas used, butcoeffnow expects the polynomial type directly, not aSubtypeprojection. The lemma now writes.val.coeff ito access the coefficient, and thesimpblock was updated to useAddMonoidAlgebra.coeff_smul_apply(likely replacing a now-unavailablecoeff_smullemma), keeping the reasoning step correct. Nosorryoradmitwere introduced. - CompPoly/Fields/Basic.lean: This diff removes two
trymarkers in thecomp_x_square_coeff_pos_deglemma, changingtry simp [←mul_assoc]andtry simp_allto plainsimpandsimp_all. Both are in branches ofrintrothat match specific patterns, so thetrywas redundant — thesimpcalls now always apply without fallback. - CompPoly/Fields/Binary/AdditiveNTT/Intermediate.lean: In
Intermediate.lean, themap_add'andmap_smul'proofs ofintermediateToCoeffsVecwere simplified by removing the explicitcoeff_addandcoeff_smullemmas from theirsimpcalls, relying on a more generalsimprewrite. The proof ofintermediateEvaluationPoly_from_inovel_coeffs_eq_selfwas refactored to useext k : 2(a two-levelexttactic) instead of the separateapply Polynomial.extfollowed byintro k, streamlining the extensionality application. No new theorems, definitions, orsorry/admitwere introduced. - CompPoly/Fields/Binary/AdditiveNTT/NovelPolynomialBasis.lean: The file makes three changes. First, it replaces
Set.Ico_insert_rightwithSet.insert_right_Icoin the proof ofU_i_is_union_of_cosets(line 156) and in the proof ofroot_U_lift_down(line 223), likely to reflect a rename of that lemma inMathlib. Second, it simplifies themap_add'proof oftoCoeffsVecby removing the explicitcoeff_addinvocation (line 1407). Third, it updates themap_smul'proof oftoCoeffsVec(line 1410) to useAddMonoidAlgebra.coeff_smul_applyin place ofPolynomial.coeff_smul, adapting to a change in how polynomial multiplication by scalars is expressed in the polynomial representation. - CompPoly/Fields/Binary/BF128Ghash/Impl.lean: In
mul_inv_cancel(which provesa * a⁻¹ = 1for nonzeroa), the subproof establishingh_quot_ne_zero : toQuot a ≠ 0was changed from usingcontrapose! hto usingcontrapose h. This is a minor proof refactor; the lemma statement and overall theorem remain unchanged. - CompPoly/Fields/Binary/BF64/Ext3.lean: Added theorem
card_ext3establishing that for any[Fintype Ext3]instance,Fintype.card Ext3 = 2 ^ 192, complementing the existingnat_card_ext3. Theset_option linter.concreteInstances falseattribute suppresses the linter warning because the theorem is stated for an arbitrary enumeration rather than a specific global instance. - CompPoly/Fields/Binary/BF64/Impl.lean: Added a
set_option linter.concreteInstances falsepragma immediately before the existingcard_bf64theorem, together with a comment explaining that the theorem is stated for any enumeration becauseBF64has no globalFintypeinstance. This change suppresses the linter's warning about a potentially non-concrete instance, clarifying that the[Fintype BF64]parameter is intentional and not an oversight. - CompPoly/Fields/Binary/Tower/Abstract/Algebra.lean: The diff renames the induction hypothesis binder
h r ih_rtoind r ih_rin bothtowerAlgebraMap_succ_lastandtowerAlgebraMap_assoc. These renames affect only the binder name used in theinductionblock; the statements, proofs, and logic of both theorems remain unchanged. - CompPoly/Fields/Binary/Tower/Concrete/Algebra.lean: The diff renames the induction case binder from
h r ih_rtoind r ih_rin bothconcreteTowerAlgebraMap_succ_lastandconcreteTowerAlgebraMap_assoc. No other changes are made; the proofs, statements, andsorry/admitcounts remain unaffected. - CompPoly/Fields/Binary/Tower/Concrete/Basis.lean: The proof of
minPoly_of_powerBasisSucc_generatoris refactored: in the subproof establishing thatcequalsq.leadingCoeff, the callq.toFinsupp.coeffis replaced by the more directq.coeff. This simplifies the expression without affecting the theorem's statement or overall correctness. - CompPoly/Fields/Binary/Tower/Concrete/Field.lean: Renamed the induction case binder from
htoindin bothconcrete_pow_base_oneandconcrete_pow_nat_eq_pow, aligning with a project-wide convention forNat.strong_induction_oninduction hypotheses. No new theorems, definitions, or proofs were added; nosorryoradmitwere introduced. - CompPoly/Fields/Binary/Tower/Support/DefiningPoly.lean: The proof of
definingPoly_coeffOf0was updated to replace the lemmacoeff_one_zerowithAddMonoidAlgebra.coeff_one_zeroin itssimpcall. No new theorems, definitions, orsorryblocks were introduced; the change is a minor cleanup to use a more specific lemma name. - CompPoly/Fields/Binary/Tower/Support/Preliminaries.lean: In
CompPoly/Fields/Binary/Tower/Support/Preliminaries.lean, the local bindingain the proof ofis_unit_iff_deg_0was changed fromcoeff p 0top.coeff 0. This is a purely cosmetic refactor, replacing a standalonecoeffcall with the equivalent dot-notation method call on the polynomialp. No new theorems, definitions, or signatures were added or removed, and nosorryoradmitwere introduced. - CompPoly/Fields/Extension/Binomial.lean: In
CompPoly/Fields/Extension/Binomial.lean, the proof ofirreducible_X_pow_sub_C_iffis corrected by updating the call tonatDegree_X_pow_sub_Cto provide an explicit argument (underscore) instead of the prior no-argument invocation. This fixes a type mismatch or ambiguity in the lemma application, ensuring theh_deghypothesis correctly states that thenatDegreeofX ^ d - C Wequalsd. - CompPoly/Fields/Extension/Defs.lean: The proof of the
natDegree_polytheorem changed:natDegree_X_pow_sub_Cis now applied with an explicit argument (natDegree_X_pow_sub_C _) instead of relying on implicit application. This adjusts the invocation of the lemma to match Lean's expected syntax or a binding update. - CompPoly/Fields/KoalaBear/Basic.lean: The proof of
primitiveRoot_orderwas refactored: the call toorderOf_eq_of_pow_and_pow_div_primenow takes only two subgoals instead of three, removing the arithmetic subgoal that previously usedomegaafter unfoldingfieldSize. The power condition (ZMod.pow_card_sub_one_eq_one) and the primality condition remain, simplifying the proof by eliminating an explicitfieldSize-related calculation. - CompPoly/LinearAlgebra/PolynomialMatrix/Approximant/PMBasis/KernelLeafSoundness.lean: In
KernelLeafSoundness.lean, a single equality in the proof ofcoefficientMatrixRows_dot_eq_zero_of_approximatesis refactored. The LHS expressionPolynomial.coeff ((rowGet row k).toPoly * (rowGet (problem.matrix.getD k #[]) j).toPoly) tis rewritten as((rowGet row k).toPoly * (rowGet (problem.matrix.getD k #[]) j).toPoly).coeff t, using the.coeffnotation instead of thePolynomial.coefffunction. This is a purely stylistic or API-consistency change that does not alter the theorem's statement or logical content. - CompPoly/LinearAlgebra/PolynomialMatrix/Approximant/PMBasis/XAdicSoundness.lean: The diff makes two changes: in
polynomialScaleCoeffX_toPoly, thePolynomial.extblock is replaced withext t : 2; similarly incoeffXPower_toPoly,Polynomial.extis replaced withext t : 2. Both changes are purely stylistic or syntactic, swapping legacyPolynomial.extfor the shorterext t : 2form while preserving the same underlying proof structure. - CompPoly/ToMathlib/Finsupp/Fin.lean: Updated the
snoc_ne_zero_of_left,snoc_ne_zero_of_right,insertNth_ne_zero_of_left, andinsertNth_ne_zero_of_righttheorems to usecontraposeinstead ofcontrapose!, changing the forward direction of the negated assumption from a direct equality to a hypothesis introduced withwith c. No other modifications were made. - CompPoly/ToMathlib/MvPolynomial/Equiv.lean: This diff performs a series of syntactic refactors in
CompPoly/ToMathlib/MvPolynomial/Equiv.lean, replacing the notationPolynomial.coeff ((finSuccEquivNth R p) f) iwith the simpler(finSuccEquivNth R p f).coeff iacross six theorems:finSuccEquivNth_coeff_coeff,support_coeff_finSuccEquivNth,image_support_finSuccEquivNth,degreeOf_coeff_finSuccEquivNth, and their associated proofs (including removing a now-unnecessaryPolynomial.coeff_addin theaddcase offinSuccEquivNth_coeff_coeff). There are no new theorems, definitions, or sorries; the change only updates the API surface to use the more direct.coeff inotation on the polynomial-valued result offinSuccEquivNth. - CompPoly/ToMathlib/Polynomial/BivariateDegree.lean: Replaced two occurrences of
Polynomial.natDegree_mem_support_of_nonzerowithPolynomial.natDegree_mem_support_of_ne_zero(a renaming upstream) in the proofs ofnatWeightedDegree_mem_weight_listandweight_le_natWeightedDegree_of_lt_natDegree_succ, and one further occurrence in the proof ofdegreeX_swap. Simplified theevalXdefinition and its associated lemmaevalX_eq_mapby removing an explicitf.toFinsupp.coeffindirection in favor off.coeffand dropping aclassicalblock. InnatDegree_sum_eq_of_unique, changed thesimpashowing(∑ x ∈ s, f x).coeff deg ≠ 0into an explicitrwfollowed byexact hmx_coeff_ne0. - CompPoly/ToMathlib/Polynomial/BivariateWeightedDegree.lean: The proof of
natWeightedDegree_smul_lewas updated: thesimpblock now usesAddMonoidAlgebra.coeff_smul_applyinstead ofcoeff_smul. The statement and behavior of the lemma remain unchanged. - CompPoly/Univariate/Barycentric.lean: The
private theorem BarycentricDomain.eval_off_node_eqhas been strengthened by removing the hypothesishn : 0 < nand the corresponding proof term⟨ ⟨ 0, hn ⟩, Finset.mem_univ _ ⟩from its proof. Consequently, the call toeval_off_node_eqin the proof oftheorem BarycentricDomain.eval_eq_interpolate_evalis updated to drop theNat.succ_pos nargument. This makes the correctness of the barycentric formula for off-node evaluation hold unconditionally rather than requiring a nonempty index setFin n. - CompPoly/Univariate/Basic.lean: The diff updates the call to
Nat.strong_induction_oninsidetheorem induction_onby renaming the named argument fromptomotive. This is a purely syntactic refactor—likely to align with a change in theNat.strong_induction_onsignature—and does not alter the theorem’s statement or its logic. - CompPoly/Univariate/CoefficientInterpolation.lean: This commit changes the binder name in the
divByLinearFactor_eq_divByMonictheorem'sNat.strong_induction_oncase from| h m ih =>to| ind m ih =>. This is a purely syntactic/renaming change—the binder in the induction case is now calledindinstead ofh, with no changes to the proof body or the theorem's statement. - CompPoly/Univariate/Deriv.lean: The proof of
derivative_toPolyis simplified: the explicitPolynomial.ext+intro nis replaced by the shorterext n : 2. Thesimpblock is otherwise unchanged, so the theorem's statement and meaning are unaffected; this is purely a proof-style refactor. - CompPoly/Univariate/DivisionCorrectness.lean: In
lowEq.sub, the proof now rewritesp₁ - p₂andq₁ - q₂asp₁ + (-p₂)andq₁ + (-q₂)viasub_eq_add_negbefore applyingh₁.add h₂.neg, making the lemma directly rely onlowEq.add. InlowEq.newton_step, thesimpcall in the proof ofh_ewas simplified by removingPolynomial.coeff_sub, keeping onlyhcoeff, which still suffices sincehcoeffalready equates the relevant coefficients. - CompPoly/Univariate/EuclideanAlgorithm.lean: In
CompPoly/Univariate/EuclideanAlgorithm.lean, the body ofRaw.toPoly_smulis modified:Polynomial.coeff_smulis replaced byAddMonoidAlgebra.coeff_smul_applyto correctly use the additive monoid algebra (Laurent polynomial) coercion underlying theCPolynomial.Rawstructure. The proof still ends by applyingCPolynomial.Raw.smul_coeff. No newsorryoradmitis introduced. - CompPoly/Univariate/Quotient/Equiv.lean: In the
ringEquivdefinition, the proof ofmap_mul'was updated: the originalPolynomial.ext (Raw.toPoly_mul_coeff p q)was replaced withAddMonoidAlgebra.ext (Finsupp.ext (Raw.toPoly_mul_coeff p q)). This changes how polynomial equality is established, likely to align with a broader use ofAddMonoidAlgebraas the underlying representation forPolynomial. - CompPoly/Univariate/Raw/Proofs.lean: The diff modifies the proof of lemma
coeff_foldl_addinCompPoly/Univariate/Raw/Proofs.lean. The change replaces aany_goals exact (f ih)[k]?.getD 0block with a more targetedon_goal 3 => exact (f ih)[k]?.getD 0, refining the tactic application to only the third goal rather than any matching subgoal. - CompPoly/Univariate/Roots/Correctness.lean: The proof of
Raw.toPoly_smulis updated by replacing the rewrite rulePolynomial.coeff_smulwithAddMonoidAlgebra.coeff_smul_apply. This change aligns the proof with the internal representation ofCPolynomial.Raw(as anAddMonoidAlgebra), ensuring that the lemma's proof still compiles after a change in the underlying algebraic structure. - CompPoly/Univariate/Roots/LasVegas/Probability/Basic.lean: The theorem
trialSuccessProbability_add_failed_masshad its second proof block adjusted: the lemmaENNReal.tsum_eq_add_tsum_itewas replaced bytsum_eq_add_tsum_ite. This updates the call to use the non-namespace-qualified version of the same lemma, likely following an upstream refactor that relocated or deprecated theENNReal-prefixed form. No new definitions, theorems, orsorry/admitwere introduced. - CompPoly/Univariate/Roots/LasVegas/Probability/EvenTrace.lean: This change modifies the proof of
tryEvenTraceSplitAttemptsWith_uniformTable_none_le_geometricby replacingENNReal.tsum_le_tsumwith the plaintsum_le_tsum(leveraging typeclass inference forℝ≥0∞) and adding adsimp onlystep before rewriting withhweight h. The adjustments improve the cleanliness of the proof, likely addressing a typeclass or simplification issue, while the theorem statement and its hypotheses remain unchanged. - CompPoly/Univariate/Roots/LasVegas/Probability/OddTrial.lean: Updated
rootProductProbabilityInput_of_lasVegasSplitterInputto replace calls toFiniteField.X_pow_card_sub_X_ne_zeroandFiniteField.X_pow_card_sub_X_natDegree_eqwithPolynomial.X_pow_sub_X_ne_zeroandPolynomial.natDegree_X_pow_sub_X, respectively. The new lemmas are more general, not requiring the fieldFto be finite, and the explicitFargument is removed from the calls. The twoomegaproofs that supply the exponentqare kept. - CompPoly/Univariate/Roots/LasVegas/Probability/Recursive.lean: The diff replaces three uses of
ENNReal.tsum_le_tsumwith the more generaltsum_le_tsum, which is part of a broader API refactor (likelyENNReal.tsum_le_tsumhas been deprecated in favor of theENNReal-aware lemmatsum_le_tsum). The affected theorems arerecursiveFallback_probability_le_binomialTail,toOuterMeasure_apply_le_one, andrecursiveSplitProcessPMF_rank_le_geometric. No other changes are present. - CompPoly/Univariate/Roots/LasVegas/Probability/Repeated.lean: In
tryOddSplitAttemptsWith_uniformTable_none_le_geometricand twice inrecursiveSplitWithTables_rank_le_geometric, the lemmaENNReal.tsum_le_tsumwas replaced by the unqualifiedtsum_le_tsum, and adsimp onlystep was added after theintroin the first two occurrences. These changes adapt to a library update that makestsum_le_tsumavailable without theENNRealprefix, and they ensure the goal is simplified after rewriting. - CompPoly/Univariate/Roots/LasVegas/Probability/Uniform.lean: In
eval_ofArray_pushandeval_ofArray_pair, the proof of equality of polynomials was refactored fromapply Polynomial.ext; intro itoext i : 2, a more concise use of theexttactic. InuniformPair_separated_probability_ge_half_of_fiber_card_le, the sum inequality step now usestsum_le_tsum(instead ofENNReal.tsum_le_tsum) and adds adsimp onlybefore rewritinghu, making the proof slightly cleaner. - CompPoly/Univariate/Roots/Shoup/FrobeniusLinear.lean: The proof of
isRepresentedLinearFactor_of_dvd_frobenius_unique_rootwas updated to replace two dependencies onFiniteField-specific lemmas (FiniteField.X_pow_card_sub_X_ne_zeroandFiniteField.X_pow_card_sub_X_natDegree_eq) with more general polynomial lemmas (Polynomial.X_pow_sub_X_ne_zeroandPolynomial.natDegree_X_pow_sub_X). The uses of these lemmas now take only the cardinality argumentFintype.one_lt_cardinstead of the field type and the cardinality argument. No new theorems, definitions, orsorry/admitwere added. - CompPoly/Univariate/ToPoly/Core.lean: Removed the unnecessary
Polynomial.ofFinsuppwrapper from the definition ofRaw.toPoly', so that the body now directly returns theAddMonoidAlgebraproduced byAddMonoidAlgebra.ofCoeff. The type signature and the overall purpose of this unused alternativetoPolydefinition are unchanged. - CompPoly/Univariate/ToPoly/Degree.lean: The proof of
toPoly_smulwas updated to useAddMonoidAlgebra.coeff_smul_applyinstead ofPolynomial.coeff_smul. The lemma's statement and itssimp/grindattributes remain unchanged. - CompPoly/Univariate/ToPoly/Equiv.lean: The proofs of
Raw.toPoly_subandtoPoly_subwere refactored to rewrite the right-hand side of the goal usingsub_eq_add_neginstead of changing the goal to an explicitly equivalent equality. The statements of both lemmas remain unchanged; only the proof scripts were simplified. - CompPoly/Univariate/ToPoly/Impl.lean: The proof of
monomial_toPolywas updated by replacingPolynomial.coeff_monomialwithPolynomial.coeff_monomial_apply. This change most likely adapts to a recent Mathlib refactor, sincecoeff_monomial_applyis the explicit lemma that returns the coefficient directly, whilecoeff_monomialmay now be asimplemma with a different form. - lakefile.lean: (minor changes, +1/-1)
- lean-toolchain: (minor changes, +1/-1)
- 1 file(s) filtered as noise (lockfiles, generated, or trivial):
lake-manifest.json
Last updated: 2026-11-18 14:34 UTC.
Build Timing Report
Incremental Rebuild Signal
This compares a clean project build against a follow-up Slowest Current Build Files (clean build)Showing 20 slowest current targets from the clean build log, with comparison against the baseline clean build log when available.
|
Moves CompPoly from Lean and Mathlib
v4.35.0tov4.36.0.Pins
lean-toolchain:leanprover/lean4:v4.36.0.lakefile.lean: Mathlibv4.36.0.lake-manifest.json: regenerated bylake update. The inherited packages are at the revisions Mathlibv4.36.0pins.Source fixes
Most fixes follow from one Mathlib change:
Polynomial Ris now anabbrevforAddMonoidAlgebra R ℕ. The constantPolynomial.coeffis gone,p.coeffresolves toAddMonoidAlgebra.coeff p : ℕ →₀ R, and several coefficient lemmas changed form.Polynomial.coeff q iis now writtenq.coeff i. The term means the same thing. This touches the statements offinSuccEquivNth_coeff_coeff,support_coeff_finSuccEquivNth,image_support_finSuccEquivNthanddegreeOf_coeff_finSuccEquivNthinToMathlib/MvPolynomial/Equiv.lean, and localhaves inBivariate/ToPoly.lean,Data/Polynomial/MonomialBasis.lean,Fields/Binary/Tower/Support/Preliminaries.leanandPMBasis/KernelLeafSoundness.lean.Polynomial.coeff_monomialnow states(monomial n r).coeff = Finsupp.single n r. Proofs that rewrote with it to anifusePolynomial.coeff_monomial_apply(ToPoly/Impl.lean,CoreCorrectness.lean,PolynomialCorrectness.lean,ModularData.lean,Divisibility.lean), or addFinsupp.single_applyto thesimpset (Bivariate/ToPoly.lean).p - qon polynomials no longer unfolds top + -qbychange.Raw.toPoly_sub,toPoly_sub(ToPoly/Equiv.lean) andlowEq.sub(DivisionCorrectness.lean) usesub_eq_add_neg.BivariateDegree.lean: the body ofevalXbuilds the polynomial withAddMonoidAlgebra.ofCoeffdirectly, sincePolynomialno longer has its own constructor. Its type is unchanged. Asimpabecamerwbecausesimpnow rewrites the sum coefficient first.coeff_one_zeroandcoeff_smulbecomeAddMonoidAlgebra.coeff_one_zeroandAddMonoidAlgebra.coeff_smul_apply.Polynomial.ext,Polynomial.ofFinsuppandPolynomial.toFinsupp:apply Polynomial.ext; intro nbecomesext n : 2, and the wrappers are dropped.Other upstream changes:
Nat.strong_induction_onnames its motivemotiveand its caseind(waspandh). Updated inUnivariate/Basic.leanand in nineinduction ... using Nat.strong_induction_onblocks.natDegree_X_pow_sub_Ctakesaexplicitly (Fields/Extension/{Defs,Binomial}.lean).orderOf_eq_of_pow_and_pow_div_primeno longer needs0 < n. The proof ofKoalaBear.primitiveRoot_orderdrops that goal.FiniteField.X_pow_card_sub_X_ne_zeroandX_pow_card_sub_X_natDegree_eqare replaced byPolynomial.X_pow_sub_X_ne_zeroandPolynomial.natDegree_X_pow_sub_X(Shoup/FrobeniusLinear.lean,LasVegas/Probability/OddTrial.lean).ENNReal.tsum_le_tsumandENNReal.tsum_eq_add_tsum_iteare replaced by the generaltsum_le_tsumandtsum_eq_add_tsum_ite. Three call sites adddsimp only, because the general lemma statesf ≤ gand leaves a beta-redex afterintro.Warning cleanup:
natDegree_mem_support_of_nonzerobecomesnatDegree_mem_support_of_ne_zero, andSet.Ico_insert_rightbecomesSet.insert_right_Ico.contrapose!becomescontraposewherepush Notmade no progress (Finsupp/Fin.lean,Bivariate/ToPoly.lean,BF128Ghash/Impl.lean).simparguments,try,all_goalsandany_goalsreported by the linters are removed or replaced (Fields/Basic.lean,CanonicalNat.lean,Raw/Proofs.lean,Intermediate.lean,NovelPolynomialBasis.lean,MvPolynomial/Equiv.lean,DivisionCorrectness.lean).Barycentric.lean: the privateeval_off_node_eqdrops its hypothesishn : 0 < n, which the proof no longer uses.No public statement changes other than the
Polynomial.coeffspelling above. No newsorry, axiom ornative_decide. The only new linter exceptions are the two described below.New linter
Mathlib's new
concreteInstanceslinter flagscard_bf64 [Fintype BF64](BF64/Impl.lean) andcard_ext3 [Fintype Ext3](BF64/Ext3.lean). Neither type has a globalFintypeinstance, and both theorems are stated for any enumeration. The tests use them in that form. Removing the binder would change their statements, so each theorem gets a scopedset_option linter.concreteInstances false inwith a comment. Without it,lake build --wfail CompPolyNativeSmokefails in CI.Validation
Run locally on Linux x86_64, after
lake exe cache get:lake build --wfailandlake testpass with no warnings.lake build --wfail CompPolyNativeSmokepasses, and the binary passes under the CI limits (ulimit -v 4194304,LEAN_NUM_THREADS=1, 30 s timeout).lake exe axiomsweep --check: 10981 declarations, none sorry-tainted, no non-standard axioms.lake exe CompPolyBench --medium --validate-onlyon the groups inbench/ci-groups.txt: 276 records in 69 groups validated.scripts/lint-style.pyon the changed files,scripts/check-imports.sh,scripts/check-docs-integrity.pyandscripts/check-writing.pypass.🤖 Generated with Claude Code