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 mul-div cancellation lemmas #11530

Closed
wants to merge 13 commits into from

Conversation

YaelDillies
Copy link
Collaborator

@YaelDillies YaelDillies commented Mar 20, 2024

Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero lemma name, the Group lemma, the AddGroup lemma name).

Statement New name Old name
(a * b) / a = b mul_div_cancel_left₀ mul_div_cancel_left
mul_div_cancel_left mul_div_cancel'''
add_sub_cancel_left add_sub_cancel'
(a * b) / b = a mul_div_cancel_right₀ mul_div_cancel
mul_div_cancel_right mul_div_cancel''
add_sub_cancel_right add_sub_cancel
a / (a * b) = b⁻¹ div_mul_cancel_left₀ div_mul_right (roughly)
div_mul_cancel_left div_mul_cancel''
sub_add_cancel_left sub_add_cancel'
b / (a * b) = a⁻¹ div_mul_cancel_right₀ div_mul_left (roughly)
div_mul_cancel_right div_mul_cancel'''
sub_add_cancel_right sub_add_cancel''
a * (b / a) = b mul_div_cancel₀ mul_div_cancel'
mul_div_cancel mul_div_cancel'_right
add_sub_cancel add_sub_cancel'_right
(a / b) * b = a div_mul_cancel₀ div_mul_cancel
div_mul_cancel div_mul_cancel'
sub_add_cancel sub_add_cancel

Open in Gitpod

Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the `GroupWithZero` lemma name, the `Group` lemma, the `AddGroup` lemma name).

| Statement           | New name                | Old name                |
|---------------------|-------------------------|-------------------------|
| `(a * b) / a = b`     | `mul_div_eq_right₀`     | `mul_div_cancel_left`   |
|                     | `mul_div_eq_right`      | `mul_div_cancel'''`     |
|                     | `add_sub_eq_right`      | `add_sub_cancel'`       |
| `(a * b) / b = a`     | `mul_div_eq_left₀`      | `mul_div_cancel`        |
|                     | `mul_div_eq_left`       | `mul_div_cancel''`      |
|                     | `add_sub_eq_left`       | `add_sub_cancel`        |
| `a / (a * b) = b⁻¹` | `div_mul_eq_inv_right₀` | roughly `div_mul_right` |
|                     | `div_mul_eq_inv_right`  | `div_mul_cancel''`      |
|                     | `sub_add_eq_neg_right`  | `sub_add_cancel'`       |
| `a / (a * b) = a⁻¹` | `div_mul_eq_inv_left₀`  | roughly `div_mul_left`  |
|                     | `div_mul_eq_inv_left`   | `div_mul_cancel'''`     |
|                     | `sub_add_eq_neg_left`   | `sub_add_cancel''`      |
| `a * (b / a) = b`   | `mul_div_cancel₀`       | `mul_div_cancel'`       |
|                     | `mul_div_cancel`        | `mul_div_cancel'_right` |
|                     | `add_sub_cancel`        | `add_sub_cancel'_right` |
| `(a / b) * b = a`   | `div_mul_cancel₀`       | `div_mul_cancel`        |
|                     | `div_mul_cancel`        | `div_mul_cancel'`       |
|                     | `sub_add_cancel`        | `sub_add_cancel`        |
@YaelDillies YaelDillies added awaiting-review awaiting-CI t-algebra Algebra (groups, rings, fields etc) labels Mar 20, 2024
@fpvandoorn
Copy link
Member

fpvandoorn commented Mar 20, 2024

For these kinds of basic lemma renames, it might be good to make a Zulip thread with the suggested renames, and only do it if nobody makes a major objection for 1-2 days.
Some of the old names matched the naming of mul_inv_cancel_right + siblings (mul_inv_cancel_left, inv_mul_cancel_left, inv_mul_cancel_right).

That said, this is definitely an improvement over all the primed lemmas. However, it's a bit unfortunate that in the new naming scheme the GroupWithZero lemmas don't have the "default name" anymore, since they are the more commonly used ones.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Mar 20, 2024
@YaelDillies
Copy link
Collaborator Author

