Skip to content

Commit

Permalink
refactor(QuotientGroup): Generalize some things to Monoids (#6804)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHughes24 committed Aug 26, 2023
1 parent 0beb1d0 commit c39c6f7
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Mathlib/GroupTheory/QuotientGroup.lean
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ isomorphism theorems, quotient groups

open Function

universe u v w
universe u v w x

namespace QuotientGroup

variable {G : Type u} [Group G] (N : Subgroup G) [nN : N.Normal] {H : Type v} [Group H]
{M : Type x} [Monoid M]

/-- The congruence relation generated by a normal subgroup. -/
@[to_additive "The additive congruence relation generated by a normal additive subgroup."]
Expand Down Expand Up @@ -110,7 +111,7 @@ See note [partially-applied ext lemmas]. -/
their compositions with `AddQuotientGroup.mk'` are equal.
See note [partially-applied ext lemmas]. "]
theorem monoidHom_ext ⦃f g : G ⧸ N →* H⦄ (h : f.comp (mk' N) = g.comp (mk' N)) : f = g :=
theorem monoidHom_ext ⦃f g : G ⧸ N →* M⦄ (h : f.comp (mk' N) = g.comp (mk' N)) : f = g :=
MonoidHom.ext fun x => QuotientGroup.induction_on x <| (FunLike.congr_fun h : _)
#align quotient_group.monoid_hom_ext QuotientGroup.monoidHom_ext
#align quotient_add_group.add_monoid_hom_ext QuotientAddGroup.addMonoidHom_ext
Expand Down Expand Up @@ -190,11 +191,11 @@ theorem mk_zpow (a : G) (n : ℤ) : ((a ^ n : G) : Q ) = (a : Q) ^ n :=
#align quotient_group.coe_zpow QuotientGroup.mk_zpow
#align quotient_add_group.coe_zsmul QuotientAddGroup.mk_zsmul

/-- A group homomorphism `φ : G →* H` with `N ⊆ ker(φ)` descends (i.e. `lift`s) to a
group homomorphism `G/N →* H`. -/
@[to_additive "An `AddGroup` homomorphism `φ : G →+ H` with `N ⊆ ker(φ)` descends (i.e. `lift`s)
to a group homomorphism `G/N →* H`."]
def lift (φ : G →* H) (HN : ∀ x ∈ N, φ x = 1) : Q →* H :=
/-- A group homomorphism `φ : G →* M` with `N ⊆ ker(φ)` descends (i.e. `lift`s) to a
group homomorphism `G/N →* M`. -/
@[to_additive "An `AddGroup` homomorphism `φ : G →+ M` with `N ⊆ ker(φ)` descends (i.e. `lift`s)
to a group homomorphism `G/N →* M`."]
def lift (φ : G →* M) (HN : ∀ x ∈ N, φ x = 1) : Q →* M :=
(QuotientGroup.con N).lift φ fun x y h => by
simp only [QuotientGroup.con, leftRel_apply, Con.rel_mk] at h
rw [Con.ker_rel]
Expand All @@ -205,20 +206,20 @@ def lift (φ : G →* H) (HN : ∀ x ∈ N, φ x = 1) : Q →* H :=
#align quotient_add_group.lift QuotientAddGroup.lift

@[to_additive (attr := simp)]
theorem lift_mk {φ : G →* H} (HN : ∀ x ∈ N, φ x = 1) (g : G) : lift N φ HN (g : Q ) = φ g :=
theorem lift_mk {φ : G →* M} (HN : ∀ x ∈ N, φ x = 1) (g : G) : lift N φ HN (g : Q ) = φ g :=
rfl
#align quotient_group.lift_mk QuotientGroup.lift_mk
#align quotient_add_group.lift_mk QuotientAddGroup.lift_mk

@[to_additive (attr := simp)]
theorem lift_mk' {φ : G →* H} (HN : ∀ x ∈ N, φ x = 1) (g : G) : lift N φ HN (mk g : Q ) = φ g :=
theorem lift_mk' {φ : G →* M} (HN : ∀ x ∈ N, φ x = 1) (g : G) : lift N φ HN (mk g : Q ) = φ g :=
rfl
-- TODO: replace `mk` with `mk'`)
#align quotient_group.lift_mk' QuotientGroup.lift_mk'
#align quotient_add_group.lift_mk' QuotientAddGroup.lift_mk'

@[to_additive (attr := simp)]
theorem lift_quot_mk {φ : G →* H} (HN : ∀ x ∈ N, φ x = 1) (g : G) :
theorem lift_quot_mk {φ : G →* M} (HN : ∀ x ∈ N, φ x = 1) (g : G) :
lift N φ HN (Quot.mk _ g : Q ) = φ g :=
rfl
#align quotient_group.lift_quot_mk QuotientGroup.lift_quot_mk
Expand Down

0 comments on commit c39c6f7

Please sign in to comment.