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: Generalise lemmas from finite groups to torsion elements #8342

Closed
wants to merge 12 commits into from

Conversation

YaelDillies
Copy link
Collaborator

@YaelDillies YaelDillies commented Nov 11, 2023

Many lemmas in GroupTheory.OrderOfElement were stated for elements of finite groups even though they work more generally for torsion elements of possibly infinite groups. This PR generalises those lemmas (and leaves convenience lemmas stated for finite groups), and fixes a bunch of names to use dot notation.

Renames

  • Function.eq_of_lt_minimalPeriod_of_iterate_eqFunction.iterate_injOn_Iio_minimalPeriod
  • Function.eq_iff_lt_minimalPeriod_of_iterate_eqFunction.iterate_eq_iterate_iff_of_lt_minimalPeriod
  • isOfFinOrder_iff_coeSubmonoid.isOfFinOrder_coe
  • orderOf_pos'IsOfFinOrder.orderOf_pos
  • pow_eq_mod_orderOfpow_mod_orderOf (and turned around)
  • pow_injective_of_lt_orderOfpow_injOn_Iio_orderOf
  • mem_powers_iff_mem_range_order_of'IsOfFinOrder.mem_powers_iff_mem_range_orderOf
  • orderOf_pow''IsOfFinOrder.orderOf_pow
  • orderOf_pow_coprimeNat.Coprime.orderOf_pow
  • zpow_eq_mod_orderOfzpow_mod_orderOf (and turned around)
  • exists_pow_eq_oneisOfFinOrder_of_finite
  • pow_apply_eq_pow_mod_orderOf_cycleOf_applypow_mod_orderOf_cycleOf_apply

New lemmas

  • IsOfFinOrder.powers_eq_image_range_orderOf
  • IsOfFinOrder.natCard_powers_le_orderOf
  • IsOfFinOrder.finite_powers
  • finite_powers
  • infinite_powers
  • Nat.card_submonoidPowers
  • IsOfFinOrder.mem_powers_iff_mem_zpowers
  • IsOfFinOrder.powers_eq_zpowers
  • IsOfFinOrder.mem_zpowers_iff_mem_range_orderOf
  • IsOfFinOrder.exists_pow_eq_one

Other changes

  • Move decidableMemPowers/fintypePowers to GroupTheory.Submonoid.Membership and decidableMemZpowers/fintypeZpowers to GroupTheory.Subgroup.ZPowers.
  • finEquivPowers, finEquivZpowers, powersEquivPowers and zpowersEquivZpowers now assume IsOfFinTorsion x instead of Finite G.
  • isOfFinOrder_iff_pow_eq_one now takes one less explicit argument.
  • Delete Equiv.Perm.IsCycle.exists_pow_eq_one since it was saying that a permutation over a finite type is torsion, but this is trivial since the group of permutation is itself finite, so we can use isOfFinOrder_of_finite instead.

I need this for Kneser's theorem

Open in Gitpod

@YaelDillies YaelDillies added WIP Work in progress t-algebra Algebra (groups, rings, fields etc) labels Nov 11, 2023
@YaelDillies YaelDillies changed the title feat: Finiteness of powers chore: Generalise lemmas from finite groups to torsion elements Nov 11, 2023
@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR and removed WIP Work in progress labels Nov 11, 2023
Copy link
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

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Nov 13, 2023
mathlib-bors bot pushed a commit that referenced this pull request Nov 13, 2023
Many lemmas in `GroupTheory.OrderOfElement` were stated for elements of finite groups even though they work more generally for torsion elements of possibly infinite groups. This PR generalises those lemmas (and leaves convenience lemmas stated for finite groups), and fixes a bunch of names to use dot notation.

## Renames