Zulip

@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
@fpvandoorn
Copy link
Member

Second Zulip thread for more visibility. I'm happy to merge this in ~24 hours if there is no serious criticism.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Mar 21, 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 21, 2024
@fpvandoorn
Copy link
Member

I think the rename I suggested is popular. If you change the names to that naming scheme, then I'll merge/delegate this.

@fpvandoorn
Copy link
Member

LGTM. I didn't have time yesterday to look at this again, so hopefully there are not conflicts.

bors merge (let's try, but I'm not too hopeful)
bors d+

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Mar 23, 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 Mar 23, 2024
mathlib-bors bot pushed a commit that referenced this pull request Mar 23, 2024
Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the `GroupWithZero` lemma name, the `Group` lemma, the `AddGroup` lemma name).

| Statement           | New name                | Old name                |
|
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Mar 23, 2024

Build failed:

  • Build

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Mar 23, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Mar 23, 2024
Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the `GroupWithZero` lemma name, the `Group` lemma, the `AddGroup` lemma name).

| Statement           | New name                | Old name                |
|
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Mar 23, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: Rename mul-div cancellation lemmas [Merged by Bors] - chore: Rename mul-div cancellation lemmas Mar 23, 2024
@mathlib-bors mathlib-bors bot closed this Mar 23, 2024
@mathlib-bors mathlib-bors bot deleted the rename_mul_div_cancel branch March 23, 2024 16:50
YaelDillies added a commit that referenced this pull request Mar 23, 2024
This is fallout from #11530. Somehow CI didn't catch that.
mathlib-bors bot pushed a commit that referenced this pull request Mar 23, 2024
We sometimes want to refer to Archive declarations in the YAML files. This is currently impossible because the script in `checkYaml` only imports `Mathlib`. This PR changes it to also import `Archive`.

It also changes the hyperlinks to Archive to instead list declarations directly.

Also fix the fallout from #11530 that CI didn't catch that because we forgot to pipe the errors coming from `lake build Archive` (see #11612).

Co-authored-by: Enrico Borba <enricozb@gmail.com>



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
mathlib-bors bot pushed a commit that referenced this pull request Mar 24, 2024
We sometimes want to refer to Archive declarations in the YAML files. This is currently impossible because the script in `checkYaml` only imports `Mathlib`. This PR changes it to also import `Archive`.

It also changes the hyperlinks to Archive to instead list declarations directly.

Also fix the fallout from #11530 that CI didn't catch that because we forgot to pipe the errors coming from `lake build Archive` (see #11612).

Co-authored-by: Enrico Borba <enricozb@gmail.com>



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
loefflerd added a commit that referenced this pull request Mar 24, 2024
mathlib-bors bot pushed a commit that referenced this pull request Mar 25, 2024
CI didn't catch the fallout from #11530 because we forgot to pipe the errors coming from `lake build Archive` and `lake build Counterexamples` back to the logs. This PR makes sure that happens.
Louddy pushed a commit that referenced this pull request Mar 25, 2024
CI didn't catch the fallout from #11530 because we forgot to pipe the errors coming from `lake build Archive` and `lake build Counterexamples` back to the logs. This PR makes sure that happens.
utensil pushed a commit that referenced this pull request Mar 26, 2024
Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the `GroupWithZero` lemma name, the `Group` lemma, the `AddGroup` lemma name).

| Statement           | New name                | Old name                |
|
utensil pushed a commit that referenced this pull request Mar 26, 2024
We sometimes want to refer to Archive declarations in the YAML files. This is currently impossible because the script in `checkYaml` only imports `Mathlib`. This PR changes it to also import `Archive`.

It also changes the hyperlinks to Archive to instead list declarations directly.

Also fix the fallout from #11530 that CI didn't catch that because we forgot to pipe the errors coming from `lake build Archive` (see #11612).

