(** ** Correctness proofs for the square root function *)

(* Specifications: *)
Lemma sqrtrem_step_spec f g p x :
(f=xO \/ f=xI) -> (g=xO \/ g=xI) ->
SqrtSpec p x -> SqrtSpec (sqrtrem_step f g p) (g (f x)).
Lemma sqrtrem_spec p : SqrtSpec (sqrtrem p) p.
Lemma sqrt_spec p :
let s := sqrt p in s*s <= p < (succ s)*(succ s).