Skip to content

Conversation

@tb65536
Copy link
Collaborator

@tb65536 tb65536 commented Nov 25, 2025

This PR continues the deprecation in Splits.lean as we move over to the new API in Factors.lean.


Open in Gitpod

@tb65536 tb65536 added awaiting-CI This PR doesn't pass CI yet. This label is automatically removed once it does. t-algebra Algebra (groups, rings, fields, etc) labels Nov 25, 2025
@github-actions
Copy link

github-actions bot commented Nov 25, 2025

PR summary 633ee94e38

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ Splits.comp_of_degree_le_one_of_invertible
+ Splits.comp_of_degree_le_one_of_monic
+ Splits.comp_of_natDegree_le_one
+ Splits.comp_of_natDegree_le_one_of_invertible
+ Splits.comp_of_natDegree_le_one_of_monic
+ Splits.splits_of_dvd
+ _root_.IsUnit.splits
+ splits_iff_comp_splits_of_natDegree_eq_one
+ splits_of_degree_le_one_of_invertible
+ splits_of_degree_le_one_of_monic
+ splits_of_natDegree_le_one_of_invertible
+ splits_of_natDegree_le_one_of_monic

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions bot removed the awaiting-CI This PR doesn't pass CI yet. This label is automatically removed once it does. label Nov 26, 2025
@mathlib4-merge-conflict-bot
Copy link
Collaborator

This pull request has conflicts, please merge master and resolve them.

@mathlib4-merge-conflict-bot mathlib4-merge-conflict-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Nov 26, 2025
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Nov 26, 2025
@Vierkantor Vierkantor self-assigned this Nov 27, 2025
Copy link
Contributor

@Vierkantor Vierkantor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise I really like the results of this PR, code becomes quite a bit nicer! 🎉

theorem splits_of_splits_gcd_left [DecidableEq K] {f g : K[X]} (hf0 : f ≠ 0)
(hf : Splits (f.map i)) : Splits ((EuclideanDomain.gcd f g).map i) :=
Polynomial.splits_of_splits_of_dvd i hf0 hf (EuclideanDomain.gcd_dvd_left f g)
Splits.of_dvd hf (map_ne_zero hf0) <| map_dvd i <| EuclideanDomain.gcd_dvd_left f g
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Sorry for catching this only now!) Seeing the name Splits.of_dvd repeated so many times has made me realize I don't like it very much. I think it's because there are three parts of this lemma, a Splits input, a Dvd input, and a Splits output, and the name only mentions two of them? So there's a bit of a weird overlap in reading in having to assign the Splits to both in- and output.

Maybe Splits.splits_of_dvd or Splits.left_of_dvd? (Dvd.splits might also work, although it's weird that a "more complicated" result about polynomials ends up in a "more simple" namespace about monoids with zero.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Splits.splits_of_dvd sounds reasonable to me.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree here. Using Foo.of_bar to mean Foo _ -> Bar _ -> Foo _ is a common and understood pattern. As such, this rename is both out of scope for this PR and (IMO) a regression.

@Vierkantor Vierkantor added the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 27, 2025
@tb65536 tb65536 added awaiting-CI This PR doesn't pass CI yet. This label is automatically removed once it does. and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Nov 27, 2025
@github-actions github-actions bot removed the awaiting-CI This PR doesn't pass CI yet. This label is automatically removed once it does. label Nov 27, 2025
@jcommelin
Copy link
Member

Thanks 🎉

bors merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the ready-to-merge This PR has been sent to bors. label Nov 28, 2025
mathlib-bors bot pushed a commit that referenced this pull request Nov 28, 2025
This PR continues the deprecation in `Splits.lean` as we move over to the new API in `Factors.lean`.

Co-authored-by: tb65536 <[email protected]>
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Nov 28, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title refactor(Algebra/Polynomial/Splits): continue deprecation [Merged by Bors] - refactor(Algebra/Polynomial/Splits): continue deprecation Nov 28, 2025
@mathlib-bors mathlib-bors bot closed this Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants