A Blueprint for Fermat’s Last Theorem

9 Miniproject: Haar Characters

9.1 The goal

The goal of this miniproject is to develop the theory (i.e., the basic API) of Haar characters. “Haar character” is a name I’ve made up to describe a certain character of the units of a locally compact topological ring. The main result we need here is that if \(B\) is a finite-dimensional algebra over a number field \(K\), then \(B^\times \) is in the kernel of the Haar character of \(B\otimes _K\mathbb {A}_K\), where \(\mathbb {A}_K\) is the ring of adeles of \(K\). Most if not all of this should probably be in mathlib.

KMB would like to heartily thank Sébastien Gouëzel for the help he gave during the preparation of this material.

9.2 Initial definitions

9.2.1 Scaling Haar measure on a group

Let \(A\) be a locally compact topological additive abelian group. There’s then a regular additive Haar measure \(\mu \) on \(A\), unique up to a positive scalar factor. If \(\phi :(A,+)\cong (A,+)\) is a homeomorphism and an additive automorphism of \(A\), then we can push forward \(\mu \) along \(\phi \) to get a second measure \(\phi _*\mu \) on \(A\), with the property that \((\phi _*\mu )(X)=\mu (\phi ^{-1}X)\) for any Borel subset \(X\) of \(A\).

Now \(\phi _*\mu \) is a translation-invariant and regular measure, and hence also a Haar measure on \(A.\) It must thus differ from \(\mu \) by a positive scalar factor, which we call \(d_A(\phi )\). There is a choice of normalization here between \(d_A(\phi )\) and \(d_A(\phi )^{-1}\), so let us be more precise.

Definition 9.1
#

If \(A\) is a locally compact topological additive abelian group, if \(\mu \) is a regular Haar measure on \(A\), and if \(\phi :A\to A\) is an additive homeomorphism, then we let \(d_A(\phi )\) denote the unique positive real number such that \(\mu (X)=d_A(\phi )(\phi _*\mu )(X)\) for any Borel set \(X\).

To give an example, if \(\phi \) is multiplication by \(2\) on the real numbers, if \(X=[0,1]\), and if \(\mu \) is Lebesgue measure on the Borel subsets of \(\mathbb {R}\), we have that \(\phi _*\mu (X)=\mu (\phi ^{-1}(X))=\mu ([0,1/2])=1/2\), so \(1=d_A(\phi )/2\) meaning that \(d_A(\phi )=2\). Similarly if \(\phi \) is multiplication by \(-2\) and \(X=[0,1]\) then \(\phi ^{-1}(X)=[-1/2,0]\) which again has measure \(1/2\), so \(d_A(\phi )\) is 2 again.

Strictly speaking our definition of \(d_A(\phi )\) depends on the choice of regular Haar measure \(\mu \). Note that mathlib offers a fixed Borel regular Haar measure MeasureTheory.Measure.haar on any locally compact topological group and the actual definition of \(d_A\) in the code uses this definition. Note also that the code defines everything for multiplicative groups and uses @[to_additive] to deduce the corresponding results for additive groups.

Here are some basic results about this construction. In all of them, \(A\) is a locally compact topological group and \(\phi :A\to A\) is a group isomorphism and a homeomorphism. The first lemma shows that the definition of \(d_A(\phi )\) is indeed independent of the choice of Haar measure.

Lemma 9.2

\(d_A(\phi )\) is independent of choice of regular Haar measure.

Proof

If \(\mu '\) is a second choice then \(\mu '=\lambda \mu \) for some positive real \(\lambda \), and the \(\lambda \)s on each side of \(\mu '(X)=d_A(\phi )(\phi _*\mu ')(X)\) cancel.

Lemma 9.3
#

If \(\mu \) is any regular Haar measure on \(A\) then \(d_A(\phi )(\phi _*\mu ) = \mu .\)

Proof

This is a restatement of the previous result.

We can of course also pull a Haar measure \(\mu \) back along a homeomorphism \(\phi \), giving a measure \(\phi ^*\mu \) such that \(\phi ^*\mu (X)=\mu (\phi (X))\).

Corollary 9.4
#

If \(\mu \) is any regular Haar measure on \(A\) then \(d_A(\phi )\mu = \phi ^*\mu .\)

Proof

This follows from lemma 9.3 applied to the regular Haar measure \(\phi ^*\mu \) and the fact that \(\phi _*\phi ^*\mu =\mu \).

Now let \(\mu \) be any regular additive Haar measure on \(A\).

If \(X\) is a Borel set then \(\mu (X)=d_A(\phi )\mu (\phi ^{-1}X)\).

Proof

This follows immediately from lemma 9.3 and the definition of the pushforward of a measure.

If \(f:A\to \mathbb {R}\) is a Borel measurable function then \(d_A(\phi )\int f(x)d\phi _*\mu (x)=\int f(x)d\mu (x)\).

Proof

This also follows immediately from lemma 9.3.

We also have the following variant:

