-
Notifications
You must be signed in to change notification settings - Fork 298
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
refactor(calculus): simplify derivative extension #1826
Conversation
@@ -96,6 +96,22 @@ lemma closure_lt_subset_le [topological_space β] {f g : β → α} (hf : contin | |||
closure {b | f b < g b} ⊆ {b | f b ≤ g b} := | |||
by { rw [←closure_le_eq hf hg], exact closure_mono (λ b, le_of_lt) } | |||
|
|||
lemma continuous_within_at.closure_le [topological_space β] |
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.
To obtain f x ≤ g x
at a given x
in the closure of s
, you only need the continuity of f
and g
at this specific x
. So, I think a statement involving one fixed x
and assumptions continuous_within_at f s x
, continuous_within_at g s x
and x ∈ closure s
would be more natural.
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.
Good point. I fixed that. But maybe I'm having too much fun with filters in the new proof...
src/topology/algebra/ordered.lean
Outdated
change ψ x ∈ H, | ||
suffices : ψ x ∈ closure H, | ||
by rwa ← (closure_eq_iff_is_closed.2 (ordered_topology.is_closed_le' α) : closure H = H), | ||
rw [closure_eq_nhds, mem_set_of_eq] at *, |
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 think you can take a shortcut by using continuous_within_at.mem_closure_image
here. Possibly with the following version that could be worth adding just below continuous_within_at.mem_closure_image
.
lemma continuous_within_at.mem_closure {f : α → β} {s : set α} {x : α} {A : set β}
(h : continuous_within_at f s x) (hx : x ∈ closure s) (hA : s ⊆ f⁻¹' A) : f x ∈ closure A :=
closure_mono (image_subset_iff.2 hA) (h.mem_closure_image hx)
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.
Nice! I've done it.
|
||
lemma continuous_within_at.image_closure {f : α → β} {s : set α} | ||
(hf : ∀ x ∈ closure s, continuous_within_at f s x) : | ||
f '' (closure s) ⊆ closure (f '' s) := |
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.
Do we have continuous_on.image_closure
assuming is_closed s
and continuous_on f s
?
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 don't think so.
…ty#1826) * refactor(calculus): simplify derivative extension * generalize continuous_within_at.closure_le * Simplify proof following Sébastien * Update src/analysis/calculus/extend_deriv.lean Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…ty#1826) * refactor(calculus): simplify derivative extension * generalize continuous_within_at.closure_le * Simplify proof following Sébastien * Update src/analysis/calculus/extend_deriv.lean Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This is the PR promised in the #1794 discussion. Sébastien used sequences to prove a derivative extension lemma. The main point of the current PR us to make sure the library allows a sequence-free proof. Recall the main lemma replacing the use of sequences in topology is
from here. Here we need a version with weaker assumptions. This PR introduces:
which is a tiny repackaging of an existing lemma. I also added a lemma about ordered topologies with similar weak assumptions:
for which I couldn't find a good name.
Using those two lemmas indeed simplifies the derivative extension main lemma (at least if you like that kind of proof).