-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Merged by Bors] - feat(GroupTheory/IndexNSmul): add results on multiplication-by-n in AddCommGroups #36494
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
Closed
MichaelStollBayreuth
wants to merge
20
commits into
leanprover-community:master
from
MichaelStollBayreuth:MS_API_index_2
Closed
[Merged by Bors] - feat(GroupTheory/IndexNSmul): add results on multiplication-by-n in AddCommGroups #36494
Changes from 16 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
4bc7a2c
feat(Algebra/Group): some API lemmas for powMonoidHom
MichaelStollBayreuth 5b6f1f8
add another lemma
MichaelStollBayreuth 4699e88
open AddSubgroup, fix whitespace
MichaelStollBayreuth a97b652
add def. of canonical iso.
MichaelStollBayreuth 2724fe0
add another powMonoidHom lemma
MichaelStollBayreuth d5a5426
feat(GroupTheory/IndexNSmul): new file
MichaelStollBayreuth 9bad6f9
move mulEquivPiModRangePowMonoidHom
MichaelStollBayreuth 8d9c380
remove powMonoidHom_comm, inline at use site
MichaelStollBayreuth df16bef
golf following review suggestions
MichaelStollBayreuth a8cb224
add 'simp' attribuite
MichaelStollBayreuth 5a6f810
run mk_all
MichaelStollBayreuth a1b299b
Merge branch 'MS_API_powMonoidHom_1' into MS_API_index_2
MichaelStollBayreuth 8afccb1
merge master
MichaelStollBayreuth 65b7c62
remove double import
MichaelStollBayreuth 501be15
fix indentation
MichaelStollBayreuth 2049482
fix garbled file
MichaelStollBayreuth 62496c9
Apply suggestions from code review
MichaelStollBayreuth 02cd249
Merge remote-tracking branch 'upstream/master' into MS_API_index_2
MichaelStollBayreuth dc5730d
suggestions from review
MichaelStollBayreuth 06bf477
Merge remote-tracking branch 'upstream/master' into MS_API_index_2
MichaelStollBayreuth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| /- | ||
| Copyright (c) 2026 Michael Stoll. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Michael Stoll | ||
| -/ | ||
| module | ||
|
|
||
| public import Mathlib.GroupTheory.Index | ||
| public import Mathlib.LinearAlgebra.Dimension.Finrank | ||
| public import Mathlib.LinearAlgebra.FreeModule.Basic | ||
| public import Mathlib.RingTheory.Finiteness.Defs | ||
|
|
||
| import Mathlib.Algebra.Group.Subgroup.ZPowers.Lemmas | ||
| import Mathlib.Data.ZMod.QuotientGroup | ||
| import Mathlib.LinearAlgebra.Dimension.Constructions | ||
| import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition | ||
|
|
||
| /-! | ||
| # Lemmas about index and multiplication-by-n | ||
|
|
||
| In this file we collect some results involving the multiplication-by-`n` map | ||
| `nsmulAddMonoidHom n` (for a natural number `n`) on a commutative additive group | ||
| and the (relative) index of subgroups. | ||
| -/ | ||
|
|
||
| public section | ||
|
|
||
| namespace AddSubgroup | ||
|
|
||
| variable {M N : Type*} [AddCommGroup M] [AddCommGroup N] | ||
|
|
||
| open Module | ||
|
|
||
| open QuotientAddGroup in | ||
| variable (M) in | ||
| /-- The index of the image of the multiplication-by-`n` map on an additive group `M` that is free | ||
| and finitely generated as a `ℤ`-module is `n ^ finrank ℤ M`. -/ | ||
| lemma index_nsmul [Free ℤ M] [Module.Finite ℤ M] (n : ℕ) : | ||
| (nsmulAddMonoidHom (α := M) n).range.index = n ^ finrank ℤ M := by | ||
| let e := (Module.finBasis ℤ M).equivFun | ||
| suffices (nsmulAddMonoidHom (α := Fin (finrank ℤ M) → ℤ) n).range.index = n ^ finrank ℤ M by | ||
| rwa [← AddEquiv.map_range_nsmulAddMonoidHom e.toAddEquiv, index_map_equiv] at this | ||
| simp [index_eq_card, Nat.card_congr (addEquivPiModRangeNSMulAddMonoidHom _ n).toEquiv, | ||
| Nat.card_fun, Int.range_nsmulAddMonoidHom, | ||
| Nat.card_congr (Int.quotientZMultiplesNatEquivZMod n).toEquiv] | ||
|
MichaelStollBayreuth marked this conversation as resolved.
Outdated
|
||
|
|
||
| /-- The relative index in `S` of the image of the multiplication-by-`n` map | ||
| on an additive subgroup `S` of an additive group such that `S` is free | ||
| and finitely generated as a `ℤ`-module is `n ^ finrank ℤ S`. -/ | ||
| lemma relIndex_nsmul (n : ℕ) (S : AddSubgroup M) [Free ℤ ↥S.toIntSubmodule] | ||
|
MichaelStollBayreuth marked this conversation as resolved.
Outdated
|
||
| [Module.Finite ℤ ↥S.toIntSubmodule] : | ||
| (S.map (nsmulAddMonoidHom (α := M) n)).relIndex S = n ^ finrank ℤ S := by | ||
| simpa only [relIndex, addSubgroupOf_map_nsmulAddMonoidHom_eq_range] | ||
| using index_nsmul S.toIntSubmodule n | ||
|
|
||
| /-- On an additive group that is torsion-free as a `ℤ`-module, the linear map given by | ||
| multiplication by `n : ℕ` is injective (when `n ≠ 0`). -/ | ||
| lemma distribSMulToLinearMap_injective_of_isTorsionFree [IsTorsionFree ℤ M] {n : ℕ} (hn : n ≠ 0) : | ||
| Function.Injective (DistribSMul.toLinearMap ℤ M n) := by | ||
| refine LinearMap.ker_eq_bot.mp <| (Submodule.eq_bot_iff _).mpr fun x hx ↦ ?_ | ||
| simp only [LinearMap.mem_ker, DistribSMul.toLinearMap_apply, ← natCast_zsmul] at hx | ||
| exact (smul_eq_zero_iff_right <| mod_cast hn).mp hx | ||
|
MichaelStollBayreuth marked this conversation as resolved.
Outdated
|
||
|
|
||
| /-- On an additive group that is torsion-free as a `ℤ`-module, the multiplication-by-`n` map | ||
| is injective (when `n ≠ 0`). -/ | ||
| lemma nsmulAddMonoidHom_injective_of_isTorsionFree [IsTorsionFree ℤ M] {n : ℕ} (hn : n ≠ 0) : | ||
| Function.Injective (nsmulAddMonoidHom (α := M) n) := by | ||
| refine (AddMonoidHom.ker_eq_bot_iff _).mp <| (eq_bot_iff_forall _).mpr fun x hx ↦ ?_ | ||
| simp only [AddMonoidHom.mem_ker, nsmulAddMonoidHom_apply, ← natCast_zsmul] at hx | ||
| exact (smul_eq_zero_iff_right <| mod_cast hn).mp hx | ||
|
MichaelStollBayreuth marked this conversation as resolved.
Outdated
|
||
|
|
||
| /-- If `A` is a subgroup of finite index of an additive group `M` that is finitely generated | ||
| and torsion-free as a `ℤ`-module, then `A` and `M` have the same rank. -/ | ||
| lemma finrank_eq_of_finiteIndex [Module.Finite ℤ M] [IsTorsionFree ℤ M] (A : AddSubgroup M) | ||
| [A.FiniteIndex] : | ||
| finrank ℤ A = finrank ℤ M := by | ||
| refine le_antisymm ?_ ?_ | ||
| · rw [← finrank_top ℤ M] | ||
| exact Submodule.finrank_mono (s := A.toIntSubmodule) le_top | ||
| · set n := A.index | ||
| rw [← (DistribSMul.toLinearMap ℤ M n).finrank_range_of_inj <| | ||
| distribSMulToLinearMap_injective_of_isTorsionFree FiniteIndex.index_ne_zero] | ||
| refine Submodule.finrank_mono <| (OrderIso.symm_apply_le toIntSubmodule).mp fun m hm ↦ ?_ | ||
| obtain ⟨x, rfl⟩ : ∃ x, n • x = m := by simpa using hm | ||
| exact A.nsmul_index_mem x | ||
|
MichaelStollBayreuth marked this conversation as resolved.
Outdated
|
||
|
|
||
| /-- If `A ≤ B` are subgroups of an additive group `M` such that `A` has finite relative index | ||
| in `B`, where `B` is finitely generated and torsion-free as a `ℤ`-module, then `A` and `B` | ||
| have the same rank. -/ | ||
| lemma finrank_eq_of_isFiniteRelIndex {A B : AddSubgroup M} [Module.Finite ℤ B] [IsTorsionFree ℤ B] | ||
| (h : A ≤ B) [A.IsFiniteRelIndex B] : | ||
| finrank ℤ A = finrank ℤ B := by | ||
| have : (A.addSubgroupOf B).FiniteIndex := IsFiniteRelIndex.to_finiteIndex_addSubgroupOf | ||
| rw [← finrank_eq_of_finiteIndex (A.addSubgroupOf B)] | ||
| exact (addSubgroupOfEquivOfLe h).symm.toIntLinearEquiv.finrank_eq | ||
|
|
||
| end AddSubgroup | ||
|
|
||
| end | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.