* `Function.eq_of_lt_minimalPeriod_of_iterate_eq` → `Function.iterate_injOn_Iio_minimalPeriod`
* `Function.eq_iff_lt_minimalPeriod_of_iterate_eq` → `Function.iterate_eq_iterate_iff_of_lt_minimalPeriod`
* `isOfFinOrder_iff_coe` → `Submonoid.isOfFinOrder_coe`
* `orderOf_pos'` → `IsOfFinOrder.orderOf_pos`
* `pow_eq_mod_orderOf` → `pow_mod_orderOf` (and turned around)
* `pow_injective_of_lt_orderOf` → `pow_injOn_Iio_orderOf`
* `mem_powers_iff_mem_range_order_of'` → `IsOfFinOrder.mem_powers_iff_mem_range_orderOf`
* `orderOf_pow''` → `IsOfFinOrder.orderOf_pow`
* `orderOf_pow_coprime` → `Nat.Coprime.orderOf_pow`
* `zpow_eq_mod_orderOf` → `zpow_mod_orderOf` (and turned around)
* `exists_pow_eq_one` → `isOfFinOrder_of_finite`
* `pow_apply_eq_pow_mod_orderOf_cycleOf_apply` → `pow_mod_orderOf_cycleOf_apply`

## New lemmas

* `IsOfFinOrder.powers_eq_image_range_orderOf`
* `IsOfFinOrder.natCard_powers_le_orderOf`
* `IsOfFinOrder.finite_powers`
* `finite_powers`
* `infinite_powers`
* `Nat.card_submonoidPowers`
* `IsOfFinOrder.mem_powers_iff_mem_zpowers`
* `IsOfFinOrder.powers_eq_zpowers`
* `IsOfFinOrder.mem_zpowers_iff_mem_range_orderOf`
* `IsOfFinOrder.exists_pow_eq_one`

## Other changes

* Move `decidableMemPowers`/`fintypePowers` to `GroupTheory.Submonoid.Membership` and `decidableMemZpowers`/`fintypeZpowers` to `GroupTheory.Subgroup.ZPowers`.
* `finEquivPowers`, `finEquivZpowers`, `powersEquivPowers` and `zpowersEquivZpowers` now assume `IsOfFinTorsion x` instead of `Finite G`.
* `isOfFinOrder_iff_pow_eq_one` now takes one less explicit argument.
* Delete `Equiv.Perm.IsCycle.exists_pow_eq_one` since it was saying that a permutation over a finite type is torsion, but this is trivial since the group of permutation is itself finite, so we can use `isOfFinOrder_of_finite` instead.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Nov 13, 2023

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: Generalise lemmas from finite groups to torsion elements [Merged by Bors] - chore: Generalise lemmas from finite groups to torsion elements Nov 13, 2023
@mathlib-bors mathlib-bors bot closed this Nov 13, 2023
@mathlib-bors mathlib-bors bot deleted the powers_finite branch November 13, 2023 08:38
alexkeizer pushed a commit that referenced this pull request Nov 17, 2023
Many lemmas in `GroupTheory.OrderOfElement` were stated for elements of finite groups even though they work more generally for torsion elements of possibly infinite groups. This PR generalises those lemmas (and leaves convenience lemmas stated for finite groups), and fixes a bunch of names to use dot notation.

## Renames

* `Function.eq_of_lt_minimalPeriod_of_iterate_eq` → `Function.iterate_injOn_Iio_minimalPeriod`
* `Function.eq_iff_lt_minimalPeriod_of_iterate_eq` → `Function.iterate_eq_iterate_iff_of_lt_minimalPeriod`
* `isOfFinOrder_iff_coe` → `Submonoid.isOfFinOrder_coe`
* `orderOf_pos'` → `IsOfFinOrder.orderOf_pos`
* `pow_eq_mod_orderOf` → `pow_mod_orderOf` (and turned around)
* `pow_injective_of_lt_orderOf` → `pow_injOn_Iio_orderOf`
* `mem_powers_iff_mem_range_order_of'` → `IsOfFinOrder.mem_powers_iff_mem_range_orderOf`
* `orderOf_pow''` → `IsOfFinOrder.orderOf_pow`
* `orderOf_pow_coprime` → `Nat.Coprime.orderOf_pow`
* `zpow_eq_mod_orderOf` → `zpow_mod_orderOf` (and turned around)
* `exists_pow_eq_one` → `isOfFinOrder_of_finite`
* `pow_apply_eq_pow_mod_orderOf_cycleOf_apply` → `pow_mod_orderOf_cycleOf_apply`

