-
Notifications
You must be signed in to change notification settings - Fork 64
New lemmas for stdlib #1053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
New lemmas for stdlib #1053
Changes from all commits
75faa40
887ca5d
aee9c7e
1ffeaee
a5828b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,6 +61,9 @@ apply/(mulfI _ (exp_neq0 x)); rewrite -expD addrN exp0. | |
| by rewrite mulrV // exp_neq0. | ||
| qed. | ||
|
|
||
| lemma expB (x y : real) : exp (x - y) = exp x / exp y. | ||
| proof. by rewrite expD expN. qed. | ||
|
|
||
| lemma exp_mono_ltr (x y : real): (exp x < exp y) <=> (x < y). | ||
| proof. by apply/lerW_mono/exp_mono. qed. | ||
|
|
||
|
|
@@ -159,6 +162,9 @@ proof. by move=> gt0x; rewrite !(rpowN, rpowD) // ltrW. qed. | |
| lemma rpowM (x n m : real) : 0%r < x => x^(n * m) = (x ^ n) ^ m. | ||
| proof. by move=> gt0x; rewrite !rpowE ?exp_gt0 // lnK mulrCA mulrA. qed. | ||
|
|
||
| lemma expM (x y : real) : exp (x * y) = (exp x) ^ y. | ||
| proof. by rewrite rpowE 1:exp_gt0 lnK RField.mulrC. qed. | ||
|
|
||
| lemma rpowMr (x y n : real) : | ||
| 0%r < x => 0%r < y => (x * y)^n = x^n * y^n. | ||
| proof. | ||
|
|
@@ -302,6 +308,22 @@ move=> eq; rewrite ltrNge /= ler_eqVlt; left. | |
| by apply/eq_sym; apply: inj_rexpr eq => /#. | ||
| qed. | ||
|
|
||
| lemma rpow_mono_base_ge1 (x n m : real) : | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is |
||
| 1%r <= x => n <= m => x ^ n <= x ^ m. | ||
| proof. | ||
| move => ??. | ||
| case (n < 0%r) => ?. | ||
| - case (m < 0%r) => ?. | ||
| - rewrite (: n = - - n) // (: m = - - m) //. | ||
| rewrite rpowN 1:/# (rpowN _ (-m)) 1:/#. | ||
| by rewrite RealOrder.ler_pinv 1,2,3,4:#smt:(rpow_gt0) &(rexpr_hmono) /#. | ||
| - apply (RealOrder.ler_trans 1%r). | ||
| - rewrite (: n = - - n) // -RField.invr1 -(rpow0 x) rpowN 1:/#. | ||
| by rewrite RealOrder.ler_pinv 1,2,3,4:#smt:(rpow_gt0) &(rexpr_hmono) /#. | ||
| - by rewrite -(rpow0 x) &(rexpr_hmono) /#. | ||
| - by rewrite &(rexpr_hmono) /#. | ||
| qed. | ||
|
|
||
| (* -------------------------------------------------------------------- *) | ||
| lemma le1Dx_rpowe (x : real): 0%r <= x => 1%r+x <= e^x. | ||
| proof. by rewrite rpoweE; apply/le1Dx_exp. qed. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -378,3 +378,7 @@ proof. by smt(). qed. | |
| lemma maxzz : idempotent max by smt(). | ||
| lemma minzz : idempotent min by smt(). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There should be a matching lemma for |
||
| lemma lez_minP (w a b : int) : | ||
| w <= min a b <=> (w <= a /\ w <= b). | ||
| proof. by smt(). qed. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only the non-negative case. It should be called something like
exprE_ge0instead.