English
Coercion of a MonoidHom into a function is itself a MonoidHom: the map (α →* β) →* α → β preserves identity and multiplication.
Русский
Приведение MonoidHom к функции само образует MonoidHom: отображение марать сохраняет единицу и умножение.
LaTeX
$$$ \text{coeFn} : (\alpha \to* \beta) \to* \alpha \to \beta $$$
Lean4
/-- Coercion of a `MonoidHom` into a function is itself a `MonoidHom`.
See also `MonoidHom.eval`. -/
@[to_additive (attr := simps) /-- Coercion of an `AddMonoidHom` into a function is itself
an `AddMonoidHom`.
See also `AddMonoidHom.eval`. -/
]
def coeFn (α β : Type*) [MulOneClass α] [CommMonoid β] : (α →* β) →* α → β
where
toFun g := g
map_one' := rfl
map_mul' _ _ := rfl