Module docstring
{"# Square root of a real number
In this file we define
NNReal.sqrtto be the square root of a nonnegative real number.Real.sqrtto be the square root of a real number, defined to be zero on negative numbers.
Then we prove some basic properties of these functions.
Implementation notes
We define NNReal.sqrt as the noncomputable inverse to the function x ↦ x * x. We use general
theory of inverses of strictly monotone functions to prove that NNReal.sqrt x exists. As a side
effect, NNReal.sqrt is a bundled OrderIso, so for NNReal numbers we get continuity as well as
theorems like NNReal.sqrt x ≤ y ↔ x ≤ y * y for free.
Then we define Real.sqrt x to be NNReal.sqrt (Real.toNNReal x).
Tags
square root "}