Skip to content

Commit 423a562

Browse files
yosakaonaffeldt-aist
authored andcommitted
derive_sqrt
1 parent 4430cc0 commit 423a562

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

theories/realfun.v

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1878,7 +1878,16 @@ rewrite -[x]sqrtK//; apply: (@is_derive_inverse _ (fun x => x ^+ 2)).
18781878
- rewrite !sqrtK//; split; first exact: exprn_derivable.
18791879
by rewrite exp_derive expr1 scaler1.
18801880
- by rewrite mulf_neq0// gt_eqF// sqrtr_gt0 exprn_gt0// sqrtr_gt0.
1881-
Unshelve. all: by end_near. Qed.
1881+
Unshelve. all: by end_near. Qed.
1882+
1883+
Lemma derive_sqrt {K : realType} (r : K) : 0 < r ->
1884+
(Num.sqrt^`())%classic r = (2 * Num.sqrt r)^-1 :> K.
1885+
Proof.
1886+
move=> r0.
1887+
rewrite derive1E.
1888+
apply: derive_val.
1889+
exact: is_derive1_sqrt.
1890+
Qed.
18821891

18831892
#[global] Hint Extern 0 (is_derive _ _ (fun _ => (_ _)^-1) _) =>
18841893
(eapply is_deriveV; first by []) : typeclass_instances.

0 commit comments

Comments
 (0)