[英]diffefentiation of (1/2)*(x-y)^2 on x is x - y
我想證明以下。
Require Import Coq.Reals.Reals.
Require Import Coquelicot.Coquelicot.
Goal forall x y:R, is_derive (fun x:R => (1/2)*(x-y)^2) x (x-y).
intros x y.
evar (e:R).
replace (x-y) with e.
apply is_derive_scal.
apply is_derive_pow.
我知道x - y
在 x 上的微分是1
,但我找不到代表它的引理。
我如何證明?
大多數繁瑣的工作都可以通過 Coquelicot 的auto_derive
策略來完成。
Require Import Coq.Reals.Reals.
Require Import Coquelicot.Coquelicot.
Require Import Lra.
Goal forall x y:R, is_derive (fun x:R => (1/2)*(x-y)^2) x (x-y).
intros.
auto_derive.
auto.
lra.
Qed.
但是,您要求的引理可以從is_derive_plus
,因為減法只是帶有負值的加法。
Variables x y:R.
Check is_derive_plus (fun x => x) (fun x => - y) x 1 0 (is_derive_id _) (is_derive_const _ _)
: is_derive (fun x => x - y) x (1+0).
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.