Skip to content

[Merged by Bors] - chore: Delete Algebra.GroupPower.Basic, Algebra.GroupWithZero.Bitwise#11855

Closed
YaelDillies wants to merge 35 commits intomasterfrom
delete_group_power_basic
Closed

[Merged by Bors] - chore: Delete Algebra.GroupPower.Basic, Algebra.GroupWithZero.Bitwise#11855
YaelDillies wants to merge 35 commits intomasterfrom
delete_group_power_basic

Conversation

@YaelDillies
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies commented Apr 2, 2024

The entire Algebra.GroupPower folder is problematic in that it treats pow as an advanced subject while the rest of mathlib wants to treat it as a primitive. As such, its existence is an obstacle to developing the theory of pow transversally.

This PR scatters the lemmas in Algebra.GroupPower.Basic to earlier files and deletes it. Also delete Algebra.GroupWithZero.Bitwise whose lemmas are completely deprecated (and hard to rehome).

See #9411 for previous work.


Open in Gitpod

The entire `Algebra.GroupPower` folder is problematic in that it treats `pow` as an advanced subject while the rest of mathlib wants to treat it as a primitive. As such, its existence is an obstacle to developing the theory of `pow` transversally.

This PR scatters the lemmas in `Algebra.GroupPower.Basic` to earlier files.

See #9411 for previous work.
@YaelDillies YaelDillies added awaiting-review awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. t-algebra Algebra (groups, rings, fields, etc) labels Apr 2, 2024
YaelDillies and others added 5 commits April 2, 2024 22:31
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Apr 3, 2024
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 6, 2024
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 6, 2024
Copy link
Copy Markdown
Contributor

@Ruben-VandeVelde Ruben-VandeVelde left a comment

Choose a reason for hiding this comment

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

This is quite big. Would you consider at least splitting out the removals from the moved code?

theorem Odd.neg_zpow (h : Odd n) (a : α) : (-a) ^ n = -a ^ n := by
obtain ⟨k, rfl⟩ := h.exists_bit1
exact zpow_bit1_neg _ _
have hn : n ≠ 0 := by rintro rfl; exact Int.odd_iff_not_even.1 h even_zero
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should exist as a lemma, IMO

section
set_option linter.deprecated false
@[simp]
theorem I_zpow_bit0 (n : ℤ) : I ^ bit0 n = (-1 : ℂ) ^ n := by rw [zpow_bit0', I_mul_I]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ref. (brief) discussion in #11414

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't see the connection. I can't replace this lemma by an ofNat lemma since the statement depends on the parity.

@j-loreaux j-loreaux added awaiting-author A reviewer has asked the author a question or requested changes. and removed awaiting-review labels Apr 7, 2024
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 7, 2024
@ghost ghost added blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Apr 7, 2024
@YaelDillies YaelDillies added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Apr 7, 2024
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 20, 2024
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 16, 2024
callesonne pushed a commit that referenced this pull request May 16, 2024
Resplit `Algebra.BigOperators.List.Basic` and `Algebra.BigOperators.List.Lemmas` into two new files:
* `Algebra.BigOperators.Group.List` for lemmas that require group-like structures (`Monoid`, `Group`, ...)
* `Algebra.BigOperators.Ring.List` for lemmas that require ring-like structures (`MonoidWithZero`, `Ring`, ...)

Add `assert_not_exists Ring` in the former. Once #11855 lands, it will be strenghtenable to `assert_not_exists MonoidWithZero`.
@leanprover-community leanprover-community deleted a comment from github-actions bot May 16, 2024
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 16, 2024
grunweg pushed a commit that referenced this pull request May 17, 2024
Resplit `Algebra.BigOperators.List.Basic` and `Algebra.BigOperators.List.Lemmas` into two new files:
* `Algebra.BigOperators.Group.List` for lemmas that require group-like structures (`Monoid`, `Group`, ...)
* `Algebra.BigOperators.Ring.List` for lemmas that require ring-like structures (`MonoidWithZero`, `Ring`, ...)

Add `assert_not_exists Ring` in the former. Once #11855 lands, it will be strenghtenable to `assert_not_exists MonoidWithZero`.
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 17, 2024
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 17, 2024
@github-actions
Copy link
Copy Markdown

+ mul_pow
++- zpow_right
- Commute.mul_pow
- I_zpow_bit0
- I_zpow_bit1
- SemiconjBy.zpow_right
- zpow_bit0
- zpow_bit0'
- zpow_bit0_neg
- zpow_bit0_nonneg
- zpow_bit0_pos
- zpow_bit0_pos_iff
- zpow_bit1
- zpow_bit1'
- zpow_bit1_neg
- zpow_bit1_neg_iff
- zpow_bit1_nonneg_iff
- zpow_bit1_nonpos_iff
- zpow_bit1_pos_iff
- zpow_bit1₀


You can run this locally as follows

## summary with just the declaration names:
./scripts/no_lost_declarations.sh short <optional_commit>

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

@Ruben-VandeVelde Ruben-VandeVelde changed the title chore: Delete Algebra.GroupPower.Basic chore: Delete Algebra.GroupPower.Basic, Algebra.GroupWithZero.Bitwise May 18, 2024
Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels May 18, 2024
mathlib-bors bot pushed a commit that referenced this pull request May 18, 2024
…ise` (#11855)

The entire `Algebra.GroupPower` folder is problematic in that it treats `pow` as an advanced subject while the rest of mathlib wants to treat it as a primitive. As such, its existence is an obstacle to developing the theory of `pow` transversally.

This PR scatters the lemmas in `Algebra.GroupPower.Basic` to earlier files and deletes it. Also delete `Algebra.GroupWithZero.Bitwise` whose lemmas are completely deprecated (and hard to rehome).

See #9411 for previous work.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented May 18, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: Delete Algebra.GroupPower.Basic, Algebra.GroupWithZero.Bitwise [Merged by Bors] - chore: Delete Algebra.GroupPower.Basic, Algebra.GroupWithZero.Bitwise May 18, 2024
@mathlib-bors mathlib-bors bot closed this May 18, 2024
@mathlib-bors mathlib-bors bot deleted the delete_group_power_basic branch May 18, 2024 17:10
callesonne pushed a commit that referenced this pull request Jun 4, 2024
…ise` (#11855)

The entire `Algebra.GroupPower` folder is problematic in that it treats `pow` as an advanced subject while the rest of mathlib wants to treat it as a primitive. As such, its existence is an obstacle to developing the theory of `pow` transversally.

This PR scatters the lemmas in `Algebra.GroupPower.Basic` to earlier files and deletes it. Also delete `Algebra.GroupWithZero.Bitwise` whose lemmas are completely deprecated (and hard to rehome).

See #9411 for previous work.
js2357 pushed a commit that referenced this pull request Jun 18, 2024
…ise` (#11855)

The entire `Algebra.GroupPower` folder is problematic in that it treats `pow` as an advanced subject while the rest of mathlib wants to treat it as a primitive. As such, its existence is an obstacle to developing the theory of `pow` transversally.

This PR scatters the lemmas in `Algebra.GroupPower.Basic` to earlier files and deletes it. Also delete `Algebra.GroupWithZero.Bitwise` whose lemmas are completely deprecated (and hard to rehome).

See #9411 for previous work.
mathlib-bors bot pushed a commit that referenced this pull request Feb 22, 2025
All lemmas in this file belong earlier. This finally gets rid of the `Algebra.GroupPower` folder, notorious for having caused imports increases in the algebra library (see #11855 for full motivation).
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.

5 participants