@@ -177,9 +177,10 @@ namespace SubgroupClass
177177-- Counterexample where K and L are submonoids: H = ℤ, K = ℕ, L = -ℕ
178178-- Counterexample where H and K are submonoids: H = {n | n = 0 ∨ 3 ≤ n}, K = 3ℕ + 4ℕ, L = 5ℤ
179179@[to_additive]
180- theorem subset_union {H K L : S} : (H : Set G) ⊆ K ∪ L ↔ H ≤ K ∨ H ≤ L := by
181- refine ⟨fun h ↦ ?_, fun h x xH ↦ h.imp (· xH) (· xH)⟩
182- rw [or_iff_not_imp_left, SetLike.not_le_iff_exists]
180+ theorem subset_union [LE S] [IsConcreteLE S G] {H K L : S} :
181+ (H : Set G) ⊆ K ∪ L ↔ H ≤ K ∨ H ≤ L := by
182+ refine ⟨fun h ↦ ?_, fun h x xH ↦ h.imp (mem_of_le_of_mem · xH) (mem_of_le_of_mem · xH)⟩
183+ rw [or_iff_not_imp_left, SetLike.not_le_iff_exists, ← SetLike.coe_subset_coe]
183184 exact fun ⟨x, xH, xK⟩ y yH ↦ (h <| mul_mem xH yH).elim
184185 ((h yH).resolve_left fun yK ↦ xK <| (mul_mem_cancel_right yK).mp ·)
185186 (mul_mem_cancel_left <| (h xH).resolve_left xK).mp
@@ -253,35 +254,40 @@ theorem coe_zpow (x : H) (n : ℤ) : ((x ^ n : H) : G) = (x : G) ^ n :=
253254/-- The inclusion homomorphism from a subgroup `H` contained in `K` to `K`. -/
254255@ [to_additive
255256/-- The inclusion homomorphism from an additive subgroup `H` contained in `K` to `K`. -/ ]
256- def inclusion {H K : S} (h : H ≤ K) : H →* K :=
257- MonoidHom.mk' (fun x => ⟨x, h x.prop⟩) fun _ _ => rfl
257+ def inclusion [LE S] [IsConcreteLE S G] {H K : S} (h : H ≤ K) : H →* K :=
258+ MonoidHom.mk' (fun x => ⟨x, mem_of_le_of_mem h x.prop⟩) fun _ _ => rfl
258259
259260@ [to_additive (attr := simp)]
260- theorem inclusion_self (x : H) : inclusion le_rfl x = x := by
261+ theorem inclusion_self [Preorder S] [IsConcreteLE S G] (x : H) : inclusion le_rfl x = x := by
261262 cases x
262263 rfl
263264
264265@ [to_additive (attr := simp)]
265- theorem inclusion_mk {h : H ≤ K} (x : G) (hx : x ∈ H) : inclusion h ⟨x, hx⟩ = ⟨x, h hx⟩ :=
266+ theorem inclusion_mk [LE S] [IsConcreteLE S G] {h : H ≤ K} (x : G) (hx : x ∈ H) :
267+ inclusion h ⟨x, hx⟩ = ⟨x, mem_of_le_of_mem h hx⟩ :=
266268 rfl
267269
268270@[to_additive]
269- theorem inclusion_right (h : H ≤ K) (x : K) (hx : (x : G) ∈ H) : inclusion h ⟨x, hx⟩ = x := by
271+ theorem inclusion_right [LE S] [IsConcreteLE S G] (h : H ≤ K) (x : K) (hx : (x : G) ∈ H) :
272+ inclusion h ⟨x, hx⟩ = x := by
270273 cases x
271274 rfl
272275
273276@[simp]
274- theorem inclusion_inclusion {L : S} (hHK : H ≤ K) (hKL : K ≤ L) (x : H) :
277+ theorem inclusion_inclusion [Preorder S] [IsConcreteLE S G]
278+ {L : S} (hHK : H ≤ K) (hKL : K ≤ L) (x : H) :
275279 inclusion hKL (inclusion hHK x) = inclusion (hHK.trans hKL) x := by
276280 cases x
277281 rfl
278282
279283@ [to_additive (attr := simp)]
280- theorem coe_inclusion {H K : S} (h : H ≤ K) (a : H) : (inclusion h a : G) = a :=
281- Set.coe_inclusion h a
284+ theorem coe_inclusion [LE S] [IsConcreteLE S G]
285+ {H K : S} (h : H ≤ K) (a : H) : (inclusion h a : G) = a :=
286+ Set.coe_inclusion (SetLike.GCongr.coe_subset_coe h) a
282287
283288@ [to_additive (attr := simp)]
284- theorem subtype_comp_inclusion {H K : S} (h : H ≤ K) :
289+ theorem subtype_comp_inclusion [LE S] [IsConcreteLE S G]
290+ {H K : S} (h : H ≤ K) :
285291 (SubgroupClass.subtype K).comp (inclusion h) = SubgroupClass.subtype H :=
286292 rfl
287293
@@ -319,6 +325,8 @@ instance : SetLike (Subgroup G) G where
319325 obtain ⟨⟨⟨hq, _⟩, _⟩, _⟩ := q
320326 congr
321327
328+ @[to_additive] instance : PartialOrder (Subgroup G) := .ofSetLike (Subgroup G) G
329+
322330initialize_simps_projections Subgroup (carrier → coe, as_prefix coe)
323331initialize_simps_projections AddSubgroup (carrier → coe, as_prefix coe)
324332
0 commit comments