Zulip Chat Archive

Stream: maths

Topic: Product of Borel spaces


Kevin Buzzard (Dec 10 2024 at 12:33):

Here's a definition which we have in FLT (and we're still developing the API for). Let RR be a topological ring which is locally compact as a topological space. Then thanks to Floris we know that there's a Haar measure μ\mu on the additive abelian group (R,+)(R,+), unique up to a positive real scaling factor. If uR×u\in R^\times then left multiplication by uu is an additive group isomorphism (R,+)(R,+)(R,+)\cong (R,+) and so there must be a positive real number δR(u)\delta_R(u) such that μ(uX)=δR(u)μ(X)\mu(uX)=\delta_R(u)\mu(X) for all measurable XRX\subseteq R. The map δR\delta_R is easily checked to be a group homomorphism from R×R^\times to the positive reals. Examples: δR(u)=u\delta_{\mathbb{R}}(u)=|u| for
0uR0\not=u\in\mathbb{R} because multiplication by uu scales Lebesgue measure on R\R by a factor u|u|. Another example: δC(z)=z2\delta_{\mathbb{C}}(z)=|z|^2 because, for example, doubling on the complex numbers scales area by a factor of 4.

On Monday I gave a lecture where I (informally) made this definition of δR\delta_R and then later on I made the remark that it is trivial to check that δR×S(u,v)=δR(u)δS(v)\delta_{R\times S}(u,v)=\delta_R(u)\delta_S(v), because if you scale the width of a rectangle by a positive real factor xx and the height by yy then you scale the area by xyxy. Are you all following along so far?

This lecture was part of a series of lectures on FLT, and we need this product result in the proof I'm formalising, in the case where RR is the finite adeles of a number field, SS is the infinite adeles, and R×SR\times S is the adeles (these definitions have recently landed in mathlib). But of course I wanted to formalise everything in the correct generality as part of the API for δR\delta_R, so in particular I wanted to formalise this trivial result about δR×S\delta_{R\times S}.

I have very limited experience with the measure theory part of mathlib (and with the area in general), but my understanding is that if RR is a topological space and I want to start talking about measures on it then I need to write this:

variable (R : Type*)
  [TopologicalSpace R] [MeasurableSpace R] [BorelSpace R]

(it annoys me that this isn't [IsBorelSpace R], making it clearer what's going on to amateurs like me, but never mind). So I ploughed on with making the formal statement about these characters on products of locally compact rings, and to my mild surprise I got typeclass errors in the statement, which due to the magic of #synth I could easily trace back to the following failure:

import Mathlib

variable (R S : Type*)
  [TopologicalSpace R] [MeasurableSpace R] [BorelSpace R]
  [TopologicalSpace S] [MeasurableSpace S] [BorelSpace S]

#synth BorelSpace (R × S) -- fails

The correct name for this instance would be something like Prod.borelSpace so I #checked this name and it does exist in mathlib, but doesn't quite say what I expected it to say, as there is an unexpected extra hypothesis:

Prod.borelSpace.{u_1, u_2} {α : Type u_1} {β : Type u_2} [TopologicalSpace α] [MeasurableSpace α] [BorelSpace α]
  [TopologicalSpace β] [MeasurableSpace β] [BorelSpace β] [SecondCountableTopologyEither α β] : BorelSpace (α × β)

This was the first time I'd encountered the rather novel SecondCountableTopologyEither α β typeclass (which in my opinion should be called IsSecondCountableTopologyEither, but never mind). In my application both R and S are second countable so the proof of FLT is not broken, but is my very convincing-looking (at least to me!) informal mathematical claim about δR×S\delta_{R\times S} at the beginning of this message not actually correct? What is the mathematical subtlety here? There seems to be no comments in mathlib about why this extra hypothesis is needed, but perhaps I have fallen into some standard trap.

If my "obvious" lemma turns out to be false, this experience will just add weight to my conviction that humans shouldn't be left alone to do mathematics without the aid of machines like Lean.

Dagur Asgeirsson (Dec 10 2024 at 12:57):

I'm not familiar with this part of the library, but removing the assumption about second countability leads me to docs#Prod.opensMeasurableSpace, I guess you can find the mathematical subtlety by looking at its proof.

So the second countability assumption is just to ensure that all open sets in R×SR \times S are measurable. Googling a bit, this seems to be well-known. I don't think there is any way for your obvious lemma to be false, just undefined. But I agree with