Lemma 9.7

If \(f:A\to \mathbb {R}\) is a Borel measurable function then \(d_A(\phi )\int f(x)d\mu (x)=\int f(x)d\phi ^*\mu (x)\).

Proof

This is immediate from corollary 9.4.

Note that as a consequence of lemma 9.5, if \(X\) is a Borel subset of \(A\) with positive finite measure then we can read off \(d_A(\phi )\) by \(d_A(\phi )=\mu (X)/\mu (\phi ^{-1}(X))\), and hence also by \(d_A(\phi )=\mu (\phi (X))/\mu (X)\). A nice special case is when \(\mu (X)=1\), in which case we have \(d_A(\phi )=\mu (\phi (X))\) for all \(\phi \), or \(d_A(\phi )=1/\mu (\phi ^{-1}(X))\). Similarly, by lemma 9.6, if \(f\) is a measurable function with \(0{\lt}\int f(x)d\mu (x){\lt}\infty \) then we can read off \(d_A(\phi )\) by \(d_A(\phi )=(\int f(x)d\mu (x))/(\int f(x)\phi _*\mu (x))\). Note that mathlib supplies such \(f\) with the function exists_continuous_nonneg_pos. The following are also straightforward.

Lemma 9.8

\(d_A(id)=1.\)

Proof

Clear.

Lemma 9.9

\(d_A(\phi \circ \psi )=d_A(\phi )d_A(\psi ).\)

Proof

Here’s one way: it suffices to prove that \(d_A(\phi \circ \psi )(\phi \circ \psi )_*\mu =d_A(\phi )d_A(\psi )(\phi \circ \psi )_*\mu \) (because there exists a compact set with positive finite measure) and using lemma 9.3 and the fact that \((\phi \circ \psi )_*\mu =\phi _*(\psi _*\mu )\) one can simplify both sides to \(\mu \).

9.2.2 Scaling Haar measure on a ring

Now let \(R\) be a locally compact topological ring. The Haar character of \(R\), or more precisely the left Haar character of \(R\), is a group homomorphism \(R^\times \to \mathbb {R}^\times \) defined in the following way. If \(u\in R^\times \) then left multiplication by \(u\), namely the map \(\ell _u:(R,+)\to (R,+)\) defined by \(\ell _u(r)=ur\), is a homeomorphism and an additive automorphism of \((R,+)\), so the preceding theory applies to \(\ell _u\).

Definition 9.10

We define \(\delta _R(u)\) (or just \(\delta (u)\) when the ring \(R\) is clear) to be \(d_R(\ell _u)\).

Lemmas 9.8 and 9.9 immediately imply that \(\delta _R\) is a group homomorphism from \(R^\times \) to \(\mathbb {R}_{{\gt}0}\). Also immediate from previous lemmas is

Lemma 9.11

If \(f:R\to \mathbb {R}\) is a Borel measurable function and \(u\in R^\times \) then \(\delta _R(u)\int f(ux)d\mu (x)=\int f(x)d\mu (x)\).

Proof

A short calculation using lemma 9.6.

If \(X\) is a Borel subset of \(R\) and \(r\in R^\times \) then \(\mu (rX)=\delta _R(r)\mu (X)\).

Proof

Immediate from lemma 9.5.

The next result lies a little deeper.

Corollary 9.13

The function \(\delta _R:R^\times \to \mathbb {R}_{{\gt}0}\) is continuous.

Proof

Fix a Haar measure \(\mu \) on \(R\) and a continuous real-valued function \(f\) on \(R\) with compact support and such that \(\int f(x) d\mu (x)\not=0\). Then \(r \mapsto \int f(rx) d\mu (x)\) is a continuous function from \(R\to \mathbb {R}\) (because a continuous function with compact support is uniformly continuous) and thus gives a continuous function \(R^\times \to \mathbb {R}\). Thus the function \(u\mapsto (\int f(ux) d\mu (x))/(\int f(x)d\mu (x))\) is a continuous function from \(R^\times \) to \(\mathbb {R}\) taking values in \(\mathbb {R}_{{\gt}0}\). Hence \(\delta _R^{-1}\) is continuous, from lemma 9.11, and thus \(\delta _R\) is too.

9.3 Examples

We discuss some examples of Haar characters.

Lemma 9.14
#

If \(R=\mathbb {R}\) then \(\delta _R(u)=|u|\).

Proof

Take \(\mu \) to be Lebesgue measure and \(X=[0,1]\). We have \(\delta (u)=\mu (uX)\). If \(u{\gt}0\) then \(u[0,1]=[0,u]\) which has measure \(u=|u|\), and if \(u{\lt}0\) then \(u*[0,1]=[u,0]\) which has measure \(-u=|u|\).

Lemma 9.15
#

If \(R=\mathbb {C}\) then \(\delta _R(u)=|u|^2\).

Proof

Multiplication by a positive real \(r\) sends a unit square to a square of area \(r^2=|r|^2\). Multiplication by \(e^{i\theta }\) is a rotation and thus does not change area. The general case follows.

