-
Notifications
You must be signed in to change notification settings - Fork 47
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
ln is concave #990
ln is concave #990
Changes from all commits
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 |
---|---|---|
|
@@ -601,6 +601,15 @@ apply: (@is_derive_inverse R expR); first by near=> z; apply: expRK. | |
by rewrite lnK // lt0r_neq0. | ||
Unshelve. all: by end_near. Qed. | ||
|
||
Local Open Scope convex_scope. | ||
Lemma concave_ln (t : {i01 R}) (a b : R^o) : 0 < a -> 0 < b -> | ||
(ln a : R^o) <| t |> (ln b : R^o) <= ln (a <| t |> b). | ||
Comment on lines
+605
to
+606
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. @affeldt-aist why the 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. The only instances were |
||
Proof. | ||
move=> a0 b0; have := convex_expR t (ln a) (ln b). | ||
by rewrite !lnK// -(@ler_ln) ?posrE ?expR_gt0 ?conv_gt0// expRK. | ||
Qed. | ||
Local Close Scope convex_scope. | ||
|
||
End Ln. | ||
|
||
Section PowR. | ||
|
@@ -752,6 +761,28 @@ move=> a0; rewrite /powR lt_eqF// gtr0_norm ?expR_gt0//. | |
by rewrite ln0 ?mulr0 ?expR0// ltW. | ||
Qed. | ||
|
||
Lemma conjugate_powR a b p q : 0 <= a -> 0 <= b -> | ||
0 < p -> 0 < q -> p^-1 + q^-1 = 1 -> | ||
a * b <= a `^ p / p + b `^ q / q. | ||
Proof. | ||
rewrite le_eqVlt => /predU1P[<- b0 p0 q0 _|a0]. | ||
by rewrite mul0r powR0 ?gt_eqF// mul0r add0r divr_ge0 ?powR_ge0 ?ltW. | ||
rewrite le_eqVlt => /predU1P[<-|b0] p0 q0 pq. | ||
by rewrite mulr0 powR0 ?gt_eqF// mul0r addr0 divr_ge0 ?powR_ge0 ?ltW. | ||
have q01 : (q^-1 \in `[0, 1])%R. | ||
by rewrite in_itv/= invr_ge0 (ltW q0)/= -pq ler_paddl// invr_ge0 ltW. | ||
have ap0 : (0 < a `^ p)%R by rewrite powR_gt0. | ||
have bq0 : (0 < b `^ q)%R by rewrite powR_gt0. | ||
have := @concave_ln _ (@Itv.mk _ `[0, 1] _ q01)%R _ _ ap0 bq0. | ||
have pq' : (p^-1 = 1 - q^-1)%R by rewrite -pq addrK. | ||
rewrite !convRE/= /onem -pq' -ler_expR expRD (mulrC p^-1). | ||
rewrite ln_powR mulrAC divff ?mul1r ?gt_eqF// (mulrC q^-1). | ||
rewrite ln_powR mulrAC divff ?mul1r ?gt_eqF//. | ||
rewrite lnK ?posrE// lnK ?posrE// => /le_trans; apply. | ||
rewrite lnK//; last by rewrite posrE addr_gt0// mulr_gt0// ?invr_gt0. | ||
by rewrite (mulrC _ p^-1) (mulrC _ q^-1). | ||
Qed. | ||
|
||
End PowR. | ||
Notation "a `^ x" := (powR a x) : ring_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.
Should we make this an instance of PosNum?
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.
It looks like a good idea but I'd prefer to do it later because I may need @proux01 's help (I easily forget about signed.v). I will issue after merging.
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 guess you should take inspiration from min and max in signed.v