English
Define coord as the natural linear isomorphism from span{ x } to R given by the inverse of the span isomorphism.
Русский
Определим coord как натуральный линейный изоморфизм от span{ x } к R как обратную сторону от изоморфизма span.
LaTeX
$$$ coord\ R\ M\ x\ h = (toSpanNonzeroSingleton R M x h)^{-1} : (R \cdot x) \cong_R R. $$$
Lean4
/-- `generator I`, if `I` is a principal submodule, is an `x ∈ M` such that `span R {x} = I` -/
noncomputable def generator (S : Submodule R M) [S.IsPrincipal] : M :=
Classical.choose (principal S)