Lemma 9.16
#

If \(R=\mathbb {Q}_p\) then \(\delta _R(u)=|u|_p\), the usual \(p\)-adic norm.

Proof

Normalise Haar measure so that \(\mu (\mathbb {Z}_p)=1\). If \(u\) is a \(p\)-adic unit then \(u\mathbb {Z}_p=\mathbb {Z}_p\) so multiplication by \(u\) didn’t change Haar measure. If however \(u=p\) then \(u\mathbb {Z}_p\) has index \(p\) in \(\mathbb {Z}_p\) and, because \(\mu (i+p\mathbb {Z}_p)=\mu (p\mathbb {Z}_p)\) we have that \(\mu (\mathbb {Z}_p)=p\mu (p\mathbb {Z}_p)\) and thus \(\delta (p)=p^{-1}\). These elements generate \(\mathbb {Q}_p^\times \) and two characters which agree on generators of a group must agree on the group.

Remark 9.17
#

If \(R\) is a finite extension of \(\mathbb {Q}_p\) then \(\delta _R(u)\) is the norm on \(R\) normalised in the following way: \(\delta _R(\varpi )=q^{-1}\), where \(\varpi \) is a uniformiser and \(q\) is the size of the (finite) residue field. In fact the same is true for any nonarchimedean local field. The proof is the same as for \(\mathbb {Q}_p\). Right now this is difficult to state in Lean because there is still some discussion about the definition of a nonarchimedean local field.

9.4 Algebras

Say \(F\) is a locally compact topological field (for example \(\mathbb {R}\) or \(\mathbb {C}\) or \(\mathbb {Q}_p\)), \(V\) is a finite-dimensional \(F\)-vector space, and \(\phi :V\to V\) is an invertible \(F\)-linear map. Then \(V\) with its module topology (which is the product topology if one picks a basis) is a locally compact topological abelian group, and \(\phi \) is additive. One can check that linearity implies continuity (this is IsModuleTopology.continuous_of_linearMap in mathlib), so in fact \(\phi \) is a homeomorphism and our theory applies. The following lemma gives a formula for the scale factor \(d_V(\phi )\).

\(d_V(\phi )=\delta _F(\det (\phi ))\), where \(\det (\phi )\in F\) is the determinant of \(\phi \) as an \(F\)-linear map.

Proof

The proof should be inspired by Real.map_matrix_volume_pi_eq_smul_volume_pi, which crucially uses the induction principle Matrix.diagonal_transvection_induction_of_det_ne_zero. In short, one needs to check it for diagonal matrices and for matrices which are the identity except that one off-diagonal entry is non-zero, because these matrices generate \(GL_n(F)\) if \(F\) is a field. Note that we only need the result for \(F=\mathbb {R}\) and \(F=\mathbb {Q}_p\) (and possibly for finite extensions of these depending on which route we go for some intermediate results), so if it helps we can assume that \(F\) is second countable (but it shouldn’t be necessary).

Now say \(F\) is still a locally compact topological field, and that \(R\) is a (possibly non-commutative) \(F\)-algebra. Recall that this means that (\(R=0\) or) \(F\) lies in the centre of \(R\). Assume that \(R\) is finite-dimensional as an \(F\)-vector space. Then if we give \(R\) the \(F\)-module topology (which is just the product topology if we pick a basis) then it is known that \(R\) becomes a topological ring. Now say \(u\in R^\times \), and recall \(\ell _u:R\to R\) is left multiplication by \(u\). Then \(\ell _u\) is easily checked to be an \(F\)-linear homeomorphism.

Corollary 9.19

If \(u\in R^\times \) then \(\delta _R(u)=\delta _F(\det (\ell _u))\).

Proof

Follows immediately from the preceding lemma.

9.5 Left and right multiplication

If \(R\) is a locally compact topological ring, and if multiplication on \(R\) is not commutative, then left and right multiplication by an element of \(R\) can scale Haar measure in different ways. For example if \(R\) is the upper-triangular \(2\times 2\) matrices with real entries, then left multiplication by \(\begin{pmatrix} a & 0 \\ 0 & 1 \end{pmatrix}\) sends \(\begin{pmatrix} x & y \\ 0 & z \end{pmatrix}\) to \(\begin{pmatrix} ax & ay \\ 0 & z \end{pmatrix}\) and thus scales \(R\)’s additive Haar measure by \(|a|^2\), but right multiplication by \(\begin{pmatrix} a & 0 \\ 0 & 1 \end{pmatrix}\) sends \(\begin{pmatrix} x & y \\ 0 & z \end{pmatrix}\) to \(\begin{pmatrix} ax & y \\ 0 & z \end{pmatrix}\) and thus scales \(R\)’s additive Haar measure by a factor of \(|a|\).

