-
Notifications
You must be signed in to change notification settings - Fork 58
natural logarithm for extended real numbers #1649
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: master
Are you sure you want to change the base?
Conversation
Note that the last commit changes the definition of Lemma lne_div : {in `]0, +oo] &, {morph lne : x y / x / y >-> x - y}}. instead of Lemma lne_div x y :
0 < x -> 0 < y -> lne (x * (fine y)^-1%:E) = lne x - lne y. (fyi: @CohenCyril) @jmmarulang It looks a bit better but is it as useful to you? |
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.
Looks good to me
@@ -21,7 +21,8 @@ From mathcomp Require Import realfun interval_inference convex. | |||
(* pseries_diffs f i == (i + 1) * f (i + 1) *) | |||
(* *) | |||
(* expeR x == extended real number-valued exponential function *) | |||
(* ln x == the natural logarithm *) | |||
(* ln x == the natural logarithm, in ring_scope *) | |||
(* lne x == the natural logarithm, in ereal_scope *) |
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.
I'd rather align the ==
than the function names
by rewrite in_itv //= leey andbT addrC -(oppeK 1) sube_ge0. | ||
Qed. | ||
|
||
Lemma lne_sublinear x : 0 < x < +oo -> lne x < x. |
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 probably true for all finite x?
by rewrite lne_EFin// lte_fin ln_sublinear. | ||
Qed. | ||
|
||
Lemma lne_ge0 x : 1 <= x -> 0 <= lne x. |
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 probably an equivalence?
by rewrite lne_EFin// ?(lt_le_trans _ r1)// lee_fin ln_ge0. | ||
Qed. | ||
|
||
Lemma lne_lt0 x : 0 < x < 1 -> lne x < 0. |
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 probably a consequence of the following equivalence:
Lemma lne_lt0 x : 0 < x < 1 -> lne x < 0. | |
Lemma lne_lt0 x : (lne x < 0) = (x < 1). |
by move=> /andP[? ?]; rewrite -lte_expeR expeR0 lneK ?in_itv//= leey andbT ?ltW. | ||
Qed. | ||
|
||
Lemma lne_gt0 x : 1 < x -> 0 < lne x. |
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 probably an equivalence
by rewrite (le_trans _ (ltW x1)). | ||
Qed. | ||
|
||
Fact le1_lne_le0 x : x <= 1 -> lne x <= 0. |
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.
same
by rewrite expeS lneM ?ih ?muleS// in_itv/= ?expe_gt0// ?x0/= leey. | ||
Qed. | ||
|
||
Lemma le_lne1Dx x : - 1%E <= x -> lne (1 + x) <= x. |
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.
equivalence too? (and why %E
?)
Motivation for this change
closes draft PR #1613
@jmmarulang : I have duplicated your PR to avoid pushing on your master
Checklist
CHANGELOG_UNRELEASED.md
Reference: How to document
Merge policy
As a rule of thumb:
all compile are preferentially merged into master.
Reminder to reviewers