Skip to content

Commit 01b31e1

Browse files
committed
chore(Submonoid/Subgroup): rename subtype_range to range_subtype (#19518)
This matches the naming convention.
1 parent 3bcc767 commit 01b31e1

File tree

11 files changed

+38
-27
lines changed

11 files changed

+38
-27
lines changed

Mathlib/Algebra/DirectSum/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def IsInternal {M S : Type*} [DecidableEq ι] [AddCommMonoid M] [SetLike S M]
375375

376376
theorem IsInternal.addSubmonoid_iSup_eq_top {M : Type*} [DecidableEq ι] [AddCommMonoid M]
377377
(A : ι → AddSubmonoid M) (h : IsInternal A) : iSup A = ⊤ := by
378-
rw [AddSubmonoid.iSup_eq_mrange_dfinsupp_sumAddHom, AddMonoidHom.mrange_eq_top_iff_surjective]
378+
rw [AddSubmonoid.iSup_eq_mrange_dfinsupp_sumAddHom, AddMonoidHom.mrange_eq_top]
379379
exact Function.Bijective.surjective h
380380

381381
variable {M S : Type*} [AddCommMonoid M] [SetLike S M] [AddSubmonoidClass S M]

Mathlib/Algebra/Group/Subgroup/Ker.lean

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ lemma rangeRestrict_injective_iff {f : G →* N} : Injective f.rangeRestrict ↔
117117
theorem map_range (g : N →* P) (f : G →* N) : f.range.map g = (g.comp f).range := by
118118
rw [range_eq_map, range_eq_map]; exact (⊤ : Subgroup G).map_map g f
119119

120+
@[to_additive]
121+
lemma range_comp (g : N →* P) (f : G →* N) : (g.comp f).range = f.range.map g := (map_range ..).symm
122+
120123
@[to_additive]
121124
theorem range_eq_top {N} [Group N] {f : G →* N} :
122125
f.range = (⊤ : Subgroup N) ↔ Function.Surjective f :=
@@ -138,10 +141,11 @@ theorem range_one : (1 : G →* N).range = ⊥ :=
138141
SetLike.ext fun x => by simpa using @comm _ (· = ·) _ 1 x
139142

140143
@[to_additive (attr := simp)]
141-
theorem _root_.Subgroup.subtype_range (H : Subgroup G) : H.subtype.range = H := by
142-
rw [range_eq_map, ← SetLike.coe_set_eq, coe_map, Subgroup.coeSubtype]
143-
ext
144-
simp
144+
theorem _root_.Subgroup.range_subtype (H : Subgroup G) : H.subtype.range = H :=
145+
SetLike.coe_injective <| (coe_range _).trans <| Subtype.range_coe
146+
147+
@[to_additive (attr := deprecated (since := "2024-11-26"))]
148+
alias _root_.Subgroup.subtype_range := Subgroup.range_subtype
145149

146150
@[to_additive (attr := simp)]
147151
theorem _root_.Subgroup.inclusion_range {H K : Subgroup G} (h_le : H ≤ K) :
@@ -368,7 +372,7 @@ theorem map_le_range (H : Subgroup G) : map f H ≤ f.range :=
368372

369373
@[to_additive]
370374
theorem map_subtype_le {H : Subgroup G} (K : Subgroup H) : K.map H.subtype ≤ H :=
371-
(K.map_le_range H.subtype).trans (le_of_eq H.subtype_range)
375+
(K.map_le_range H.subtype).trans_eq H.range_subtype
372376

373377
@[to_additive]
374378
theorem ker_le_comap (H : Subgroup N) : f.ker ≤ comap f H :=
@@ -466,7 +470,7 @@ theorem map_injective_of_ker_le {H K : Subgroup G} (hH : f.ker ≤ H) (hK : f.ke
466470
@[to_additive]
467471
theorem closure_preimage_eq_top (s : Set G) : closure ((closure s).subtype ⁻¹' s) = ⊤ := by
468472
apply map_injective (closure s).subtype_injective
469-
rw [MonoidHom.map_closure, ← MonoidHom.range_eq_map, subtype_range,
473+
rw [MonoidHom.map_closure, ← MonoidHom.range_eq_map, range_subtype,
470474
Set.image_preimage_eq_of_subset]
471475
rw [coeSubtype, Subtype.range_coe_subtype]
472476
exact subset_closure
@@ -487,7 +491,8 @@ theorem comap_sup_eq (H K : Subgroup N) (hf : Function.Surjective f) :
487491
@[to_additive]
488492
theorem sup_subgroupOf_eq {H K L : Subgroup G} (hH : H ≤ L) (hK : K ≤ L) :
489493
H.subgroupOf L ⊔ K.subgroupOf L = (H ⊔ K).subgroupOf L :=
490-
comap_sup_eq_of_le_range L.subtype (hH.trans L.subtype_range.ge) (hK.trans L.subtype_range.ge)
494+
comap_sup_eq_of_le_range L.subtype (hH.trans_eq L.range_subtype.symm)
495+
(hK.trans_eq L.range_subtype.symm)
491496

492497
@[to_additive]
493498
theorem codisjoint_subgroupOf_sup (H K : Subgroup G) :
@@ -501,7 +506,7 @@ theorem subgroupOf_sup (A A' B : Subgroup G) (hA : A ≤ B) (hA' : A' ≤ B) :
501506
refine
502507
map_injective_of_ker_le B.subtype (ker_le_comap _ _)
503508
(le_trans (ker_le_comap B.subtype _) le_sup_left) ?_
504-
simp only [subgroupOf, map_comap_eq, map_sup, subtype_range]
509+
simp only [subgroupOf, map_comap_eq, map_sup, range_subtype]
505510
rw [inf_of_le_right (sup_le hA hA'), inf_of_le_right hA', inf_of_le_right hA]
506511

507512
end Subgroup

Mathlib/Algebra/Group/Submonoid/Membership.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ open MonoidHom
543543
@[to_additive]
544544
theorem sup_eq_range (s t : Submonoid N) : s ⊔ t = mrange (s.subtype.coprod t.subtype) := by
545545
rw [mrange_eq_map, ← mrange_inl_sup_mrange_inr, map_sup, map_mrange, coprod_comp_inl, map_mrange,
546-
coprod_comp_inr, range_subtype, range_subtype]
546+
coprod_comp_inr, mrange_subtype, mrange_subtype]
547547

548548
@[to_additive]
549549
theorem mem_sup {s t : Submonoid N} {x : N} : x ∈ s ⊔ t ↔ ∃ y ∈ s, ∃ z ∈ t, y * z = x := by

Mathlib/Algebra/Group/Submonoid/Operations.lean

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,10 @@ theorem coe_mrange (f : F) : (mrange f : Set N) = Set.range f :=
628628
theorem mem_mrange {f : F} {y : N} : y ∈ mrange f ↔ ∃ x, f x = y :=
629629
Iff.rfl
630630

631+
@[to_additive]
632+
lemma mrange_comp {O : Type*} [Monoid O] (f : N →* O) (g : M →* N) :
633+
mrange (f.comp g) = (mrange g).map f := SetLike.coe_injective <| Set.range_comp f _
634+
631635
@[to_additive]
632636
theorem mrange_eq_map (f : F) : mrange f = (⊤ : Submonoid M).map f :=
633637
Submonoid.copy_eq _
@@ -641,18 +645,18 @@ theorem map_mrange (g : N →* P) (f : M →* N) : f.mrange.map g = mrange (comp
641645
simpa only [mrange_eq_map] using (⊤ : Submonoid M).map_map g f
642646

643647
@[to_additive]
644-
theorem mrange_eq_top_iff_surjective {f : F} : mrange f = (⊤ : Submonoid N) ↔ Surjective f :=
648+
theorem mrange_eq_top {f : F} : mrange f = (⊤ : Submonoid N) ↔ Surjective f :=
645649
SetLike.ext'_iff.trans <| Iff.trans (by rw [coe_mrange, coe_top]) Set.range_eq_univ
646650

647651
@[deprecated (since := "2024-11-11")]
648-
alias mrange_top_iff_surjective := mrange_eq_top_iff_surjective
652+
alias mrange_top_iff_surjective := mrange_eq_top
649653

650654
/-- The range of a surjective monoid hom is the whole of the codomain. -/
651655
@[to_additive (attr := simp)
652656
"The range of a surjective `AddMonoid` hom is the whole of the codomain."]
653657
theorem mrange_eq_top_of_surjective (f : F) (hf : Function.Surjective f) :
654658
mrange f = (⊤ : Submonoid N) :=
655-
mrange_eq_top_iff_surjective.2 hf
659+
mrange_eq_top.2 hf
656660

657661
@[deprecated (since := "2024-11-11")] alias mrange_top_of_surjective := mrange_eq_top_of_surjective
658662

@@ -863,9 +867,11 @@ def inclusion {S T : Submonoid M} (h : S ≤ T) : S →* T :=
863867
S.subtype.codRestrict _ fun x => h x.2
864868

865869
@[to_additive (attr := simp)]
866-
theorem range_subtype (s : Submonoid M) : mrange s.subtype = s :=
870+
theorem mrange_subtype (s : Submonoid M) : mrange s.subtype = s :=
867871
SetLike.coe_injective <| (coe_mrange _).trans <| Subtype.range_coe
868872

873+
@[to_additive (attr := deprecated (since := "2024-11-25"))] alias range_subtype := mrange_subtype
874+
869875
@[to_additive]
870876
theorem eq_top_iff' : S = ⊤ ↔ ∀ x : M, x ∈ S :=
871877
eq_top_iff.trans ⟨fun h m => h <| mem_top m, fun h m _ => h m⟩

Mathlib/GroupTheory/Congruence/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ variable (x y : M)
173173
@[to_additive (attr := simp)]
174174
-- Porting note: removed dot notation
175175
theorem mrange_mk' : MonoidHom.mrange c.mk' = ⊤ :=
176-
MonoidHom.mrange_eq_top_iff_surjective.2 mk'_surjective
176+
MonoidHom.mrange_eq_top.2 mk'_surjective
177177

178178
variable {f : M →* P}
179179

Mathlib/GroupTheory/Finiteness.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ theorem Submonoid.FG.map_injective {M' : Type*} [Monoid M'] {P : Submonoid M} (e
138138

139139
@[to_additive (attr := simp)]
140140
theorem Monoid.fg_iff_submonoid_fg (N : Submonoid M) : Monoid.FG N ↔ N.FG := by
141-
conv_rhs => rw [← N.range_subtype, MonoidHom.mrange_eq_map]
141+
conv_rhs => rw [← N.mrange_subtype, MonoidHom.mrange_eq_map]
142142
exact ⟨fun h => h.out.map N.subtype, fun h => ⟨h.map_injective N.subtype Subtype.coe_injective⟩⟩
143143

144144
@[to_additive]
@@ -148,7 +148,7 @@ theorem Monoid.fg_of_surjective {M' : Type*} [Monoid M'] [Monoid.FG M] (f : M
148148
obtain ⟨s, hs⟩ := Monoid.fg_def.mp ‹_›
149149
use s.image f
150150
rwa [Finset.coe_image, ← MonoidHom.map_mclosure, hs, ← MonoidHom.mrange_eq_map,
151-
MonoidHom.mrange_eq_top_iff_surjective]
151+
MonoidHom.mrange_eq_top]
152152

153153
@[to_additive]
154154
instance Monoid.fg_range {M' : Type*} [Monoid M'] [Monoid.FG M] (f : M →* M') :

Mathlib/GroupTheory/Index.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ theorem index_comap (f : G' →* G) :
8080
@[to_additive]
8181
theorem relindex_comap (f : G' →* G) (K : Subgroup G') :
8282
relindex (comap f H) K = relindex H (map f K) := by
83-
rw [relindex, subgroupOf, comap_comap, index_comap, ← f.map_range, K.subtype_range]
83+
rw [relindex, subgroupOf, comap_comap, index_comap, ← f.map_range, K.range_subtype]
8484

8585
variable {H K L}
8686

@@ -262,7 +262,7 @@ theorem index_map_of_injective {f : G →* G'} (hf : Function.Injective f) :
262262
@[to_additive]
263263
theorem index_map_subtype {H : Subgroup G} (K : Subgroup H) :
264264
(K.map H.subtype).index = K.index * H.index := by
265-
rw [K.index_map_of_injective H.subtype_injective, H.subtype_range]
265+
rw [K.index_map_of_injective H.subtype_injective, H.range_subtype]
266266

267267
@[to_additive]
268268
theorem index_eq_card : H.index = Nat.card (G ⧸ H) :=

Mathlib/GroupTheory/PGroup.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ theorem to_inf_right {H K : Subgroup G} (hK : IsPGroup p K) : IsPGroup p (H ⊓
240240

241241
theorem map {H : Subgroup G} (hH : IsPGroup p H) {K : Type*} [Group K] (ϕ : G →* K) :
242242
IsPGroup p (H.map ϕ) := by
243-
rw [← H.subtype_range, MonoidHom.map_range]
243+
rw [← H.range_subtype, MonoidHom.map_range]
244244
exact hH.of_surjective (ϕ.restrict H).rangeRestrict (ϕ.restrict H).rangeRestrict_surjective
245245

246246
theorem comap_of_ker_isPGroup {H : Subgroup G} (hH : IsPGroup p H) {K : Type*} [Group K]

Mathlib/GroupTheory/SchurZassenhaus.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private theorem step1 (K : Subgroup G) (hK : K ⊔ N = ⊤) : K = ⊤ := by
174174
replace hH : Nat.card (H.map K.subtype) = N.index := by
175175
rw [← relindex_bot_left, ← relindex_comap, MonoidHom.comap_bot, Subgroup.ker_subtype,
176176
relindex_bot_left, ← IsComplement'.index_eq_card (IsComplement'.symm hH), index_comap,
177-
subtype_range, ← relindex_sup_right, hK, relindex_top_right]
177+
range_subtype, ← relindex_sup_right, hK, relindex_top_right]
178178
have h7 : Nat.card N * Nat.card (H.map K.subtype) = Nat.card G := by
179179
rw [hH, ← N.index_mul_card, mul_comm]
180180
have h8 : (Nat.card N).Coprime (Nat.card (H.map K.subtype)) := by
@@ -220,7 +220,7 @@ private theorem step3 (K : Subgroup N) [(K.map N.subtype).Normal] : K = ⊥ ∨
220220
conv at key =>
221221
rhs
222222
rhs
223-
rw [← N.subtype_range, N.subtype.range_eq_map]
223+
rw [← N.range_subtype, N.subtype.range_eq_map]
224224
have inj := map_injective N.subtype_injective
225225
rwa [inj.eq_iff, inj.eq_iff] at key
226226

@@ -239,7 +239,7 @@ include h2 in
239239
private theorem step6 : IsPGroup (Nat.card N).minFac N := by
240240
haveI : Fact (Nat.card N).minFac.Prime := ⟨step4 h1 h3⟩
241241
refine Sylow.nonempty.elim fun P => P.2.of_surjective P.1.subtype ?_
242-
rw [← MonoidHom.range_eq_top, subtype_range]
242+
rw [← MonoidHom.range_eq_top, range_subtype]
243243
haveI : (P.1.map N.subtype).Normal :=
244244
normalizer_eq_top.mp (step1 h1 h2 h3 (P.1.map N.subtype).normalizer P.normalizer_sup_eq_top)
245245
exact (step3 h1 h2 h3 P.1).resolve_left (step5 h1 h3)

Mathlib/GroupTheory/SpecificGroups/Alternating.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ theorem IsThreeCycle.alternating_normalClosure (h5 : 5 ≤ Fintype.card α) {f :
168168
(by
169169
have hi : Function.Injective (alternatingGroup α).subtype := Subtype.coe_injective
170170
refine eq_top_iff.1 (map_injective hi (le_antisymm (map_mono le_top) ?_))
171-
rw [← MonoidHom.range_eq_map, subtype_range, normalClosure, MonoidHom.map_closure]
171+
rw [← MonoidHom.range_eq_map, range_subtype, normalClosure, MonoidHom.map_closure]
172172
refine (le_of_eq closure_three_cycles_eq_alternating.symm).trans (closure_mono ?_)
173173
intro g h
174174
obtain ⟨c, rfl⟩ := isConj_iff.1 (isConj_iff_cycleType_eq.2 (hf.trans h.symm))

0 commit comments

Comments
 (0)