Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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 Mar 10, 2026
5b6f1f8
add another lemma
MichaelStollBayreuth Mar 10, 2026
4699e88
open AddSubgroup, fix whitespace
MichaelStollBayreuth Mar 10, 2026
a97b652
add def. of canonical iso.
MichaelStollBayreuth Mar 11, 2026
2724fe0
add another powMonoidHom lemma
MichaelStollBayreuth Mar 11, 2026
d5a5426
feat(GroupTheory/IndexNSmul): new file
MichaelStollBayreuth Mar 11, 2026
9bad6f9
move mulEquivPiModRangePowMonoidHom
MichaelStollBayreuth Mar 11, 2026
8d9c380
remove powMonoidHom_comm, inline at use site
MichaelStollBayreuth Mar 11, 2026
df16bef
golf following review suggestions
MichaelStollBayreuth Mar 11, 2026
a8cb224
add 'simp' attribuite
MichaelStollBayreuth Mar 11, 2026
5a6f810
run mk_all
MichaelStollBayreuth Mar 11, 2026
a1b299b
Merge branch 'MS_API_powMonoidHom_1' into MS_API_index_2
MichaelStollBayreuth Mar 11, 2026
8afccb1
merge master
MichaelStollBayreuth Mar 26, 2026
65b7c62
remove double import
MichaelStollBayreuth Mar 26, 2026
501be15
fix indentation
MichaelStollBayreuth Mar 26, 2026
2049482
fix garbled file
MichaelStollBayreuth Mar 26, 2026
62496c9
Apply suggestions from code review
MichaelStollBayreuth Apr 2, 2026
02cd249
Merge remote-tracking branch 'upstream/master' into MS_API_index_2
MichaelStollBayreuth Apr 2, 2026
dc5730d
suggestions from review
MichaelStollBayreuth Apr 9, 2026
06bf477
Merge remote-tracking branch 'upstream/master' into MS_API_index_2
MichaelStollBayreuth Apr 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4617,6 +4617,7 @@ public import Mathlib.GroupTheory.GroupExtension.Basic
public import Mathlib.GroupTheory.GroupExtension.Defs
public import Mathlib.GroupTheory.HNNExtension
public import Mathlib.GroupTheory.Index
public import Mathlib.GroupTheory.IndexNSmul
public import Mathlib.GroupTheory.IndexNormal
public import Mathlib.GroupTheory.IsPerfect
public import Mathlib.GroupTheory.IsSubnormal
Expand Down
97 changes: 97 additions & 0 deletions Mathlib/GroupTheory/IndexNSmul.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/-
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_range_nsmul [Free ℤ M] [Module.Finite ℤ M] (n : ℕ) :
(nsmulAddMonoidHom (α := M) n).range.index = n ^ finrank ℤ M :=
calc
_ = (nsmulAddMonoidHom (α := (Fin (finrank ℤ M) → ℤ)) n).range.index := by
simpa [AddEquiv.map_range_nsmulAddMonoidHom]
using (index_map_equiv (nsmulAddMonoidHom (α := M) n).range
(Module.finBasis ℤ M).equivFun.toAddEquiv).symm
_ = _ := by
simp [index_eq_card, Nat.card_congr (addEquivPiModRangeNSMulAddMonoidHom _ n).toEquiv,
Nat.card_fun, Int.range_nsmulAddMonoidHom,
Nat.card_congr (Int.quotientZMultiplesNatEquivZMod n).toEquiv]

/-- 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_map_nsmul (n : ℕ) (S : AddSubgroup M) [Free ℤ ↥S.toIntSubmodule]
[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_range_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) :=
LinearMap.ker_eq_bot.mp <| (Submodule.eq_bot_iff _).mpr fun x hx ↦ by simp_all

/-- 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) :=
(AddMonoidHom.ker_eq_bot_iff _).mp <| (eq_bot_iff_forall _).mpr fun x hx ↦ by simp_all

/-- 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 A.toIntSubmodule.finrank_le ?_
have : finrank ℤ (DistribSMul.toLinearMap ℤ M A.index).range = finrank ℤ M :=
(DistribSMul.toLinearMap ..).finrank_range_of_inj <|
distribSMulToLinearMap_injective_of_isTorsionFree FiniteIndex.index_ne_zero
rw [← this]
refine Submodule.finrank_mono <| (OrderIso.symm_apply_le toIntSubmodule).mp fun m hm ↦ ?_
obtain ⟨x, rfl⟩ : ∃ x, A.index • x = m := by simpa using hm
exact A.nsmul_index_mem x

/-- 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
Loading