English
End_R(M) carries a Semiring structure with addition as usual and multiplication given by composition; the natural integer cast aligns with the endomorphism by zsmul.
Русский
End_R(M) имеет структуру полукольца: сложение обычное, умножение — композиция; встроенный целочисленный привод согласуется с умножением.
LaTeX
$$$ \mathrm{End}_R(M) \text{ is a Semiring with } f \cdot g = f \circ g \text{ and scalar actions compatible with } \mathbb{Z}.$$$
Lean4
instance instRing : Ring (Module.End R N₁)
where
intCast z := z • (1 : N₁ →ₗ[R] N₁)
intCast_ofNat := natCast_zsmul _
intCast_negSucc := negSucc_zsmul _