Skip to content

Commit b47d330

Browse files
committed
chore: replace SubgroupClass.inv by InvMemClass.inv (#9761)
1 parent 4d0b750 commit b47d330

File tree

6 files changed

+27
-20
lines changed

6 files changed

+27
-20
lines changed

Mathlib/Algebra/Module/Submodule/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ protected theorem add_mem_iff_right : x ∈ p → (x + y ∈ p ↔ y ∈ p) :=
457457
#align submodule.add_mem_iff_right Submodule.add_mem_iff_right
458458

459459
protected theorem coe_neg (x : p) : ((-x : p) : M) = -x :=
460-
AddSubgroupClass.coe_neg _
460+
NegMemClass.coe_neg _
461461
#align submodule.coe_neg Submodule.coe_neg
462462

463463
protected theorem coe_sub (x y : p) : (↑(x - y) : M) = ↑x - ↑y :=

Mathlib/Algebra/Module/Zlattice.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ theorem fundamentalDomain_isBounded [Finite ι] [HasSolidNorm K] :
244244

245245
theorem vadd_mem_fundamentalDomain [Fintype ι] (y : span ℤ (Set.range b)) (x : E) :
246246
y +ᵥ x ∈ fundamentalDomain b ↔ y = -floor b x := by
247-
rw [Subtype.ext_iff, ← add_right_inj x, AddSubgroupClass.coe_neg, ← sub_eq_add_neg, ← fract_apply,
247+
rw [Subtype.ext_iff, ← add_right_inj x, NegMemClass.coe_neg, ← sub_eq_add_neg, ← fract_apply,
248248
← fract_zspan_add b _ (Subtype.mem y), add_comm, ← vadd_eq_add, ← vadd_def, eq_comm, ←
249249
fract_eq_self]
250250
#align zspan.vadd_mem_fundamental_domain Zspan.vadd_mem_fundamentalDomain

Mathlib/Analysis/Convex/Cone/Extension.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ theorem step (nonneg : ∀ x : f.domain, (x : E) ∈ s → 0 ≤ f x)
7575
simpa only [Set.Nonempty, upperBounds, lowerBounds, ball_image_iff] using this
7676
refine' exists_between_of_forall_le (Nonempty.image f _) (Nonempty.image f (dense y)) _
7777
· rcases dense (-y) with ⟨x, hx⟩
78-
rw [← neg_neg x, AddSubgroupClass.coe_neg, ← sub_eq_add_neg] at hx
78+
rw [← neg_neg x, NegMemClass.coe_neg, ← sub_eq_add_neg] at hx
7979
exact ⟨_, hx⟩
8080
rintro a ⟨xn, hxn, rfl⟩ b ⟨xp, hxp, rfl⟩
8181
have := s.add_mem hxp hxn

Mathlib/Data/Complex/Module.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ theorem realPart_I_smul (a : A) : ℜ (I • a) = -ℑ a := by
472472
ext
473473
-- Porting note: was
474474
-- simp [smul_comm I, smul_sub, sub_eq_add_neg, add_comm]
475-
rw [realPart_apply_coe, AddSubgroupClass.coe_neg, imaginaryPart_apply_coe, neg_smul, neg_neg,
475+
rw [realPart_apply_coe, NegMemClass.coe_neg, imaginaryPart_apply_coe, neg_smul, neg_neg,
476476
smul_comm I, star_smul, star_def, conj_I, smul_sub, neg_smul, sub_eq_add_neg]
477477
set_option linter.uppercaseLean3 false in
478478
#align real_part_I_smul realPart_I_smul

Mathlib/GroupTheory/DoubleCoset.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ theorem doset_union_rightCoset (H K : Subgroup G) (a : G) :
178178
constructor
179179
· rintro ⟨y, h_h⟩
180180
refine' ⟨x * (y⁻¹ * a⁻¹), h_h, y, y.2, _⟩
181-
simp only [← mul_assoc, Subgroup.coe_mk, inv_mul_cancel_right, SubgroupClass.coe_inv]
181+
simp only [← mul_assoc, Subgroup.coe_mk, inv_mul_cancel_right, InvMemClass.coe_inv]
182182
· rintro ⟨x, hx, y, hy, hxy⟩
183183
refine' ⟨⟨y, hy⟩, _⟩
184184
simp only [hxy, ← mul_assoc, hx, mul_inv_cancel_right, Subgroup.coe_mk]
@@ -191,7 +191,7 @@ theorem doset_union_leftCoset (H K : Subgroup G) (a : G) :
191191
constructor
192192
· rintro ⟨y, h_h⟩
193193
refine' ⟨y, y.2, a⁻¹ * y⁻¹ * x, h_h, _⟩
194-
simp only [← mul_assoc, one_mul, mul_right_inv, mul_inv_cancel_right, SubgroupClass.coe_inv]
194+
simp only [← mul_assoc, one_mul, mul_right_inv, mul_inv_cancel_right, InvMemClass.coe_inv]
195195
· rintro ⟨x, hx, y, hy, hxy⟩
196196
refine' ⟨⟨x, hx⟩, _⟩
197197
simp only [hxy, ← mul_assoc, hy, one_mul, mul_left_inv, Subgroup.coe_mk, inv_mul_cancel_right]

Mathlib/GroupTheory/Subgroup/Basic.lean

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,29 @@ theorem mul_mem_cancel_left {x y : G} (h : x ∈ H) : x * y ∈ H ↔ y ∈ H :=
187187
#align mul_mem_cancel_left mul_mem_cancel_left
188188
#align add_mem_cancel_left add_mem_cancel_left
189189

190+
namespace InvMemClass
191+
192+
/-- A subgroup of a group inherits an inverse. -/
193+
@[to_additive "An additive subgroup of an `AddGroup` inherits an inverse."]
194+
instance inv {G : Type u_1} {S : Type u_2} [Inv G] [SetLike S G]
195+
[InvMemClass S G] {H : S} : Inv H :=
196+
fun a => ⟨a⁻¹, inv_mem a.2⟩⟩
197+
#align subgroup_class.has_inv InvMemClass.inv
198+
#align add_subgroup_class.has_neg NegMemClass.neg
199+
200+
@[to_additive (attr := simp, norm_cast)]
201+
theorem coe_inv (x : H) : (x⁻¹).1 = x.1⁻¹ :=
202+
rfl
203+
#align subgroup_class.coe_inv InvMemClass.coe_inv
204+
#align add_subgroup_class.coe_neg NegMemClass.coe_neg
205+
206+
end InvMemClass
207+
190208
namespace SubgroupClass
191209

210+
-- deprecated since 15 January 2024
211+
@[to_additive (attr := deprecated)] alias coe_inv := InvMemClass.coe_inv
212+
192213
-- Here we assume H, K, and L are subgroups, but in fact any one of them
193214
-- could be allowed to be a subsemigroup.
194215
-- Counterexample where K and L are submonoids: H = ℤ, K = ℕ, L = -ℕ
@@ -201,14 +222,6 @@ theorem subset_union {H K L : S} : (H : Set G) ⊆ K ∪ L ↔ H ≤ K ∨ H ≤
201222
((h yH).resolve_left fun yK ↦ xK <| (mul_mem_cancel_right yK).mp ·)
202223
(mul_mem_cancel_left <| (h xH).resolve_left xK).mp
203224

204-
/-- A subgroup of a group inherits an inverse. -/
205-
@[to_additive "An additive subgroup of an `AddGroup` inherits an inverse."]
206-
instance inv {G : Type u_1} {S : Type u_2} [DivInvMonoid G] [SetLike S G]
207-
[SubgroupClass S G] {H : S} : Inv H :=
208-
fun a => ⟨a⁻¹, inv_mem a.2⟩⟩
209-
#align subgroup_class.has_inv SubgroupClass.inv
210-
#align add_subgroup_class.has_neg AddSubgroupClass.neg
211-
212225
/-- A subgroup of a group inherits a division -/
213226
@[to_additive "An additive subgroup of an `AddGroup` inherits a subtraction."]
214227
instance div {G : Type u_1} {S : Type u_2} [DivInvMonoid G] [SetLike S G]
@@ -230,12 +243,6 @@ instance zpow {M S} [DivInvMonoid M] [SetLike S M] [SubgroupClass S M] {H : S} :
230243
#align subgroup_class.has_zpow SubgroupClass.zpow
231244
-- Porting note: additive align statement is given above
232245

233-
@[to_additive (attr := simp, norm_cast)]
234-
theorem coe_inv (x : H) : (x⁻¹).1 = x.1⁻¹ :=
235-
rfl
236-
#align subgroup_class.coe_inv SubgroupClass.coe_inv
237-
#align add_subgroup_class.coe_neg AddSubgroupClass.coe_neg
238-
239246
@[to_additive (attr := simp, norm_cast)]
240247
theorem coe_div (x y : H) : (x / y).1 = x.1 / y.1 :=
241248
rfl

0 commit comments

Comments
 (0)