Zulip Chat Archive

Stream: general

Topic: Trying to understand nhdsSet


Trevor Murphy (Dec 17 2025 at 21:21):

I'm learning about filters through some basic exercises on normed topological vector spaces over the reals. One question that arose for me was this: can I show the following

example {X : Type*} [SeminormedAddCommGroup X] [NormedSpace โ„ X]
    {U V : Set X} : ๐“หข (U + V) = ๐“หข U + ๐“หข V := sorry

If not, are there hypotheses I can add to U and/or V that make it true in a nontrivial way? Intuitively I'm pretty sure that the "โ‰ค" direction is true in general, though I'm still struggling to formalize a proof. But I'm really struggling to think about the "โ‰ฅ" direction. I can't think of a counterexample, but I also get easily confused when trying to unravel the definitions.

Is somebody able to point me in a useful direction?

Kevin Buzzard (Dec 17 2025 at 21:48):

Can you edit your post to make it a #mwe ? So far I tried adding import Mathlib and open scoped Topology but your code still doesn't compile so I don't even know what the question says.

Kevin Buzzard (Dec 17 2025 at 21:53):

Oh finally got it: is this your question?

import Mathlib

open scoped Topology Pointwise

example {X : Type*} [SeminormedAddCommGroup X] [NormedSpace โ„ X]
    {U V : Set X} : ๐“หข (U + V) = ๐“หข U + ๐“หข V := sorry

Can you give a mathematics proof of what you're claiming here? i.e. are you asking a mathematics question or a Lean question?

Trevor Murphy (Dec 17 2025 at 22:17):

Ah sorry for the confusion. There's a math question and a lean question. Here's the lean part first:

The claim ๐“หข (U + V) โ‰ค ๐“หข U + ๐“หข V holds generally. Let W be any set in ๐“หข U + ๐“หข V, and let U' and V' be open sets with U โІ U', V โІ V', and U' + V' โІ W. Then U' + V' is an open set with U + V โІ U' + V' โІ W, so W is in ๐“หข (U + V). I'm stuck translating this into lean because I don't understand the nhdsSet API well enough to pull out the U' and V' that satisfy those conditions.

Trevor Murphy (Dec 17 2025 at 22:23):

Then there's a math question about the reverse inequality. It feels like there should be a counterexample, but I'm just not coming up with it. I was hoping maybe the API and general lean code around nhdsSet could point me in a useful direction but I couldn't figure it out.

Alternatively, it feels like if I assume U and V are nice enough (maybe connected?) then it should be possible to prove the reverse inequality. Again I was hoping to glean some ideas from the conditions and properties of nhdsSet, but I couldn't figure it out.

Kevin Buzzard (Dec 17 2025 at 22:38):

import Mathlib

open scoped Topology Pointwise

example {X : Type*} [SeminormedAddCommGroup X] [NormedSpace โ„ X]
    {U V : Set X} : ๐“หข (U + V) โ‰ค ๐“หข U + ๐“หข V := by
  -- let W be any set in N(U)+N(V)
  intro W hW
  -- by definition
  -- let A, B be sets with U โІ interior(A), V โІ interior(B), and A + B โІ W
  obtain โŸจA, hA, B, hB, hโŸฉ := hW
  -- let U' and V' be opens with U โІ U' โІ A and V โІ V' โІ B
  rw [mem_nhdsSet_iff_exists] at hA hB
  obtain โŸจU', hU', hUU', HU'AโŸฉ := hA
  obtain โŸจV', hV', hVV', hV'BโŸฉ := hB
  -- we want to find some open W' with U + V โІ W' โІ W
  rw [mem_nhdsSet_iff_exists]
  -- We claim U' + V' works
  use U' + V'
  -- is an open set with U + V โІ U' + V' โІ W
  -- so we now need to check it's open, it contains U+V and it's contained in W
  refine โŸจ?_, ?_, ?_โŸฉ
  ยท -- U' + V' is open because it's a union of open sets (translate of V')
    exact IsOpen.add_left hV'
  ยท -- the inclusion U + V โІ U' + V' is clear by monotonicity results
    mono
  ยท -- and the inclusion U' + V' โІ W is also clear
    apply subset_trans (show U' + V' โІ A + B by mono) h

is the inclusion which we have the proof of.

Mirek Olลกรกk (Dec 17 2025 at 22:41):

If I understand the definitions well, this should be a counterexample to the math question:

  • X=R2X = \R^2
  • U={(n,0)โˆฃnโˆˆZ}U = \{(n,0) \mid n \in \Z\}
  • V={(0,n)โˆฃnโˆˆZ}V = \{(0,n) \mid n \in \Z\}
  • A neighborhood of U+VU+V where we take a ball of radius minโก(1,eโˆ’xโˆ’y)\min(1, e^{-x-y}) around each integer point.

Trevor Murphy (Dec 17 2025 at 23:01):

Okay! Thanks so much! I'll go work through these

Mirek Olลกรกk (Dec 17 2025 at 23:01):

I don't think connectedness helps much, then I could connect the disconnected points through another dimension. Compactness of U+VU+V should help, then for a given neighborhood of U+VU+V, we can find an ฯต\epsilon-neighborhood inside.

Trevor Murphy (Dec 17 2025 at 23:06):

Ah now I see how that example works. Interesting, thanks for explaining. I'll have a lot to think about on the plane home

Kevin Buzzard (Dec 17 2025 at 23:47):

How about X=R2X=\R^2, U=(โˆ’1,1)ร—{0}U=(-1,1)\times\{0\}, V={0}ร—(โˆ’1,1)V=\{0\}\times(-1,1) and the neighbourhood is simply U+V=(โˆ’1,1)ร—(โˆ’1,1)U+V=(-1,1)\times(-1,1)?


Last updated: Dec 20 2025 at 21:32 UTC