Skip to content

Commit

Permalink
feat(group_theory/subgroup/basic): generalize monoid_hom.eq_locus (#…
Browse files Browse the repository at this point in the history
…17748)

Only assume that the codomain is a `monoid`. Also rename `monoid_hom.gclosure_preimage_le` to `monoid_hom.closure_preimage_le`.
  • Loading branch information
urkud committed Nov 29, 2022
1 parent fc6ece0 commit 4f81077
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/group_theory/subgroup/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2147,30 +2147,36 @@ instance normal_ker (f : G →* M) : f.ker.normal :=

end ker

section eq_locus

variables {M : Type*} [monoid M]

/-- The subgroup of elements `x : G` such that `f x = g x` -/
@[to_additive "The additive subgroup of elements `x : G` such that `f x = g x`"]
def eq_locus (f g : G →* N) : subgroup G :=
{ inv_mem' := λ x (hx : f x = g x), show f x⁻¹ = g x⁻¹, by rw [f.map_inv, g.map_inv, hx],
def eq_locus (f g : G →* M) : subgroup G :=
{ inv_mem' := λ x, eq_on_inv f g,
.. eq_mlocus f g}

/-- If two monoid homomorphisms are equal on a set, then they are equal on its subgroup closure. -/
@[to_additive "If two monoid homomorphisms are equal on a set, then they are equal on its subgroup
closure."]
lemma eq_on_closure {f g : G →* N} {s : set G} (h : set.eq_on f g s) : set.eq_on f g (closure s) :=
lemma eq_on_closure {f g : G →* M} {s : set G} (h : set.eq_on f g s) : set.eq_on f g (closure s) :=
show closure s ≤ f.eq_locus g, from (closure_le _).2 h

@[to_additive]
lemma eq_of_eq_on_top {f g : G →* N} (h : set.eq_on f g (⊤ : subgroup G)) :
lemma eq_of_eq_on_top {f g : G →* M} (h : set.eq_on f g (⊤ : subgroup G)) :
f = g :=
ext $ λ x, h trivial

@[to_additive]
lemma eq_of_eq_on_dense {s : set G} (hs : closure s = ⊤) {f g : G →* N} (h : s.eq_on f g) :
lemma eq_of_eq_on_dense {s : set G} (hs : closure s = ⊤) {f g : G →* M} (h : s.eq_on f g) :
f = g :=
eq_of_eq_on_top $ hs ▸ eq_on_closure h

end eq_locus

@[to_additive]
lemma gclosure_preimage_le (f : G →* N) (s : set N) :
lemma closure_preimage_le (f : G →* N) (s : set N) :
closure (f ⁻¹' s) ≤ (closure s).comap f :=
(closure_le _).2 $ λ x hx, by rw [set_like.mem_coe, mem_comap]; exact subset_closure hx

Expand Down

0 comments on commit 4f81077

Please sign in to comment.