From the Rédei matrix to Rédei's bits
For an odd number \(d\) and a nonempty set \(B\) of its primes, the Rédei matrix of \(d_B\) is the Laplacian \(L_B\) of the bits \(a_{qp}=[p/q]\) of \(d\), bordered by the column \(z_B\) exactly when \(y(B)=0\). Its kernel is \(\{0,e_{d_B}\}\) exactly when \(g_d(B)=1\). The first two articles prove the last statement for arbitrary bits satisfying reciprocity; the others identify the Rédei matrix of \(\mathbb Q(\sqrt{-d_B})\) with the bits, and deduce Rédei's formula from the 4-rank statement.
Rédei's bit as a kernel condition
TheoremThe kernel of \((L_B\mid z_B)\) through a square matrix#✓
Let \(V\) be a finite set with bits \(a_{ij},y_i,z_i\in\mathbb F_2\) on \(V\) satisfying reciprocity, as in Rédei's \(g\) from the bits. Let \(B\subseteq V\), \(\rho\in B\), \(y(B)=\sum_{i\in B}y_i\), and let \(L_B\) be the Laplacian of \(a\) on \(B\). Say that the kernel of \((L_B\mid z_B)\) is trivial if the following holds: for every \(e:V\to\mathbb F_2\) vanishing off \(B\) and every \(e_2\in\mathbb F_2\) with \(e_2=0\) when \(y(B)=1\), if $\(\sum_{p\in B}(L_B)_{qp}e_p+e_2z_q=0\quad\text{for every }q\in B,\)$ then \(e_2=0\) and \(e\) is constant on \(B\) (identically \(0\) or identically \(1\) there). So the column \(z_B\) counts only when \(y(B)=0\).
Let \(w=y\) if \(y(B)=1\) and \(w=z\) otherwise, and let \(N\) be \(L_B\) with its column \(\rho\) replaced by \(w\). Then the kernel of \((L_B\mid z_B)\) is trivial if and only if every \(F:V\to\mathbb F_2\) vanishing off \(B\) with \(\sum_{p\in B}N_{qp}F_p=0\) for all \(q\in B\) vanishes on \(B\).
Along the way, without reciprocity:
- the rows of \(L_B\) sum to zero over \(B\): \(\sum_{p\in B}(L_B)_{qp}=0\) for \(q\in B\);
- splitting off the column \(\rho\): \(\sum_{p\in B}N_{qp}F_p=\sum_{p\in B}(L_B)_{qp}F'_p+w_qF_\rho\), where \(F'\) is \(F\) with \(F'_\rho=0\);
- every element of \(\mathbb F_2\) is \(0\) or \(1\).
Proof sketch. (⇒) Let \(F\) vanish off \(B\) with \(\sum_pN_{qp}F_p=0\) on \(B\). Put \(e=F\) with \(e_\rho=0\), and \(e_2=F_\rho\), so that \(L_Be+F_\rho w=0\) on \(B\).
- If \(y(B)=1\), sum over \(q\in B\). Under reciprocity the column sums of \(L_B\) over \(B\) are \(y_v(1+y(B))=0\), while \(\sum_{q\in B}w_q=y(B)=1\), so \(F_\rho=0\).
- In either case the triviality of the kernel applies (with \(w=z\) when \(y(B)=0\)). It gives \(e_2=0\) and \(e\) constant on \(B\), and \(e_\rho=0\), so \(F=0\) on \(B\).
(⇐) Given \((e,e_2)\), replace \(e\) by \(e-e_\rho\) on \(B\); this does not change \(L_Be\) on \(B\), since the rows of \(L_B\) sum to zero. Set its value at \(\rho\) to \(e_2\) and call the result \(F\). Then \(\sum_pN_{qp}F_p=0\) on \(B\) (when \(y(B)=1\) because \(e_2=0\), when \(y(B)=0\) because \(w=z\)), so \(F=0\) on \(B\): \(e_2=0\), and \(e=e_\rho\) is constant on \(B\).
theorem redeiK_kernel_iff_updateCol {a : ι → ι → ZMod 2} {y z : ι → ZMod 2} (hrec : Recip a y)
{B : Finset ι} {ρ : ι} (hρ : ρ ∈ B) :
(∀ (e : ι → ZMod 2) (e₂ : ZMod 2), (∀ i ∉ B, e i = 0) → (∑ i ∈ B, y i = 1 → e₂ = 0) →
(∀ q ∈ B, ∑ p ∈ B, lapl a B q p * e p + e₂ * z q = 0) →
e₂ = 0 ∧ ((∀ i ∈ B, e i = 0) ∨ (∀ i ∈ B, e i = 1))) ↔
(∀ F : ι → ZMod 2, (∀ i ∉ B, F i = 0) →
(∀ q ∈ B, ∑ p ∈ B,
(lapl a B).updateCol ρ (if ∑ i ∈ B, y i = 1 then y else z) q p * F p = 0) →
∀ i ∈ B, F i = 0)
theorem redeiK_lapl_rowSum (a : ι → ι → ZMod 2) {B : Finset ι} {q : ι} (hq : q ∈ B) :
∑ p ∈ B, lapl a B q p = 0
theorem redeiK_sum_updateCol (a : ι → ι → ZMod 2) {B : Finset ι} {ρ : ι} (hρ : ρ ∈ B)
(w F : ι → ZMod 2) (q : ι) :
∑ p ∈ B, (lapl a B).updateCol ρ w q p * F p =
∑ p ∈ B, lapl a B q p * Function.update F ρ 0 p + w q * F ρ
def Recip (a : ι → ι → ZMod 2) (y : ι → ZMod 2) : Prop :=
∀ i j, i ≠ j → a i j + a j i = y i * y j
ZInQKernel/RouteK/Rank5b/Sec3/Redei.lean:25
def lapl (a : ι → ι → ZMod 2) (U : Finset ι) : Matrix ι ι (ZMod 2) := fun i j =>
if i = j then ∑ k ∈ U.erase i, a i k else a i j
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:38
Uses 3 · Used by 3
TheoremRédei's bit as the triviality of a kernel#✓
Let \(V\) be a finite set with bits \(a_{ij},y_i,z_i\in\mathbb F_2\) satisfying reciprocity, and let \(B\subseteq V\) be nonempty. Then the kernel of \((L_B\mid z_B)\) is trivial (the column \(z_B\) counting only when \(y(B)=0\)) if and only if \(g(B)=1\), where $\(g(B)=\sum_{\rho\in B}y_\rho\,\kappa_\rho(B)\ \text{ if }y(B)=1,\qquad g(B)=\sum_{\rho\in B}z_\rho\,\kappa_\rho(B)\ \text{ if }y(B)=0,\)$ and \(\kappa_\rho(B)=\det L_B[B\setminus\rho,B\setminus\rho]\).
Along the way, without reciprocity:
- for \(\rho\in B\) and any \(w:V\to\mathbb F_2\), the matrix \(L_B\) with column \(\rho\) replaced by \(w\) has determinant \(\sum_{v\in B}w_v\,\kappa_v(B)\) on \(B\times B\);
- a square matrix \(N\) on \(B\) has trivial kernel, in the sense that every \(F:V\to\mathbb F_2\) vanishing off \(B\) with \(\sum_{p\in B}N_{qp}F_p=0\) for all \(q\in B\) vanishes on \(B\), if and only if its determinant on \(B\times B\) is nonzero.
Proof sketch. Fix \(\rho\in B\), let \(w=y\) if \(y(B)=1\) and \(w=z\) otherwise, and let \(N\) be \(L_B\) with column \(\rho\) replaced by \(w\). By the kernel through a square matrix, the kernel of \((L_B\mid z_B)\) is trivial if and only if \(N\) has trivial kernel on \(B\), that is, \(\det N\ne0\). Expanding \(\det N\) along column \(\rho\), the minor of \(L_B\) with row \(v\) and column \(\rho\) deleted is \(\kappa_v(B)\) (Lemma 2.2(2)), so \(\det N=\sum_{v\in B}w_v\kappa_v(B)\), which is \(g(B)\) by its definition. In \(\mathbb F_2\), nonzero means \(1\).
theorem kernel_trivial_iff_redeiG {a : ι → ι → ZMod 2} {y z : ι → ZMod 2} (hrec : Recip a y)
{B : Finset ι} (hB : B.Nonempty) :
(∀ (e : ι → ZMod 2) (e₂ : ZMod 2), (∀ i ∉ B, e i = 0) → (∑ i ∈ B, y i = 1 → e₂ = 0) →
(∀ q ∈ B, ∑ p ∈ B, lapl a B q p * e p + e₂ * z q = 0) →
e₂ = 0 ∧ ((∀ i ∈ B, e i = 0) ∨ (∀ i ∈ B, e i = 1))) ↔
redeiG a y z B = 1
theorem redeiK_det_updateCol (a : ι → ι → ZMod 2) {B : Finset ι} {ρ : ι} (hρ : ρ ∈ B)
(w : ι → ZMod 2) :
(((lapl a B).updateCol ρ w).submatrix (fun x : ↥B => (x : ι)) (fun x : ↥B => (x : ι))).det =
∑ v ∈ B, w v * kappa a B v
theorem redeiK_ker_iff_det (N : Matrix ι ι (ZMod 2)) (B : Finset ι) :
(∀ F : ι → ZMod 2, (∀ i ∉ B, F i = 0) → (∀ q ∈ B, ∑ p ∈ B, N q p * F p = 0) →
∀ i ∈ B, F i = 0) ↔
(N.submatrix (fun x : ↥B => (x : ι)) (fun x : ↥B => (x : ι))).det ≠ 0
def Recip (a : ι → ι → ZMod 2) (y : ι → ZMod 2) : Prop :=
∀ i j, i ≠ j → a i j + a j i = y i * y j
ZInQKernel/RouteK/Rank5b/Sec3/Redei.lean:25
def lapl (a : ι → ι → ZMod 2) (U : Finset ι) : Matrix ι ι (ZMod 2) := fun i j =>
if i = j then ∑ k ∈ U.erase i, a i k else a i j
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:38
noncomputable def redeiG (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) (B : Finset ι) : ZMod 2 :=
if ∑ i ∈ B, y i = 1 then ∑ ρ ∈ B, y ρ * kappa a B ρ else ∑ ρ ∈ B, z ρ * kappa a B ρ
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:48
noncomputable def kappa (a : ι → ι → ZMod 2) (B : Finset ι) (ρ : ι) : ZMod 2 :=
((lapl a B).submatrix (fun x : ↥(B.erase ρ) => (x : ι)) (fun x : ↥(B.erase ρ) => (x : ι))).det
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:42
Uses 5 · Used by 1
The Rédei matrix of \(\mathbb Q(\sqrt{-d_B})\)
TheoremThe primes of \(d_B\)#✓
Let \(d\) be a natural number, \(B\) a set of primes of \(d\) and \(d_B=\prod_{p\in B}p\). Then:
- the primes of \(d_B\) are exactly the elements of \(B\), and \(d_B\) is squarefree;
- if \(B\) is nonempty, then \(d_B>1\);
- for \(q\in B\), \(d_B/q=\prod_{k\in B,\,k\ne q}k\);
- every element of \(B\) lies in \(T_{d_B}\), and every element of \(T_{d_B}\) is \(2\) or an element of \(B\).
If \(d\) is odd, then moreover:
- the primes of \(d\) are different from \(2\), so \(2\) is not a prime of \(d_B\) and \(d_B\) is odd;
- \(2\in T_{d_B}\) if and only if \(d_B\not\equiv3\pmod4\);
- \(y(B)=\sum_{q\in B}y_q=1\) if and only if \(d_B\equiv3\pmod4\).
Proof sketch. \(d_B\) is a product of distinct primes, so its primes are the elements of \(B\) and it is squarefree; the statements about \(T_{d_B}\) follow from its definition. For odd \(d\), \(y(B)\) is \(\lambda(d_B)=[d_B\equiv3\pmod4]\), by the multiplicativity of \(\lambda\) on odd residues modulo \(8\).
theorem redeiB_primeFactors (B : Finset d.primeFactors) :
(dProd B).primeFactors = B.map (Function.Embedding.subtype _)
theorem redeiB_prime (p : d.primeFactors) : (p : ℕ).Prime
theorem redeiB_ne_two (hd : Odd d) (p : d.primeFactors) : (p : ℕ) ≠ 2
def dProd {d : ℕ} (B : Finset d.primeFactors) : ℕ := ∏ p ∈ B, (p : ℕ)
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:81
Uses 4 · Used by 3
TheoremThe Rédei matrix of \(\mathbb Q(\sqrt{-d_B})\) in the bits#✓
Let \(d\) be odd, \(B\) a set of primes of \(d\), \(R\) the Rédei matrix of \(d_B\), and \(L_B\) the Laplacian on \(B\) of the bits \(a_{qp}=[p/q]\) of \(d\). For \(q\in B\) and every function \(F\) from the natural numbers to \(\mathbb F_2\), $\(\sum_{p\in T_{d_B}}R_{qp}F(p)=\sum_{p\in B}(L_B)_{qp}F(p)+\begin{cases}0,&d_B\equiv3\pmod4,\\ z_qF(2),&\text{otherwise.}\end{cases}\)$ More precisely, for \(q\in B\) and every prime \(p\) of \(d\), the entry given by the formula of the Rédei matrix of \(d_B\), namely \([p/q]\) for \(p\ne q\) and \([(d_B/q)/q]\) for \(p=q\), equals \((L_B)_{qp}\).
Proof sketch. The off-diagonal entries are \([p/q]=a_{qp}=(L_B)_{qp}\). On the diagonal, \(d_B/q=\prod_{k\in B,\,k\ne q}k\), and the other primes of \(B\) are prime to \(q\), so by the multiplicativity of the residue bit \([(d_B/q)/q]=\sum_{k\in B,\,k\ne q}[k/q]=(L_B)_{qq}\). The set \(T_{d_B}\) is \(B\) if \(d_B\equiv3\pmod4\) and \(B\cup\{2\}\) otherwise, with \(2\notin B\); the column at \(2\) has entries \([2/q]=z_q\).
theorem redeiB_sum_entry (hd : Odd d) {B : Finset d.primeFactors} (F : ℕ → ZMod 2)
{q : d.primeFactors} (hq : q ∈ B) :
∑ p : ramSet (dProd B), redeiEntry (dProd B) ⟨q, redeiB_mem_primeFactors hq⟩ p * F p =
∑ p ∈ B, lapl (aBit d) B q p * F p +
(if dProd B % 4 = 3 then 0 else zBit d q * F 2)
theorem redeiB_entry_eq_lapl (hd : Odd d) {B : Finset d.primeFactors} {q p : d.primeFactors}
(hq : q ∈ B) :
(if (p : ℕ) = 2 then legBit q 2
else if (p : ℕ) = q then legBit q ((dProd B / q : ℕ) : ℤ) else legBit q (p : ℤ)) =
lapl (aBit d) B q p
def ramSet : Finset ℕ := if n % 4 = 3 then n.primeFactors else insert 2 n.primeFactors
ZInQKernel/RouteK/Redei/Primes.lean:335
def dProd {d : ℕ} (B : Finset d.primeFactors) : ℕ := ∏ p ∈ B, (p : ℕ)
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:81
def redeiEntry (n : ℕ) (q : n.primeFactors) (p : ramSet n) : ZMod 2 :=
if (p : ℕ) = 2 then legBit q 2
else if (p : ℕ) = q then legBit q ((n / q : ℕ) : ℤ) else legBit q (p : ℤ)
ZInQKernel/RouteK/Redei/Entry.lean:19
theorem redeiB_mem_primeFactors {B : Finset d.primeFactors} {q : d.primeFactors} (hq : q ∈ B) :
(q : ℕ) ∈ (dProd B).primeFactors
ZInQKernel/RouteK/Redei/Bridge.lean:62
def lapl (a : ι → ι → ZMod 2) (U : Finset ι) : Matrix ι ι (ZMod 2) := fun i j =>
if i = j then ∑ k ∈ U.erase i, a i k else a i j
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:38
noncomputable def aBit (d : ℕ) (i j : d.primeFactors) : ZMod 2 := legBit (i : ℕ) ((j : ℕ) : ℤ)
ZInQKernel/RouteK/Rank5b/Matrices.lean:54
noncomputable def zBit (d : ℕ) (i : d.primeFactors) : ZMod 2 := muBit (i : ℕ)
ZInQKernel/RouteK/Rank5b/Matrices.lean:60
noncomputable def legBit (p : ℕ) (a : ℤ) : ZMod 2 := if IsSquare (a : ZMod p) then 0 else 1
ZInQKernel/RouteK/Slots/Symbols.lean:17
Uses 5 · Used by 1
TheoremThe two kernel conditions agree#✓
Let \(d\) be odd and \(B\) a set of primes of \(d\). Let \(e_{d_B}\in\mathbb F_2^{T_{d_B}}\) be \(1\) at the primes of \(d_B\) and \(0\) at \(2\). Then every vector of \(\mathbb F_2^{T_{d_B}}\) killed by the Rédei matrix of \(d_B\) is \(0\) or \(e_{d_B}\) if and only if the kernel of \((L_B\mid z_B)\) is trivial for the bits \(a,y,z\) of \(d\).
Proof sketch. A vector on \(T_{d_B}\) corresponds to its restriction \(e\) to \(B\), together with its value \(e_2\) at \(2\) when \(2\in T_{d_B}\) (and \(e_2=0\) otherwise). Then:
- \(2\notin T_{d_B}\) exactly when \(d_B\equiv3\pmod4\), that is, when \(y(B)=1\);
- the two linear systems agree, by the formula for the Rédei matrix of \(d_B\) in the bits;
- \(e_{d_B}\) corresponds to \(e=1\) on \(B\) with \(e_2=0\), and \(0\) to \(e=0\) with \(e_2=0\).
theorem redeiB_kernel_iff (hd : Odd d) (B : Finset d.primeFactors) :
(∀ e : ramSet (dProd B) → ZMod 2, (∀ q, ∑ p, redeiEntry (dProd B) q p * e p = 0) →
e = 0 ∨ e = fun p : ramSet (dProd B) =>
if (p : ℕ) ∈ (dProd B).primeFactors then (1 : ZMod 2) else 0) ↔
(∀ (e : d.primeFactors → ZMod 2) (e₂ : ZMod 2), (∀ i ∉ B, e i = 0) →
(∑ i ∈ B, yBit d i = 1 → e₂ = 0) →
(∀ q ∈ B, ∑ p ∈ B, lapl (aBit d) B q p * e p + e₂ * zBit d q = 0) →
e₂ = 0 ∧ ((∀ i ∈ B, e i = 0) ∨ (∀ i ∈ B, e i = 1)))
def ramSet : Finset ℕ := if n % 4 = 3 then n.primeFactors else insert 2 n.primeFactors
ZInQKernel/RouteK/Redei/Primes.lean:335
def dProd {d : ℕ} (B : Finset d.primeFactors) : ℕ := ∏ p ∈ B, (p : ℕ)
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:81
def redeiEntry (n : ℕ) (q : n.primeFactors) (p : ramSet n) : ZMod 2 :=
if (p : ℕ) = 2 then legBit q 2
else if (p : ℕ) = q then legBit q ((n / q : ℕ) : ℤ) else legBit q (p : ℤ)
ZInQKernel/RouteK/Redei/Entry.lean:19
noncomputable def yBit (d : ℕ) (i : d.primeFactors) : ZMod 2 := lamBit (i : ℕ)
ZInQKernel/RouteK/Rank5b/Matrices.lean:57
def lapl (a : ι → ι → ZMod 2) (U : Finset ι) : Matrix ι ι (ZMod 2) := fun i j =>
if i = j then ∑ k ∈ U.erase i, a i k else a i j
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:38
noncomputable def aBit (d : ℕ) (i j : d.primeFactors) : ZMod 2 := legBit (i : ℕ) ((j : ℕ) : ℤ)
ZInQKernel/RouteK/Rank5b/Matrices.lean:54
noncomputable def zBit (d : ℕ) (i : d.primeFactors) : ZMod 2 := muBit (i : ℕ)
ZInQKernel/RouteK/Rank5b/Matrices.lean:60
Uses 6 · Used by 1
The formula
TheoremRédei's formula from the 4-rank statement#✓
The 4-rank statement implies Rédei's formula. More precisely, assume the 4-rank statement. Then for every odd \(d\) and every nonempty set \(B\) of primes of \(d\), $\(g(d_B)\equiv g_d(B)\pmod2;\)$ neither the squarefreeness of \(d\) nor a condition on \(d_B\) modulo \(8\) is needed.
Proof sketch. The number \(d_B\) is odd, squarefree and greater than \(1\). By the 4-rank statement, \(g(d_B)\) is odd if and only if every vector killed by the Rédei matrix of \(d_B\) is \(0\) or \(e_{d_B}\). That holds if and only if the kernel of \((L_B\mid z_B)\) is trivial for the bits of \(d\). These bits satisfy reciprocity because \(d\) is odd, so the kernel is trivial if and only if \(g_d(B)=1\). Compare parities.
theorem redeiFormula_of_oddGClStatement (h : OddGClStatement) : RedeiFormula
theorem gCl_dProd_eq_gBit (h : OddGClStatement) (hd : Odd d) {B : Finset d.primeFactors}
(hB : B.Nonempty) : ((gCl (dProd B) : ℕ) : ZMod 2) = gBit d B
def OddGClStatement : Prop :=
∀ (n : ℕ) [NeZero n], Odd n → Squarefree n → 1 < n →
(Odd (gCl n) ↔ ∀ e : ramSet n → ZMod 2, (∀ q, ∑ p, redeiEntry n q p * e p = 0) →
e = 0 ∨ e = fun p : ramSet n => if (p : ℕ) ∈ n.primeFactors then (1 : ZMod 2) else 0)
ZInQKernel/RouteK/Redei/Bridge.lean:39
def RedeiFormula : Prop :=
∀ d : ℕ, Odd d → Squarefree d → ∀ B : Finset d.primeFactors, B.Nonempty →
(dProd B % 8 = 7 ∨ dProd B % 8 = 3 ∨ dProd B % 8 = 1) →
((gCl (dProd B) : ℕ) : ZMod 2) = gBit d B
ZInQKernel/RouteK/Rank5b/Sec3/RedeiStatement.lean:74
def gCl (n : ℕ) [NeZero n] : ℕ :=
Nat.card (powMonoidHom 2 : ClassGroup (𝓞 (QNeg n)) →* ClassGroup (𝓞 (QNeg n))).range
ZInQKernel/RouteK/Rank5b/Sec3/RedeiStatement.lean:49
def dProd {d : ℕ} (B : Finset d.primeFactors) : ℕ := ∏ p ∈ B, (p : ℕ)
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:81
noncomputable def gBit (d : ℕ) (B : Finset d.primeFactors) : ZMod 2 :=
redeiG (aBit d) (yBit d) (zBit d) B
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:77
Uses 10 · Used by 3
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.