Skip to content

Commit

Permalink
feat: add dsimp lemma for SetLike (#18453)
Browse files Browse the repository at this point in the history
The analogous lemma for Set already exists
  • Loading branch information
sven-manthe committed Nov 4, 2024
1 parent 522e1ef commit fef6aa3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Mathlib/Algebra/Group/Subgroup/Pointwise.lean
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,11 @@ theorem smul_inf (a : α) (S T : Subgroup G) : a • (S ⊓ T) = a • S ⊓ a
def equivSMul (a : α) (H : Subgroup G) : H ≃* (a • H : Subgroup G) :=
(MulDistribMulAction.toMulEquiv G a).subgroupMap H

theorem subgroup_mul_singleton {H : Subgroup G} {h : G} (hh : h ∈ H) : (H : Set G) * {h} = H :=
suffices { x : G | x ∈ H } = ↑H by simpa [preimage, mul_mem_cancel_right (inv_mem hh)]
rfl
theorem subgroup_mul_singleton {H : Subgroup G} {h : G} (hh : h ∈ H) : (H : Set G) * {h} = H := by
simp [preimage, mul_mem_cancel_right (inv_mem hh)]

theorem singleton_mul_subgroup {H : Subgroup G} {h : G} (hh : h ∈ H) : {h} * (H : Set G) = H :=
suffices { x : G | x ∈ H } = ↑H by simpa [preimage, mul_mem_cancel_left (inv_mem hh)]
rfl
theorem singleton_mul_subgroup {H : Subgroup G} {h : G} (hh : h ∈ H) : {h} * (H : Set G) = H := by
simp [preimage, mul_mem_cancel_left (inv_mem hh)]

theorem Normal.conjAct {G : Type*} [Group G] {H : Subgroup G} (hH : H.Normal) (g : ConjAct G) :
g • H = H :=
Expand Down
2 changes: 2 additions & 0 deletions Mathlib/Data/SetLike/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ lemma mem_of_subset {s : Set B} (hp : s ⊆ p) {x : B} (hx : x ∈ s) : x ∈ p
-- Porting note: removed `@[simp]` because `simpNF` linter complained
protected theorem eta (x : p) (hx : (x : B) ∈ p) : (⟨x, hx⟩ : p) = x := rfl

@[simp] lemma setOf_mem_eq (a : A) : {b | b ∈ a} = a := rfl

instance (priority := 100) instPartialOrder : PartialOrder A :=
{ PartialOrder.lift (SetLike.coe : A → Set B) coe_injective with
le := fun H K => ∀ ⦃x⦄, x ∈ H → x ∈ K }
Expand Down

0 comments on commit fef6aa3

Please sign in to comment.