Repository navigation
Core: consolidate onto Mathlib's Splits API and general interlacing lemmas - #1996
Merged
Merged
Conversation
- Rewrite about 370 calls in 125 files from local root-count,
product-over-roots, zero-or-splits, derivative and divisibility
helpers to `Polynomial.splits_iff_card_roots`,
`Splits.eval_eq_prod_roots`, `Splits.mul`/`pow`/`derivative`,
`IsRoot.dvd`, `Splits.exists_eval_eq_zero` and `Splits.of_dvd`.
- Use Mathlib's `natDegree_add_eq_{left,right}_of_natDegree_lt`,
dropping the leading-coefficient hypothesis.
- Derive the `StrictInterl.mul_X*` special cases from the general
`StrictInterl.mul_X_sub_C_both`, moved earlier in the import order.
- Merge in-repository duplicates: `pairwise_le_of_listInterlaces`,
`hasNonnegCoeffs_C_mul`, `Interl.toStrictInterl_of_ne`,
`Splits.mem_range_of_isRoot` and the divX splitting lemma.
- Derive the quadratic splitting forms from one discriminant criterion.
- Add namespaced reverse/reflect shims (`Polynomial.Splits.reverse`,
`.reflect`, `.of_reverse`, `splits_reverse_iff`, `splits_reflect_iff`).
- Make 42 file-local helpers private.
Names still used downstream keep dated deprecations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # RealRooted/AffineFamily/Boundary.lean
- Add hypothesis-free `StrictInterl.mul_X_sub_C_both_iff`, `Interl.mul_X_sub_C_both`, `Interl.of_mul_X_sub_C_both`, `Interl.mul_X_both`, `Interl.of_mul_X_both`, `Interl.theta`, `Interl.thetaPlusOne` and `Interl.iterateThetaPlusOne`. - Rename `strictInterl_X_derivative_X_self_of_splits_nonneg` to `strictInterl_X_derivative_X_self_of_splits`. - Old names used downstream stay as dated deprecations; unused ones are removed. - Tactics get certificate-minimal syntax; the old forms still parse. - Fix the product branch of `rr_zero_or_splits`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Moves the core onto Mathlib's API and onto general lemmas, as the core-cleanup audit asked:
core modules should be Mathlib-clean, without duplicate lemmas, and should prefer general
arguments to special cases.
Mathlib API
splits_iff_card_roots,Splits.eval_eq_prod_roots,Splits.mul/pow/derivative/iterate_derivative,Splits.of_dvd,IsRoot.dvd,Splits.exists_eval_eq_zeroandSplits.mem_range_of_isRoot.natDegree_add_eq_{left,right}_of_natDegree_ltcomes from Mathlib directly, so thepositive-leading-coefficient hypothesis is gone.
RealRooted/Mathlib/Algebra/Polynomial/Reverse.lean:Polynomial.Splits.reverse,.reflect,.X_pow_mul_reverseand.of_reverse, plussplits_reverse_iffandsplits_reflect_iff.General lemmas instead of special cases
StrictInterl.mul_X*variants follow fromStrictInterl.mul_X_sub_C_both, which movedearlier in the import order.
StrictInterl.mul_X_sub_C_both_iff,Interl.mul_X_sub_C_both,Interl.of_mul_X_sub_C_both,Interl.mul_X_both,Interl.of_mul_X_both,Interl.theta,Interl.thetaPlusOneandInterl.iterateThetaPlusOne. Their predecessors carriednonnegativity or PF hypotheses that the proofs did not use.
pairwise_le_of_listInterlaces,hasNonnegCoeffs_C_mul(115 calls),Interl.toStrictInterl_of_ne, and the divX splitting lemma.private.Compatibility
@[deprecated … (since := "2026-10-21")]withtheir old signatures. Names with no downstream use were deleted.
rr_strict_interl_mul_X_both using proper := h. The old forms still parse and areregistered as
@[tactic_alt].rr_zero_or_splits.Checks (local)
Tactic.Examplesincluded.runLinterpasses against the committednolints.json, with the baseline unchanged.lake exe lint-stylepasses, along with all guards and the shim registry check.OEIS_COVERAGE.mdis regenerated and passes--check.🤖 Generated with Claude Code