Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 3d00081

Browse files
committed
feat(group_theory/index): Index of top and bottom subgroups (#9819)
This PR computes the index of the top and bottom subgroups. Co-authored-by: tb65536 <tb65536@users.noreply.github.com>
1 parent 68a674e commit 3d00081

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

src/group_theory/index.lean

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Thomas Browning
55
-/
66

7-
import group_theory.coset
7+
import group_theory.quotient_group
88
import set_theory.cardinal
99

1010
/-!
@@ -31,13 +31,15 @@ In this file we define the index of a subgroup, and prove several divisibility p
3131

3232
namespace subgroup
3333

34+
open_locale cardinal
35+
3436
variables {G : Type*} [group G] (H K L : subgroup G)
3537

3638
/-- The index of a subgroup as a natural number, and returns 0 if the index is infinite. -/
3739
@[to_additive "The index of a subgroup as a natural number,
3840
and returns 0 if the index is infinite."]
3941
noncomputable def index : ℕ :=
40-
(cardinal.mk (quotient_group.quotient H)).to_nat
42+
(#(quotient_group.quotient H)).to_nat
4143

4244
/-- The relative index of a subgroup as a natural number,
4345
and returns 0 if the relative index is infinite. -/
@@ -90,6 +92,15 @@ end
9092

9193
variables (H K L)
9294

95+
@[simp, to_additive] lemma index_top : (⊤ : subgroup G).index = 1 :=
96+
cardinal.to_nat_eq_one_iff_unique.mpr ⟨quotient_group.subsingleton_quotient_top, ⟨1⟩⟩
97+
98+
@[to_additive] lemma index_bot : (⊥ : subgroup G).index = cardinal.to_nat (#G) :=
99+
cardinal.to_nat_congr (quotient_group.quotient_bot.to_equiv)
100+
101+
@[to_additive] lemma index_bot_eq_card [fintype G] : (⊥ : subgroup G).index = fintype.card G :=
102+
index_bot.trans cardinal.mk_to_nat_eq_card
103+
93104
@[to_additive] lemma index_eq_card [fintype (quotient_group.quotient H)] :
94105
H.index = fintype.card (quotient_group.quotient H) :=
95106
cardinal.mk_to_nat_eq_card

src/set_theory/cardinal.lean

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -982,13 +982,21 @@ lemma mk_to_nat_eq_card [fintype α] : (#α).to_nat = fintype.card α :=
982982
by simp [fintype_card]
983983

984984
@[simp]
985-
lemma zero_to_nat : cardinal.to_nat 0 = 0 :=
985+
lemma zero_to_nat : to_nat 0 = 0 :=
986986
by rw [← to_nat_cast 0, nat.cast_zero]
987987

988988
@[simp]
989-
lemma one_to_nat : cardinal.to_nat 1 = 1 :=
989+
lemma one_to_nat : to_nat 1 = 1 :=
990990
by rw [← to_nat_cast 1, nat.cast_one]
991991

992+
@[simp] lemma to_nat_eq_one {c : cardinal} : to_nat c = 1 ↔ c = 1 :=
993+
⟨λ h, (cast_to_nat_of_lt_omega (lt_of_not_ge (one_ne_zero ∘ h.symm.trans ∘
994+
to_nat_apply_of_omega_le))).symm.trans ((congr_arg coe h).trans nat.cast_one),
995+
λ h, (congr_arg to_nat h).trans one_to_nat⟩
996+
997+
lemma to_nat_eq_one_iff_unique {α : Type*} : (#α).to_nat = 1 ↔ subsingleton α ∧ nonempty α :=
998+
to_nat_eq_one.trans eq_one_iff_unique
999+
9921000
@[simp] lemma to_nat_lift (c : cardinal.{v}) : (lift.{u v} c).to_nat = c.to_nat :=
9931001
begin
9941002
apply nat_cast_injective,

0 commit comments

Comments
 (0)