Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
affeldt-aist committed Feb 4, 2025
1 parent d442ec8 commit 7e609e4
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
definition `interior_itv`

- in `derive.v`:
+ lemmas `ltr0_derive1_decr`, `gtr0_derive1_incr`
+ lemmas `decr_derive1_le0`, `decr_derive1_le0_itv`
+ lemmas `ler0_derive1_nincry`, `le0r_derive1_ndecry`
+ lemmas `ler0_derive1_nincry`, `ge0r_derive1_ndecry`

### Changed

Expand Down
46 changes: 44 additions & 2 deletions theories/derive.v
Original file line number Diff line number Diff line change
Expand Up @@ -1624,6 +1624,45 @@ move=> t /itvWlt dft dftxy _; rewrite -oppr_le0 opprB dftxy.
by apply: mulr_le0_ge0 => //; [exact: dfle0|by rewrite subr_ge0 ltW].
Qed.

Lemma ltr0_derive1_decr (R : realType) (f : R -> R) (a b : R) :
(forall x, x \in `]a, b[%R -> derivable f x 1) ->
(forall x, x \in `]a, b[%R -> f^`() x < 0) ->
{within `[a, b], continuous f}%classic ->
forall x y, a <= x -> x < y -> y <= b -> f y < f x.
Proof.
move=> fdrvbl dflt0 ctsf x y leax ltxy leyb; rewrite -subr_gt0.
case: ltgtP ltxy => // xlty _.
have itvW : {subset `[x, y]%R <= `[a, b]%R}.
by apply/subitvP; rewrite /<=%O /= /<=%O /= leyb leax.
have itvWlt : {subset `]x, y[%R <= `]a, b[%R}.
by apply subitvP; rewrite /<=%O /= /<=%O /= leyb leax.
have fdrv z : z \in `]x, y[%R -> is_derive z 1 f (f^`()z).
rewrite in_itv/= => /andP[xz zy]; apply: DeriveDef; last by rewrite derive1E.
by apply: fdrvbl; rewrite in_itv/= (le_lt_trans _ xz)// (lt_le_trans zy).
have [] := @MVT _ f (f^`()) x y xlty fdrv.
apply: (@continuous_subspaceW _ _ _ `[a, b]); first exact: itvW.
by rewrite continuous_subspace_in.
move=> t /itvWlt dft dftxy; rewrite -oppr_lt0 opprB dftxy.
by rewrite pmulr_llt0 ?subr_gt0// dflt0.
Qed.

Lemma gtr0_derive1_incr (R : realType) (f : R -> R) (a b : R) :
(forall x, x \in `]a, b[%R -> derivable f x 1) ->
(forall x, x \in `]a, b[%R -> 0 < f^`() x) ->
{within `[a, b], continuous f}%classic ->
forall x y, a <= x -> x < y -> y <= b -> f x < f y.
Proof.
move=> fdrvbl dfgt0 ctsf x y leax ltxy leyb.
rewrite -ltrN2; apply: (@ltr0_derive1_decr _ (\- f) a b).
- by move=> z zab; apply: derivableN; exact: fdrvbl.
- move=> z zab; rewrite derive1E deriveN; last exact: fdrvbl.
by rewrite ltrNl oppr0 -derive1E dfgt0.
- by move=> z; apply: continuousN; exact: ctsf.
- exact: leax.
- exact: ltxy.
- exact: leyb.
Qed.

Lemma ler0_derive1_nincry {R : realType} (f : R -> R) (a : R) :
(forall x, x \in `]a, +oo[%R -> derivable f x 1) ->
(forall x, x \in `]a, +oo[%R -> f^`() x <= 0) ->
Expand All @@ -1644,7 +1683,7 @@ apply: (@ler0_derive1_nincr _ _ a N) => //.
by rewrite num_real.
Unshelve. all: end_near. Qed.

Lemma le0r_derive1_ndecr (R : realType) (f : R -> R) (a b : R) :
Lemma ge0r_derive1_ndecr (R : realType) (f : R -> R) (a b : R) :
(forall x, x \in `]a, b[%R -> derivable f x 1) ->
(forall x, x \in `]a, b[%R -> 0 <= f^`() x) ->
{within `[a,b], continuous f} ->
Expand All @@ -1656,8 +1695,11 @@ apply (@ler0_derive1_nincr _ (- f)) => t tab; first exact/derivableN/fdrvbl.
by rewrite oppr_le0 -derive1E; apply: dfge0.
by apply: continuousN; exact: fcont.
Qed.
#[deprecated(since="mathcomp-analysis 1.9.0",
note="renamed to `ge0r_derive1_ndecr`")]
Notation le0r_derive1_ndecr := ge0r_derive1_ndecr (only parsing).

Lemma le0r_derive1_ndecry {R : realType} (f : R -> R) (a b : R) :
Lemma ge0r_derive1_ndecry {R : realType} (f : R -> R) (a b : R) :
(forall x, x \in `]a, +oo[%R -> derivable f x 1) ->
(forall x, x \in `]a, +oo[%R -> 0 <= f^`() x) ->
{within `[a, +oo[, continuous f} ->
Expand Down

0 comments on commit 7e609e4

Please sign in to comment.