Kevin Buzzard said:

humans shouldn't be left alone to do mathematics without the aid of machines like Lean.

Yaël Dillies (Dec 10 2024 at 13:04):

Yes, exactly. The issue is that the open sets in the product are generated by arbitrary unions from boxes, while measurable sets in the product are generated by countable union. They match only if there is a way to consider only countably many sets in one direction or the other

Kevin Buzzard (Dec 10 2024 at 13:16):

I now understand the mathematical subtlety but I don't see why my lemma is undefined: if R is any locally compact topological ring then as far as I can see δR\delta_R is well-defined, and a binary product of locally compact rings is locally compact. So the way I see it (at this point) the lemma is either true or false.

Kevin Buzzard (Dec 10 2024 at 13:23):

Let me talk through the argument a little more. Left multiplication by u is an additive automorphism of (R,+) which is also a homeomorphism. If I then put the Borel sigma-algebra structure on R it's an isomorphism of measurable spaces. So I get my positive real number from general nonsense, right?

Johan Commelin (Dec 10 2024 at 13:30):

Can't you get your BorelSpace (R \times S) via a different route, if you know that R and S are both loc.cmpt top rings?

Sébastien Gouëzel (Dec 10 2024 at 14:01):

Your lemma is correct, but your proof is not. Let μ\mu be a Haar measure on SS (more precisely on the Borel sigma algebra of SS, call it BS\mathcal{B}_S). In the same way, let ν\nu be a Haar measure on BT\mathcal{B}_T in TT. Then the product measure μν\mu \otimes \nu (in Mathlib sense) is a measure on the product sigma-algebra BSBT\mathcal{B}_S \otimes \mathcal{B}_T, which is not the Borel sigma-algebra on S×TS \times T when both of these spaces are not second-countable. So, μν\mu \otimes \nu is not a Haar measure.

Sébastien Gouëzel (Dec 10 2024 at 14:05):

On the other hand, you can start from a Haar measure ρ\rho on S×TS \times T, which exists as this space is locally compact. It is defined on the much bigger sigma-algebra BS×T\mathcal{B}_{S \times T}, and it is not a product measure a priori. Fix s0s_0 and t0t_0 sets in SS and TT which are compact with nonempty interior. Then I can define a measure ν\nu on BS\mathcal{B}_S by ν(s):=ρ(s×t0)\nu(s) := \rho(s \times t_0). This is a Haar measure on SS. Then δR×S(a,1)ν(s0)=δR×S(a,1)ρ(s0×t0)=ρ((a,1)(s0×t0))=ρ(as0×t0)=ν(as0)=δR(a)ν(s0)\delta_{R\times S} (a,1) \nu(s_0) = \delta_{R\times S} (a,1) \rho(s_0\times t_0) =\rho ((a, 1) (s_0 \times t_0)) = \rho(a s_0 \times t_0) = \nu(as_0)=\delta_R(a) \nu(s_0), which shows that the Haar expansion factor of (a,1)(a, 1) in R×SR\times S coincides with the Haar expansion factor of aa in RR. Similarly, δR×S(1,b)=δS(b)\delta_{R \times S} (1, b) = \delta_S(b). Taking the product, δR×S(a,b)=δR(a)δS(b)\delta_{R \times S}(a, b) = \delta_R(a) \delta_S(b).

Sébastien Gouëzel (Dec 10 2024 at 14:10):

