English
The map Zsqrtd.d → ℝ sends a square root of d to the positive real square root of d when d ≥ 0.
Русский
Отображение Zsqrtd.d → ℝ отправляет квадратный корень из d к положительному вещественному квадратному корню, если d ≥ 0.
LaTeX
$$$ \text{toReal}_{d} : \mathbb{Z}\sqrt{d} \to \mathbb{R} $ реализуется как подъём к реальному корню нескольких свойств.$$
Lean4
/-- The image of `Zsqrtd` in `ℝ`, using `Real.sqrt` which takes the positive root of `d`.
If the negative root is desired, use `toReal h (star a)`. -/
@[simps!]
noncomputable def toReal {d : ℤ} (h : 0 ≤ d) : ℤ√d →+* ℝ :=
lift ⟨√↑d, Real.mul_self_sqrt (Int.cast_nonneg.mpr h)⟩