Zulip Chat Archive
Stream: Is there code for X?
Topic: Operations on uniform limits
Vincent Beffara (Oct 23 2022 at 19:52):
Do we have this somewhere where I didn't find it? docs#tendsto_uniformly_on.mul is for uniform groups.
variables {ΞΉ Ξ± π : Type*} [normed_field π] {p : filter ΞΉ} [ne_bot p] {K s : set Ξ±} {m mf mg : β}
{F G : ΞΉ β Ξ± β π} {f g : Ξ± β π}
lemma tendsto_uniformly_on.inv_of_le (hF : tendsto_uniformly_on F f p s)
(hm : 0 < m) (hf : β x β s, m β€ β₯f xβ₯) :
tendsto_uniformly_on Fβ»ΒΉ fβ»ΒΉ p s := sorry
lemma tendsto_uniformly_on.mul_of_le
(hF : tendsto_uniformly_on F f p s) (hG : tendsto_uniformly_on G g p s)
(hf : βαΆ i in p, β x β s, β₯F i xβ₯ β€ mf) (hg : βαΆ i in p, β x β s, β₯G i xβ₯ β€ mg) :
tendsto_uniformly_on (F * G) (f * g) p s := sorry
lemma tendsto_uniformly_on.mul_of_bound
(hF : tendsto_uniformly_on F f p s) (hG : tendsto_uniformly_on G g p s)
(hf : β x β s, β₯f xβ₯ β€ mf) (hg : β x β s, β₯g xβ₯ β€ mg) :
tendsto_uniformly_on (F * G) (f * g) p s := sorry
I have proofs but they are too ugly to be displayed in public :sweat_smile:
Patrick Massot (Oct 23 2022 at 20:38):
I'm not surprised this isn't there yet. I'm not even sure we have the statement that inversion in a topological field is uniformly continuous on a set whose closure doesn't contain zero.
Patrick Massot (Oct 23 2022 at 20:46):
Probably you would even need something like: if p
and q
are filters on such that p β π 0 = β₯
and q β π 0 = β₯
then map (Ξ» x : π Γ π, (x.1β»ΒΉ, x.2 β»ΒΉ)) (π€ π β (p ΓαΆ q)) β€ π€ π
.
Patrick Massot (Oct 23 2022 at 20:48):
Note this is totally untested and I didn't think very hard. It simply looks good and the kind of thing that would help in writing a nice proof of your first lemma.
Patrick Massot (Oct 23 2022 at 20:51):
This inequality would be meant to be used with the one appearing in docs#tendsto_uniformly_on_iff_tendsto
Vincent Beffara (Oct 23 2022 at 20:51):
p β π 0 = β₯
as in "eventually bounded below" ?
Patrick Massot (Oct 23 2022 at 20:55):
I was thinking of p
and q
as π (f '' s)
and πΛ’ (f '' s)
(or the other way around)
Vincent Beffara (Oct 24 2022 at 13:36):
Here is what I have for step 1:
variables {ΞΉ Ξ± π : Type*} [normed_field π] {p : filter ΞΉ} [ne_bot p] {K s : set Ξ±} {m mf mg : β}
{F G : ΞΉ β Ξ± β π} {f g : Ξ± β π} {x y : π} {Ξ· Ξ·' : β}
lemma toto (hΞ· : 0 < Ξ·) (hΞ·' : 0 < Ξ·') (hx : x β ball (0:π) Ξ·) (hy : y β ball (0:π) Ξ·') :
dist xβ»ΒΉ yβ»ΒΉ β€ dist x y / (Ξ· * Ξ·') :=
begin
have h1 : x β 0 := Ξ» h, by simpa [h, hΞ·] using hx,
have h2 : y β 0 := Ξ» h, by simpa [h, hΞ·'] using hy,
simp [dist_eq_norm] at hx hy,
rw [dist_eq_norm, inv_sub_inv h1 h2, norm_div, norm_mul, dist_comm, dist_eq_norm],
exact div_le_div (norm_nonneg _) le_rfl (mul_pos hΞ· hΞ·') (mul_le_mul hx hy hΞ·'.le (norm_nonneg _))
end
lemma titi {p q : filter π} (hp : p β π 0 = β₯) (hq : q β π 0 = β₯) :
map (Ξ» x : π Γ π, (x.1β»ΒΉ, x.2β»ΒΉ)) (π€ π β (p ΓαΆ q)) β€ π€ π :=
begin
obtain β¨U, hU, V, hV, hUVβ© := inf_eq_bot_iff.mp hp,
obtain β¨U', hU', V', hV', hUV'β© := inf_eq_bot_iff.mp hq,
obtain β¨Ξ·, hΞ·, hVβ© := metric.mem_nhds_iff.mp hV,
obtain β¨Ξ·', hΞ·', hV'β© := metric.mem_nhds_iff.mp hV',
have hΞ·Ξ·' : 0 < Ξ· * Ξ·' := mul_pos hΞ· hΞ·',
rintro u hu,
obtain β¨Ξ΅, hΞ΅, huβ© := mem_uniformity_dist.mp hu,
rw mem_map_iff_exists_image,
refine β¨_, inter_mem_inf (dist_mem_uniformity (mul_pos hΞ΅ hΞ·Ξ·')) (prod_mem_prod hU hU'), _β©,
rintro z β¨x, β¨hx1, hx2β©, rflβ©,
have hx'1 : x.1 β ball (0 : π) Ξ·,
from Ξ» h, (nonempty_of_mem (mem_inter hx2.1 (hV h))).ne_empty hUV,
have hx'2 : x.2 β ball (0 : π) Ξ·',
from Ξ» h, (nonempty_of_mem (mem_inter hx2.2 (hV' h))).ne_empty hUV',
refine hu ((toto hΞ· hΞ·' hx'1 hx'2).trans_lt _),
convert (div_lt_div_right hΞ·Ξ·').mpr hx1,
field_simp [hΞ·.lt.ne.symm, hΞ·'.lt.ne.symm]; ring
end
Vincent Beffara (Oct 24 2022 at 13:56):
example (hΞ· : 0 < Ξ·) : uniform_continuous_on (Ξ» x, xβ»ΒΉ) (ball (0 : π) Ξ·)αΆ :=
begin
rw [uniform_continuous_on, tendsto, β prod_principal_principal],
refine titi (inf_eq_bot_iff.mpr _) (inf_eq_bot_iff.mpr _);
exact β¨(ball 0 Ξ·)αΆ, mem_principal_self _, ball 0 Ξ·, ball_mem_nhds _ hΞ·, compl_inter_self _β©
end
Vincent Beffara (Oct 24 2022 at 13:59):
I mean,
example {s : set π} (hs : π s β π 0 = β₯) : uniform_continuous_on (Ξ» x, xβ»ΒΉ) s :=
by simpa only [uniform_continuous_on, tendsto, β prod_principal_principal] using titi hs hs
Vincent Beffara (Oct 24 2022 at 17:07):
@Patrick Massot I seem to be stuck at this point writing the proof that at the moment feels natural:
example (hF : tendsto_uniformly_on F f p s) (hf : π (f '' s) β π 0 = β₯) :
tendsto_uniformly_on Fβ»ΒΉ fβ»ΒΉ p s :=
begin
rw [tendsto_uniformly_on_iff_tendsto, tendsto] at hF β’,
have h1 : map (Ξ» (q : ΞΉ Γ Ξ±), (f q.snd, F q.fst q.snd)) (p ΓαΆ π s) β€ π (f '' s) ΓαΆ πΛ’ (f '' s),
{ sorry },
have h2 := le_inf hF h1,
have h3 : monotone (filter.map (Ξ» (x : π Γ π), ((x.fst)β»ΒΉ, (x.snd)β»ΒΉ))) := filter.map_mono,
have h4 : πΛ’ (f '' s) β π 0 = β₯, sorry, -- but this should work
exact (h3 h2).trans (titi hf h4)
end
(with titi
as above). h1
fits very well with the rest, but I'm not sure it is true; I also have trouble proving the simpler map (Ξ» (q : ΞΉ Γ Ξ±), F q.1 q.2) (p ΓαΆ π s) β€ πΛ’ (f '' s)
. I somehow convinced myself that it is not true and one should replace πΛ’ (f '' s)
with a uniform version to be able to exploit hypothesis hF
so that the same element of p
works everywhere. Is that completely off?
Patrick Massot (Oct 24 2022 at 18:38):
Indeed that suggestion was probably a bit too optimistic. There is clearly a notion of uniform neighborhood of a set in a uniform space, but I'm not sure how to phrase it nicely, and we clearly don't have it in mathlib.
Junyan Xu (Oct 24 2022 at 18:48):
This topic is about uniform neighborhoods right?
Vincent Beffara (Oct 24 2022 at 18:51):
So β x β A, ball x V
for V β π€ Ξ±
is the uniform neighborhood I was looking for
Patrick Massot (Oct 24 2022 at 18:55):
It is a basis for the filter you were asking for
Vincent Beffara (Oct 24 2022 at 19:25):
Like this?
def uniform_thickening (s : set Ξ±) (u : set (Ξ± Γ Ξ±)) : set Ξ± :=
β x β s, uniform_space.ball x u
def uniform_nhds_set [uniform_space Ξ±] (s : set Ξ±) : filter (set Ξ±) :=
filter.generate ((Ξ» u, {t | uniform_thickening s u β t}) '' (π€ Ξ±).sets)
Anatole Dedecker (Oct 24 2022 at 19:28):
Yes, but the goal is to make it less readable more easy to apply the API to by defining it in terms of all the filter operations we have (e.g the usual infimum, supremum, pushforward and pullback, but also docs#filter.lift or docs#filter.lift')
Anatole Dedecker (Oct 24 2022 at 19:31):
(I'm not sure that's possible, I didn't find anything like this for the uniformity generating the topology of uniform convergence, so it's completely possible we don't have a nice way to do it, but I'm mentioning it because it's worth thinking about)
Patrick Massot (Oct 24 2022 at 19:41):
Yes, there should be a nice description but I don't immediately see it (and I'm really late with many things so I should really really resist the temptation to spend the evening thinking about this).
Vincent Beffara (Oct 24 2022 at 19:49):
def uniform_nhds_set [uniform_space Ξ±] (s : set Ξ±) : filter (set Ξ±) :=
β¨
u β π€ Ξ±, π {t | uniform_thickening s u β t}
Vincent Beffara (Oct 24 2022 at 19:59):
def uniform_nhds_set [uniform_space Ξ±] (s : set Ξ±) : filter (set Ξ±) :=
(π€ Ξ±).lift' (Ξ» u, {t | uniform_thickening s u β t})
Vincent Beffara (Oct 24 2022 at 19:59):
Not sure which one is "more easy to apply the API to"
Vincent Beffara (Oct 24 2022 at 20:41):
Ah, actually this makes more sense probably:
def uniform_nhds_set [uniform_space Ξ±] (s : set Ξ±) : filter Ξ± :=
(π€ Ξ±).lift' (uniform_thickening s)
Anatole Dedecker (Oct 24 2022 at 20:48):
Oh indeed I didn't realize your first suggestion didn't have the good type (as in, not the same as docs#nhds_set)
Vincent Beffara (Oct 25 2022 at 08:07):
The definition above is quite workable:
def uniform_thickening (s : set Ξ±) (u : set (Ξ± Γ Ξ±)) : set Ξ± :=
β x β s, uniform_space.ball x u
lemma monotone_uniform_thickening {s : set Ξ±} : monotone (uniform_thickening s) :=
Ξ» u v huv, Unionβ_mono (Ξ» i hi, by simpa [uniform_space.ball] using preimage_mono huv)
def uniform_nhds_set [uniform_space Ξ±] (s : set Ξ±) : filter Ξ± :=
(π€ Ξ±).lift' (uniform_thickening s)
lemma lemma1 (hF : tendsto_uniformly_on F f p s) (hf : π (f '' s) β π 0 = β₯) :
map (Ξ» (q : ΞΉ Γ Ξ±), (f q.2, F q.1 q.2)) (p ΓαΆ π s) β€ π (f '' s) ΓαΆ uniform_nhds_set (f '' s) :=
begin
rintro u hu,
obtain β¨t1, ht1, t2, ht2, hβ© := filter.mem_prod_iff.mp hu,
simp only [uniform_nhds_set, mem_lift'_sets monotone_uniform_thickening, exists_prop] at ht2,
obtain β¨v, hv1, hv2β© := ht2,
rw mem_map_iff_exists_image,
refine β¨_ ΓΛ’ s, prod_mem_prod (hF v hv1) (mem_principal_self s), subset.trans _ hβ©,
rintro β¨x1, x2β© β¨β¨i, aβ©, β¨h1, h2β©, h3β©,
replace h1 : β b β s, (f b, F i a) β v := β¨a, h2, by simp [h1 a h2]β©,
rcases prod.mk.inj_iff.mp h3 with β¨rfl, rflβ©,
simp [mem_principal.mp ht1 (mem_image_of_mem f h2), prod_mk_mem_set_prod_eq, true_and],
refine hv2 _,
simpa [uniform_space.ball, uniform_thickening] using h1
end
lemma lemma2 {t : set π} (hf : π t β π 0 = β₯) : (uniform_nhds_set t) β π 0 = β₯ :=
sorry
(the proof of lemma1
is a bit clumsy but it works well enough for now). @Anatole Dedecker what is your feeling about the separation lemma lemma2
here? I can prove it in a metric space but the whole point is to work in a uniform space, where some additional assumption could be needed.
Anatole Dedecker (Oct 25 2022 at 08:18):
I think this is true. You can certainly prove it as a direct consequence of docs#disjoint.exists_uniform_thickening applied to the compact {0}
and to the closed set closure t
(which 0 does not belong to by the hypothesis)
Anatole Dedecker (Oct 25 2022 at 08:28):
That said a direct proof would work well too and maybe it is more βmorally satisfyingβ: you take a U
ball around 0 that does not meet t
, split it in half using docs#comp_mem_uniformity_sets, and with the V
you get, you have that the V
ball around 0 does not meet the V
uniform thickening of t
Anatole Dedecker (Oct 25 2022 at 08:32):
Thereβs also a more practical reason why this second proof is better, which is that we definitely want to rewrite some things using this uniform_nhds_set
filter, like we have rewritten a lot of things using nhds_set
(e.g in separation axioms). I need to look more at the current library to get a better feel of how it would fit the best, but at least it suggests that using βhigh levelβ results about uniform space is not a good choice
Vincent Beffara (Oct 25 2022 at 08:36):
Ah, this is what I did in a metric space but comp_mem_uniformity_sets
is what I did not find (the name is difficult to guess ...) so thanks! I will try to use it and see what happens.
Anatole Dedecker (Oct 25 2022 at 08:38):
For example, Iβd argue docs#uniform_space.regular_space should be proven using your lemma2 (or a variation of it), first because it feels more βmathlibβ-y than the current proof, and because anyone looking at the proof would easily find your uniform version of regularity, which is arguably more useful and intuitive than closed entourages being a basis of uniformity
Vincent Beffara (Oct 25 2022 at 08:38):
πα΅ s
as a notation?
Anatole Dedecker (Oct 25 2022 at 08:38):
Ah yes, this is the key fact that makes uniform spaces nice: you have an βepsilon/2β principle
Patrick Massot (Oct 25 2022 at 08:40):
I'm sure the proof of lemma1
can be made nicer, but I really don't have time so I'll let Anatole handle it. He will probably start with removing the hf
argument that looks like a copy-paste mistake
Vincent Beffara (Oct 25 2022 at 08:50):
I will work further on that proof
Anatole Dedecker (Oct 25 2022 at 10:48):
Sorry, I couldn't resist working on it anyway :sweat_smile: There are probably a dozen more way to do it, so feel free to work on it too, we will almost surely learn something by comparing the versions.
Vincent Beffara (Oct 26 2022 at 21:57):
Here is what I have for now for the uniform separation lemma, together with a bit of API around uniform neighborhoods of sets:
import topology.uniform_space.uniform_convergence
open set filter uniform_space
open_locale filter uniformity topological_space
variables {ΞΉ Ξ± Ξ² : Type*} {a : Ξ±} {s t : set Ξ±} {u v : set (Ξ± Γ Ξ±)}
lemma comp_symm_of_uniformity' [uniform_space Ξ±] (hu : u β π€ Ξ±) :
β t β π€ Ξ±, symmetric_rel t β§ t β t β u :=
let β¨v, hv, hvu, huβ© := comp_symm_of_uniformity hu in β¨v, hv, by { ext β¨_,_β©, exact β¨hvu,hvuβ© }, huβ©
-----------------------------------------------------------------------------
namespace uniform_space -- uniform thickening
def thickening (s : set Ξ±) (u : set (Ξ± Γ Ξ±)) : set Ξ± :=
β x β s, ball x u
@[simp] lemma thickening_singleton : thickening {a} = ball a :=
by { ext, simp [thickening] }
@[simp] lemma monotone_thickening : monotone (thickening s) :=
Ξ» u v huv, Unionβ_mono (Ξ» i hi, by simpa [ball] using preimage_mono huv)
lemma thickening_mono (h : s β t) : thickening s β€ thickening t :=
pi.le_def.mpr (Ξ» u, Unionβ_mono' (Ξ» a ha, β¨a, h ha, subset_rflβ©))
@[simp] lemma thickening_comp : thickening (thickening s u) v = thickening s (u β v) :=
by { ext, simp [thickening, ball] }
lemma disjoint_ball_iff : disjoint (ball a u) t β β b β t, (a, b) β u :=
by { rw [β compl_compl (ball a u), disjoint_compl_left_iff_subset]; refl }
lemma thickening_inter_eq_empty : thickening s u β© t = β
β β (a β s) (b β t), (a, b) β u :=
by simp [thickening, β disjoint_iff_inter_eq_empty, disjoint_ball_iff]
lemma thickening_inter_eq_empty_comm (hu : symmetric_rel u) :
thickening s u β© t = β
β s β© thickening t u = β
:=
begin
simp [thickening_inter_eq_empty, inter_comm s],
split; exact Ξ» h a ha b hb hab, h b hb a ha (hu.mk_mem_comm.mp hab)
end
lemma thickening_inter_thickening_eq_empty_of_comp (hv : symmetric_rel v) (hvu : v β v β u)
(hST : thickening s u β© t = β
) :
thickening s v β© thickening t v = β
:=
begin
simp [β thickening_inter_eq_empty_comm hv],
exact subset_empty_iff.mp (hST βΈ inter_subset_inter_left t (monotone_thickening hvu))
end
end uniform_space
-----------------------------------------------------------------------------
def uniform_nhds_set [uniform_space Ξ±] (s : set Ξ±) : filter Ξ± :=
(π€ Ξ±).lift' (uniform_space.thickening s)
localized "notation (name := uniform_nhds_set) `πα΅` := uniform_nhds_set" in uniformity
namespace uniform_space -- uniform_nhds_set
variables [uniform_space Ξ±]
lemma uniform_nhds_set_mono (h : s β t) : πα΅ s β€ πα΅ t :=
lift'_mono le_rfl (thickening_mono h)
lemma uniform_nhds_set_singleton : πα΅ {a} = π a :=
by simp [nhds_eq_uniformity, uniform_nhds_set]
lemma mem_uniform_nhds_set_iff : s β πα΅ t β β u β π€ Ξ±, thickening t u β s :=
by simp [uniform_nhds_set, mem_lift'_sets]
lemma nhds_le_uniform_nhds_set (ha : a β s) : π a β€ πα΅ s :=
by simpa [β uniform_nhds_set_singleton] using uniform_nhds_set_mono (singleton_subset_iff.mpr ha)
lemma nhds_set_le_uniform_nhds_set : πΛ’ s β€ πα΅ s :=
by simpa [nhds_set] using Ξ» a, nhds_le_uniform_nhds_set
lemma uniform_nhds_inf_uniform_nhds_eq_bot (h : πα΅ s β π t = β₯) : πα΅ s β πα΅ t = β₯ :=
begin
simp_rw [inf_principal_eq_bot, inf_eq_bot_iff, mem_uniform_nhds_set_iff] at h β’,
obtain β¨u, hu, hsuβ© := h,
obtain β¨v, hv, hvs, hvuβ© := comp_symm_of_uniformity' hu,
refine β¨_, β¨v, hv, subset_rflβ©, _, β¨v, hv, subset_rflβ©, _β©,
refine thickening_inter_thickening_eq_empty_of_comp hvs hvu _,
exact (subset_compl_iff_disjoint_right.mp hsu).inter_eq,
end
lemma nhds_inf_uniform_nhds_eq_bot (hf : π a β π s = β₯) : π a β πα΅ s = β₯ :=
by { rw [β uniform_nhds_set_singleton] at hf β’; exact uniform_nhds_inf_uniform_nhds_eq_bot hf }
end uniform_space
Anatole Dedecker (Oct 28 2022 at 11:15):
If you add
@[simp] lemma lift'_inter {f : filter Ξ±} {g h : set Ξ± β set Ξ²} :
f.lift' (Ξ»x, g x β© h x) = f.lift' g β f.lift' h :=
calc f.lift' (Ξ»x, g x β© h x)
= f.lift (Ξ»x, (π $ g x) β (π $ h x)) : by simp [filter.lift']
... = f.lift' g β f.lift' h : lift_inf
lemma lift_eq_bot_iff {f : filter Ξ±} {g : set Ξ± β filter Ξ²} (hm : monotone g) :
f.lift g = β₯ β β s β f, g s = β₯ :=
by simp only [β empty_mem_iff_bot, mem_lift_sets hm]
lemma lift'_eq_bot_iff {f : filter Ξ±} {g : set Ξ± β set Ξ²} (hm : monotone g) :
f.lift' g = β₯ β β s β f, g s = β
:=
by simp_rw [filter.lift', lift_eq_bot_iff (monotone_principal.comp hm),
β principal_empty, principal_eq_iff_eq]
You can do:
lemma uniform_nhds_inf_uniform_nhds_eq_bot (h : πα΅ s β π t = β₯) : πα΅ s β πα΅ t = β₯ :=
begin
simp only [uniform_nhds_set, lift'_inf_principal_eq, β lift'_inter, lift'_eq_bot_iff,
monotone_thickening.inter monotone_const,
monotone_thickening.inter monotone_thickening] at h β’,
obtain β¨u, hu, hsuβ© := h,
obtain β¨v, hv, hvs, hvuβ© := comp_symm_of_uniformity' hu,
exact β¨v, hv, thickening_inter_thickening_eq_empty_of_comp hvs hvu hsuβ©
end
It's not really shorter so you can keep your version, I just really wanted to give it a try :sweat_smile:
Anatole Dedecker (Oct 28 2022 at 11:17):
But the whole thing is quite nice, I'd say you can open a PR with what you have right now (unless you want to do more things with it first of course)
Vincent Beffara (Oct 28 2022 at 11:19):
I want to add that the uniform neighborhood of a compact is its set neighborhood. (If it is true.) But first I have to go teach...
Anatole Dedecker (Oct 28 2022 at 11:27):
Is it true and we do have it! You just have to rephrase docs#is_compact.nhds_set_basis_uniformity as πα΅ K = πΛ’ K
but that should be straightforward
Anatole Dedecker (Oct 28 2022 at 11:29):
But if you think you can shorten the proof using API then you should absolutely go for that!
Vincent Beffara (Oct 28 2022 at 11:30):
Also I wanted to swap the arguments of uniform_space.thickening
to match metric.thickening
Patrick Massot (Oct 28 2022 at 12:33):
This is still abusing dot notation to obfuscate code. It is especially confusing when is a filter and and are maps...
Vincent Beffara (Oct 28 2022 at 13:30):
Patrick Massot said:
This is still abusing dot notation to obfuscate code. It is especially confusing when is a filter and and are maps...
Which part exactly is abusing dot notation?
Patrick Massot (Oct 28 2022 at 13:52):
Lines like f.lift' (Ξ»x, g x β© h x) = f.lift' g β f.lift' h
Vincent Beffara (Oct 28 2022 at 14:14):
Also here then?
def uniform_nhds_set [uniform_space Ξ±] (s : set Ξ±) : filter Ξ± :=
(π€ Ξ±).lift' (uniform_space.thickening s)
Vincent Beffara (Oct 28 2022 at 17:10):
lemma lemma3 (hs : is_compact s) : πΛ’ s = πα΅ s :=
(hs.nhds_set_basis_uniformity (basis_sets _)).eq_of_same_basis β¨Ξ» t, mem_uniform_nhds_set_iffβ©
Last updated: Dec 20 2023 at 11:08 UTC