English
If Y is a Monoid, LocallyConstant X Y inherits a Monoid structure with pointwise multiplication and a constant-ones as the unit: (f g)(x) = f(x) g(x), 1(x) = 1_Y.
Русский
Если Y — моноид, LocallyConstant X Y получает моноидовую структуру по точкам: (f g)(x) = f(x) g(x), 1(x) = 1_Y.
LaTeX
$$$\forall f,g:\mathrm{LocallyConstant}(X,Y),\; (f\cdot g)(x) = f(x)g(x),\; 1_{\mathrm{LocConst}}(x) = 1_Y.$$$
Lean4
@[to_additive]
instance [Monoid Y] : Monoid (LocallyConstant X Y) :=
Function.Injective.monoid DFunLike.coe DFunLike.coe_injective' rfl (fun _ _ => rfl) fun _ _ => rfl