What’s going on here is that if we regard left and right multiplication as \(\mathbb {R}\)-linear maps from \(R\) to \(R\), then their associated matrices with respect to the obvious basis are \(diag(a,a,1)\) and \(diag(a,1,1)\), which have different determinants.

However, if \(k\) is now any field and if \(B\) is a finite-dimensional central simple algebra over \(k\) (for example a quaternion algebra, the case we’ll care about later), and if \(u\in B^\times \) then \(x\mapsto ux\) and \(x\mapsto xu\) are both \(k\)-linear endomorphisms of \(B\), and I claim that they have the same determinant.

Lemma 9.20

Say \(B\) is a finite-dimensional central simple algebra over a field \(k\), and \(u\in B^\times \). Let \(\ell _u:B\to B\) be the \(k\)-linear maping \(x\) to \(ux\) and let \(r_u:B\to B\) be the \(k\)-linear map sending \(x\) to \(xu\). Then \(\det (\ell _u)=\det (r_u)\).

Proof

Determinants are unchanged by base extension, so WLOG \(k\) is algebraically closed. Then it’s known that \(B\) must be a matrix algebra, say \(M_n(k)\). Now \(u\) can be thought of as a matrix which has its own intrinsic determinant \(d\), and \(B\) as a left \(B\)-module becomes a direct sum of \(n\) copies of \(V\), the standard \(n\)-dimensional representation of \(B\). Thus \(\det (\ell _u)=d^n\). Similarly \(\det (r_u)=d^n\) and in particular they are equal.

Corollary 9.21

If \(B\) is a central simple algebra over a locally compact field \(F\), and if \(u\in B^\times \), then \(d_B(r_u)=\delta _B(u)\) (recall that the latter is defined to mean \(d_B(\ell _u)\)).

Proof

If \(\ell _u\) and \(r_u\) denote left and right multiplication by \(u\) on \(B\), then we have seen in lemma 9.18 that \(d_B(r_u)=\delta _F(\det (r_u))\). Lemma 9.20 tells us that this is \(\delta _F(\det (\ell _u))\) and this is \(\delta _B(u)\) again by corollary 9.18.

9.6 Finite Products

Here are two facts which we will need about products.

Lemma 9.22

If \((A,+)\) and \((B,+)\) are locally compact topological abelian groups, and if \(\phi :A\to A\) and \(\psi :B\to B\) are additive homeomorphisms, then \(\phi \times \psi :A\times B\to A\times B\) is an additive homeomorphism (this is obvious), and \(d_{A\times B}(\phi \times \psi )=d_A(\phi )d_B(\psi )\).

Proof

We only need this result in the case where both \(A\) and \(B\) are second-countable, in which case Prod.borelSpace can be used to show that Haar measure on \(A\times B\) is the product of Haar measures on \(A\) and \(B\), and in this case the result follows easily. Without this assumption, the product of these measures may not even be a Borel measure and one has to be more careful. The proof in this case is explained by Gouëzel here. Here is the idea. Let \(\rho \) be a Haar measure on \(A\times B\). Fix sets \(X\subseteq A\) and \(Y\subseteq B\) which are compact with nonempty interior. We can now pull back \(\rho \) to a measure \(\nu \) on the Borel sigma-algebra of \(A\) defined as \(\nu (s)=\rho (s\times Y)\) and this is easily checked to be a Haar measure on \(A\). Then \(\delta _{A\times B}(a,0)\nu (X)= \delta _{A\times B}(a,0)\rho (X\times Y)=\rho ((a,0)(X\times Y))= \rho (aX\times Y)=\nu (aX)=\delta _A(a)\nu (X)\) , so \(\delta _{A\times B}(a,0)=\delta _A(a)\). Similarly \(\delta _{A\times B}(0,b)=\delta _B(b)\) and because \(\delta _{A\times B}\) is a group homomorphism we’re home.

Lemma 9.23

If \(A_i\) are a finite collection of locally compact topological abelian groups, with \(\phi _i:A_i\to A_i\) additive homeomorphisms, then \(d_{\prod _i A_i}(\prod _i\phi _i)=\prod _i d_{A_i}(\phi _i)\).

Proof

Induction on the size of the finite set, using the previous lemma.

Lemma 9.24
#

If \(R\) and \(S\) are locally compact topological rings, then \(\delta _{R\times S}(r,s)=\delta _R(r)\times \delta _S(s)\).

Proof

Follows immediately from lemma 9.22.

Lemma 9.25
#

If \(R_i\) are a finite collection of locally compact topological rings, and \(u_i\in R_i^\times \) then \(\delta _{\prod _i R_i}((u_i)_i)=\prod _i\delta _{R_i}(u_i)\).

Proof

Follows immediately from lemma 9.23.

9.7 Some measure-theoretic preliminaries

Lemma 9.26

Let \(A\) and \(B\) be locally compact topological groups and let \(f:A\to B\) be both a group homomorphism and open embedding. The pullback along \(f\) of a Haar measure on \(B\) is a Haar measure on \(A\).

Proof