## New lemmas

* `IsOfFinOrder.powers_eq_image_range_orderOf`
* `IsOfFinOrder.natCard_powers_le_orderOf`
* `IsOfFinOrder.finite_powers`
* `finite_powers`
* `infinite_powers`
* `Nat.card_submonoidPowers`
* `IsOfFinOrder.mem_powers_iff_mem_zpowers`
* `IsOfFinOrder.powers_eq_zpowers`
* `IsOfFinOrder.mem_zpowers_iff_mem_range_orderOf`
* `IsOfFinOrder.exists_pow_eq_one`

## Other changes

* Move `decidableMemPowers`/`fintypePowers` to `GroupTheory.Submonoid.Membership` and `decidableMemZpowers`/`fintypeZpowers` to `GroupTheory.Subgroup.ZPowers`.
* `finEquivPowers`, `finEquivZpowers`, `powersEquivPowers` and `zpowersEquivZpowers` now assume `IsOfFinTorsion x` instead of `Finite G`.
* `isOfFinOrder_iff_pow_eq_one` now takes one less explicit argument.
* Delete `Equiv.Perm.IsCycle.exists_pow_eq_one` since it was saying that a permutation over a finite type is torsion, but this is trivial since the group of permutation is itself finite, so we can use `isOfFinOrder_of_finite` instead.
alexkeizer pushed a commit that referenced this pull request Nov 21, 2023
Many lemmas in `GroupTheory.OrderOfElement` were stated for elements of finite groups even though they work more generally for torsion elements of possibly infinite groups. This PR generalises those lemmas (and leaves convenience lemmas stated for finite groups), and fixes a bunch of names to use dot notation.

## Renames

* `Function.eq_of_lt_minimalPeriod_of_iterate_eq` → `Function.iterate_injOn_Iio_minimalPeriod`
* `Function.eq_iff_lt_minimalPeriod_of_iterate_eq` → `Function.iterate_eq_iterate_iff_of_lt_minimalPeriod`
* `isOfFinOrder_iff_coe` → `Submonoid.isOfFinOrder_coe`
* `orderOf_pos'` → `IsOfFinOrder.orderOf_pos`
* `pow_eq_mod_orderOf` → `pow_mod_orderOf` (and turned around)
* `pow_injective_of_lt_orderOf` → `pow_injOn_Iio_orderOf`
* `mem_powers_iff_mem_range_order_of'` → `IsOfFinOrder.mem_powers_iff_mem_range_orderOf`
* `orderOf_pow''` → `IsOfFinOrder.orderOf_pow`
* `orderOf_pow_coprime` → `Nat.Coprime.orderOf_pow`
* `zpow_eq_mod_orderOf` → `zpow_mod_orderOf` (and turned around)
* `exists_pow_eq_one` → `isOfFinOrder_of_finite`
* `pow_apply_eq_pow_mod_orderOf_cycleOf_apply` → `pow_mod_orderOf_cycleOf_apply`

## New lemmas

* `IsOfFinOrder.powers_eq_image_range_orderOf`
* `IsOfFinOrder.natCard_powers_le_orderOf`
* `IsOfFinOrder.finite_powers`
* `finite_powers`
* `infinite_powers`
* `Nat.card_submonoidPowers`
* `IsOfFinOrder.mem_powers_iff_mem_zpowers`
* `IsOfFinOrder.powers_eq_zpowers`
* `IsOfFinOrder.mem_zpowers_iff_mem_range_orderOf`
* `IsOfFinOrder.exists_pow_eq_one`

