English
Extensionality: if two monoid homomorphisms f,g: M ∗ N →* P agree on inl and inr, then f = g.
Русский
Экстремальность: если два гомоморфизма f,g совпадают на inl и inr, то они равны.
LaTeX
$$theorem hom_ext {f g : M ∗ N →* P} (h1 : f ∘ inl = g ∘ inl) (h2 : f ∘ inr = g ∘ inr) : f = g$$
Lean4
/-- Extensionality lemma for monoid homomorphisms `M ∗ N →* P`.
If two homomorphisms agree on the ranges of `Monoid.Coprod.inl` and `Monoid.Coprod.inr`,
then they are equal. -/
@[to_additive (attr := ext 1100) /-- Extensionality lemma for additive monoid homomorphisms `AddMonoid.Coprod M N →+ P`.
If two homomorphisms agree on the ranges of `AddMonoid.Coprod.inl` and `AddMonoid.Coprod.inr`,
then they are equal. -/
]
theorem hom_ext {f g : M ∗ N →* P} (h₁ : f.comp inl = g.comp inl) (h₂ : f.comp inr = g.comp inr) : f = g :=
MonoidHom.eq_of_eqOn_denseM mclosure_range_inl_union_inr <|
eqOn_union.2 ⟨eqOn_range.2 <| DFunLike.ext'_iff.1 h₁, eqOn_range.2 <| DFunLike.ext'_iff.1 h₂⟩