Translation-invariance is easy, compact sets are finite because continuous image of compact is compact, open sets are bounded because image of open is open.

Lemma 9.27

The pullback of a regular Borel measure along an open embedding is a regular Borel measure.

Proof

Again this is because the image of compact is compact and the image of open is open, so all the properties of being a regular measure are easily checked.

Say \(A\) is a compact topological additive group and \(\phi :A\to A\) is an additive isomorphism. Then \(d_A(\phi )=1.\)

Proof

We have \(d_A(\phi )\mu (A)=\mu (A)\) from lemma 9.5 and \(\mu (A)\) is positive and finite because \(A\) is open and compact.

If \(f:A\to B\) is a group homomorphism and open embedding between locally compact topological additive groups and if \(\alpha :A\to A\) and \(\beta :B\to B\) are additive homeomorphisms such that the square commutes (i.e., \(f\circ \alpha =\beta \circ f\)) then \(d_A(\alpha )=d_B(\beta )\).

Proof

Choose a regular Haar measure \(\mu _B\) on \(B\). We just saw in lemmas 9.26 and 9.27 that its pullback \(\mu _A:=f^*\mu _B\) to \(A\) is also a regular Haar measure. Now fix a continuous compactly-supported function \(g\) on \(A\) with \(0{\lt}\int g(a)d\mu (a){\lt}\infty \). Then \(d_A(\alpha )\int g(a)d\mu _A(a)=\int g(a)d(\alpha ^*\mu _A)(a)\) by lemma 9.7. This equals \(\int g(a)d(\alpha ^* f^*\mu _B)(a)\) by definition, which is \(\int g(a)d(f^*\beta ^*\mu _B)(a)\) because pullback of pullback is pullback. This equals \(d_B(\beta )\int g(a) d(f^*\mu _B)(a)\) by corollary 9.4 which is \(d_B(\beta )\int g(a)d\mu _A(a)\) by definition, and so \(d_A(\alpha )=d_B(\beta )\) as required.

9.8 Restricted products

