English
Let f: S → R be injective. If R carries a Ring structure, then S inherits a Ring structure pulled back along f, with f preserving 0, 1, +, ×, neg, and cast operations.
Русский
Пусть f: S → R инъективна. Если R имеет структуру Ring, тогда S наследует Ring путем переноса через f, сохраняя ноль, единицу, суммы, произведения и т.д.
LaTeX
$$$\\exists\\, \\mathcal{S}: \\text{Ring}(S),\\quad f(0)=0,\\quad f(1)=1,\\quad \\forall x,y, f(x+y)=f(x)+f(y),\\quad \\forall x,y, f(x\\cdot y)=f(x)\\cdot f(y),\\quad \\forall x, f(-x)=-f(x).$$$
Lean4
/-- Pullback a `Ring` instance along an injective function. -/
-- See note [reducible non-instances]
protected abbrev ring [Ring R] (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
(mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
(nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
(npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (natCast : ∀ n : ℕ, f n = n) (intCast : ∀ n : ℤ, f n = n) : Ring S
where
toSemiring := hf.semiring f zero one add mul nsmul npow natCast
zsmul := fun n x ↦ n • x
__ := hf.addGroupWithOne f zero one add neg sub nsmul zsmul natCast intCast
__ := hf.addCommGroup f zero add neg sub (swap nsmul) (swap zsmul)