Module Type NZSqrt (A : NZOrdAxiomsSig) := Sqrt A <+ NZSqrtSpec A.
Module Type NZSqrt' (A : NZOrdAxiomsSig) := Sqrt' A <+ NZSqrtSpec A.
(** Derived properties of power *)
Module Type NZSqrtProp
(Import A : NZOrdAxiomsSig')
(Import B : NZSqrt' A)
(Import C : NZMulOrderProp A).
Local Notation "a ²" := (a*a) (at level 5, no associativity, format "a ²").
(** First, sqrt is non-negative *)

(* Specifications: *)
Lemma sqrt_spec_nonneg : forall b,
b² < (S b)² -> 0 <= b.
Lemma sqrt_nonneg : forall a, 0<=√a.
(** The spec of sqrt indeed determines it *)
Lemma sqrt_unique : forall a b, b² <= a < (S b)² -> √a == b.
#[global]
Instance sqrt_wd : Proper (eq==>eq) sqrt.