proposition: Lemma AQsqrt_loop_fst_nonneg (n : nat) : 0 ≤ fst (AQsqrt_loop n).
proof: Proof. induction n; simpl. transitivity 1; [solve_propholds | easy]. revert IHn; case (AQsqrt_loop n); intros r s IHn. case (decide_rel (≤) (s + 1) r); intros; simpl in *. rewrite shiftl_2. apply nonneg_mult_compat; [solve_propholds |]. now apply rings.flip_nonneg_minus. rewrite shiftl_2. now apply (nonneg_mult_compat _ _ _). Qed.
imports: CoRN.algebra.RSetoid CoRN.metric2.Metric CoRN.metric2.UniformContinuity Coq.setoid_ring.Ring CoRN.stdlib_omissions.Z CoRN.model.totalorder.QposMinMax CoRN.metric2.Complete CoRN.model.metric2.Qmetric Coq.ZArith.ZArith CoRN.util.Qdlog CoRN.reals.fast.CRroot CoRN.reals.faster.ARabs MathClasses.interfaces.abstract_algebra MathClasses.theory.shiftl MathClasses.theory.nat_pow MathClasses.theory.int_pow CoRN.reals.faster.ARArith