Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
proux01 committed Jan 15, 2024
1 parent 8ac72cc commit 037c72f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classical/mathcomp_extra.v
Original file line number Diff line number Diff line change
Expand Up @@ -1138,12 +1138,13 @@ Arguments dfwith {I T} f i x.

Definition swap (T1 T2 : Type) (x : T1 * T2) := (x.2, x.1).

(* MathComp 2.2 addition *)
Lemma ler_sqrt {R : rcfType} (a b : R) :
(0 <= b -> (Num.sqrt a <= Num.sqrt b) = (a <= b))%R.
Proof.
have [b_gt0 _|//|<- _] := ltgtP; last first.
by rewrite sqrtr0 -sqrtr_eq0 le_eqVlt ltNge sqrtr_ge0 orbF.
have [a_le0|a_gt0] := ler0P a; last by rewrite ler_psqrt.
have [a_le0|a_gt0] := ler0P a; last by rewrite ler_psqrt// ?qualifE/= ?ltW.
by rewrite ler0_sqrtr // sqrtr_ge0 (le_trans a_le0) ?ltW.
Qed.

Expand Down

0 comments on commit 037c72f

Please sign in to comment.