proposition: Theorem spec_sqrt: forall x, to_Z (sqrt x) = Z.sqrt (to_Z x).
proof: Proof. destruct x as [p|p]; simpl. apply NN.spec_sqrt. rewrite NN.spec_0. destruct (Z_le_lt_eq_dec _ _ (NN.spec_pos p)) as [LT|EQ]. rewrite Z.sqrt_neg; auto with zarith. now rewrite <- EQ. Qed.
imports: ZArith Lia BigNumPrelude NSig ZSig