English
If Y is a Semiring, LocallyConstant X Y inherits a Semiring structure with pointwise addition and multiplication.
Русский
Если Y — полусемирия, LocallyConstant X Y наследует полусемирия по точкам.
LaTeX
$$$\mathrm{LocallyConstant}(X,Y)\text{ is a Semiring with } (f+g)(x)=f(x)+g(x), (f\cdot g)(x)=f(x)g(x).$$$
Lean4
instance [Semiring Y] : Semiring (LocallyConstant X Y) :=
Function.Injective.semiring DFunLike.coe DFunLike.coe_injective' rfl rfl (fun _ _ => rfl) (fun _ _ => rfl)
(fun _ _ => rfl) (fun _ _ => rfl) fun _ => rfl