@@ -187,8 +187,29 @@ theorem mul_mem_cancel_left {x y : G} (h : x ∈ H) : x * y ∈ H ↔ y ∈ H :=
187
187
#align mul_mem_cancel_left mul_mem_cancel_left
188
188
#align add_mem_cancel_left add_mem_cancel_left
189
189
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
+
190
208
namespace SubgroupClass
191
209
210
+ -- deprecated since 15 January 2024
211
+ @[to_additive (attr := deprecated)] alias coe_inv := InvMemClass.coe_inv
212
+
192
213
-- Here we assume H, K, and L are subgroups, but in fact any one of them
193
214
-- could be allowed to be a subsemigroup.
194
215
-- 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 ≤
201
222
((h yH).resolve_left fun yK ↦ xK <| (mul_mem_cancel_right yK).mp ·)
202
223
(mul_mem_cancel_left <| (h xH).resolve_left xK).mp
203
224
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
-
212
225
/-- A subgroup of a group inherits a division -/
213
226
@[to_additive "An additive subgroup of an `AddGroup` inherits a subtraction."]
214
227
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} :
230
243
#align subgroup_class.has_zpow SubgroupClass.zpow
231
244
-- Porting note: additive align statement is given above
232
245
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
-
239
246
@[to_additive (attr := simp, norm_cast)]
240
247
theorem coe_div (x y : H) : (x / y).1 = x.1 / y.1 :=
241
248
rfl
0 commit comments