Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - chore: Rename coe_nat/coe_int/coe_rat to natCast/intCast/ratCast #11499

Closed
wants to merge 31 commits into from

Conversation

YaelDillies
Copy link
Collaborator

@YaelDillies YaelDillies commented Mar 19, 2024

This is less exhaustive than its sibling #11486 because edge cases are harder to classify. No fundamental difficulty, just me being a bit fast and lazy.

Reduce the diff of #11203


Open in Gitpod

@fpvandoorn
Copy link
Member

fpvandoorn commented Mar 19, 2024

Can we add deprecated aliases for the old names? Maybe only some of the main lemmas?

@fpvandoorn
Copy link
Member

Other than that, I'm very much in favor of this, but the poll is indeed not as one-sided as I would have hoped.

@YaelDillies
Copy link
Collaborator Author

YaelDillies commented Mar 19, 2024

I estimate that without automation it would take me several hours to write the deprecated aliases 😦 (and no lemma comes to mind as particularly important)

Copy link
Collaborator

@j-loreaux j-loreaux left a comment

Choose a reason for hiding this comment

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

LGTM but I would like one more maintainer to sign off since the poll was close.

Mathlib/Data/Polynomial/Basic.lean Outdated Show resolved Hide resolved
Mathlib/Order/Filter/FilterProduct.lean Outdated Show resolved Hide resolved
Mathlib/Order/Filter/FilterProduct.lean Outdated Show resolved Hide resolved
Mathlib/Order/Filter/Germ.lean Outdated Show resolved Hide resolved
Mathlib/Order/Filter/Germ.lean Outdated Show resolved Hide resolved
Mathlib/RingTheory/Subsemiring/Basic.lean Outdated Show resolved Hide resolved
@YaelDillies YaelDillies added the t-algebra Algebra (groups, rings, fields etc) label Mar 20, 2024
Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

Half way through...

Mathlib/Order/Filter/Germ.lean Outdated Show resolved Hide resolved
Mathlib/Data/Polynomial/Basic.lean Outdated Show resolved Hide resolved
Mathlib/Algebra/Group/ULift.lean Outdated Show resolved Hide resolved
Mathlib/Data/ENNReal/Basic.lean Outdated Show resolved Hide resolved
Mathlib/Data/ENNReal/Basic.lean Outdated Show resolved Hide resolved
Mathlib/Data/Int/Cast/Basic.lean Outdated Show resolved Hide resolved
Mathlib/Data/Int/Cast/Lemmas.lean Outdated Show resolved Hide resolved
Mathlib/Data/Nat/Cast/Basic.lean Outdated Show resolved Hide resolved
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added merge-conflict The PR has a merge conflict with master, and needs manual merging. blocked-by-other-PR This PR depends on another PR to Mathlib and removed blocked-by-other-PR This PR depends on another PR to Mathlib labels Mar 20, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Mar 20, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added merge-conflict The PR has a merge conflict with master, and needs manual merging. and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. labels Apr 6, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added merge-conflict The PR has a merge conflict with master, and needs manual merging. and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. labels Apr 7, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Apr 7, 2024
@fpvandoorn
Copy link
Member

bors merge
bors d+
I think the deprecations make it fine to not list the renames.

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Apr 7, 2024

✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. delegated and removed awaiting-review labels Apr 7, 2024
mathlib-bors bot pushed a commit that referenced this pull request Apr 7, 2024
…atCast` (#11499)

This is less exhaustive than its sibling #11486 because edge cases are harder to classify. No fundamental difficulty, just me being a bit fast and lazy.

Reduce the diff of #11203
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Apr 7, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: Rename coe_nat/coe_int/coe_rat to natCast/intCast/ratCast [Merged by Bors] - chore: Rename coe_nat/coe_int/coe_rat to natCast/intCast/ratCast Apr 7, 2024
@mathlib-bors mathlib-bors bot closed this Apr 7, 2024
@mathlib-bors mathlib-bors bot deleted the nat_cast_mem branch April 7, 2024 18:52
Louddy pushed a commit that referenced this pull request Apr 15, 2024
Louddy pushed a commit that referenced this pull request Apr 15, 2024
Reduce the diff of #11499

## Renames

All in the `Int` namespace:
* `ofNat_eq_cast` → `ofNat_eq_natCast`
* `cast_eq_cast_iff_Nat` → `natCast_inj`
* `natCast_eq_ofNat` → `ofNat_eq_natCast`
* `coe_nat_sub` → `natCast_sub`
* `coe_nat_nonneg` → `natCast_nonneg`
* `sign_coe_add_one` → `sign_natCast_add_one`
* `nat_succ_eq_int_succ` → `natCast_succ`
* `succ_neg_nat_succ` → `succ_neg_natCast_succ`
* `coe_pred_of_pos` → `natCast_pred_of_pos`
* `coe_nat_div` → `natCast_div`
* `coe_nat_ediv` → `natCast_ediv`
* `sign_coe_nat_of_nonzero` → `sign_natCast_of_ne_zero`
* `toNat_coe_nat` → `toNat_natCast`
* `toNat_coe_nat_add_one` → `toNat_natCast_add_one`
* `coe_nat_dvd` → `natCast_dvd_natCast`
* `coe_nat_dvd_left` → `natCast_dvd`
* `coe_nat_dvd_right` → `dvd_natCast`
* `le_coe_nat_sub` → `le_natCast_sub`
* `succ_coe_nat_pos` → `succ_natCast_pos`
* `coe_nat_modEq_iff` → `natCast_modEq_iff`
* `coe_natAbs` → `natCast_natAbs`
* `coe_nat_eq_zero` → `natCast_eq_zero`
* `coe_nat_ne_zero` → `natCast_ne_zero`
* `coe_nat_ne_zero_iff_pos` → `natCast_ne_zero_iff_pos`
* `abs_coe_nat` → `abs_natCast`
* `coe_nat_nonpos_iff` → `natCast_nonpos_iff`

Also rename `Nat.coe_nat_dvd` to `Nat.cast_dvd_cast`
Louddy pushed a commit that referenced this pull request Apr 15, 2024
…atCast` (#11499)

This is less exhaustive than its sibling #11486 because edge cases are harder to classify. No fundamental difficulty, just me being a bit fast and lazy.

Reduce the diff of #11203
atarnoam pushed a commit that referenced this pull request Apr 16, 2024
atarnoam pushed a commit that referenced this pull request Apr 16, 2024
Reduce the diff of #11499

## Renames

All in the `Int` namespace:
* `ofNat_eq_cast` → `ofNat_eq_natCast`
* `cast_eq_cast_iff_Nat` → `natCast_inj`
* `natCast_eq_ofNat` → `ofNat_eq_natCast`
* `coe_nat_sub` → `natCast_sub`
* `coe_nat_nonneg` → `natCast_nonneg`
* `sign_coe_add_one` → `sign_natCast_add_one`
* `nat_succ_eq_int_succ` → `natCast_succ`
* `succ_neg_nat_succ` → `succ_neg_natCast_succ`
* `coe_pred_of_pos` → `natCast_pred_of_pos`
* `coe_nat_div` → `natCast_div`
* `coe_nat_ediv` → `natCast_ediv`
* `sign_coe_nat_of_nonzero` → `sign_natCast_of_ne_zero`
* `toNat_coe_nat` → `toNat_natCast`
* `toNat_coe_nat_add_one` → `toNat_natCast_add_one`
* `coe_nat_dvd` → `natCast_dvd_natCast`
* `coe_nat_dvd_left` → `natCast_dvd`
* `coe_nat_dvd_right` → `dvd_natCast`
* `le_coe_nat_sub` → `le_natCast_sub`
* `succ_coe_nat_pos` → `succ_natCast_pos`
* `coe_nat_modEq_iff` → `natCast_modEq_iff`
* `coe_natAbs` → `natCast_natAbs`
* `coe_nat_eq_zero` → `natCast_eq_zero`
* `coe_nat_ne_zero` → `natCast_ne_zero`
* `coe_nat_ne_zero_iff_pos` → `natCast_ne_zero_iff_pos`
* `abs_coe_nat` → `abs_natCast`
* `coe_nat_nonpos_iff` → `natCast_nonpos_iff`

Also rename `Nat.coe_nat_dvd` to `Nat.cast_dvd_cast`
atarnoam pushed a commit that referenced this pull request Apr 16, 2024
…atCast` (#11499)

This is less exhaustive than its sibling #11486 because edge cases are harder to classify. No fundamental difficulty, just me being a bit fast and lazy.

Reduce the diff of #11203
uniwuni pushed a commit that referenced this pull request Apr 19, 2024
uniwuni pushed a commit that referenced this pull request Apr 19, 2024
Reduce the diff of #11499

## Renames

All in the `Int` namespace:
* `ofNat_eq_cast` → `ofNat_eq_natCast`
* `cast_eq_cast_iff_Nat` → `natCast_inj`
* `natCast_eq_ofNat` → `ofNat_eq_natCast`
* `coe_nat_sub` → `natCast_sub`
* `coe_nat_nonneg` → `natCast_nonneg`
* `sign_coe_add_one` → `sign_natCast_add_one`
* `nat_succ_eq_int_succ` → `natCast_succ`
* `succ_neg_nat_succ` → `succ_neg_natCast_succ`
* `coe_pred_of_pos` → `natCast_pred_of_pos`
* `coe_nat_div` → `natCast_div`
* `coe_nat_ediv` → `natCast_ediv`
* `sign_coe_nat_of_nonzero` → `sign_natCast_of_ne_zero`
* `toNat_coe_nat` → `toNat_natCast`
* `toNat_coe_nat_add_one` → `toNat_natCast_add_one`
* `coe_nat_dvd` → `natCast_dvd_natCast`
* `coe_nat_dvd_left` → `natCast_dvd`
* `coe_nat_dvd_right` → `dvd_natCast`
* `le_coe_nat_sub` → `le_natCast_sub`
* `succ_coe_nat_pos` → `succ_natCast_pos`
* `coe_nat_modEq_iff` → `natCast_modEq_iff`
* `coe_natAbs` → `natCast_natAbs`
* `coe_nat_eq_zero` → `natCast_eq_zero`
* `coe_nat_ne_zero` → `natCast_ne_zero`
* `coe_nat_ne_zero_iff_pos` → `natCast_ne_zero_iff_pos`
* `abs_coe_nat` → `abs_natCast`
* `coe_nat_nonpos_iff` → `natCast_nonpos_iff`

Also rename `Nat.coe_nat_dvd` to `Nat.cast_dvd_cast`
uniwuni pushed a commit that referenced this pull request Apr 19, 2024
…atCast` (#11499)

This is less exhaustive than its sibling #11486 because edge cases are harder to classify. No fundamental difficulty, just me being a bit fast and lazy.

Reduce the diff of #11203
callesonne pushed a commit that referenced this pull request Apr 22, 2024
callesonne pushed a commit that referenced this pull request Apr 22, 2024
Reduce the diff of #11499

## Renames

All in the `Int` namespace:
* `ofNat_eq_cast` → `ofNat_eq_natCast`
* `cast_eq_cast_iff_Nat` → `natCast_inj`
* `natCast_eq_ofNat` → `ofNat_eq_natCast`
* `coe_nat_sub` → `natCast_sub`
* `coe_nat_nonneg` → `natCast_nonneg`
* `sign_coe_add_one` → `sign_natCast_add_one`
* `nat_succ_eq_int_succ` → `natCast_succ`
* `succ_neg_nat_succ` → `succ_neg_natCast_succ`
* `coe_pred_of_pos` → `natCast_pred_of_pos`
* `coe_nat_div` → `natCast_div`
* `coe_nat_ediv` → `natCast_ediv`
* `sign_coe_nat_of_nonzero` → `sign_natCast_of_ne_zero`
* `toNat_coe_nat` → `toNat_natCast`
* `toNat_coe_nat_add_one` → `toNat_natCast_add_one`
* `coe_nat_dvd` → `natCast_dvd_natCast`
* `coe_nat_dvd_left` → `natCast_dvd`
* `coe_nat_dvd_right` → `dvd_natCast`
* `le_coe_nat_sub` → `le_natCast_sub`
* `succ_coe_nat_pos` → `succ_natCast_pos`
* `coe_nat_modEq_iff` → `natCast_modEq_iff`
* `coe_natAbs` → `natCast_natAbs`
* `coe_nat_eq_zero` → `natCast_eq_zero`
* `coe_nat_ne_zero` → `natCast_ne_zero`
* `coe_nat_ne_zero_iff_pos` → `natCast_ne_zero_iff_pos`
* `abs_coe_nat` → `abs_natCast`
* `coe_nat_nonpos_iff` → `natCast_nonpos_iff`

Also rename `Nat.coe_nat_dvd` to `Nat.cast_dvd_cast`
callesonne pushed a commit that referenced this pull request Apr 22, 2024
…atCast` (#11499)

This is less exhaustive than its sibling #11486 because edge cases are harder to classify. No fundamental difficulty, just me being a bit fast and lazy.

Reduce the diff of #11203
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated 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.

None yet

6 participants