## Other changes

* Move `decidableMemPowers`/`fintypePowers` to `GroupTheory.Submonoid.Membership` and `decidableMemZpowers`/`fintypeZpowers` to `GroupTheory.Subgroup.ZPowers`.
* `finEquivPowers`, `finEquivZpowers`, `powersEquivPowers` and `zpowersEquivZpowers` now assume `IsOfFinTorsion x` instead of `Finite G`.
* `isOfFinOrder_iff_pow_eq_one` now takes one less explicit argument.
* Delete `Equiv.Perm.IsCycle.exists_pow_eq_one` since it was saying that a permutation over a finite type is torsion, but this is trivial since the group of permutation is itself finite, so we can use `isOfFinOrder_of_finite` instead.
grunweg pushed a commit that referenced this pull request Dec 15, 2023
Many lemmas in `GroupTheory.OrderOfElement` were stated for elements of finite groups even though they work more generally for torsion elements of possibly infinite groups. This PR generalises those lemmas (and leaves convenience lemmas stated for finite groups), and fixes a bunch of names to use dot notation.

## Renames

* `Function.eq_of_lt_minimalPeriod_of_iterate_eq` → `Function.iterate_injOn_Iio_minimalPeriod`
* `Function.eq_iff_lt_minimalPeriod_of_iterate_eq` → `Function.iterate_eq_iterate_iff_of_lt_minimalPeriod`
* `isOfFinOrder_iff_coe` → `Submonoid.isOfFinOrder_coe`
* `orderOf_pos'` → `IsOfFinOrder.orderOf_pos`
* `pow_eq_mod_orderOf` → `pow_mod_orderOf` (and turned around)
* `pow_injective_of_lt_orderOf` → `pow_injOn_Iio_orderOf`
* `mem_powers_iff_mem_range_order_of'` → `IsOfFinOrder.mem_powers_iff_mem_range_orderOf`
* `orderOf_pow''` → `IsOfFinOrder.orderOf_pow`
* `orderOf_pow_coprime` → `Nat.Coprime.orderOf_pow`
* `zpow_eq_mod_orderOf` → `zpow_mod_orderOf` (and turned around)
* `exists_pow_eq_one` → `isOfFinOrder_of_finite`
* `pow_apply_eq_pow_mod_orderOf_cycleOf_apply` → `pow_mod_orderOf_cycleOf_apply`

## New lemmas

* `IsOfFinOrder.powers_eq_image_range_orderOf`
* `IsOfFinOrder.natCard_powers_le_orderOf`
* `IsOfFinOrder.finite_powers`
* `finite_powers`
* `infinite_powers`
* `Nat.card_submonoidPowers`
* `IsOfFinOrder.mem_powers_iff_mem_zpowers`
* `IsOfFinOrder.powers_eq_zpowers`
* `IsOfFinOrder.mem_zpowers_iff_mem_range_orderOf`
* `IsOfFinOrder.exists_pow_eq_one`

## Other changes

* Move `decidableMemPowers`/`fintypePowers` to `GroupTheory.Submonoid.Membership` and `decidableMemZpowers`/`fintypeZpowers` to `GroupTheory.Subgroup.ZPowers`.
* `finEquivPowers`, `finEquivZpowers`, `powersEquivPowers` and `zpowersEquivZpowers` now assume `IsOfFinTorsion x` instead of `Finite G`.
* `isOfFinOrder_iff_pow_eq_one` now takes one less explicit argument.
* Delete `Equiv.Perm.IsCycle.exists_pow_eq_one` since it was saying that a permutation over a finite type is torsion, but this is trivial since the group of permutation is itself finite, so we can use `isOfFinOrder_of_finite` instead.
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.

None yet

3 participants