Zulip Chat Archive
Stream: mathlib4
Topic: ContinuousAt.eventually_mem'
Geoffrey Irving (Feb 21 2024 at 16:58):
Is this lemma reasonable to add?
theorem ContinuousAt.eventually_mem' {A B : Type} [TopologicalSpace A] [TopologicalSpace B]
{f : A → B} {x : A} (fc : ContinuousAt f x) {s : Set B} (m : s ∈ 𝓝 (f x)) :
∀ᶠ y in 𝓝 x, f y ∈ s :=
fc m
It almost exists now, as Filter.Tendsto.eventually_mem
. However, that lemma has no connection between the x
s occuring in the two locations. I turn out to use apply ContinuousAt.eventually_mem'
a lot, and a lot of those applies no longer infer if replaced by Filter.Tendsto.eventually_mem
.
Geoffrey Irving (Feb 21 2024 at 17:01):
Hmm, actually I don't think I understand why it doesn't infer. I should produce a MWE, but unfortunately I have to head off now.
Patrick Massot (Feb 21 2024 at 17:05):
Why the prime? Is there an unprimed version?
Geoffrey Irving (Feb 21 2024 at 17:06):
The unprimed version is Filter.Tendsto.eventually_mem
, but maybe that’s fine.
Geoffrey Irving (Feb 21 2024 at 17:54):
That is, the goal was not to shadow when using dot notation, but I suppose the new one should match when the old one did.
Geoffrey Irving (Feb 21 2024 at 17:55):
(Since ContinuousAt is a Filter.Tendsto)
Patrick Massot (Feb 21 2024 at 17:56):
I don’t think there would be any shadowing.
Geoffrey Irving (Feb 21 2024 at 18:09):
There’s definitely shadowing: currently if you have a c : ContinuousAt
and you do c.eventually_mem
you get Filter.Tendsto.eventually_mem
.
Geoffrey Irving (Feb 21 2024 at 21:16):
So my guess on reflection is that adding this is a clean (small) win, as all/nearly all shadowing examples will still work, and the new one is better for inference. If that seems reasonable I can make a PR to check the “still work” part.
Anatole Dedecker (Feb 21 2024 at 21:23):
Yes, I think your proposed new lemma is precisely what you already get by doing c.eventually_mem
but with better inference properties, so I think it is a good idea.
Geoffrey Irving (Feb 21 2024 at 21:35):
https://github.com/leanprover-community/mathlib4/pull/10838
Geoffrey Irving (Feb 21 2024 at 22:26):
Indeed, all of Mathlib built without complaint.
Geoffrey Irving (Feb 21 2024 at 22:26):
(And I can reconfirm that this one is way better for use with apply
.)
Last updated: May 02 2025 at 03:31 UTC