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

Commit 777f11c

Browse files
committed
feat(group_theory/index): Special cases of relindex (#9831)
Adds special cases of relindex. Also refactors the file to use `nat.card`, rather than the equivalent `(# _).to_nat`. Co-authored-by: tb65536 <tb65536@users.noreply.github.com>
1 parent bfa4010 commit 777f11c

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

src/group_theory/index.lean

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Authors: Thomas Browning
55
-/
66

77
import group_theory.quotient_group
8-
import set_theory.cardinal
8+
import set_theory.fincard
99

1010
/-!
1111
# Index of a Subgroup
@@ -39,7 +39,7 @@ variables {G : Type*} [group G] (H K L : subgroup G)
3939
@[to_additive "The index of a subgroup as a natural number,
4040
and returns 0 if the index is infinite."]
4141
noncomputable def index : ℕ :=
42-
(#(quotient_group.quotient H)).to_nat
42+
nat.card (quotient_group.quotient H)
4343

4444
/-- The relative index of a subgroup as a natural number,
4545
and returns 0 if the relative index is infinite. -/
@@ -95,23 +95,38 @@ variables (H K L)
9595
@[simp, to_additive] lemma index_top : (⊤ : subgroup G).index = 1 :=
9696
cardinal.to_nat_eq_one_iff_unique.mpr ⟨quotient_group.subsingleton_quotient_top, ⟨1⟩⟩
9797

98-
@[to_additive] lemma index_bot : (⊥ : subgroup G).index = cardinal.to_nat (#G) :=
98+
@[simp, to_additive] lemma index_bot : (⊥ : subgroup G).index = nat.card G :=
9999
cardinal.to_nat_congr (quotient_group.quotient_bot.to_equiv)
100100

101101
@[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
102+
index_bot.trans nat.card_eq_fintype_card
103+
104+
@[simp, to_additive] lemma relindex_top_left : (⊤ : subgroup G).relindex H = 1 :=
105+
index_top
106+
107+
@[simp, to_additive] lemma relindex_top_right : H.relindex ⊤ = H.index :=
108+
by rw [←relindex_mul_index (show H ≤ ⊤, from le_top), index_top, mul_one]
109+
110+
@[simp, to_additive] lemma relindex_bot_left : (⊥ : subgroup G).relindex H = nat.card H :=
111+
by rw [relindex, bot_subgroup_of, index_bot]
112+
113+
@[to_additive] lemma relindex_bot_left_eq_card [fintype H] :
114+
(⊥ : subgroup G).relindex H = fintype.card H :=
115+
H.relindex_bot_left.trans nat.card_eq_fintype_card
116+
117+
@[simp, to_additive] lemma relindex_bot_right : H.relindex ⊥ = 1 :=
118+
by rw [relindex, subgroup_of_bot_eq_top, index_top]
119+
120+
@[simp, to_additive] lemma relindex_self : H.relindex H = 1 :=
121+
by rw [relindex, subgroup_of_self, index_top]
103122

104123
@[to_additive] lemma index_eq_card [fintype (quotient_group.quotient H)] :
105124
H.index = fintype.card (quotient_group.quotient H) :=
106-
cardinal.mk_to_nat_eq_card
125+
nat.card_eq_fintype_card
107126

108127
@[to_additive] lemma index_mul_card [fintype G] [hH : fintype H] :
109128
H.index * fintype.card H = fintype.card G :=
110-
begin
111-
classical,
112-
rw H.index_eq_card,
113-
apply H.card_eq_card_quotient_mul_card_subgroup.symm,
114-
end
129+
by rw [←relindex_bot_left_eq_card, ←index_bot_eq_card, mul_comm]; exact relindex_mul_index bot_le
115130

116131
@[to_additive] lemma index_dvd_card [fintype G] : H.index ∣ fintype.card G :=
117132
begin

0 commit comments

Comments
 (0)