File: Mathlib/Algebra/Group/Subsemigroup/Operations.lean

full_name: Subsemigroup.toAddSubsemigroup_apply_coe
code: /-- Subsemigroups of semigroup `M` are isomorphic to additive subsemigroups of `Additive M`. -/
@[simps]
def Subsemigroup.toAddSubsemigroup : Subsemigroup M ≃o AddSubsemigroup (Additive M) 
goal: ↑(Subsemigroup.toAddSubsemigroup S) = ⇑Additive.toMul ⁻¹' ↑S

full_name: Subsemigroup.toAddSubsemigroup
code: /-- Subsemigroups of semigroup `M` are isomorphic to additive subsemigroups of `Additive M`. -/
@[simps]
def Subsemigroup.toAddSubsemigroup : Subsemigroup M ≃o AddSubsemigroup (Additive M) 
goal: Subsemigroup M ≃o AddSubsemigroup (Additive M)

full_name: Subsemigroup.toAddSubsemigroup_symm_apply_coe
code: /-- Subsemigroups of semigroup `M` are isomorphic to additive subsemigroups of `Additive M`. -/
@[simps]
def Subsemigroup.toAddSubsemigroup : Subsemigroup M ≃o AddSubsemigroup (Additive M) 
goal: ↑((RelIso.symm Subsemigroup.toAddSubsemigroup) S) = ⇑Additive.ofMul ⁻¹' ↑S

full_name: AddSubsemigroup.toSubsemigroup'
code: /-- Additive subsemigroups of an additive semigroup `Additive M` are isomorphic to subsemigroups
of `M`. -/
abbrev AddSubsemigroup.toSubsemigroup' : AddSubsemigroup (Additive M) ≃o Subsemigroup M 
goal: AddSubsemigroup (Additive M) ≃o Subsemigroup M

