-
Notifications
You must be signed in to change notification settings - Fork 297
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
[Merged by Bors] - feat(analysis/convex/function): API for strict convex functions #9437
Conversation
🎉 Great news! Looks like all the dependencies have been resolved:
💡 To add or remove a dependency please update this issue/PR description. Brought to you by Dependent Issues (:robot: ). Happy coding! |
src/analysis/convex/function.lean
Outdated
hb hab hfx | ||
|
||
lemma strict_convex_on.lt_left_of_right_lt (hf : strict_convex_on 𝕜 s f) {x y z : E} (hx : x ∈ s) | ||
(hy : y ∈ s) (hxy : x ≠ y) (hz : z ∈ open_segment 𝕜 x y) (hyz : f y < f z) : |
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.
Can we drop (hxy : x ≠ y)
given that we have (hz : z ∈ open_segment 𝕜 x y)
?
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.
Eheh, we actually can because we know that y ≠ z
because f y < f z
. Well spotted.
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.
Note however that it requires module 𝕜 E
while those only require has_scalar 𝕜 E
, so I've duplicated all lemmas.
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 had not realised open_segment 𝕜 x x = {x}
when I wrote those words but fortunately you correctly identified the substitute hypothesis f y < f z
.
Regarding the duplication, personally I'm not yet convinced it's worth it. Couldn't we just have the module 𝕜 E
versions?
I think it's worth having definitions very general but are people ever going to use these lemmas when they don't have a module 𝕜 E
structure to hand?
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.
As you want. I agree this makes for many lemmas, of which only one or two are currently used (on my branch sperner-again
I think, actually).
Very nice work! Just a few minor comments. |
Co-authored-by: Oliver Nash <github@olivernash.org>
bors merge |
This provides all the basic API for `strict_convex_on` and `strict_concave_on`.
Pull request successfully merged into master. Build succeeded: |
This provides all the basic API for
strict_convex_on
andstrict_concave_on
.