Now say \(A=\prod '_i A_i\) is the restricted product of a collection of types \(A_i\) with respect to the subsets \(C_i\). Recall that this is the subset of \(\prod _i A_i\) consisting of y Say \(B=\prod '_i B_i\) is the restricted product of types \(B_i\) over the same index set, with respect to subsets \(D_i\). Say \(\phi _i:A_i\to B_i\) are functions with the property that \(\phi _i(C_i)\subseteq D_i\) for all but finitely many \(i\). It is easily checked that the \(\phi _i\) induce a function \(\phi :=\prod '_i\phi _i:A\to B\). It is also easily checked that if all the \(A_i\) and \(B_i\) are groups or rings or \(R\)-modules, the \(C_i\) and \(D_i\) are subgroups or subrings or submodules, and the \(\phi _i\) are group or ring or module homomorphisms, then \(\phi \) is a group or ring or module homomorphism. However topological facts lie a little deeper.

Lemma 9.30

If the \(A_i\) and \(B_i\) are topological spaces and the \(\phi _i\) are continuous functions, then the restricted product \(\phi = \prod '_i\phi _i\) is a continuous function.

Proof

We use the universal property RestrictedProduct.continuous_dom of the topology in mathlib to reduce to the claim that for all finite \(S\), the induced map \(A_S:=\prod _{i\in S}A_i\times \prod _{i\notin S}C_i\to B\) is continuous. Because the inclusion \(A_S\to A_T\) is continuous for \(S\subseteq T\) we are reduced to checking this claim for \(S\) sufficiently large that it contains all of the \(i\) for which \(\phi (C_i)\not=D_i\). For such \(S\), this map \(A_S\to B\) factors as \(A_S\to B_S\to B\) and \(B_S\to B\) is continuous, so it suffices to prove that \(A_S\to B_S\) is continuous, but this is just a product of continuous maps.

We now focus on the case that \(B_i=A_i\) are locally compact groups, \(D_i=C_i\) are compact open subgroups, and \(\phi _i:A_i\to A_i\) are group isomorphisms and homeomorphisms sending \(C_i\) to \(C_i\) for all but finitely many \(i\). Then the restricted product \(A:=\prod 'A_i\) of the \(A_i\) with respect to the \(C_i\) is also a locally compact topological group, and the restricted product \(\phi =\prod '\phi _i\) of the \(\phi _i\) is a group isomorphism and homeomorphism, so we can ask how \(d_A(\phi )\) compares to the \(d_{A_i}(\phi _i)\).

First note that \(d_{A_i}(\phi _i)=1\) for all the \(i\) such that \(\phi _i(C_i)=C_i\), as \(d_{A_i}(\phi _i)\) can be computed as \(\mu (\phi _i(C_i))/\mu (C_i)\) and \(\mu (C_i)\) is guaranteed to have positive finite measure as it is open and compact. Hence the product \(\prod _id_{A_i}\phi _i\) is a finite product, in the sense that all but finitely many terms are 1. The following theorem shows that the value of this product is \(d(\phi )\).

With \(A\), \(A_i\), \(C_i\), \(\phi _i\), \(\phi \) defined as above, we have \(\delta _A(\phi )=\prod _i\delta _{A_i}(\phi _i)\).

Proof

Assume \(\phi _i(C_i)=C_i\) for all \(i\not\in S\), a finite set, and work in the open subgroup \(U:=\prod _{i\in S}A_i\times \prod _{i\not\in S}C_i\). Then \(\phi \) induces an automorphism \(\phi _S\) of this open subgroup \(U\) of \(A\), and in particular lemma 9.29 tells us that \(\delta (\phi )=\delta _U(\phi _S)\). Next note that \(\phi _S:U\to U\) can be written as a product of the automorphisms \(\prod _{i\not\in S}\phi _i|_{C_i}\) of \(\prod _{i\not\in S}C_i\) and \(\prod _{i\in S}\phi _i\) of \(\prod _{i\in S}A_i\). Because \(\prod _{i\not\in S}C_i\) is a compact group we must have \(\delta (\phi _{i\not\in S}\phi _i|_{C_i})=1\) by lemma 9.28. Finally \(\delta (\prod _{i\in S}\phi _i)=\prod _{i\in S}\delta (\phi _i)\) by lemma 9.23 and we are home.

As a special case, if \(R\) is the restricted product of a collection of topological rings \(R_i\) (not necessarily commutative) each equipped with a compact open subring \(C_i\), then we have

Corollary 9.32

If \(u=(u_i)_i\in R^\times \) then \(\delta _R(u)=\prod _i\delta _{R_i}(u_i)\).

Proof

By definition of restricted product we have \(u_i\in C_i\) for all but finitely many \(i\). Note also that \(u\) has an inverse \(v=(v_i)_i\) with \(v_i\in C_i\) for all but finitely many \(i\). The fact that \(u_iv_i=v_iu_i=1\) means that \(u_i,v_i\in C_i^\times \) for all but finitely many \(i\). Thus the previous theorem 9.31 applies.

9.9 Adeles

We finish this miniproject by proving some results about Haar characters for algebras over adele rings. So let \(K\) be a number field and let \(\mathbb {A}_K\) be the adeles of \(K\). We will prove some theorems about \(\mathbb {A}_K\)-algebras \(R\) which are finite and free as \(\mathbb {A}_K\)-modules. Such algebras can be given the \(\mathbb {A}_K\)-module topology and this makes them into locally compact topological rings. In fact we shall only be concerned in applications with algebras of the form \(B\otimes _K\mathbb {A}_K\) where \(B\) is a finite-dimensional \(K\)-algebra. So fix such a \(B\), and write \(B_{\mathbb {A}}\) for \(B\otimes _K\mathbb {A}_K\). Let us first deal with a subtlety. Recall that if \(K\subseteq L\) are number fields, then \(\mathbb {A}_L\) is a module-finite \(\mathbb {A}_K\)-algebra and hence an \(\mathbb {A}_K\)-module, and theorem 8.48 tells us that \(\mathbb {A}_L\) has the \(\mathbb {A}_K\)-module topology. Thus the next lemma applies.

Lemma 9.33

Say \(R\) and \(S\) are topological rings, and \(S\) is an \(R\)-algebra, finite as an \(R\)-module. Assume that the topology on \(S\) is the \(R\)-module topology. Now say \(M\) is an \(S\)-module, and give it the induced \(R\)-module structure. Then the \(R\)-module topology and \(S\)-module topology on \(M\) coincide.

Proof

Let \(i:R\to S\) denote the structure map. First observe that \(S\) has the \(R\)-module topology so the \(R\)-action map \(R\times S\to S\) (explicitly defined by \((r,s)\mapsto i(r)s\)) is continuous, and restricting to \(s=1\) we deduce that \(i\) is continuous.

Now let \(M_R\) and \(M_S\) denote \(M\) with the \(R\)-module and \(S\)-module topologies respectively. It suffices to prove that the identity maps \(M_R\to M_S\) and \(M_S\to M_R\) are continuous. Equivalently, because the \(A\)-module topology on an \(A\)-module is the finest topology making it into a topological module, we need to prove that \(M_R\) is a topological \(S\)-module and that \(M_S\) is a topological \(R\)-module. We start with the latter claim.

First observe that \(M_S\) is a topological \(S\)-module, so addition is continuous. Next note that the map \(R\times M_S\to M_S\) factors through \(S\times M_S\) and is hence the composite of two continuous maps and thus continuous. Hence \(M_S\) is a topological \(R\)-module.

It thus remains to check that \(M_R\) is a topological \(S\)-module, or equivalently that the map \(S\times M_R\to M_R\) is continuous. But this map is \(R\)-bilinear, and by the result Module.continuous_bilinear_of_finite in mathlib, any \(R\)-bilinear map between modules with the \(R\)-module topology is automatically continuous if one of the source modules is finitely-generated. The result applies because \(S\) is assumed to be a finite \(R\)-module and the proof is complete.

Corollary 9.34

If \(K\) is a number field and \(V\) is an \(K\)-module, then the natural isomorphism \(V\otimes _K\mathbb {A}_K=V\otimes _{\mathbb {Q}}\mathbb {A}_{\mathbb {Q}}\) induced by the natural isomorphism \(\mathbb {A}_K=K\otimes _K\mathbb {A}_{\mathbb {Q}}\) is a homeomorphism if the left hand side has the \(\mathbb {A}_K\)-module topology and the right hand side has the \(\mathbb {A}_{\mathbb {Q}}\)-module topology.

Proof

Lemma 9.33 tells us that \(V\otimes _K\mathbb {A}_K\) has the \(\mathbb {A}_{\mathbb {Q}}\)-module topology, and it is easily checked that the isomorphism is \(\mathbb {A}_{\mathbb {Q}}\)-linear and hence automatically continuous.

Note that in the Lean we prove this for a general extension \(L/K\) rather than \(K/\mathbb {Q}\).

As a consequence, if \(B\) is a \(K\)-algebra then we can think of \(B_{\mathbb {A}}\) as either \(B\otimes _K\mathbb {A}_K\) with the \(\mathbb {A}_K\)-module topology or as \(B\otimes _{\mathbb {Q}}\mathbb {A}_{\mathbb {Q}}\) with the \(\mathbb {A}_{\mathbb {Q}}\)-module topology. Note that this isomorphism commutes with the inclusions from \(B\) into these rings. But Lean is picky about these things so we’ll have to be careful.

Let \(B\) be a finite-dimensional central simple \(K\)-algebra. Say \(u\in B_{\mathbb {A}}^\times \), and define \(\ell _u\) and \(r_u:B_{\mathbb {A}}\to B_{\mathbb {A}}\) by \(\ell _u(x)=ux\) and \(r_u(x)=xu\). Then \(d_{B_{\mathbb {A}}}(\ell _u)=d_{B_{\mathbb {A}}}(r_u)\).

Proof

We think of \(B_{\mathbb {A}}\) as \(B\otimes _K\mathbb {A}_K\). If \(u=(u_v)\) as \(v\) runs through the places of \(K\) then \(d_{B_{\mathbb {A}}}(\ell _u)=\prod _v d_{B_v}(\ell _{u_v})\) by theorem 9.31 (and the product is finite). By corollary 9.21 this equals \(\prod _v d_{B_v}(r_{u_v})\), and again by theorem 9.31 this is \(d_{B_{\mathbb {A}}}(r_u)\).

The previous theorem only applies to inner forms of matrix algebras, but the below theorem, a generalization of the adelic product formula, is valid for any finite-dimensional \(K\)-algebra. Before we state it let’s remind ourselves of the product formula for \(\mathbb {Q}\), and restate it in the language of these Haar characters.

Lemma 9.36
#

If \(x\in \mathbb {A}_{\mathbb {Q}}^\times \) then \(\delta _{\mathbb {A}_{\mathbb {Q}}}(x)=\prod _v|x_v|_v.\)

Proof

By theorem 9.22 we have \(\delta _{\mathbb {A}_{\mathbb {Q}}}(x)=\delta _{\mathbb {A}_{\mathbb {Q}}^\infty }(x^\infty )\times \delta _{\mathbb {R}}(x_\infty )\). By lemma 9.14 we have \(\delta _{\mathbb {R}}(x_\infty )=|x|_\infty \), and by theorem 9.31 we have \(\delta _{\mathbb {A}_{\mathbb {Q}}^\infty }=\prod _p\delta _{\mathbb {Q}_p}(x_p)\). By lemma 9.16 we have \(\delta _{\mathbb {Q}_p}(x_p)=|x_p|_p\) and putting everything together we get the result.

Now \(\mathbb {A}_{\mathbb {Q}}\) is nonzero a \(\mathbb {Q}\)-algebra and hence we have an inclusion \(\mathbb {Q}^\times \to \mathbb {A}_{\mathbb {Q}}^\times \). Here is our reinterpretation of the product formula.

Lemma 9.37

If \(x\in \mathbb {Q}^\times \subseteq \mathbb {A}_{\mathbb {Q}}^\times \) then \(\delta _{\mathbb {A}_{\mathbb {Q}}}(x)=1.\)

Proof

By lemma 9.36 we have \(\delta _{\mathbb {A}_{\mathbb {Q}}}(x)=\prod _v|x|_v\). But the product formula says that this is 1. A quick proof: if \(x=\pm \prod _pp^{e_p}\) then \(\prod _p|x|_p=\prod _pp^{-e_p}\) and \(|x|_\infty =\prod _pp^{e_p}\) so they cancel.

Next we generalize this to finite-dimensional \(\mathbb {Q}\)-vector spaces.

So say \(V\) is an \(N\)-dimensional \(\mathbb {Q}\)-vector space, and define \(V_{\mathbb {A}}:= V\otimes _{\mathbb {Q}}\mathbb {A}_{\mathbb {Q}}\) with its \(\mathbb {A}_{\mathbb {Q}}\)-module topology. If we choose an isomorphism \(V\cong \mathbb {Q}^N\) then \(V_{\mathbb {A}}\cong \mathbb {A}_{\mathbb {Q}}^N\) as an additive topological abelian group. In particular, \(V_{\mathbb {A}}\) is locally compact.

Fix a \(\mathbb {Q}\)-linear automorphism \(\phi :V\to V\). By base extension \(\phi \) induces an \(\mathbb {A}_{\mathbb {Q}}\)-linear automorphism \(\phi _{\mathbb {A}}\) of \(V_{\mathbb {A}}\) which is also a homeomorphism of \(V_{\mathbb {A}}\) if \(V_{\mathbb {A}}\) is given the module topology as an \(\mathbb {A}_{\mathbb {Q}}\)-module. Our goal is

Theorem 9.38

In the above situation (\(V\) a finite-dimensional \(\mathbb {Q}\)-vector space, \(\phi :V\cong V\) is \(\mathbb {Q}\)-linear, \(\phi _{\mathbb {A}}\) the base extension to \(V_{\mathbb {A}}:=V\otimes _{\mathbb {Q}}{\mathbb {A}_{\mathbb {Q}}}\), a continuous linear endomorphism of \(V_{\mathbb {A}}\) with the \(\mathbb {A}_{\mathbb {Q}}\)-module topology), we have \(d_{V_{\mathbb {A}}}(\phi _{\mathbb {A}})=1.\)

Proof

Fix once and for all a \(\mathbb {Z}\)-lattice \(L\subseteq V\) (that is, a spanning \(\mathbb {Z}^N\) in the \(\mathbb {Q}^N\)). Then \(V\otimes _{\mathbb {Q}}\mathbb {A}_{\mathbb {Q}}=L\otimes _{\mathbb {Z}}\mathbb {A}_{\mathbb {Q}}\) which is \(L\otimes _{\mathbb {Z}}(\mathbb {A}_{\mathbb {Q}}^\infty \times \mathbb {R})\). Because tensoring by a finitely presented module commute with restricted products and binary products this equals \(\prod '_p(L\otimes _{\mathbb {Z}}\mathbb {Q}_p)\times (L\otimes _{\mathbb {Q}}\mathbb {R})\), the restricted product being over \(L\otimes _{\mathbb {Z}}\mathbb {Z}_p\), and this is \(\prod '_p(V\otimes _{\mathbb {Q}}\mathbb {Q}_p)\times (V\otimes _{\mathbb {Q}}\mathbb {R})\). If \(V_v\) denotes \(V\otimes _{\mathbb {Q}}\mathbb {Q}_v\) then the endomorphism \(\phi _{\mathbb {A}}\) is the product of \(\phi _p\) for all \(p\) and \(\phi _\infty \), where \(\phi _v\) is a \(\mathbb {Q}_v\)-linear and and hence continuous automorphism of \(V_v\).

Hence by theorem 9.31 we have \(d_{V_{\mathbb {A}}}(\phi _{\mathbb {A}})=\prod _p d_{V_p}(\phi _p)\times d_{V_\infty }(\phi _\infty )\), where we note that all but finitely many of the \(d_{V_p}(\phi _p)\) are 1.

By Lemma 9.18 we have that \(d_{V_v}(\phi _v)=\delta _{\mathbb {Q}_v}(\det (\phi _v))\), hence \(d_{V_{\mathbb {A}}}(\phi _{\mathbb {A}})=\prod _v\delta _{\mathbb {Q}_v}(\det (\phi _v))\). But \(\det (\phi _v)\) is equal to the determinant of \(\phi \) on \(V\) as \(\mathbb {Q}\)-vector space (because base change does not change determinant), which is some nonzero rational number \(q\). Thus \(d_{V_{\mathbb {A}}}(\phi _{\mathbb {A}})=\prod _v\delta _{\mathbb {Q}_v}(q)=1\) by the product formula for \(\mathbb {Q}\).

Corollary 9.39

If \(B\) is a finite-dimensional \(\mathbb {Q}\)-algebra (for example a number field, or a quaternion algebra over a number field), if \(B_{\mathbb {A}}\) denotes the ring \(B\otimes _{\mathbb {Q}}\mathbb {A}_{\mathbb {Q}}\), and if \(b\in B^\times \), then \(\delta _{B_{\mathbb {A}}}(b)=1\).

Proof

Follows immediately from the previous theorem.

Corollary 9.40

If \(B\) is a finite-dimensional \(\mathbb {Q}\)-algebra and if \(b\in B^\times \) then right multiplication by \(b\) does not change Haar measure on \(B_{\mathbb {A}}\).

Proof

Follows immediately from the previous theorem.