full_name: Subsemigroup.toAddSubsemigroup_closure
code: theorem Subsemigroup.toAddSubsemigroup_closure (S : Set M) :
    Subsemigroup.toAddSubsemigroup (Subsemigroup.closure S) =
    AddSubsemigroup.closure (Additive.toMul ⁻¹' S) 
goal: Subsemigroup.toAddSubsemigroup (Subsemigroup.closure S) = AddSubsemigroup.closure (⇑Additive.toMul ⁻¹' S)

full_name: AddSubsemigroup.toSubsemigroup'_closure
code: theorem AddSubsemigroup.toSubsemigroup'_closure (S : Set (Additive M)) :
    AddSubsemigroup.toSubsemigroup' (AddSubsemigroup.closure S) =
      Subsemigroup.closure (Additive.ofMul ⁻¹' S) 
goal: AddSubsemigroup.toSubsemigroup' (AddSubsemigroup.closure S) = Subsemigroup.closure (⇑Additive.ofMul ⁻¹' S)

full_name: AddSubsemigroup.toSubsemigroup_apply_coe
code: /-- Additive subsemigroups of an additive semigroup `A` are isomorphic to
multiplicative subsemigroups of `Multiplicative A`. -/
@[simps]
def AddSubsemigroup.toSubsemigroup : AddSubsemigroup A ≃o Subsemigroup (Multiplicative A) 
goal: ↑(AddSubsemigroup.toSubsemigroup S) = ⇑Multiplicative.toAdd ⁻¹' ↑S

full_name: AddSubsemigroup.toSubsemigroup_symm_apply_coe
code: /-- Additive subsemigroups of an additive semigroup `A` are isomorphic to
multiplicative subsemigroups of `Multiplicative A`. -/
@[simps]
def AddSubsemigroup.toSubsemigroup : AddSubsemigroup A ≃o Subsemigroup (Multiplicative A) 
goal: ↑((RelIso.symm AddSubsemigroup.toSubsemigroup) S) = ⇑Multiplicative.ofAdd ⁻¹' ↑S

full_name: AddSubsemigroup.toSubsemigroup
code: /-- Additive subsemigroups of an additive semigroup `A` are isomorphic to
multiplicative subsemigroups of `Multiplicative A`. -/
@[simps]
def AddSubsemigroup.toSubsemigroup : AddSubsemigroup A ≃o Subsemigroup (Multiplicative A) 
goal: AddSubsemigroup A ≃o Subsemigroup (Multiplicative A)

full_name: Subsemigroup.toAddSubsemigroup'
code: /-- Subsemigroups of a semigroup `Multiplicative A` are isomorphic to additive subsemigroups
of `A`. -/
abbrev Subsemigroup.toAddSubsemigroup' : Subsemigroup (Multiplicative A) ≃o AddSubsemigroup A 
goal: Subsemigroup (Multiplicative A) ≃o AddSubsemigroup A

full_name: AddSubsemigroup.toSubsemigroup_closure
code: theorem AddSubsemigroup.toSubsemigroup_closure (S : Set A) :
    AddSubsemigroup.toSubsemigroup (AddSubsemigroup.closure S) =
      Subsemigroup.closure (Multiplicative.toAdd ⁻¹' S) 
goal: AddSubsemigroup.toSubsemigroup (AddSubsemigroup.closure S) = Subsemigroup.closure (⇑Multiplicative.toAdd ⁻¹' S)

full_name: Subsemigroup.toAddSubsemigroup'_closure
code: theorem Subsemigroup.toAddSubsemigroup'_closure (S : Set (Multiplicative A)) :
    Subsemigroup.toAddSubsemigroup' (Subsemigroup.closure S) =
      AddSubsemigroup.closure (Multiplicative.ofAdd ⁻¹' S) 
goal: Subsemigroup.toAddSubsemigroup' (Subsemigroup.closure S) = AddSubsemigroup.closure (⇑Multiplicative.ofAdd ⁻¹' S)

full_name: Subsemigroup.comap
code: /-- The preimage of a subsemigroup along a semigroup homomorphism is a subsemigroup. -/
@[to_additive
      "The preimage of an `AddSubsemigroup` along an `AddSemigroup` homomorphism is an
      `AddSubsemigroup`."]
def comap (f : M →ₙ* N) (S : Subsemigroup N) :
    Subsemigroup M 
goal: Subsemigroup M

full_name: AddSubsemigroup.comap
code: /-- The preimage of a subsemigroup along a semigroup homomorphism is a subsemigroup. -/
@[to_additive
      "The preimage of an `AddSubsemigroup` along an `AddSemigroup` homomorphism is an
      `AddSubsemigroup`."]
def comap (f : M →ₙ* N) (S : Subsemigroup N) :
    Subsemigroup M 
goal: AddSubsemigroup M

full_name: AddSubsemigroup.coe_comap
code: @[to_additive (attr := simp)]
theorem coe_comap (S : Subsemigroup N) (f : M →ₙ* N) : (S.comap f : Set M) = f ⁻¹' S 
goal: ↑(AddSubsemigroup.comap f S) = ⇑f ⁻¹' ↑S

full_name: Subsemigroup.coe_comap
code: @[to_additive (attr := simp)]
theorem coe_comap (S : Subsemigroup N) (f : M →ₙ* N) : (S.comap f : Set M) = f ⁻¹' S 
goal: ↑(Subsemigroup.comap f S) = ⇑f ⁻¹' ↑S

full_name: Subsemigroup.mem_comap
code: @[to_additive (attr := simp)]
theorem mem_comap {S : Subsemigroup N} {f : M →ₙ* N} {x : M} : x ∈ S.comap f ↔ f x ∈ S 
goal: x ∈ Subsemigroup.comap f S ↔ f x ∈ S

full_name: AddSubsemigroup.mem_comap
code: @[to_additive (attr := simp)]
theorem mem_comap {S : Subsemigroup N} {f : M →ₙ* N} {x : M} : x ∈ S.comap f ↔ f x ∈ S 
goal: x ∈ AddSubsemigroup.comap f S ↔ f x ∈ S

full_name: AddSubsemigroup.comap_comap
code: @[to_additive]
theorem comap_comap (S : Subsemigroup P) (g : N →ₙ* P) (f : M →ₙ* N) :
    (S.comap g).comap f = S.comap (g.comp f) 
goal: AddSubsemigroup.comap f (AddSubsemigroup.comap g S) = AddSubsemigroup.comap (g.comp f) S

full_name: Subsemigroup.comap_comap
code: @[to_additive]
theorem comap_comap (S : Subsemigroup P) (g : N →ₙ* P) (f : M →ₙ* N) :
    (S.comap g).comap f = S.comap (g.comp f) 
goal: Subsemigroup.comap f (Subsemigroup.comap g S) = Subsemigroup.comap (g.comp f) S

full_name: Subsemigroup.comap_id
code: @[to_additive (attr := simp)]
theorem comap_id (S : Subsemigroup P) : S.comap (MulHom.id _) = S 
goal: Subsemigroup.comap (MulHom.id P) S = S

full_name: AddSubsemigroup.comap_id
code: @[to_additive (attr := simp)]
theorem comap_id (S : Subsemigroup P) : S.comap (MulHom.id _) = S 
goal: AddSubsemigroup.comap (AddHom.id P) S = S

full_name: Subsemigroup.map
code: /-- The image of a subsemigroup along a semigroup homomorphism is a subsemigroup. -/
@[to_additive
      "The image of an `AddSubsemigroup` along an `AddSemigroup` homomorphism is
      an `AddSubsemigroup`."]
def map (f : M →ₙ* N) (S : Subsemigroup M) : Subsemigroup N 
goal: Subsemigroup N

full_name: AddSubsemigroup.map
code: /-- The image of a subsemigroup along a semigroup homomorphism is a subsemigroup. -/
@[to_additive
      "The image of an `AddSubsemigroup` along an `AddSemigroup` homomorphism is
      an `AddSubsemigroup`."]
def map (f : M →ₙ* N) (S : Subsemigroup M) : Subsemigroup N 
goal: AddSubsemigroup N

full_name: Subsemigroup.coe_map
code: @[to_additive (attr := simp)]
theorem coe_map (f : M →ₙ* N) (S : Subsemigroup M) : (S.map f : Set N) = f '' S 
goal: ↑(Subsemigroup.map f S) = ⇑f '' ↑S

full_name: AddSubsemigroup.coe_map
code: @[to_additive (attr := simp)]
theorem coe_map (f : M →ₙ* N) (S : Subsemigroup M) : (S.map f : Set N) = f '' S 
goal: ↑(AddSubsemigroup.map f S) = ⇑f '' ↑S

full_name: Subsemigroup.mem_map
code: @[to_additive (attr := simp)]
theorem mem_map {f : M →ₙ* N} {S : Subsemigroup M} {y : N} : y ∈ S.map f ↔ ∃ x ∈ S, f x = y 
goal: y ∈ Subsemigroup.map f S ↔ ∃ x ∈ S, f x = y

full_name: AddSubsemigroup.mem_map
code: @[to_additive (attr := simp)]
theorem mem_map {f : M →ₙ* N} {S : Subsemigroup M} {y : N} : y ∈ S.map f ↔ ∃ x ∈ S, f x = y 
goal: y ∈ AddSubsemigroup.map f S ↔ ∃ x ∈ S, f x = y

full_name: Subsemigroup.mem_map_of_mem
code: @[to_additive]
theorem mem_map_of_mem (f : M →ₙ* N) {S : Subsemigroup M} {x : M} (hx : x ∈ S) : f x ∈ S.map f 
goal: f x ∈ Subsemigroup.map f S

full_name: AddSubsemigroup.mem_map_of_mem
code: @[to_additive]
theorem mem_map_of_mem (f : M →ₙ* N) {S : Subsemigroup M} {x : M} (hx : x ∈ S) : f x ∈ S.map f 
goal: f x ∈ AddSubsemigroup.map f S

full_name: Subsemigroup.apply_coe_mem_map
code: @[to_additive]
theorem apply_coe_mem_map (f : M →ₙ* N) (S : Subsemigroup M) (x : S) : f x ∈ S.map f 
goal: f ↑x ∈ Subsemigroup.map f S

full_name: AddSubsemigroup.apply_coe_mem_map
code: @[to_additive]
theorem apply_coe_mem_map (f : M →ₙ* N) (S : Subsemigroup M) (x : S) : f x ∈ S.map f 
goal: f ↑x ∈ AddSubsemigroup.map f S

full_name: Subsemigroup.map_map
code: @[to_additive]
theorem map_map (g : N →ₙ* P) (f : M →ₙ* N) : (S.map f).map g = S.map (g.comp f) 
goal: Subsemigroup.map g (Subsemigroup.map f S) = Subsemigroup.map (g.comp f) S

full_name: AddSubsemigroup.map_map
code: @[to_additive]
theorem map_map (g : N →ₙ* P) (f : M →ₙ* N) : (S.map f).map g = S.map (g.comp f) 
goal: AddSubsemigroup.map g (AddSubsemigroup.map f S) = AddSubsemigroup.map (g.comp f) S

full_name: Subsemigroup.mem_map_iff_mem
code: @[to_additive (attr := simp, nolint simpNF)]
theorem mem_map_iff_mem {f : M →ₙ* N} (hf : Function.Injective f) {S : Subsemigroup M} {x : M} :
    f x ∈ S.map f ↔ x ∈ S 
goal: f x ∈ Subsemigroup.map f S ↔ x ∈ S

full_name: AddSubsemigroup.mem_map_iff_mem
code: @[to_additive (attr := simp, nolint simpNF)]
theorem mem_map_iff_mem {f : M →ₙ* N} (hf : Function.Injective f) {S : Subsemigroup M} {x : M} :
    f x ∈ S.map f ↔ x ∈ S 
goal: f x ∈ AddSubsemigroup.map f S ↔ x ∈ S

full_name: Subsemigroup.map_le_iff_le_comap
code: @[to_additive]
theorem map_le_iff_le_comap {f : M →ₙ* N} {S : Subsemigroup M} {T : Subsemigroup N} :
    S.map f ≤ T ↔ S ≤ T.comap f 
goal: Subsemigroup.map f S ≤ T ↔ S ≤ Subsemigroup.comap f T

full_name: AddSubsemigroup.map_le_iff_le_comap
code: @[to_additive]
theorem map_le_iff_le_comap {f : M →ₙ* N} {S : Subsemigroup M} {T : Subsemigroup N} :
    S.map f ≤ T ↔ S ≤ T.comap f 
goal: AddSubsemigroup.map f S ≤ T ↔ S ≤ AddSubsemigroup.comap f T

full_name: Subsemigroup.gc_map_comap
code: @[to_additive]
theorem gc_map_comap (f : M →ₙ* N) : GaloisConnection (map f) (comap f) 
goal: GaloisConnection (Subsemigroup.map f) (Subsemigroup.comap f)

full_name: AddSubsemigroup.gc_map_comap
code: @[to_additive]
theorem gc_map_comap (f : M →ₙ* N) : GaloisConnection (map f) (comap f) 
goal: GaloisConnection (AddSubsemigroup.map f) (AddSubsemigroup.comap f)

full_name: Subsemigroup.map_le_of_le_comap
code: @[to_additive]
theorem map_le_of_le_comap {T : Subsemigroup N} {f : M →ₙ* N} : S ≤ T.comap f → S.map f ≤ T 
goal: S ≤ Subsemigroup.comap f T → Subsemigroup.map f S ≤ T

full_name: AddSubsemigroup.map_le_of_le_comap
code: @[to_additive]
theorem map_le_of_le_comap {T : Subsemigroup N} {f : M →ₙ* N} : S ≤ T.comap f → S.map f ≤ T 
goal: S ≤ AddSubsemigroup.comap f T → AddSubsemigroup.map f S ≤ T

full_name: AddSubsemigroup.le_comap_of_map_le
code: @[to_additive]
theorem le_comap_of_map_le {T : Subsemigroup N} {f : M →ₙ* N} : S.map f ≤ T → S ≤ T.comap f 
goal: AddSubsemigroup.map f S ≤ T → S ≤ AddSubsemigroup.comap f T

full_name: Subsemigroup.le_comap_of_map_le
code: @[to_additive]
theorem le_comap_of_map_le {T : Subsemigroup N} {f : M →ₙ* N} : S.map f ≤ T → S ≤ T.comap f 
goal: Subsemigroup.map f S ≤ T → S ≤ Subsemigroup.comap f T

full_name: AddSubsemigroup.le_comap_map
code: @[to_additive]
theorem le_comap_map {f : M →ₙ* N} : S ≤ (S.map f).comap f 
goal: S ≤ AddSubsemigroup.comap f (AddSubsemigroup.map f S)

full_name: Subsemigroup.le_comap_map
code: @[to_additive]
theorem le_comap_map {f : M →ₙ* N} : S ≤ (S.map f).comap f 
goal: S ≤ Subsemigroup.comap f (Subsemigroup.map f S)

full_name: Subsemigroup.map_comap_le
code: @[to_additive]
theorem map_comap_le {S : Subsemigroup N} {f : M →ₙ* N} : (S.comap f).map f ≤ S 
goal: Subsemigroup.map f (Subsemigroup.comap f S) ≤ S

full_name: AddSubsemigroup.map_comap_le
code: @[to_additive]
theorem map_comap_le {S : Subsemigroup N} {f : M →ₙ* N} : (S.comap f).map f ≤ S 
goal: AddSubsemigroup.map f (AddSubsemigroup.comap f S) ≤ S

full_name: Subsemigroup.monotone_map
code: @[to_additive]
theorem monotone_map {f : M →ₙ* N} : Monotone (map f) 
goal: Monotone (Subsemigroup.map f)

full_name: AddSubsemigroup.monotone_map
code: @[to_additive]
theorem monotone_map {f : M →ₙ* N} : Monotone (map f) 
goal: Monotone (AddSubsemigroup.map f)

full_name: AddSubsemigroup.monotone_comap
code: @[to_additive]
theorem monotone_comap {f : M →ₙ* N} : Monotone (comap f) 
goal: Monotone (AddSubsemigroup.comap f)

full_name: Subsemigroup.monotone_comap
code: @[to_additive]
theorem monotone_comap {f : M →ₙ* N} : Monotone (comap f) 
goal: Monotone (Subsemigroup.comap f)

full_name: AddSubsemigroup.map_comap_map
code: @[to_additive (attr := simp)]
theorem map_comap_map {f : M →ₙ* N} : ((S.map f).comap f).map f = S.map f 
goal: AddSubsemigroup.map f (AddSubsemigroup.comap f (AddSubsemigroup.map f S)) = AddSubsemigroup.map f S

full_name: Subsemigroup.map_comap_map
code: @[to_additive (attr := simp)]
theorem map_comap_map {f : M →ₙ* N} : ((S.map f).comap f).map f = S.map f 
goal: Subsemigroup.map f (Subsemigroup.comap f (Subsemigroup.map f S)) = Subsemigroup.map f S

full_name: Subsemigroup.comap_map_comap
code: @[to_additive (attr := simp)]
theorem comap_map_comap {S : Subsemigroup N} {f : M →ₙ* N} :
    ((S.comap f).map f).comap f = S.comap f 
goal: Subsemigroup.comap f (Subsemigroup.map f (Subsemigroup.comap f S)) = Subsemigroup.comap f S

full_name: AddSubsemigroup.comap_map_comap
code: @[to_additive (attr := simp)]
theorem comap_map_comap {S : Subsemigroup N} {f : M →ₙ* N} :
    ((S.comap f).map f).comap f = S.comap f 
goal: AddSubsemigroup.comap f (AddSubsemigroup.map f (AddSubsemigroup.comap f S)) = AddSubsemigroup.comap f S

full_name: Subsemigroup.map_sup
code: @[to_additive]
theorem map_sup (S T : Subsemigroup M) (f : M →ₙ* N) : (S ⊔ T).map f = S.map f ⊔ T.map f 
goal: Subsemigroup.map f (S ⊔ T) = Subsemigroup.map f S ⊔ Subsemigroup.map f T

full_name: AddSubsemigroup.map_sup
code: @[to_additive]
theorem map_sup (S T : Subsemigroup M) (f : M →ₙ* N) : (S ⊔ T).map f = S.map f ⊔ T.map f 
goal: AddSubsemigroup.map f (S ⊔ T) = AddSubsemigroup.map f S ⊔ AddSubsemigroup.map f T

full_name: Subsemigroup.map_iSup
code: @[to_additive]
theorem map_iSup {ι : Sort*} (f : M →ₙ* N) (s : ι → Subsemigroup M) :
    (iSup s).map f = ⨆ i, (s i).map f 
goal: Subsemigroup.map f (iSup s) = ⨆ i, Subsemigroup.map f (s i)

full_name: AddSubsemigroup.map_iSup
code: @[to_additive]
theorem map_iSup {ι : Sort*} (f : M →ₙ* N) (s : ι → Subsemigroup M) :
    (iSup s).map f = ⨆ i, (s i).map f 
goal: AddSubsemigroup.map f (iSup s) = ⨆ i, AddSubsemigroup.map f (s i)

full_name: Subsemigroup.comap_inf
code: @[to_additive]
theorem comap_inf (S T : Subsemigroup N) (f : M →ₙ* N) : (S ⊓ T).comap f = S.comap f ⊓ T.comap f 
goal: Subsemigroup.comap f (S ⊓ T) = Subsemigroup.comap f S ⊓ Subsemigroup.comap f T

full_name: AddSubsemigroup.comap_inf
code: @[to_additive]
theorem comap_inf (S T : Subsemigroup N) (f : M →ₙ* N) : (S ⊓ T).comap f = S.comap f ⊓ T.comap f 
goal: AddSubsemigroup.comap f (S ⊓ T) = AddSubsemigroup.comap f S ⊓ AddSubsemigroup.comap f T

full_name: Subsemigroup.comap_iInf
code: @[to_additive]
theorem comap_iInf {ι : Sort*} (f : M →ₙ* N) (s : ι → Subsemigroup N) :
    (iInf s).comap f = ⨅ i, (s i).comap f 
goal: Subsemigroup.comap f (iInf s) = ⨅ i, Subsemigroup.comap f (s i)

full_name: AddSubsemigroup.comap_iInf
code: @[to_additive]
theorem comap_iInf {ι : Sort*} (f : M →ₙ* N) (s : ι → Subsemigroup N) :
    (iInf s).comap f = ⨅ i, (s i).comap f 
goal: AddSubsemigroup.comap f (iInf s) = ⨅ i, AddSubsemigroup.comap f (s i)

full_name: AddSubsemigroup.map_bot
code: @[to_additive (attr := simp)]
theorem map_bot (f : M →ₙ* N) : (⊥ : Subsemigroup M).map f = ⊥ 
goal: AddSubsemigroup.map f ⊥ = ⊥

full_name: Subsemigroup.map_bot
code: @[to_additive (attr := simp)]
theorem map_bot (f : M →ₙ* N) : (⊥ : Subsemigroup M).map f = ⊥ 
goal: Subsemigroup.map f ⊥ = ⊥

full_name: AddSubsemigroup.comap_top
code: @[to_additive (attr := simp)]
theorem comap_top (f : M →ₙ* N) : (⊤ : Subsemigroup N).comap f = ⊤ 
goal: AddSubsemigroup.comap f ⊤ = ⊤

full_name: Subsemigroup.comap_top
code: @[to_additive (attr := simp)]
theorem comap_top (f : M →ₙ* N) : (⊤ : Subsemigroup N).comap f = ⊤ 
goal: Subsemigroup.comap f ⊤ = ⊤

full_name: Subsemigroup.map_id
code: @[to_additive (attr := simp)]
theorem map_id (S : Subsemigroup M) : S.map (MulHom.id M) = S 
goal: Subsemigroup.map (MulHom.id M) S = S

full_name: AddSubsemigroup.map_id
code: @[to_additive (attr := simp)]
theorem map_id (S : Subsemigroup M) : S.map (MulHom.id M) = S 
goal: AddSubsemigroup.map (AddHom.id M) S = S

full_name: Subsemigroup.gciMapComap
code: /-- `map f` and `comap f` form a `GaloisCoinsertion` when `f` is injective. -/
@[to_additive " `map f` and `comap f` form a `GaloisCoinsertion` when `f` is injective. "]
def gciMapComap (hf : Function.Injective f) : GaloisCoinsertion (map f) (comap f) 
goal: GaloisCoinsertion (Subsemigroup.map f) (Subsemigroup.comap f)

full_name: AddSubsemigroup.gciMapComap
code: /-- `map f` and `comap f` form a `GaloisCoinsertion` when `f` is injective. -/
@[to_additive " `map f` and `comap f` form a `GaloisCoinsertion` when `f` is injective. "]
def gciMapComap (hf : Function.Injective f) : GaloisCoinsertion (map f) (comap f) 
goal: GaloisCoinsertion (AddSubsemigroup.map f) (AddSubsemigroup.comap f)

full_name: AddSubsemigroup.comap_map_eq_of_injective
code: @[to_additive]
theorem comap_map_eq_of_injective (S : Subsemigroup M) : (S.map f).comap f = S 
goal: AddSubsemigroup.comap f (AddSubsemigroup.map f S) = S

full_name: Subsemigroup.comap_map_eq_of_injective
code: @[to_additive]
theorem comap_map_eq_of_injective (S : Subsemigroup M) : (S.map f).comap f = S 
goal: Subsemigroup.comap f (Subsemigroup.map f S) = S

full_name: Subsemigroup.comap_surjective_of_injective
code: @[to_additive]
theorem comap_surjective_of_injective : Function.Surjective (comap f) 
goal: Function.Surjective (Subsemigroup.comap f)

full_name: AddSubsemigroup.comap_surjective_of_injective
code: @[to_additive]
theorem comap_surjective_of_injective : Function.Surjective (comap f) 
goal: Function.Surjective (AddSubsemigroup.comap f)

full_name: Subsemigroup.map_injective_of_injective
code: @[to_additive]
theorem map_injective_of_injective : Function.Injective (map f) 
goal: Function.Injective (Subsemigroup.map f)

full_name: AddSubsemigroup.map_injective_of_injective
code: @[to_additive]
theorem map_injective_of_injective : Function.Injective (map f) 
goal: Function.Injective (AddSubsemigroup.map f)

full_name: AddSubsemigroup.comap_inf_map_of_injective
code: @[to_additive]
theorem comap_inf_map_of_injective (S T : Subsemigroup M) : (S.map f ⊓ T.map f).comap f = S ⊓ T 
goal: AddSubsemigroup.comap f (AddSubsemigroup.map f S ⊓ AddSubsemigroup.map f T) = S ⊓ T

full_name: Subsemigroup.comap_inf_map_of_injective
code: @[to_additive]
theorem comap_inf_map_of_injective (S T : Subsemigroup M) : (S.map f ⊓ T.map f).comap f = S ⊓ T 
goal: Subsemigroup.comap f (Subsemigroup.map f S ⊓ Subsemigroup.map f T) = S ⊓ T

full_name: Subsemigroup.comap_iInf_map_of_injective
code: @[to_additive]
theorem comap_iInf_map_of_injective (S : ι → Subsemigroup M) :
    (⨅ i, (S i).map f).comap f = iInf S 
goal: Subsemigroup.comap f (⨅ i, Subsemigroup.map f (S i)) = iInf S

full_name: AddSubsemigroup.comap_iInf_map_of_injective
code: @[to_additive]
theorem comap_iInf_map_of_injective (S : ι → Subsemigroup M) :
    (⨅ i, (S i).map f).comap f = iInf S 
goal: AddSubsemigroup.comap f (⨅ i, AddSubsemigroup.map f (S i)) = iInf S

full_name: AddSubsemigroup.comap_sup_map_of_injective
code: @[to_additive]
theorem comap_sup_map_of_injective (S T : Subsemigroup M) : (S.map f ⊔ T.map f).comap f = S ⊔ T 
goal: AddSubsemigroup.comap f (AddSubsemigroup.map f S ⊔ AddSubsemigroup.map f T) = S ⊔ T

full_name: Subsemigroup.comap_sup_map_of_injective
code: @[to_additive]
theorem comap_sup_map_of_injective (S T : Subsemigroup M) : (S.map f ⊔ T.map f).comap f = S ⊔ T 
goal: Subsemigroup.comap f (Subsemigroup.map f S ⊔ Subsemigroup.map f T) = S ⊔ T

full_name: AddSubsemigroup.comap_iSup_map_of_injective
code: @[to_additive]
theorem comap_iSup_map_of_injective (S : ι → Subsemigroup M) :
    (⨆ i, (S i).map f).comap f = iSup S 
goal: AddSubsemigroup.comap f (⨆ i, AddSubsemigroup.map f (S i)) = iSup S

full_name: Subsemigroup.comap_iSup_map_of_injective
code: @[to_additive]
theorem comap_iSup_map_of_injective (S : ι → Subsemigroup M) :
    (⨆ i, (S i).map f).comap f = iSup S 
goal: Subsemigroup.comap f (⨆ i, Subsemigroup.map f (S i)) = iSup S

full_name: AddSubsemigroup.map_le_map_iff_of_injective
code: @[to_additive]
theorem map_le_map_iff_of_injective {S T : Subsemigroup M} : S.map f ≤ T.map f ↔ S ≤ T 
goal: AddSubsemigroup.map f S ≤ AddSubsemigroup.map f T ↔ S ≤ T

full_name: Subsemigroup.map_le_map_iff_of_injective
code: @[to_additive]
theorem map_le_map_iff_of_injective {S T : Subsemigroup M} : S.map f ≤ T.map f ↔ S ≤ T 
goal: Subsemigroup.map f S ≤ Subsemigroup.map f T ↔ S ≤ T

full_name: Subsemigroup.map_strictMono_of_injective
code: @[to_additive]
theorem map_strictMono_of_injective : StrictMono (map f) 
goal: StrictMono (Subsemigroup.map f)

full_name: AddSubsemigroup.map_strictMono_of_injective
code: @[to_additive]
theorem map_strictMono_of_injective : StrictMono (map f) 
goal: StrictMono (AddSubsemigroup.map f)

full_name: AddSubsemigroup.giMapComap
code: /-- `map f` and `comap f` form a `GaloisInsertion` when `f` is surjective. -/
@[to_additive " `map f` and `comap f` form a `GaloisInsertion` when `f` is surjective. "]
def giMapComap : GaloisInsertion (map f) (comap f) 
goal: GaloisInsertion (AddSubsemigroup.map f) (AddSubsemigroup.comap f)

full_name: Subsemigroup.giMapComap
code: /-- `map f` and `comap f` form a `GaloisInsertion` when `f` is surjective. -/
@[to_additive " `map f` and `comap f` form a `GaloisInsertion` when `f` is surjective. "]
def giMapComap : GaloisInsertion (map f) (comap f) 
goal: GaloisInsertion (Subsemigroup.map f) (Subsemigroup.comap f)

full_name: Subsemigroup.map_comap_eq_of_surjective
code: @[to_additive]
theorem map_comap_eq_of_surjective (S : Subsemigroup N) : (S.comap f).map f = S 
goal: Subsemigroup.map f (Subsemigroup.comap f S) = S

full_name: AddSubsemigroup.map_comap_eq_of_surjective
code: @[to_additive]
theorem map_comap_eq_of_surjective (S : Subsemigroup N) : (S.comap f).map f = S 
goal: AddSubsemigroup.map f (AddSubsemigroup.comap f S) = S

full_name: Subsemigroup.map_surjective_of_surjective
code: @[to_additive]
theorem map_surjective_of_surjective : Function.Surjective (map f) 
goal: Function.Surjective (Subsemigroup.map f)

full_name: AddSubsemigroup.map_surjective_of_surjective
code: @[to_additive]
theorem map_surjective_of_surjective : Function.Surjective (map f) 
goal: Function.Surjective (AddSubsemigroup.map f)

full_name: AddSubsemigroup.comap_injective_of_surjective
code: @[to_additive]
theorem comap_injective_of_surjective : Function.Injective (comap f) 
goal: Function.Injective (AddSubsemigroup.comap f)

full_name: Subsemigroup.comap_injective_of_surjective
code: @[to_additive]
theorem comap_injective_of_surjective : Function.Injective (comap f) 
goal: Function.Injective (Subsemigroup.comap f)

full_name: AddSubsemigroup.map_inf_comap_of_surjective
code: @[to_additive]
theorem map_inf_comap_of_surjective (S T : Subsemigroup N) :
    (S.comap f ⊓ T.comap f).map f = S ⊓ T 
goal: AddSubsemigroup.map f (AddSubsemigroup.comap f S ⊓ AddSubsemigroup.comap f T) = S ⊓ T

full_name: Subsemigroup.map_inf_comap_of_surjective
code: @[to_additive]
theorem map_inf_comap_of_surjective (S T : Subsemigroup N) :
    (S.comap f ⊓ T.comap f).map f = S ⊓ T 
goal: Subsemigroup.map f (Subsemigroup.comap f S ⊓ Subsemigroup.comap f T) = S ⊓ T

full_name: AddSubsemigroup.map_iInf_comap_of_surjective
code: @[to_additive]
theorem map_iInf_comap_of_surjective (S : ι → Subsemigroup N) :
    (⨅ i, (S i).comap f).map f = iInf S 
goal: AddSubsemigroup.map f (⨅ i, AddSubsemigroup.comap f (S i)) = iInf S

full_name: Subsemigroup.map_iInf_comap_of_surjective
code: @[to_additive]
theorem map_iInf_comap_of_surjective (S : ι → Subsemigroup N) :
    (⨅ i, (S i).comap f).map f = iInf S 
goal: Subsemigroup.map f (⨅ i, Subsemigroup.comap f (S i)) = iInf S

full_name: Subsemigroup.map_sup_comap_of_surjective
code: @[to_additive]
theorem map_sup_comap_of_surjective (S T : Subsemigroup N) :
    (S.comap f ⊔ T.comap f).map f = S ⊔ T 
goal: Subsemigroup.map f (Subsemigroup.comap f S ⊔ Subsemigroup.comap f T) = S ⊔ T

full_name: AddSubsemigroup.map_sup_comap_of_surjective
code: @[to_additive]
theorem map_sup_comap_of_surjective (S T : Subsemigroup N) :
    (S.comap f ⊔ T.comap f).map f = S ⊔ T 
goal: AddSubsemigroup.map f (AddSubsemigroup.comap f S ⊔ AddSubsemigroup.comap f T) = S ⊔ T

full_name: Subsemigroup.map_iSup_comap_of_surjective
code: @[to_additive]
theorem map_iSup_comap_of_surjective (S : ι → Subsemigroup N) :
    (⨆ i, (S i).comap f).map f = iSup S 
goal: Subsemigroup.map f (⨆ i, Subsemigroup.comap f (S i)) = iSup S

full_name: AddSubsemigroup.map_iSup_comap_of_surjective
code: @[to_additive]
theorem map_iSup_comap_of_surjective (S : ι → Subsemigroup N) :
    (⨆ i, (S i).comap f).map f = iSup S 
goal: AddSubsemigroup.map f (⨆ i, AddSubsemigroup.comap f (S i)) = iSup S

full_name: Subsemigroup.comap_le_comap_iff_of_surjective
code: @[to_additive]
theorem comap_le_comap_iff_of_surjective {S T : Subsemigroup N} : S.comap f ≤ T.comap f ↔ S ≤ T 
goal: Subsemigroup.comap f S ≤ Subsemigroup.comap f T ↔ S ≤ T

full_name: AddSubsemigroup.comap_le_comap_iff_of_surjective
code: @[to_additive]
theorem comap_le_comap_iff_of_surjective {S T : Subsemigroup N} : S.comap f ≤ T.comap f ↔ S ≤ T 
goal: AddSubsemigroup.comap f S ≤ AddSubsemigroup.comap f T ↔ S ≤ T

full_name: AddSubsemigroup.comap_strictMono_of_surjective
code: @[to_additive]
theorem comap_strictMono_of_surjective : StrictMono (comap f) 
goal: StrictMono (AddSubsemigroup.comap f)

full_name: Subsemigroup.comap_strictMono_of_surjective
code: @[to_additive]
theorem comap_strictMono_of_surjective : StrictMono (comap f) 
goal: StrictMono (Subsemigroup.comap f)

full_name: AddMemClass.add
code: /-- A submagma of a magma inherits a multiplication. -/
@[to_additive "An additive submagma of an additive magma inherits an addition."]
instance (priority := 900) mul : Mul S' 
goal: Add ↥S'

full_name: MulMemClass.mul
code: /-- A submagma of a magma inherits a multiplication. -/
@[to_additive "An additive submagma of an additive magma inherits an addition."]
instance (priority := 900) mul : Mul S' 
goal: Mul ↥S'

full_name: MulMemClass.coe_mul
code: @[to_additive (attr := simp low, norm_cast)]
theorem coe_mul (x y : S') : (↑(x * y) : M) = ↑x * ↑y 
goal: ↑(x * y) = ↑x * ↑y

full_name: AddMemClass.coe_add
code: @[to_additive (attr := simp low, norm_cast)]
theorem coe_mul (x y : S') : (↑(x * y) : M) = ↑x * ↑y 
goal: ↑(x + y) = ↑x + ↑y

full_name: AddMemClass.mk_add_mk
code: @[to_additive (attr := simp low)]
theorem mk_mul_mk (x y : M) (hx : x ∈ S') (hy : y ∈ S') :
    (⟨x, hx⟩ : S') * ⟨y, hy⟩ = ⟨x * y, mul_mem hx hy⟩ 
goal: ⟨x, hx⟩ + ⟨y, hy⟩ = ⟨x + y, ⋯⟩

full_name: MulMemClass.mk_mul_mk
code: @[to_additive (attr := simp low)]
theorem mk_mul_mk (x y : M) (hx : x ∈ S') (hy : y ∈ S') :
    (⟨x, hx⟩ : S') * ⟨y, hy⟩ = ⟨x * y, mul_mem hx hy⟩ 
goal: ⟨x, hx⟩ * ⟨y, hy⟩ = ⟨x * y, ⋯⟩

full_name: AddMemClass.add_def
code: @[to_additive]
theorem mul_def (x y : S') : x * y = ⟨x * y, mul_mem x.2 y.2⟩ 
goal: x + y = ⟨↑x + ↑y, ⋯⟩

full_name: MulMemClass.mul_def
code: @[to_additive]
theorem mul_def (x y : S') : x * y = ⟨x * y, mul_mem x.2 y.2⟩ 
goal: x * y = ⟨↑x * ↑y, ⋯⟩

full_name: AddMemClass.toAddSemigroup
code: /-- A subsemigroup of a semigroup inherits a semigroup structure. -/
@[to_additive "An `AddSubsemigroup` of an `AddSemigroup` inherits an `AddSemigroup` structure."]
instance toSemigroup {M : Type*} [Semigroup M] {A : Type*} [SetLike A M] [MulMemClass A M]
    (S : A) : Semigroup S 
goal: AddSemigroup ↥S

full_name: MulMemClass.toSemigroup
code: /-- A subsemigroup of a semigroup inherits a semigroup structure. -/
@[to_additive "An `AddSubsemigroup` of an `AddSemigroup` inherits an `AddSemigroup` structure."]
instance toSemigroup {M : Type*} [Semigroup M] {A : Type*} [SetLike A M] [MulMemClass A M]
    (S : A) : Semigroup S 
goal: Semigroup ↥S

full_name: MulMemClass.toCommSemigroup
code: /-- A subsemigroup of a `CommSemigroup` is a `CommSemigroup`. -/
@[to_additive "An `AddSubsemigroup` of an `AddCommSemigroup` is an `AddCommSemigroup`."]
instance toCommSemigroup {M} [CommSemigroup M] {A : Type*} [SetLike A M] [MulMemClass A M]
    (S : A) : CommSemigroup S 
goal: CommSemigroup ↥S

full_name: AddMemClass.toAddCommSemigroup
code: /-- A subsemigroup of a `CommSemigroup` is a `CommSemigroup`. -/
@[to_additive "An `AddSubsemigroup` of an `AddCommSemigroup` is an `AddCommSemigroup`."]
instance toCommSemigroup {M} [CommSemigroup M] {A : Type*} [SetLike A M] [MulMemClass A M]
    (S : A) : CommSemigroup S 
goal: AddCommSemigroup ↥S

full_name: MulMemClass.subtype
code: /-- The natural semigroup hom from a subsemigroup of semigroup `M` to `M`. -/
@[to_additive "The natural semigroup hom from an `AddSubsemigroup` of
`AddSubsemigroup` `M` to `M`."]
def subtype : S' →ₙ* M 
goal: ↥S' →ₙ* M

full_name: AddMemClass.subtype
code: /-- The natural semigroup hom from a subsemigroup of semigroup `M` to `M`. -/
@[to_additive "The natural semigroup hom from an `AddSubsemigroup` of
`AddSubsemigroup` `M` to `M`."]
def subtype : S' →ₙ* M 
goal: AddHom (↥S') M

full_name: MulMemClass.coe_subtype
code: @[to_additive (attr := simp)]
theorem coe_subtype : (MulMemClass.subtype S' : S' → M) = Subtype.val 
goal: ⇑(MulMemClass.subtype S') = Subtype.val

full_name: AddMemClass.coe_subtype
code: @[to_additive (attr := simp)]
theorem coe_subtype : (MulMemClass.subtype S' : S' → M) = Subtype.val 
goal: ⇑(AddMemClass.subtype S') = Subtype.val

full_name: Subsemigroup.topEquiv_symm_apply_coe
code: /-- The top subsemigroup is isomorphic to the semigroup. -/
@[to_additive (attr := simps)
  "The top additive subsemigroup is isomorphic to the additive semigroup."]
def topEquiv : (⊤ : Subsemigroup M) ≃* M 
goal: ↑(Subsemigroup.topEquiv.symm x) = x

full_name: AddSubsemigroup.topEquiv_apply
code: /-- The top subsemigroup is isomorphic to the semigroup. -/
@[to_additive (attr := simps)
  "The top additive subsemigroup is isomorphic to the additive semigroup."]
def topEquiv : (⊤ : Subsemigroup M) ≃* M 
goal: AddSubsemigroup.topEquiv x = ↑x

full_name: Subsemigroup.topEquiv_apply
code: /-- The top subsemigroup is isomorphic to the semigroup. -/
@[to_additive (attr := simps)
  "The top additive subsemigroup is isomorphic to the additive semigroup."]
def topEquiv : (⊤ : Subsemigroup M) ≃* M 
goal: Subsemigroup.topEquiv x = ↑x

full_name: AddSubsemigroup.topEquiv
code: /-- The top subsemigroup is isomorphic to the semigroup. -/
@[to_additive (attr := simps)
  "The top additive subsemigroup is isomorphic to the additive semigroup."]
def topEquiv : (⊤ : Subsemigroup M) ≃* M 
goal: ↥⊤ ≃+ M

full_name: AddSubsemigroup.topEquiv_symm_apply_coe
code: /-- The top subsemigroup is isomorphic to the semigroup. -/
@[to_additive (attr := simps)
  "The top additive subsemigroup is isomorphic to the additive semigroup."]
def topEquiv : (⊤ : Subsemigroup M) ≃* M 
goal: ↑(AddSubsemigroup.topEquiv.symm x) = x

full_name: Subsemigroup.topEquiv
code: /-- The top subsemigroup is isomorphic to the semigroup. -/
@[to_additive (attr := simps)
  "The top additive subsemigroup is isomorphic to the additive semigroup."]
def topEquiv : (⊤ : Subsemigroup M) ≃* M 
goal: ↥⊤ ≃* M

full_name: AddSubsemigroup.topEquiv_toAddHom
code: @[to_additive (attr := simp)]
theorem topEquiv_toMulHom :
    ((topEquiv : _ ≃* M) : _ →ₙ* M) = MulMemClass.subtype (⊤ : Subsemigroup M) 
goal: ↑AddSubsemigroup.topEquiv = AddMemClass.subtype ⊤

full_name: Subsemigroup.topEquiv_toMulHom
code: @[to_additive (attr := simp)]
theorem topEquiv_toMulHom :
    ((topEquiv : _ ≃* M) : _ →ₙ* M) = MulMemClass.subtype (⊤ : Subsemigroup M) 
goal: ↑Subsemigroup.topEquiv = MulMemClass.subtype ⊤

full_name: AddSubsemigroup.equivMapOfInjective
code: /-- A subsemigroup is isomorphic to its image under an injective function -/
@[to_additive "An additive subsemigroup is isomorphic to its image under an injective function"]
noncomputable def equivMapOfInjective (f : M →ₙ* N) (hf : Function.Injective f) : S ≃* S.map f 
goal: ↥S ≃+ ↥(AddSubsemigroup.map f S)

full_name: Subsemigroup.equivMapOfInjective
code: /-- A subsemigroup is isomorphic to its image under an injective function -/
@[to_additive "An additive subsemigroup is isomorphic to its image under an injective function"]
noncomputable def equivMapOfInjective (f : M →ₙ* N) (hf : Function.Injective f) : S ≃* S.map f 
goal: ↥S ≃* ↥(Subsemigroup.map f S)

full_name: AddSubsemigroup.coe_equivMapOfInjective_apply
code: @[to_additive (attr := simp)]
theorem coe_equivMapOfInjective_apply (f : M →ₙ* N) (hf : Function.Injective f) (x : S) :
    (equivMapOfInjective S f hf x : N) = f x 
goal: ↑((S.equivMapOfInjective f hf) x) = f ↑x

full_name: Subsemigroup.coe_equivMapOfInjective_apply
code: @[to_additive (attr := simp)]
theorem coe_equivMapOfInjective_apply (f : M →ₙ* N) (hf : Function.Injective f) (x : S) :
    (equivMapOfInjective S f hf x : N) = f x 
goal: ↑((S.equivMapOfInjective f hf) x) = f ↑x

full_name: Subsemigroup.closure_closure_coe_preimage
code: @[to_additive (attr := simp)]
theorem closure_closure_coe_preimage {s : Set M} :
    closure ((Subtype.val : closure s → M) ⁻¹' s) = ⊤ 
goal: Subsemigroup.closure (Subtype.val ⁻¹' s) = ⊤

full_name: AddSubsemigroup.closure_closure_coe_preimage
code: @[to_additive (attr := simp)]
theorem closure_closure_coe_preimage {s : Set M} :
    closure ((Subtype.val : closure s → M) ⁻¹' s) = ⊤ 
goal: AddSubsemigroup.closure (Subtype.val ⁻¹' s) = ⊤

full_name: Subsemigroup.prod
code: /-- Given `Subsemigroup`s `s`, `t` of semigroups `M`, `N` respectively, `s × t` as a subsemigroup
of `M × N`. -/
@[to_additive prod
      "Given `AddSubsemigroup`s `s`, `t` of `AddSemigroup`s `A`, `B` respectively,
      `s × t` as an `AddSubsemigroup` of `A × B`."]
def prod (s : Subsemigroup M) (t : Subsemigroup N) : Subsemigroup (M × N) 
goal: Subsemigroup (M × N)

full_name: AddSubsemigroup.prod
code: /-- Given `Subsemigroup`s `s`, `t` of semigroups `M`, `N` respectively, `s × t` as a subsemigroup
of `M × N`. -/
@[to_additive prod
      "Given `AddSubsemigroup`s `s`, `t` of `AddSemigroup`s `A`, `B` respectively,
      `s × t` as an `AddSubsemigroup` of `A × B`."]
def prod (s : Subsemigroup M) (t : Subsemigroup N) : Subsemigroup (M × N) 
goal: AddSubsemigroup (M × N)

full_name: Subsemigroup.coe_prod
code: @[to_additive coe_prod]
theorem coe_prod (s : Subsemigroup M) (t : Subsemigroup N) :
    (s.prod t : Set (M × N)) = (s : Set M) ×ˢ (t : Set N) 
goal: ↑(s.prod t) = ↑s ×ˢ ↑t

full_name: AddSubsemigroup.coe_prod
code: @[to_additive coe_prod]
theorem coe_prod (s : Subsemigroup M) (t : Subsemigroup N) :
    (s.prod t : Set (M × N)) = (s : Set M) ×ˢ (t : Set N) 
goal: ↑(s.prod t) = ↑s ×ˢ ↑t

full_name: AddSubsemigroup.mem_prod
code: @[to_additive mem_prod]
theorem mem_prod {s : Subsemigroup M} {t : Subsemigroup N} {p : M × N} :
    p ∈ s.prod t ↔ p.1 ∈ s ∧ p.2 ∈ t 
goal: p ∈ s.prod t ↔ p.1 ∈ s ∧ p.2 ∈ t

full_name: Subsemigroup.mem_prod
code: @[to_additive mem_prod]
theorem mem_prod {s : Subsemigroup M} {t : Subsemigroup N} {p : M × N} :
    p ∈ s.prod t ↔ p.1 ∈ s ∧ p.2 ∈ t 
goal: p ∈ s.prod t ↔ p.1 ∈ s ∧ p.2 ∈ t

full_name: Subsemigroup.prod_mono
code: @[to_additive prod_mono]
theorem prod_mono {s₁ s₂ : Subsemigroup M} {t₁ t₂ : Subsemigroup N} (hs : s₁ ≤ s₂) (ht : t₁ ≤ t₂) :
    s₁.prod t₁ ≤ s₂.prod t₂ 
goal: s₁.prod t₁ ≤ s₂.prod t₂

full_name: AddSubsemigroup.prod_mono
code: @[to_additive prod_mono]
theorem prod_mono {s₁ s₂ : Subsemigroup M} {t₁ t₂ : Subsemigroup N} (hs : s₁ ≤ s₂) (ht : t₁ ≤ t₂) :
    s₁.prod t₁ ≤ s₂.prod t₂ 
goal: s₁.prod t₁ ≤ s₂.prod t₂

full_name: AddSubsemigroup.prod_top
code: @[to_additive prod_top]
theorem prod_top (s : Subsemigroup M) : s.prod (⊤ : Subsemigroup N) = s.comap (MulHom.fst M N) 
goal: s.prod ⊤ = AddSubsemigroup.comap (AddHom.fst M N) s

full_name: Subsemigroup.prod_top
code: @[to_additive prod_top]
theorem prod_top (s : Subsemigroup M) : s.prod (⊤ : Subsemigroup N) = s.comap (MulHom.fst M N) 
goal: s.prod ⊤ = Subsemigroup.comap (MulHom.fst M N) s

full_name: Subsemigroup.top_prod
code: @[to_additive top_prod]
theorem top_prod (s : Subsemigroup N) : (⊤ : Subsemigroup M).prod s = s.comap (MulHom.snd M N) 
goal: ⊤.prod s = Subsemigroup.comap (MulHom.snd M N) s

full_name: AddSubsemigroup.top_prod
code: @[to_additive top_prod]
theorem top_prod (s : Subsemigroup N) : (⊤ : Subsemigroup M).prod s = s.comap (MulHom.snd M N) 
goal: ⊤.prod s = AddSubsemigroup.comap (AddHom.snd M N) s

full_name: Subsemigroup.top_prod_top
code: @[to_additive (attr := simp) top_prod_top]
theorem top_prod_top : (⊤ : Subsemigroup M).prod (⊤ : Subsemigroup N) = ⊤ 
goal: ⊤.prod ⊤ = ⊤

full_name: AddSubsemigroup.top_prod_top
code: @[to_additive (attr := simp) top_prod_top]
theorem top_prod_top : (⊤ : Subsemigroup M).prod (⊤ : Subsemigroup N) = ⊤ 
goal: ⊤.prod ⊤ = ⊤

full_name: AddSubsemigroup.bot_prod_bot
code: @[to_additive bot_prod_bot]
theorem bot_prod_bot : (⊥ : Subsemigroup M).prod (⊥ : Subsemigroup N) = ⊥ 
goal: ⊥.prod ⊥ = ⊥

full_name: Subsemigroup.bot_prod_bot
code: @[to_additive bot_prod_bot]
theorem bot_prod_bot : (⊥ : Subsemigroup M).prod (⊥ : Subsemigroup N) = ⊥ 
goal: ⊥.prod ⊥ = ⊥

full_name: Subsemigroup.prodEquiv
code: /-- The product of subsemigroups is isomorphic to their product as semigroups. -/
@[to_additive prodEquiv
    "The product of additive subsemigroups is isomorphic to their product as additive semigroups"]
def prodEquiv (s : Subsemigroup M) (t : Subsemigroup N) : s.prod t ≃* s × t 
goal: ↥(s.prod t) ≃* ↥s × ↥t

full_name: AddSubsemigroup.prodEquiv
code: /-- The product of subsemigroups is isomorphic to their product as semigroups. -/
@[to_additive prodEquiv
    "The product of additive subsemigroups is isomorphic to their product as additive semigroups"]
def prodEquiv (s : Subsemigroup M) (t : Subsemigroup N) : s.prod t ≃* s × t 
goal: ↥(s.prod t) ≃+ ↥s × ↥t

full_name: Subsemigroup.mem_map_equiv
code: @[to_additive]
theorem mem_map_equiv {f : M ≃* N} {K : Subsemigroup M} {x : N} :
    x ∈ K.map (f : M →ₙ* N) ↔ f.symm x ∈ K 
goal: x ∈ Subsemigroup.map (↑f) K ↔ f.symm x ∈ K

full_name: AddSubsemigroup.mem_map_equiv
code: @[to_additive]
theorem mem_map_equiv {f : M ≃* N} {K : Subsemigroup M} {x : N} :
    x ∈ K.map (f : M →ₙ* N) ↔ f.symm x ∈ K 
goal: x ∈ AddSubsemigroup.map (↑f) K ↔ f.symm x ∈ K

full_name: AddSubsemigroup.map_equiv_eq_comap_symm
code: @[to_additive]
theorem map_equiv_eq_comap_symm (f : M ≃* N) (K : Subsemigroup M) :
    K.map (f : M →ₙ* N) = K.comap (f.symm : N →ₙ* M) 
goal: AddSubsemigroup.map (↑f) K = AddSubsemigroup.comap (↑f.symm) K

full_name: Subsemigroup.map_equiv_eq_comap_symm
code: @[to_additive]
theorem map_equiv_eq_comap_symm (f : M ≃* N) (K : Subsemigroup M) :
    K.map (f : M →ₙ* N) = K.comap (f.symm : N →ₙ* M) 
goal: Subsemigroup.map (↑f) K = Subsemigroup.comap (↑f.symm) K

full_name: AddSubsemigroup.comap_equiv_eq_map_symm
code: @[to_additive]
theorem comap_equiv_eq_map_symm (f : N ≃* M) (K : Subsemigroup M) :
    K.comap (f : N →ₙ* M) = K.map (f.symm : M →ₙ* N) 
goal: AddSubsemigroup.comap (↑f) K = AddSubsemigroup.map (↑f.symm) K

full_name: Subsemigroup.comap_equiv_eq_map_symm
code: @[to_additive]
theorem comap_equiv_eq_map_symm (f : N ≃* M) (K : Subsemigroup M) :
    K.comap (f : N →ₙ* M) = K.map (f.symm : M →ₙ* N) 
goal: Subsemigroup.comap (↑f) K = Subsemigroup.map (↑f.symm) K

full_name: AddSubsemigroup.map_equiv_top
code: @[to_additive (attr := simp)]
theorem map_equiv_top (f : M ≃* N) : (⊤ : Subsemigroup M).map (f : M →ₙ* N) = ⊤ 
goal: AddSubsemigroup.map ↑f ⊤ = ⊤

full_name: Subsemigroup.map_equiv_top
code: @[to_additive (attr := simp)]
theorem map_equiv_top (f : M ≃* N) : (⊤ : Subsemigroup M).map (f : M →ₙ* N) = ⊤ 
goal: Subsemigroup.map ↑f ⊤ = ⊤

full_name: Subsemigroup.le_prod_iff
code: @[to_additive le_prod_iff]
theorem le_prod_iff {s : Subsemigroup M} {t : Subsemigroup N} {u : Subsemigroup (M × N)} :
    u ≤ s.prod t ↔ u.map (fst M N) ≤ s ∧ u.map (snd M N) ≤ t 
goal: u ≤ s.prod t ↔ Subsemigroup.map (MulHom.fst M N) u ≤ s ∧ Subsemigroup.map (MulHom.snd M N) u ≤ t

full_name: AddSubsemigroup.le_prod_iff
code: @[to_additive le_prod_iff]
theorem le_prod_iff {s : Subsemigroup M} {t : Subsemigroup N} {u : Subsemigroup (M × N)} :
    u ≤ s.prod t ↔ u.map (fst M N) ≤ s ∧ u.map (snd M N) ≤ t 
goal: u ≤ s.prod t ↔ AddSubsemigroup.map (AddHom.fst M N) u ≤ s ∧ AddSubsemigroup.map (AddHom.snd M N) u ≤ t

full_name: MulHom.srange
code: /-- The range of a semigroup homomorphism is a subsemigroup. See Note [range copy pattern]. -/
@[to_additive "The range of an `AddHom` is an `AddSubsemigroup`."]
def srange (f : M →ₙ* N) : Subsemigroup N 
goal: Subsemigroup N

full_name: AddHom.srange
code: /-- The range of a semigroup homomorphism is a subsemigroup. See Note [range copy pattern]. -/
@[to_additive "The range of an `AddHom` is an `AddSubsemigroup`."]
def srange (f : M →ₙ* N) : Subsemigroup N 
goal: AddSubsemigroup N

full_name: MulHom.coe_srange
code: @[to_additive (attr := simp)]
theorem coe_srange (f : M →ₙ* N) : (f.srange : Set N) = Set.range f 
goal: ↑f.srange = Set.range ⇑f

full_name: AddHom.coe_srange
code: @[to_additive (attr := simp)]
theorem coe_srange (f : M →ₙ* N) : (f.srange : Set N) = Set.range f 
goal: ↑f.srange = Set.range ⇑f

full_name: AddHom.mem_srange
code: @[to_additive (attr := simp)]
theorem mem_srange {f : M →ₙ* N} {y : N} : y ∈ f.srange ↔ ∃ x, f x = y 
goal: y ∈ f.srange ↔ ∃ x, f x = y

full_name: MulHom.mem_srange
code: @[to_additive (attr := simp)]
theorem mem_srange {f : M →ₙ* N} {y : N} : y ∈ f.srange ↔ ∃ x, f x = y 
goal: y ∈ f.srange ↔ ∃ x, f x = y

full_name: AddHom.srange_eq_map
code: @[to_additive]
theorem srange_eq_map (f : M →ₙ* N) : f.srange = (⊤ : Subsemigroup M).map f 
goal: f.srange = AddSubsemigroup.map f ⊤

full_name: MulHom.srange_eq_map
code: @[to_additive]
theorem srange_eq_map (f : M →ₙ* N) : f.srange = (⊤ : Subsemigroup M).map f 
goal: f.srange = Subsemigroup.map f ⊤

full_name: AddHom.map_srange
code: @[to_additive]
theorem map_srange (g : N →ₙ* P) (f : M →ₙ* N) : f.srange.map g = (g.comp f).srange 
goal: AddSubsemigroup.map g f.srange = (g.comp f).srange

full_name: MulHom.map_srange
code: @[to_additive]
theorem map_srange (g : N →ₙ* P) (f : M →ₙ* N) : f.srange.map g = (g.comp f).srange 
goal: Subsemigroup.map g f.srange = (g.comp f).srange

full_name: AddHom.srange_top_iff_surjective
code: @[to_additive]
theorem srange_top_iff_surjective {N} [Mul N] {f : M →ₙ* N} :
    f.srange = (⊤ : Subsemigroup N) ↔ Function.Surjective f 
goal: f.srange = ⊤ ↔ Function.Surjective ⇑f

full_name: MulHom.srange_top_iff_surjective
code: @[to_additive]
theorem srange_top_iff_surjective {N} [Mul N] {f : M →ₙ* N} :
    f.srange = (⊤ : Subsemigroup N) ↔ Function.Surjective f 
goal: f.srange = ⊤ ↔ Function.Surjective ⇑f

full_name: MulHom.srange_top_of_surjective
code: /-- The range of a surjective semigroup hom is the whole of the codomain. -/
@[to_additive (attr := simp)
  "The range of a surjective `AddSemigroup` hom is the whole of the codomain."]
theorem srange_top_of_surjective {N} [Mul N] (f : M →ₙ* N) (hf : Function.Surjective f) :
    f.srange = (⊤ : Subsemigroup N) 
goal: f.srange = ⊤

full_name: AddHom.srange_top_of_surjective
code: /-- The range of a surjective semigroup hom is the whole of the codomain. -/
@[to_additive (attr := simp)
  "The range of a surjective `AddSemigroup` hom is the whole of the codomain."]
theorem srange_top_of_surjective {N} [Mul N] (f : M →ₙ* N) (hf : Function.Surjective f) :
    f.srange = (⊤ : Subsemigroup N) 
goal: f.srange = ⊤

full_name: AddHom.mclosure_preimage_le
code: @[to_additive]
theorem mclosure_preimage_le (f : M →ₙ* N) (s : Set N) : closure (f ⁻¹' s) ≤ (closure s).comap f 
goal: AddSubsemigroup.closure (⇑f ⁻¹' s) ≤ AddSubsemigroup.comap f (AddSubsemigroup.closure s)

full_name: MulHom.mclosure_preimage_le
code: @[to_additive]
theorem mclosure_preimage_le (f : M →ₙ* N) (s : Set N) : closure (f ⁻¹' s) ≤ (closure s).comap f 
goal: Subsemigroup.closure (⇑f ⁻¹' s) ≤ Subsemigroup.comap f (Subsemigroup.closure s)

full_name: MulHom.map_mclosure
code: /-- The image under a semigroup hom of the subsemigroup generated by a set equals the subsemigroup
generated by the image of the set. -/
@[to_additive
      "The image under an `AddSemigroup` hom of the `AddSubsemigroup` generated by a set
      equals the `AddSubsemigroup` generated by the image of the set."]
theorem map_mclosure (f : M →ₙ* N) (s : Set M) : (closure s).map f = closure (f '' s) 
goal: Subsemigroup.map f (Subsemigroup.closure s) = Subsemigroup.closure (⇑f '' s)

full_name: AddHom.map_mclosure
code: /-- The image under a semigroup hom of the subsemigroup generated by a set equals the subsemigroup
generated by the image of the set. -/
@[to_additive
      "The image under an `AddSemigroup` hom of the `AddSubsemigroup` generated by a set
      equals the `AddSubsemigroup` generated by the image of the set."]
theorem map_mclosure (f : M →ₙ* N) (s : Set M) : (closure s).map f = closure (f '' s) 
goal: AddSubsemigroup.map f (AddSubsemigroup.closure s) = AddSubsemigroup.closure (⇑f '' s)

full_name: AddHom.restrict
code: /-- Restriction of a semigroup hom to a subsemigroup of the domain. -/
@[to_additive "Restriction of an AddSemigroup hom to an `AddSubsemigroup` of the domain."]
def restrict {N : Type*} [Mul N] [SetLike σ M] [MulMemClass σ M] (f : M →ₙ* N) (S : σ) : S →ₙ* N 
goal: AddHom (↥S) N

full_name: MulHom.restrict
code: /-- Restriction of a semigroup hom to a subsemigroup of the domain. -/
@[to_additive "Restriction of an AddSemigroup hom to an `AddSubsemigroup` of the domain."]
def restrict {N : Type*} [Mul N] [SetLike σ M] [MulMemClass σ M] (f : M →ₙ* N) (S : σ) : S →ₙ* N 
goal: ↥S →ₙ* N

full_name: MulHom.restrict_apply
code: @[to_additive (attr := simp)]
theorem restrict_apply {N : Type*} [Mul N] [SetLike σ M] [MulMemClass σ M] (f : M →ₙ* N) {S : σ}
    (x : S) : f.restrict S x = f x 
goal: (f.restrict S) x = f ↑x

full_name: AddHom.restrict_apply
code: @[to_additive (attr := simp)]
theorem restrict_apply {N : Type*} [Mul N] [SetLike σ M] [MulMemClass σ M] (f : M →ₙ* N) {S : σ}
    (x : S) : f.restrict S x = f x 
goal: (f.restrict S) x = f ↑x

full_name: AddHom.codRestrict
code: /-- Restriction of a semigroup hom to a subsemigroup of the codomain. -/
@[to_additive (attr := simps)
  "Restriction of an `AddSemigroup` hom to an `AddSubsemigroup` of the codomain."]
def codRestrict [SetLike σ N] [MulMemClass σ N] (f : M →ₙ* N) (S : σ) (h : ∀ x, f x ∈ S) :
    M →ₙ* S 
goal: AddHom M ↥S

full_name: MulHom.codRestrict_apply_coe
code: /-- Restriction of a semigroup hom to a subsemigroup of the codomain. -/
@[to_additive (attr := simps)
  "Restriction of an `AddSemigroup` hom to an `AddSubsemigroup` of the codomain."]
def codRestrict [SetLike σ N] [MulMemClass σ N] (f : M →ₙ* N) (S : σ) (h : ∀ x, f x ∈ S) :
    M →ₙ* S 
goal: ↑((f.codRestrict S h) n) = f n

full_name: MulHom.codRestrict
code: /-- Restriction of a semigroup hom to a subsemigroup of the codomain. -/
@[to_additive (attr := simps)
  "Restriction of an `AddSemigroup` hom to an `AddSubsemigroup` of the codomain."]
def codRestrict [SetLike σ N] [MulMemClass σ N] (f : M →ₙ* N) (S : σ) (h : ∀ x, f x ∈ S) :
    M →ₙ* S 
goal: M →ₙ* ↥S

full_name: AddHom.codRestrict_apply_coe
code: /-- Restriction of a semigroup hom to a subsemigroup of the codomain. -/
@[to_additive (attr := simps)
  "Restriction of an `AddSemigroup` hom to an `AddSubsemigroup` of the codomain."]
def codRestrict [SetLike σ N] [MulMemClass σ N] (f : M →ₙ* N) (S : σ) (h : ∀ x, f x ∈ S) :
    M →ₙ* S 
goal: ↑((f.codRestrict S h) n) = f n

full_name: MulHom.srangeRestrict
code: /-- Restriction of a semigroup hom to its range interpreted as a subsemigroup. -/
@[to_additive "Restriction of an `AddSemigroup` hom to its range interpreted as a subsemigroup."]
def srangeRestrict {N} [Mul N] (f : M →ₙ* N) : M →ₙ* f.srange 
goal: M →ₙ* ↥f.srange

full_name: AddHom.srangeRestrict
code: /-- Restriction of a semigroup hom to its range interpreted as a subsemigroup. -/
@[to_additive "Restriction of an `AddSemigroup` hom to its range interpreted as a subsemigroup."]
def srangeRestrict {N} [Mul N] (f : M →ₙ* N) : M →ₙ* f.srange 
goal: AddHom M ↥f.srange

full_name: AddHom.coe_srangeRestrict
code: @[to_additive (attr := simp)]
theorem coe_srangeRestrict {N} [Mul N] (f : M →ₙ* N) (x : M) : (f.srangeRestrict x : N) = f x 
goal: ↑(f.srangeRestrict x) = f x

full_name: MulHom.coe_srangeRestrict
code: @[to_additive (attr := simp)]
theorem coe_srangeRestrict {N} [Mul N] (f : M →ₙ* N) (x : M) : (f.srangeRestrict x : N) = f x 
goal: ↑(f.srangeRestrict x) = f x

full_name: AddHom.srangeRestrict_surjective
code: @[to_additive]
theorem srangeRestrict_surjective (f : M →ₙ* N) : Function.Surjective f.srangeRestrict 
goal: Function.Surjective ⇑f.srangeRestrict

full_name: MulHom.srangeRestrict_surjective
code: @[to_additive]
theorem srangeRestrict_surjective (f : M →ₙ* N) : Function.Surjective f.srangeRestrict 
goal: Function.Surjective ⇑f.srangeRestrict

full_name: MulHom.prod_map_comap_prod'
code: @[to_additive prod_map_comap_prod']
theorem prod_map_comap_prod' {M' : Type*} {N' : Type*} [Mul M'] [Mul N'] (f : M →ₙ* N)
    (g : M' →ₙ* N') (S : Subsemigroup N) (S' : Subsemigroup N') :
    (S.prod S').comap (prodMap f g) = (S.comap f).prod (S'.comap g) 
goal: Subsemigroup.comap (f.prodMap g) (S.prod S') = (Subsemigroup.comap f S).prod (Subsemigroup.comap g S')

full_name: AddHom.prod_map_comap_prod'
code: @[to_additive prod_map_comap_prod']
theorem prod_map_comap_prod' {M' : Type*} {N' : Type*} [Mul M'] [Mul N'] (f : M →ₙ* N)
    (g : M' →ₙ* N') (S : Subsemigroup N) (S' : Subsemigroup N') :
    (S.prod S').comap (prodMap f g) = (S.comap f).prod (S'.comap g) 
goal: AddSubsemigroup.comap (f.prodMap g) (S.prod S') = (AddSubsemigroup.comap f S).prod (AddSubsemigroup.comap g S')

full_name: MulHom.subsemigroupComap_apply_coe
code: /-- The `MulHom` from the preimage of a subsemigroup to itself. -/
@[to_additive (attr := simps)
  "The `AddHom` from the preimage of an additive subsemigroup to itself."]
def subsemigroupComap (f : M →ₙ* N) (N' : Subsemigroup N) :
    N'.comap f →ₙ* N' 
goal: ↑((f.subsemigroupComap N') x) = f ↑x

full_name: AddHom.subsemigroupComap
code: /-- The `MulHom` from the preimage of a subsemigroup to itself. -/
@[to_additive (attr := simps)
  "The `AddHom` from the preimage of an additive subsemigroup to itself."]
def subsemigroupComap (f : M →ₙ* N) (N' : Subsemigroup N) :
    N'.comap f →ₙ* N' 
goal: AddHom ↥(AddSubsemigroup.comap f N') ↥N'

full_name: MulHom.subsemigroupComap
code: /-- The `MulHom` from the preimage of a subsemigroup to itself. -/
@[to_additive (attr := simps)
  "The `AddHom` from the preimage of an additive subsemigroup to itself."]
def subsemigroupComap (f : M →ₙ* N) (N' : Subsemigroup N) :
    N'.comap f →ₙ* N' 
goal: ↥(Subsemigroup.comap f N') →ₙ* ↥N'

full_name: AddHom.subsemigroupComap_apply_coe
code: /-- The `MulHom` from the preimage of a subsemigroup to itself. -/
@[to_additive (attr := simps)
  "The `AddHom` from the preimage of an additive subsemigroup to itself."]
def subsemigroupComap (f : M →ₙ* N) (N' : Subsemigroup N) :
    N'.comap f →ₙ* N' 
goal: ↑((f.subsemigroupComap N') x) = f ↑x

full_name: AddHom.subsemigroupMap
code: /-- The `MulHom` from a subsemigroup to its image.
See `MulEquiv.subsemigroupMap` for a variant for `MulEquiv`s. -/
@[to_additive (attr := simps)
      "the `AddHom` from an additive subsemigroup to its image. See
      `AddEquiv.addSubsemigroupMap` for a variant for `AddEquiv`s."]
def subsemigroupMap (f : M →ₙ* N) (M' : Subsemigroup M) :
    M' →ₙ* M'.map f 
goal: AddHom ↥M' ↥(AddSubsemigroup.map f M')

full_name: AddHom.subsemigroupMap_apply_coe
code: /-- The `MulHom` from a subsemigroup to its image.
See `MulEquiv.subsemigroupMap` for a variant for `MulEquiv`s. -/
@[to_additive (attr := simps)
      "the `AddHom` from an additive subsemigroup to its image. See
      `AddEquiv.addSubsemigroupMap` for a variant for `AddEquiv`s."]
def subsemigroupMap (f : M →ₙ* N) (M' : Subsemigroup M) :
    M' →ₙ* M'.map f 
goal: ↑((f.subsemigroupMap M') x) = f ↑x

full_name: MulHom.subsemigroupMap_apply_coe
code: /-- The `MulHom` from a subsemigroup to its image.
See `MulEquiv.subsemigroupMap` for a variant for `MulEquiv`s. -/
@[to_additive (attr := simps)
      "the `AddHom` from an additive subsemigroup to its image. See
      `AddEquiv.addSubsemigroupMap` for a variant for `AddEquiv`s."]
def subsemigroupMap (f : M →ₙ* N) (M' : Subsemigroup M) :
    M' →ₙ* M'.map f 
goal: ↑((f.subsemigroupMap M') x) = f ↑x

full_name: MulHom.subsemigroupMap
code: /-- The `MulHom` from a subsemigroup to its image.
See `MulEquiv.subsemigroupMap` for a variant for `MulEquiv`s. -/
@[to_additive (attr := simps)
      "the `AddHom` from an additive subsemigroup to its image. See
      `AddEquiv.addSubsemigroupMap` for a variant for `AddEquiv`s."]
def subsemigroupMap (f : M →ₙ* N) (M' : Subsemigroup M) :
    M' →ₙ* M'.map f 
goal: ↥M' →ₙ* ↥(Subsemigroup.map f M')

full_name: MulHom.subsemigroupMap_surjective
code: @[to_additive]
theorem subsemigroupMap_surjective (f : M →ₙ* N) (M' : Subsemigroup M) :
    Function.Surjective (f.subsemigroupMap M') 
goal: Function.Surjective ⇑(f.subsemigroupMap M')

full_name: AddHom.subsemigroupMap_surjective
code: @[to_additive]
theorem subsemigroupMap_surjective (f : M →ₙ* N) (M' : Subsemigroup M) :
    Function.Surjective (f.subsemigroupMap M') 
goal: Function.Surjective ⇑(f.subsemigroupMap M')

full_name: Subsemigroup.srange_fst
code: @[to_additive (attr := simp)]
theorem srange_fst [Nonempty N] : (fst M N).srange = ⊤ 
goal: (MulHom.fst M N).srange = ⊤

full_name: AddSubsemigroup.srange_fst
code: @[to_additive (attr := simp)]
theorem srange_fst [Nonempty N] : (fst M N).srange = ⊤ 
goal: (AddHom.fst M N).srange = ⊤

full_name: AddSubsemigroup.srange_snd
code: @[to_additive (attr := simp)]
theorem srange_snd [Nonempty M] : (snd M N).srange = ⊤ 
goal: (AddHom.snd M N).srange = ⊤

full_name: Subsemigroup.srange_snd
code: @[to_additive (attr := simp)]
theorem srange_snd [Nonempty M] : (snd M N).srange = ⊤ 
goal: (MulHom.snd M N).srange = ⊤

full_name: Subsemigroup.prod_eq_top_iff
code: @[to_additive prod_eq_top_iff]
theorem prod_eq_top_iff [Nonempty M] [Nonempty N] {s : Subsemigroup M} {t : Subsemigroup N} :
    s.prod t = ⊤ ↔ s = ⊤ ∧ t = ⊤ 
goal: s.prod t = ⊤ ↔ s = ⊤ ∧ t = ⊤

full_name: AddSubsemigroup.prod_eq_top_iff
code: @[to_additive prod_eq_top_iff]
theorem prod_eq_top_iff [Nonempty M] [Nonempty N] {s : Subsemigroup M} {t : Subsemigroup N} :
    s.prod t = ⊤ ↔ s = ⊤ ∧ t = ⊤ 
goal: s.prod t = ⊤ ↔ s = ⊤ ∧ t = ⊤

full_name: Subsemigroup.inclusion
code: /-- The semigroup hom associated to an inclusion of subsemigroups. -/
@[to_additive "The `AddSemigroup` hom associated to an inclusion of subsemigroups."]
def inclusion {S T : Subsemigroup M} (h : S ≤ T) : S →ₙ* T 
goal: ↥S →ₙ* ↥T

full_name: AddSubsemigroup.inclusion
code: /-- The semigroup hom associated to an inclusion of subsemigroups. -/
@[to_additive "The `AddSemigroup` hom associated to an inclusion of subsemigroups."]
def inclusion {S T : Subsemigroup M} (h : S ≤ T) : S →ₙ* T 
goal: AddHom ↥S ↥T

full_name: AddSubsemigroup.range_subtype
code: @[to_additive (attr := simp)]
theorem range_subtype (s : Subsemigroup M) : (MulMemClass.subtype s).srange = s 
goal: (AddMemClass.subtype s).srange = s

full_name: Subsemigroup.range_subtype
code: @[to_additive (attr := simp)]
theorem range_subtype (s : Subsemigroup M) : (MulMemClass.subtype s).srange = s 
goal: (MulMemClass.subtype s).srange = s

full_name: AddSubsemigroup.eq_top_iff'
code: @[to_additive]
theorem eq_top_iff' : S = ⊤ ↔ ∀ x : M, x ∈ S 
goal: S = ⊤ ↔ ∀ (x : M), x ∈ S

full_name: Subsemigroup.eq_top_iff'
code: @[to_additive]
theorem eq_top_iff' : S = ⊤ ↔ ∀ x : M, x ∈ S 
goal: S = ⊤ ↔ ∀ (x : M), x ∈ S

full_name: MulEquiv.subsemigroupCongr
code: /-- Makes the identity isomorphism from a proof that two subsemigroups of a multiplicative
    semigroup are equal. -/
@[to_additive
      "Makes the identity additive isomorphism from a proof two
      subsemigroups of an additive semigroup are equal."]
def subsemigroupCongr (h : S = T) : S ≃* T 
goal: ↥S ≃* ↥T

full_name: AddEquiv.subsemigroupCongr
code: /-- Makes the identity isomorphism from a proof that two subsemigroups of a multiplicative
    semigroup are equal. -/
@[to_additive
      "Makes the identity additive isomorphism from a proof two
      subsemigroups of an additive semigroup are equal."]
def subsemigroupCongr (h : S = T) : S ≃* T 
goal: ↥S ≃+ ↥T

full_name: MulEquiv.ofLeftInverse
code: /-- A semigroup homomorphism `f : M →ₙ* N` with a left-inverse `g : N → M` defines a multiplicative
equivalence between `M` and `f.srange`.

This is a bidirectional version of `MulHom.srangeRestrict`. -/
@[to_additive (attr := simps (config := { simpRhs := true }))
      "An additive semigroup homomorphism `f : M →+ N` with a left-inverse
      `g : N → M` defines an additive equivalence between `M` and `f.srange`.
      This is a bidirectional version of `AddHom.srangeRestrict`. "]
def ofLeftInverse (f : M →ₙ* N) {g : N → M} (h : Function.LeftInverse g f) : M ≃* f.srange 
goal: M ≃* ↥f.srange

full_name: AddEquiv.ofLeftInverse_apply
code: /-- A semigroup homomorphism `f : M →ₙ* N` with a left-inverse `g : N → M` defines a multiplicative
equivalence between `M` and `f.srange`.

This is a bidirectional version of `MulHom.srangeRestrict`. -/
@[to_additive (attr := simps (config := { simpRhs := true }))
      "An additive semigroup homomorphism `f : M →+ N` with a left-inverse
      `g : N → M` defines an additive equivalence between `M` and `f.srange`.
      This is a bidirectional version of `AddHom.srangeRestrict`. "]
def ofLeftInverse (f : M →ₙ* N) {g : N → M} (h : Function.LeftInverse g f) : M ≃* f.srange 
goal: (AddEquiv.ofLeftInverse f h) a = f.srangeRestrict a

full_name: AddEquiv.ofLeftInverse_symm_apply
code: /-- A semigroup homomorphism `f : M →ₙ* N` with a left-inverse `g : N → M` defines a multiplicative
equivalence between `M` and `f.srange`.

This is a bidirectional version of `MulHom.srangeRestrict`. -/
@[to_additive (attr := simps (config := { simpRhs := true }))
      "An additive semigroup homomorphism `f : M →+ N` with a left-inverse
      `g : N → M` defines an additive equivalence between `M` and `f.srange`.
      This is a bidirectional version of `AddHom.srangeRestrict`. "]
def ofLeftInverse (f : M →ₙ* N) {g : N → M} (h : Function.LeftInverse g f) : M ≃* f.srange 
goal: ∀ (a : ↥f.srange), (AddEquiv.ofLeftInverse f h).symm a = g ↑a

full_name: MulEquiv.ofLeftInverse_symm_apply
code: /-- A semigroup homomorphism `f : M →ₙ* N` with a left-inverse `g : N → M` defines a multiplicative
equivalence between `M` and `f.srange`.

This is a bidirectional version of `MulHom.srangeRestrict`. -/
@[to_additive (attr := simps (config := { simpRhs := true }))
      "An additive semigroup homomorphism `f : M →+ N` with a left-inverse
      `g : N → M` defines an additive equivalence between `M` and `f.srange`.
      This is a bidirectional version of `AddHom.srangeRestrict`. "]
def ofLeftInverse (f : M →ₙ* N) {g : N → M} (h : Function.LeftInverse g f) : M ≃* f.srange 
goal: ∀ (a : ↥f.srange), (MulEquiv.ofLeftInverse f h).symm a = g ↑a

full_name: MulEquiv.ofLeftInverse_apply
code: /-- A semigroup homomorphism `f : M →ₙ* N` with a left-inverse `g : N → M` defines a multiplicative
equivalence between `M` and `f.srange`.

This is a bidirectional version of `MulHom.srangeRestrict`. -/
@[to_additive (attr := simps (config := { simpRhs := true }))
      "An additive semigroup homomorphism `f : M →+ N` with a left-inverse
      `g : N → M` defines an additive equivalence between `M` and `f.srange`.
      This is a bidirectional version of `AddHom.srangeRestrict`. "]
def ofLeftInverse (f : M →ₙ* N) {g : N → M} (h : Function.LeftInverse g f) : M ≃* f.srange 
goal: (MulEquiv.ofLeftInverse f h) a = f.srangeRestrict a

full_name: AddEquiv.ofLeftInverse
code: /-- A semigroup homomorphism `f : M →ₙ* N` with a left-inverse `g : N → M` defines a multiplicative
equivalence between `M` and `f.srange`.

This is a bidirectional version of `MulHom.srangeRestrict`. -/
@[to_additive (attr := simps (config := { simpRhs := true }))
      "An additive semigroup homomorphism `f : M →+ N` with a left-inverse
      `g : N → M` defines an additive equivalence between `M` and `f.srange`.
      This is a bidirectional version of `AddHom.srangeRestrict`. "]
def ofLeftInverse (f : M →ₙ* N) {g : N → M} (h : Function.LeftInverse g f) : M ≃* f.srange 
goal: M ≃+ ↥f.srange

full_name: AddEquiv.subsemigroupMap_symm_apply_coe
code: /-- A `MulEquiv` `φ` between two semigroups `M` and `N` induces a `MulEquiv` between
a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
See `MulHom.subsemigroupMap` for a variant for `MulHom`s. -/
@[to_additive (attr := simps)
      "An `AddEquiv` `φ` between two additive semigroups `M` and `N` induces an `AddEquiv`
      between a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
      See `AddHom.addSubsemigroupMap` for a variant for `AddHom`s."]
def subsemigroupMap (e : M ≃* N) (S : Subsemigroup M) : S ≃* S.map (e : M →ₙ* N) 
goal: ↑((e.subsemigroupMap S).symm x) = e.symm ↑x

full_name: MulEquiv.subsemigroupMap
code: /-- A `MulEquiv` `φ` between two semigroups `M` and `N` induces a `MulEquiv` between
a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
See `MulHom.subsemigroupMap` for a variant for `MulHom`s. -/
@[to_additive (attr := simps)
      "An `AddEquiv` `φ` between two additive semigroups `M` and `N` induces an `AddEquiv`
      between a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
      See `AddHom.addSubsemigroupMap` for a variant for `AddHom`s."]
def subsemigroupMap (e : M ≃* N) (S : Subsemigroup M) : S ≃* S.map (e : M →ₙ* N) 
goal: ↥S ≃* ↥(Subsemigroup.map (↑e) S)

full_name: AddEquiv.subsemigroupMap_apply_coe
code: /-- A `MulEquiv` `φ` between two semigroups `M` and `N` induces a `MulEquiv` between
a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
See `MulHom.subsemigroupMap` for a variant for `MulHom`s. -/
@[to_additive (attr := simps)
      "An `AddEquiv` `φ` between two additive semigroups `M` and `N` induces an `AddEquiv`
      between a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
      See `AddHom.addSubsemigroupMap` for a variant for `AddHom`s."]
def subsemigroupMap (e : M ≃* N) (S : Subsemigroup M) : S ≃* S.map (e : M →ₙ* N) 
goal: ↑((e.subsemigroupMap S) x) = e ↑x

full_name: AddEquiv.subsemigroupMap
code: /-- A `MulEquiv` `φ` between two semigroups `M` and `N` induces a `MulEquiv` between
a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
See `MulHom.subsemigroupMap` for a variant for `MulHom`s. -/
@[to_additive (attr := simps)
      "An `AddEquiv` `φ` between two additive semigroups `M` and `N` induces an `AddEquiv`
      between a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
      See `AddHom.addSubsemigroupMap` for a variant for `AddHom`s."]
def subsemigroupMap (e : M ≃* N) (S : Subsemigroup M) : S ≃* S.map (e : M →ₙ* N) 
goal: ↥S ≃+ ↥(AddSubsemigroup.map (↑e) S)

full_name: MulEquiv.subsemigroupMap_symm_apply_coe
code: /-- A `MulEquiv` `φ` between two semigroups `M` and `N` induces a `MulEquiv` between
a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
See `MulHom.subsemigroupMap` for a variant for `MulHom`s. -/
@[to_additive (attr := simps)
      "An `AddEquiv` `φ` between two additive semigroups `M` and `N` induces an `AddEquiv`
      between a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
      See `AddHom.addSubsemigroupMap` for a variant for `AddHom`s."]
def subsemigroupMap (e : M ≃* N) (S : Subsemigroup M) : S ≃* S.map (e : M →ₙ* N) 
goal: ↑((e.subsemigroupMap S).symm x) = e.symm ↑x

full_name: MulEquiv.subsemigroupMap_apply_coe
code: /-- A `MulEquiv` `φ` between two semigroups `M` and `N` induces a `MulEquiv` between
a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
See `MulHom.subsemigroupMap` for a variant for `MulHom`s. -/
@[to_additive (attr := simps)
      "An `AddEquiv` `φ` between two additive semigroups `M` and `N` induces an `AddEquiv`
      between a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
      See `AddHom.addSubsemigroupMap` for a variant for `AddHom`s."]
def subsemigroupMap (e : M ≃* N) (S : Subsemigroup M) : S ≃* S.map (e : M →ₙ* N) 
goal: ↑((e.subsemigroupMap S) x) = e ↑x

full_name: Subsemigroup.map_comap_eq
code: @[to_additive]
theorem map_comap_eq (f : M →ₙ* N) (S : Subsemigroup N) : (S.comap f).map f = S ⊓ f.srange 
goal: Subsemigroup.map f (Subsemigroup.comap f S) = S ⊓ f.srange

full_name: AddSubsemigroup.map_comap_eq
code: @[to_additive]
theorem map_comap_eq (f : M →ₙ* N) (S : Subsemigroup N) : (S.comap f).map f = S ⊓ f.srange 
goal: AddSubsemigroup.map f (AddSubsemigroup.comap f S) = S ⊓ f.srange

full_name: Subsemigroup.map_comap_eq_self
code: @[to_additive]
theorem map_comap_eq_self {f : M →ₙ* N} {S : Subsemigroup N} (h : S ≤ f.srange) :
    (S.comap f).map f = S 
goal: Subsemigroup.map f (Subsemigroup.comap f S) = S

full_name: AddSubsemigroup.map_comap_eq_self
code: @[to_additive]
theorem map_comap_eq_self {f : M →ₙ* N} {S : Subsemigroup N} (h : S ≤ f.srange) :
    (S.comap f).map f = S 
goal: AddSubsemigroup.map f (AddSubsemigroup.comap f S) = S