Co-authored-by: Enrico Borba <enricozb@gmail.com>



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
utensil pushed a commit that referenced this pull request Mar 26, 2024
CI didn't catch the fallout from #11530 because we forgot to pipe the errors coming from `lake build Archive` and `lake build Counterexamples` back to the logs. This PR makes sure that happens.
Louddy pushed a commit that referenced this pull request Apr 15, 2024
Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the `GroupWithZero` lemma name, the `Group` lemma, the `AddGroup` lemma name).

| Statement           | New name                | Old name                |
|
Louddy pushed a commit that referenced this pull request Apr 15, 2024
We sometimes want to refer to Archive declarations in the YAML files. This is currently impossible because the script in `checkYaml` only imports `Mathlib`. This PR changes it to also import `Archive`.

It also changes the hyperlinks to Archive to instead list declarations directly.

Also fix the fallout from #11530 that CI didn't catch that because we forgot to pipe the errors coming from `lake build Archive` (see #11612).

Co-authored-by: Enrico Borba <enricozb@gmail.com>



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Louddy pushed a commit that referenced this pull request Apr 15, 2024
CI didn't catch the fallout from #11530 because we forgot to pipe the errors coming from `lake build Archive` and `lake build Counterexamples` back to the logs. This PR makes sure that happens.
atarnoam pushed a commit that referenced this pull request Apr 16, 2024
Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the `GroupWithZero` lemma name, the `Group` lemma, the `AddGroup` lemma name).

| Statement           | New name                | Old name                |
|
atarnoam pushed a commit that referenced this pull request Apr 16, 2024
We sometimes want to refer to Archive declarations in the YAML files. This is currently impossible because the script in `checkYaml` only imports `Mathlib`. This PR changes it to also import `Archive`.

It also changes the hyperlinks to Archive to instead list declarations directly.

Also fix the fallout from #11530 that CI didn't catch that because we forgot to pipe the errors coming from `lake build Archive` (see #11612).

Co-authored-by: Enrico Borba <enricozb@gmail.com>



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
atarnoam pushed a commit that referenced this pull request Apr 16, 2024
CI didn't catch the fallout from #11530 because we forgot to pipe the errors coming from `lake build Archive` and `lake build Counterexamples` back to the logs. This PR makes sure that happens.
uniwuni pushed a commit that referenced this pull request Apr 19, 2024
Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the `GroupWithZero` lemma name, the `Group` lemma, the `AddGroup` lemma name).

| Statement           | New name                | Old name                |
|
uniwuni pushed a commit that referenced this pull request Apr 19, 2024
We sometimes want to refer to Archive declarations in the YAML files. This is currently impossible because the script in `checkYaml` only imports `Mathlib`. This PR changes it to also import `Archive`.

It also changes the hyperlinks to Archive to instead list declarations directly.

Also fix the fallout from #11530 that CI didn't catch that because we forgot to pipe the errors coming from `lake build Archive` (see #11612).

Co-authored-by: Enrico Borba <enricozb@gmail.com>



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
uniwuni pushed a commit that referenced this pull request Apr 19, 2024
CI didn't catch the fallout from #11530 because we forgot to pipe the errors coming from `lake build Archive` and `lake build Counterexamples` back to the logs. This PR makes sure that happens.
callesonne pushed a commit that referenced this pull request Apr 22, 2024
Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the `GroupWithZero` lemma name, the `Group` lemma, the `AddGroup` lemma name).

| Statement           | New name                | Old name                |
|
callesonne pushed a commit that referenced this pull request Apr 22, 2024
We sometimes want to refer to Archive declarations in the YAML files. This is currently impossible because the script in `checkYaml` only imports `Mathlib`. This PR changes it to also import `Archive`.

It also changes the hyperlinks to Archive to instead list declarations directly.

Also fix the fallout from #11530 that CI didn't catch that because we forgot to pipe the errors coming from `lake build Archive` (see #11612).

Co-authored-by: Enrico Borba <enricozb@gmail.com>



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
callesonne pushed a commit that referenced this pull request Apr 22, 2024
CI didn't catch the fallout from #11530 because we forgot to pipe the errors coming from `lake build Archive` and `lake build Counterexamples` back to the logs. This PR makes sure that happens.
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

3 participants