Note that I specified "in the Mathlib sense" for the product measure above, because there are competing definitions of product measures in the literature. For some authors, you first take the measure on the product of the Borel sigma algebras as above, but then you complete as much as you can. Then the product of Haar measures would be a completion of the Haar measure on the product (but this requires an additional proof, which is essentially the argument I've given above, and starts from the existence of the Haar measure on the whole Borel sigma-algebra of the product).

Kevin Buzzard (Dec 10 2024 at 15:21):

Wonderful! Many thanks for this. So "product of Haar measures is obviously a Haar measure" is ultimately my error. I am reminded of my "pushforward of product topologies is obviously product of pushforward topologies because what else can it be" error a few months ago, but Patrick saw through that claim immediately. I like that my error here is so subtle -- product of Haar measures isn't even a measure on the correct sigma algebra so it's actually a type error to claim that it's equal to Haar measure on the product. Many thanks all!

Jireh Loreaux (Dec 10 2024 at 16:20):

I love this thread. It's a perfect example of one of the reasons I've loved formalization so much. In pursuing the appropriate generality, we learn so much more than we would've otherwise, and we end up needing cross-pollination from different sides of the community. :heart:

David Ledvinka (Jun 01 2025 at 09:11):

Trying to impliment Sébastien's proof we have ran into two issues. Firstly the compact sets may not be measurable (since without Hausdorff assumption compacts are not necessarily Borel). But this was fixable by using the interiors instead. Secondly though the calculation at the end (at least according to the lemmas we have in the project) require the measure to be regular as well, and without second-countable we dont automatically have that a Haar measure is regular. Is it possible to prove that ν\nu defined in this way is regular? (its not clear to me that it is)

An alternative idea I had would be to use MeasureTheory.Content and define the content in the same way as ν\nu but only on compacts. This would automatically give regularity and I haven't checked any of the details but I assume this would be a Haar measure. Unfortunately I think this construction would definitely require compacts to be measurable (so assume Hausdorff).

Is it possible to complete the proof without either of these two assumptions?

Kevin Buzzard (Jun 01 2025 at 09:30):

Oh all my Haar measures are assumed regular. I always want to be in the situation that Haar measures are unique up to scaling. All my applications have a second countability assumption but I've tried to be as general as possible when sketching the theory

Sébastien Gouëzel (Jun 01 2025 at 09:30):

I think ν\nu above should be regular, as ρ\rho is (maybe you need to pick s0s_0 and t0t_0 to be nice enough for this, i.e., compact, closed, and GδG_\delta). I can try to write down the details if you're stuck.

Another way is to use integrals of continuous compactly supported functions instead of measures of sets, to avoid all the regularity issues.

David Ledvinka (Jun 01 2025 at 09:38):

Kevin Buzzard said:

Oh all my Haar measures are assumed regular. I always want to be in the situation that Haar measures are unique up to scaling. All my applications have a second countability assumption but I've tried to be as general as possible when sketching the theory

Yes I am aware. But I have thought enough about this generalization that I wanted to see it through if reasonable lol. (Note the point I am making is that its not immediately clear that without second countability the constructed Haar measure on the components of the product is regular even though the one on the product is, although according to Sébastien it should be).

David Ledvinka (Jun 01 2025 at 09:45):

Sébastien Gouëzel said:

I think ν\nu above should be regular, as ρ\rho is (maybe you need to pick s0s_0 and t0t_0 to be nice enough for this, i.e., compact, closed, and GδG_\delta). I can try to write down the details if you're stuck.

Another way is to use integrals of continuous compactly supported functions instead of measures of sets, to avoid all the regularity issues.

If your intuition says its true I can try to think about it more. I thought about it a little bit and became skeptical.

For your second point are you saying that a version of the following (proved) theorem should be true

lemma mulEquivHaarChar_smul_integral_map (μ : Measure G)
    [IsHaarMeasure μ] [Regular μ] {f : G  } (φ : G ≃ₜ* G) :
     (a : G), f a μ = (mulEquivHaarChar φ)   a, f a (map φ μ)

where we replace [Regular μ] with f continuously compactly supported or something like that?

Sébastien Gouëzel (Jun 01 2025 at 09:48):

Yes. That's essentially the way haarScalarFactor is defined, so it should come essentially for free from the definitions.

Kevin Buzzard (Jun 01 2025 at 10:37):

I think I muddied the water by pushing this "let's use a set of nonzero positive measure to calculate everything" idea; this was before I had been taught that using continuous functions with compact support was a better idea. My intuition is so poor that whilst I can immediately solve "if X is a set of reals with measure 1, what is the measure of 2X?" I don't have a clue about "if f is a function whose integral is 1 wrt mu, what is the integral of f wrt (x mapsto 2x)_* mu or (x mapsto 2x)^* mu" instinctively so my instinct was just to avoid them.

James Sundstrom (Jun 02 2025 at 21:11):

Eliminating the need for regularity turned out to be somewhat easier than expected. Regularity was being used to prove statements of the form mulEquivHaarChar φ • map φ μ = μ, but we only needed those measures to agree on open sets, which holds without regularity. If anyone's interested, the proof is here.

Kevin Buzzard (Jun 03 2025 at 08:20):

Thanks a lot!


Last updated: Dec 20 2025 at 21:32 UTC