@@ -12,7 +12,8 @@ From mathcomp Require Import sequences real_interval.
12
12
(* # Real-valued functions over reals *)
13
13
(* *)
14
14
(* This file provides properties of standard real-valued functions over real *)
15
- (* numbers (e.g., the continuity of the inverse of a continuous function). *)
15
+ (* numbers (e.g., the continuity of the inverse of a continuous function, *)
16
+ (* L'Hopital's rule). *)
16
17
(* *)
17
18
(* ``` *)
18
19
(* nondecreasing_fun f == the function f is non-decreasing *)
@@ -41,9 +42,6 @@ From mathcomp Require Import sequences real_interval.
41
42
(* lime_sup f a/lime_inf f a == limit sup/inferior of the extended real- *)
42
43
(* valued function f at point a *)
43
44
(* ``` *)
44
- (* cauchy_MVT == Cauchy's mean value theorem *)
45
- (* lhopital_right == L'Hopital rule (limit taken on the right) *)
46
- (* lhopital_left == L'Hopital rule (limit taken on the left) *)
47
45
(* *)
48
46
(* Discontinuities: *)
49
47
(* ``` *)
@@ -2875,6 +2873,7 @@ Unshelve. all: end_near. Qed.
2875
2873
2876
2874
End discontinuity_countable.
2877
2875
2876
+ (** Cauchy's mean value theorem *)
2878
2877
Section Cauchy_MVT.
2879
2878
Context {R : realType}.
2880
2879
Variables (f df g dg : R -> R) (a b c : R).
@@ -2970,22 +2969,6 @@ by apply: DeriveDef => //; exact: near_eq_derivable fav.
2970
2969
Qed .
2971
2970
(* /NB: PR in progress *)
2972
2971
2973
- (* TODO: rename, move *)
2974
- Lemma nbhs_lt' {R : realType} (a z : R) : a < z -> \forall x \near nbhs z, a < x.
2975
- Proof .
2976
- rewrite -subr_gt0 => za0.
2977
- exists (z - a) => //=.
2978
- move=> u/=.
2979
- rewrite ltrBrDl addrC -ltrBrDl.
2980
- move=> /lt_le_trans; apply.
2981
- rewrite lerBlDl.
2982
- have [uz|uz] := leP u z.
2983
- rewrite ger0_norm ?subr_ge0//.
2984
- by rewrite subrK.
2985
- rewrite ltr0_norm ?subr_lt0//.
2986
- by rewrite opprB addrAC -lerBlDr opprK lerD// ?ltW.
2987
- Qed .
2988
-
2989
2972
Section lhopital_at_right.
2990
2973
Context {R : realType}.
2991
2974
Variables (f df g dg : R -> R) (a b : R) (l : R) (ab : a < b).
@@ -3034,7 +3017,7 @@ Proof.
3034
3017
move=> yb zay; apply: (@near_eq_is_derive _ _ _ g) => //; last first.
3035
3018
by apply: gdg; move: z zay; apply: subset_itvSoo; rewrite bnd_simp.
3036
3019
near=> u do rewrite /g0 gt_eqF//.
3037
- by move: zay; rewrite in_itv/= => /andP[+ _]; exact: nbhs_lt' .
3020
+ by move: zay; rewrite in_itv/= => /andP[+ _]; exact: lt_nbhsr .
3038
3021
Unshelve. all: by end_near. Qed .
3039
3022
3040
3023
Let wcont_g0 y : a < y -> y < b -> {within `[a, y], continuous g0}.
@@ -3221,28 +3204,6 @@ Unshelve. all: by end_near. Qed.
3221
3204
3222
3205
End lhopital_at_left.
3223
3206
3224
- (* TODO: move *)
3225
- Lemma set_itv_splitU {R : realType} (a b : itv_bound R) (c : R) :
3226
- c \in Interval a b ->
3227
- [set` Interval a b] `\ c =
3228
- [set` Interval a (BLeft c)] `|` [set` Interval (BRight c) b].
3229
- Proof .
3230
- move=> cab; apply/seteqP; split => [x /= [xab /eqP]|x[|]]/=.
3231
- - rewrite neq_lt => /orP[xc|cx]; [left|right].
3232
- + move: cab xab; rewrite !itv_boundlr=> /andP[ac cb] /andP[ax xb].
3233
- by rewrite ax/= bnd_simp.
3234
- + move: cab xab; rewrite !itv_boundlr=> /andP[ac cb] /andP[ax xb].
3235
- by rewrite xb andbT bnd_simp.
3236
- - move: cab; rewrite !itv_boundlr => /andP[ac cb] /andP[ax].
3237
- rewrite bnd_simp => xc.
3238
- rewrite ax/= (le_trans _ cb) ?bnd_simp ?(ltW xc)//; split => //.
3239
- by apply/eqP; rewrite lt_eqF.
3240
- - move: cab; rewrite !itv_boundlr => /andP[ac cb] /andP[+ xb].
3241
- rewrite bnd_simp => cx.
3242
- rewrite xb/= andbT (le_trans ac)/= ?bnd_simp ?(ltW cx)//; split => //.
3243
- by apply/eqP; rewrite gt_eqF.
3244
- Qed .
3245
-
3246
3207
Section lhopital.
3247
3208
Context {R : realType}.
3248
3209
Variables (f df g dg : R -> R) (a b c : R) (l : R).
@@ -3275,99 +3236,3 @@ move=> fgcl; apply/cvg_at_right_left_dnbhs.
3275
3236
Qed .
3276
3237
3277
3238
End lhopital.
3278
-
3279
- Section lhopital0.
3280
- Context {R : realType}.
3281
- Variables (f df g dg : R -> R) (a : R) (U : set R) (Ua : nbhs a U).
3282
- Hypotheses (fdf : forall x, x \in U -> is_derive x 1 f (df x))
3283
- (gdg : forall x, x \in U -> is_derive x 1 g (dg x)).
3284
- Hypotheses (fa0 : f a = 0) (ga0 : g a = 0)
3285
- (cdg : \forall x \near a^', dg x != 0).
3286
-
3287
- Lemma lhopital_right (l : R) :
3288
- df x / dg x @[x --> a^'+] --> l -> f x / g x @[x --> a^'+] --> l.
3289
- Proof .
3290
- case: Ua => e/= e0 aeU.
3291
- case: cdg => d/= d0 cdg'.
3292
- pose D := minr e d.
3293
- have := @lhopital_at_right R f df g dg a (a + D).
3294
- rewrite ltrDl.
3295
- have D0 : 0 < D by rewrite lt_min e0 d0.
3296
- move=> /(_ _ D0).
3297
- have H (x : R) (G : R) : 0 < G -> x \in `]a, (a + G)%E[ -> `|a - x| < G.
3298
- move=> G0 xae.
3299
- rewrite ltr_norml; apply/andP; split.
3300
- move: xae; rewrite in_itv/= => /andP[_].
3301
- by rewrite ltrBrDl ltrBlDl addrC.
3302
- move: xae; rewrite in_itv/= => /andP[+ _].
3303
- rewrite -subr_lt0 => /lt_le_trans; apply.
3304
- exact: ltW.
3305
- apply.
3306
- - move=> x xae; apply: fdf.
3307
- rewrite inE; apply: aeU => /=; apply: H => //.
3308
- by move: x xae; apply: subset_itvl; rewrite bnd_simp lerD2l ge_min lexx.
3309
- - move=> x xae; apply: gdg.
3310
- rewrite inE; apply: aeU => /=; apply: H => //.
3311
- by move: x xae; apply: subset_itvl; rewrite bnd_simp lerD2l ge_min lexx.
3312
- - rewrite -fa0; apply: cvg_at_right_filter.
3313
- suff : {for a, continuous f} by [].
3314
- apply/differentiable_continuous/derivable1_diffP.
3315
- apply: ex_derive; apply: fdf.
3316
- rewrite inE.
3317
- by case: Ua => r /= r0; apply; rewrite /= subrr normr0.
3318
- - rewrite -ga0.
3319
- apply: cvg_at_right_filter.
3320
- suff : {for a, continuous g} by [].
3321
- apply/differentiable_continuous/derivable1_diffP.
3322
- apply: ex_derive; apply: gdg.
3323
- rewrite inE.
3324
- by case: Ua => r /= r0; apply; rewrite /= subrr normr0.
3325
- - move=> x xae; apply: cdg' => /=.
3326
- apply: H => //.
3327
- by move: x xae; apply: subset_itvl; rewrite bnd_simp lerD2l ge_min lexx orbT.
3328
- rewrite gt_eqF//.
3329
- by move: xae; rewrite in_itv/= => /andP[].
3330
- Qed .
3331
-
3332
- End lhopital0.
3333
-
3334
- Section lhopital1.
3335
- Context {R : realType}.
3336
- Variables (f df g dg : R -> R) (a : R) (U : set R) (Ua : nbhs a U).
3337
- Hypotheses (fdf : forall x, x \in U -> is_derive x 1 f (df x))
3338
- (gdg : forall x, x \in U -> is_derive x 1 g (dg x)).
3339
- Hypotheses (fa0 : f a = 0) (ga0 : g a = 0)
3340
- (cdg : \forall x \near a^', dg x != 0).
3341
-
3342
- Lemma lhopital_left (l : R) :
3343
- df x / dg x @[x --> a^'-] --> l -> f x / g x @[x --> a^'-] --> l.
3344
- Proof .
3345
- move=> fgbl; apply/cvg_at_leftNP.
3346
- set h := (X in X x @[x --> _]).
3347
- rewrite (_ : h = (fun x => (fun y => (f \o -%R) y / (g \o -%R) y) x))//.
3348
- have := @lhopital_right R (f \o -%R) (fun x => (df (- x)) * -1)
3349
- (g \o -%R) (fun x => (dg (- x)) * -1) (- a) (-%R @` U).
3350
- apply.
3351
- - by rewrite nbhsNimage/=; exists U.
3352
- - move=> x; rewrite inE/= => -[r Ur] <-{x}.
3353
- rewrite opprK; apply: is_derive1_comp.
3354
- by rewrite opprK; apply: fdf; exact: mem_set.
3355
- - move=> x; rewrite inE/= => -[r Ur] <-{x}.
3356
- rewrite opprK; apply: is_derive1_comp.
3357
- by rewrite opprK; apply: gdg; exact: mem_set.
3358
- - by rewrite /= opprK.
3359
- - by rewrite /= opprK.
3360
- - case: cdg => e/= e0 H; near=> x.
3361
- rewrite mulrN1 oppr_eq0.
3362
- apply: H => /=.
3363
- rewrite -normrN opprB addrC.
3364
- by near: x; exists e.
3365
- rewrite eqr_oppLR.
3366
- by near: x; exact: nbhs_dnbhs_neq.
3367
- - apply/cvg_at_rightNP.
3368
- rewrite opprK/=; apply: cvg_trans fgbl.
3369
- apply: near_eq_cvg; near=> x.
3370
- by rewrite /= opprK !mulrN1 mulNr invrN mulrN opprK.
3371
- Unshelve. all: by end_near. Qed .
3372
-
3373
- End lhopital1.
0 commit comments