Row 5b of Smith's table
Row 5b of Smith's Table 2 says that for squarefree \(n\equiv5\pmod8\) the determinant of \(M_{5b}\) is the genus sum \(T_{5b}(n)\) of Tian, Yuan and Zhang (Theorem 3.6). Here Rédei's \(g\) is defined from the bits through the cofactors \(\kappa_\rho(B)\) of the Laplacian of a block, so both sides depend only on the bits \(a_{pq}\), \(y_p\), \(z_p\) of the primes of \(n\). That this \(g\) is the parity of a class number is Rédei's formula; it is not needed in this section.
Most statements are about bits \(a_{ij}\), \(y_i\), \(z_i\) on an abstract finite set \(V\); for the primes of \(n\), \(V\) is the set of primes, and the odd number is still written \(n\), as in the rest of the chapter. The proof writes both sides of Theorem 3.6 as the same sum over the forests on \(V\). The determinant goes through a rank-one update and the matrix \(P(c,d)\) of the forests section. The genus sum goes block by block, through Lemma 2.2 and the cofactor forms (2.1) and (2.2) of \(g\), glued along the partition. Only reciprocity \(a_{pq}+a_{qp}=y_py_q\) and \(y(V)=0\) are used, and \(y(V)=0\) holds since \(n\) is squarefree and \(n\equiv1\pmod4\). The partition forms of Propositions 3.3–3.5 are proved as well, but the proof of Theorem 3.6 does not pass through them.
Rédei's \(g\) and the genus sum
DefinitionRédei's \(g\) from the bits#✓
Let \(V\) be a finite set with bits \(a_{ij}\in\mathbb F_2\) (\(i,j\in V\)) and \(y_i,z_i\in\mathbb F_2\) (\(i\in V\)). For \(S\subseteq V\) write \(y(S)=\sum_{i\in S}y_i\) and \(z(S)=\sum_{i\in S}z_i\). The bits satisfy reciprocity if \(a_{ij}+a_{ji}=y_iy_j\) for all \(i\ne j\) in \(V\).
For \(B\subseteq V\) let \(L_B\) be the Laplacian of the bits \(a\) on \(B\), and for \(\rho\in V\) put $\(\kappa_\rho(B)=\det L_B[B\setminus\{\rho\},\,B\setminus\{\rho\}],\)$ the principal minor of \(L_B\) on the rows and columns of \(B\setminus\{\rho\}\); for \(B=\{\rho\}\) it is the empty determinant \(1\). Rédei's \(g\) of \(B\) is $\(g(B)=\begin{cases}\sum_{\rho\in B}y_\rho\,\kappa_\rho(B)&\text{if }y(B)=1,\\ \sum_{\rho\in B}z_\rho\,\kappa_\rho(B)&\text{if }y(B)=0.\end{cases}\)$
For a natural number \(n\) with set of primes \(P\) and \(B\subseteq P\), \(g_n(B)\) is \(g(B)\) for the bits of the primes of \(n\) of Smith's matrices: \(a_{pq}=(q/p)_+\), \(y_p=(-1/p)_+\) and \(z_p=(2/p)_+\).
The definition does not assume reciprocity. Under reciprocity and \(y(B)=1\) the cofactors \(\kappa_\rho(B)\), \(\rho\in B\), are all equal (Lemma 2.2), and since \(\sum_{\rho\in B}y_\rho=1\) the first case is their common value \(\kappa(B)\); this is Rédei's form \(g(B)=\kappa(B)\). For odd squarefree \(n\) and a nonempty \(B\) with \(d_B=\prod_{p\in B}p\equiv7,3\) or \(1\pmod8\), Rédei's formula identifies \(g_n(B)\) with the parity of the order of the subgroup of squares \(2\mathrm{Cl}\) of the class group of \(\mathbb Q(\sqrt{-d_B})\).
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 ρ
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
def Recip (a : ι → ι → ZMod 2) (y : ι → ZMod 2) : Prop :=
∀ i j, i ≠ j → a i j + a j i = y i * y j
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
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 2 · Used by 10
TheoremThe cofactors of the Laplacian (Lemma 2.2)#✓
Let \(a\) be bits on a finite set \(V\), let \(B\subseteq V\), and let \(c_v=\sum_{u\in B}(L_B)_{uv}\) be the column sums of \(L_B\) over the rows of \(B\). For a forest \(\varphi\) and a root \(i\) of \(\varphi\), \(T_i(\varphi)\) is the tree of \(i\).
Cofactors as forest counts. For \(\rho\in V\), \(\kappa_\rho(B)=\operatorname{per}L_B[B\setminus\{\rho\},B\setminus\{\rho\}]\). For \(\rho\in B\), \(\kappa_\rho(B)=\sum_f\mathrm{wt}(f)\), the sum over the forests \(f\) on \(B\) rooted at \(\{\rho\}\), that is, the spanning arborescences of \(B\) with root \(\rho\).
Under reciprocity, the column sums are \(c_v=y_v\,(1+y(B))\) for every \(v\in B\). Moreover:
- Under reciprocity, if \(y(B)=1\), then \(\kappa_i(B)=\kappa_j(B)\) for all \(i,j\in B\).
- For \(i,j\in B\), \(\operatorname{per}L_B[B\setminus\{i\},B\setminus\{j\}]=\kappa_i(B)\).
- (The \(\kappa\)-difference.) For \(i\ne j\) in \(B\), $\(\kappa_i(B)+\kappa_j(B)=\sum_\varphi\mathrm{wt}(\varphi)\sum_{v\in T_i(\varphi)}c_v,\)$ the sum over the forests \(\varphi\) on \(B\) rooted at \(\{i,j\}\).
Along the way: for \(i\ne j\) in \(B\), \(v\in B\) with \(v\ne j\) and a forest \(\varphi\) on \(B\) rooted at \(\{i,j\}\), the set \(\{j,v\}\) is a transversal of \(\varphi\) if and only if \(v\) lies in the tree of \(i\).
Proof sketch. Forest counts. The principal minor is a permanent over \(\mathbb F_2\). For \(\rho\in B\), apply the forest lemma with \(U=B\) and \(F=W=\{\rho\}\): a forest rooted at \(\{\rho\}\) has the single tree \(B\), so \(\{\rho\}\) is always a transversal. Column sums. The diagonal entry of column \(v\) is \(\sum_{u\in B,u\ne v}a_{vu}\), so \(c_v=\sum_{u\in B,u\ne v}(a_{vu}+a_{uv})=\sum_{u\in B,u\ne v}y_vy_u=y_v(y(B)+y_v)=y_v(1+y(B))\), using \(y_v^2=y_v\). (2) The forest lemma with \(F=\{i\}\) and \(W=\{j\}\); again \(j\) lies in the single tree. (3) Put \(R=B\setminus\{j\}\), so that \(\kappa_j(B)=\operatorname{per}L_B[R,R]\). Replace row \(i\) by the sum of all rows of \(R\). By linearity in that row the minor changes by the minors with row \(i\) replaced by another row of \(R\), and these vanish because they have two equal rows. The sum of the rows of \(R\) is \(c+(L_B)_{j,\cdot}\), so by linearity \(\kappa_j(B)\) is the minor with row \(i\) replaced by \((L_B)_{j,\cdot}\) plus the minor with row \(i\) replaced by \(c\). Expanding the first along that row and comparing with the expansion of (2) along row \(j\) gives \(\kappa_i(B)\). Expanding the second along the row \(c\) gives \(\sum_{v\in R}c_v\operatorname{per}L_B[B\setminus\{i,j\},B\setminus\{j,v\}]\). By the forest lemma with \(F=\{i,j\}\) and \(W=\{j,v\}\), and the transversal criterion above, each of these minors is the sum of \(\mathrm{wt}(\varphi)\) over the forests \(\varphi\) rooted at \(\{i,j\}\) with \(v\) in the tree of \(i\). Exchanging the sums, and noting that \(j\) is never in the tree of \(i\), gives the right side of (3). (1) If \(y(B)=1\), every \(c_v\) with \(v\in B\) vanishes by the column sums, and (3) gives \(\kappa_i(B)=\kappa_j(B)\).
theorem kappa_add_kappa (a : ι → ι → ZMod 2) {B : Finset ι} {i j : ι} (hi : i ∈ B) (hj : j ∈ B)
(hij : i ≠ j) :
kappa a B i + kappa a B j = ∑ f ∈ forests B {i, j},
wt a (B \ {i, j}) f * ∑ v ∈ B.filter (fun v => root f v = i), colSum a B v
theorem kappa_eq_kappa {a : ι → ι → ZMod 2} {y : ι → ZMod 2} (hrec : Recip a y) {B : Finset ι}
(hy : ∑ u ∈ B, y u = 1) {i j : ι} (hi : i ∈ B) (hj : j ∈ B) : kappa a B i = kappa a B j
theorem colSum_lapl {a : ι → ι → ZMod 2} {y : ι → ZMod 2} (hrec : Recip a y) {B : Finset ι}
{v : ι} (hv : v ∈ B) : colSum a B v = y v * (∑ u ∈ B, y u + 1)
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
def forests (U F : Finset ι) : Finset (ι → ι) := (mapsOn U (U \ F)).filter IsAcyc
ZInQKernel/RouteK/Rank5b/Sec3/Forest.lean:49
def wt (a : ι → ι → ZMod 2) (R : Finset ι) (f : ι → ι) : ZMod 2 := ∏ i ∈ R, a i (f i)
ZInQKernel/RouteK/Rank5b/Sec3/Forest.lean:34
def root (f : ι → ι) (i : ι) : ι := f^[Fintype.card ι] i
ZInQKernel/RouteK/Rank5b/Sec3/Forest.lean:41
def colSum (a : ι → ι → ZMod 2) (B : Finset ι) (v : ι) : ZMod 2 := ∑ u ∈ B, lapl a B u v
ZInQKernel/RouteK/Rank5b/Sec3/Redei.lean:77
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
TheoremRédei's \(g\) through the cofactors (2.1), (2.2)#✓
Let \(a,y,z\) be bits on a finite set \(V\) and \(B\subseteq V\).
- If \(y(B)=1\), then \(\sum_{\rho\in B}y_\rho\,\kappa_\rho(B)=g(B)\).
- If the bits satisfy reciprocity and \(y(B)=1\), then \(g(B)=\kappa_\rho(B)\) for every \(\rho\in B\), and (2.1) \(\sum_{\rho\in B}z_\rho\,\kappa_\rho(B)=z(B)\,g(B)\).
- (2.2) If \(y(B)=0\), then \(\sum_{\rho\in B}z_\rho\,\kappa_\rho(B)=g(B)\).
Proof sketch. The first and the last statements are the definition of \(g\). Assume reciprocity and \(y(B)=1\). By Lemma 2.2 all \(\kappa_r(B)\), \(r\in B\), equal \(\kappa_\rho(B)\) for a fixed \(\rho\in B\), so \(g(B)=\sum_ry_r\kappa_r(B)=y(B)\,\kappa_\rho(B)=\kappa_\rho(B)\). Then \(\sum_rz_r\kappa_r(B)=z(B)\,\kappa_\rho(B)=z(B)\,g(B)\); here \(B\) is not empty because \(y(B)=1\).
theorem redeiG_eq_kappa {a : ι → ι → ZMod 2} {y z : ι → ZMod 2} (hrec : Recip a y)
{B : Finset ι} (hy : ∑ u ∈ B, y u = 1) {ρ : ι} (hρ : ρ ∈ B) :
redeiG a y z B = kappa a B ρ
theorem sum_y_kappa {a : ι → ι → ZMod 2} {y z : ι → ZMod 2} {B : Finset ι}
(hy : ∑ u ∈ B, y u = 1) : ∑ ρ ∈ B, y ρ * kappa a B ρ = redeiG a y z B
theorem sum_z_kappa {a : ι → ι → ZMod 2} {y z : ι → ZMod 2} (hrec : Recip a y) {B : Finset ι}
(hy : ∑ u ∈ B, y u = 1) : ∑ ρ ∈ B, z ρ * kappa a B ρ = (∑ u ∈ B, z u) * redeiG a y z B
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
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 2 · Used by 1
DefinitionThe genus sum \(T_{5b}\)#✓
Let \(a,y,z\) be bits on a finite set \(V\). A set \(B\subseteq V\) has class \(1\), \(5\), \(7\) or \(3\) according as \((y(B),z(B))\) is \((0,0)\), \((0,1)\), \((1,0)\) or \((1,1)\). The genus sum of row 5b of the bits is $\(T_{5b}=\sum_\pi\prod_{B\in\pi}g(B),\)$ the sum over the set partitions \(\pi\) of \(V\) (into nonempty blocks) with exactly one block of class \(7\), exactly one block of class \(3\) and no block of class \(5\), so that all other blocks have class \(1\).
For a natural number \(n\) with set of primes \(P\) and \(B\subseteq P\) put \(d_B=\prod_{p\in B}p\). The genus sum of \(n\) is $\(T_{5b}(n)=\sum_\pi\prod_{B\in\pi}g_n(B),\)$ the sum over the set partitions \(\pi\) of \(P\) with exactly one block with \(d_B\equiv7\pmod8\), exactly one block with \(d_B\equiv3\pmod8\), and every block with \(d_B\equiv7\), \(3\) or \(1\pmod8\). In Smith's notation, \(T_{5b}(n)=\sum_{d_0\equiv7,\,d_1\equiv3\,(8)}g_n(d_0)g_n(d_1)\mathcal L_1(n/d_0d_1)\), where \(g_n(d_0)\) is \(g_n(B)\) for the block \(B\) with \(d_B=d_0\) and \(\mathcal L_1(m)\) is the sum of \(\prod g_n\) over the partitions of the primes of \(m\) into blocks \(\equiv1\pmod8\).
noncomputable def T5b (d : ℕ) : ZMod 2 :=
∑ P : Finpartition (Finset.univ : Finset d.primeFactors),
if Admissible5bNat d P then ∏ B ∈ P.parts, gBit d B else 0
def Admissible5bNat (d : ℕ) (P : Finpartition (Finset.univ : Finset d.primeFactors)) : Prop :=
(P.parts.filter fun B => dProd B % 8 = 7).card = 1 ∧
(P.parts.filter fun B => dProd B % 8 = 3).card = 1 ∧
∀ B ∈ P.parts, dProd B % 8 = 7 ∨ dProd B % 8 = 3 ∨ dProd B % 8 = 1
def dProd {d : ℕ} (B : Finset d.primeFactors) : ℕ := ∏ p ∈ B, (p : ℕ)
def Admissible5bNat (d : ℕ) (P : Finpartition (Finset.univ : Finset d.primeFactors)) : Prop :=
(P.parts.filter fun B => dProd B % 8 = 7).card = 1 ∧
(P.parts.filter fun B => dProd B % 8 = 3).card = 1 ∧
∀ B ∈ P.parts, dProd B % 8 = 7 ∨ dProd B % 8 = 3 ∨ dProd B % 8 = 1
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:85
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
def dProd {d : ℕ} (B : Finset d.primeFactors) : ℕ := ∏ p ∈ B, (p : ℕ)
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:81
Uses 1 · Used by 18
Both sides as forest sums
A rank-one update reduces \(\det M_1\) to \(\det P(z,y)\), and \(\det M_{5b}\) to the determinants of \(P(z[k\mapsto1],y)\) and \(P(z[k\mapsto0],y)\), \(k\in V\). On the other side, each block weight of the genus sum is a sum over the forests of the block with one or two roots. Marking the blocks of classes \(7\) and \(3\) turns the partition sums into sums of products of block weights, ready to be glued.
TheoremThe row-5b determinant as a forest sum#✓
Let \(a,y,z\) be bits on a finite set \(V\) and \(L=L_V\) their Laplacian on \(V\); its rows sum to zero. Define the \((V\sqcup V)\)-square matrix \(M_1\) and its bordering \(M_{5b}\) from the bits as in Smith's matrices: $\(M_1=\begin{pmatrix}L+L^{\mathsf T}&L^{\mathsf T}\\ L&D_z\end{pmatrix},\qquad M_{5b}=\begin{pmatrix}M_1&(0,y)\\ (0,y)^{\mathsf T}&0\end{pmatrix}.\)$ For the bits of a natural number \(n\) these are Smith's \(M_1\) and \(M_{5b}\). Let \(P(c,d)=\begin{pmatrix}D_d&L^{\mathsf T}\\ L&D_c\end{pmatrix}\) for \(c,d\in\mathbb F_2^V\), the matrix whose determinant is a sum over forests, write \(z[k\mapsto t]\) for \(z\) with the entry at \(k\) replaced by \(t\), \(z^S\) for \(\prod_{\rho\in S}z_\rho\), and \(\mathbf 1\) for the all-ones vector on \(V\).
- For all \(c,d\in\mathbb F_2^V\), \(P(c,d)\,(\mathbf 1,0)=(d,0)\), and the diagonal entry of the adjugate of \(P(c,d)\) at the lower copy \(k'\) of \(k\in V\) is \(\operatorname{adj}P(c,d)_{k'k'}=\det P(c[k\mapsto1],d)+\det P(c[k\mapsto0],d)\).
- Under reciprocity, \(M_1=P(z,y)+ww^{\mathsf T}\) with \(w=(y,0)\), and $\(\det M_1=(1+y(V))\det P(z,y).\)$
- Under reciprocity, $\(\det M_{5b}=(1+y(V))\sum_{k\in V}y_k\bigl(\det P(z[k\mapsto1],y)+\det P(z[k\mapsto0],y)\bigr)\)$ and $\(\det M_{5b}=(1+y(V))\sum_{F\subseteq V}\Bigl(\sum_{k\in F}y_kz^{F\setminus k}\Bigr) \sum_f\mathrm{wt}(f)\prod_{\rho\in F}y(T_\rho),\)$ the inner sum over the forests \(f\) on \(V\) rooted at \(F\), with \(T_\rho\) the tree of \(\rho\).
Proof sketch. (1) The rows of \(L\) sum to zero, so \(P(c,d)(\mathbf 1,0)=(d,0)\). Row \(k'\) of \(P(c[k\mapsto1],d)\) is row \(k'\) of \(P(c[k\mapsto0],d)\) plus the unit vector at \(k'\); by linearity in that row, the difference of the two determinants is the determinant with row \(k'\) replaced by the unit vector, which is \(\operatorname{adj}P_{k'k'}\) and does not depend on \(c_k\). (2) By reciprocity \(L+L^{\mathsf T}\) has entries \(y_iy_j\) off the diagonal and \(0\) on it, while \((ww^{\mathsf T})_{ii}=y_i^2=y_i\) cancels the diagonal of \(D_y\); so \(M_1=P(z,y)+ww^{\mathsf T}\). With \(x=(\mathbf 1,0)\) we have \(P(z,y)x=w\), and the rank-one update with a preimage gives \(\det M_1=\det P(z,y)\,(1+w\cdot x)=(1+y(V))\det P(z,y)\). (3) Put \(P=P(z,y)\) and \(v=(0,y)\). The bordered determinant is \(\det M_{5b}=\det(M_1+vv^{\mathsf T})+\det M_1\). Since \(v\cdot x=0\), also \((P+vv^{\mathsf T})x=w\), so \(\det(M_1+vv^{\mathsf T})=(1+y(V))\det(P+vv^{\mathsf T})\). Expanding \(\det(P+vv^{\mathsf T})\) by the rank-one formula, the term \(\det P\) cancels against \(\det M_1\), and \(\det M_{5b}=(1+y(V))\sum_jv_j\det P^{(j\leftarrow v)}\), with \(P^{(j\leftarrow v)}\) the matrix \(P\) with column \(j\) replaced by \(v\). Expanding that column gives \(\sum_{i,j}v_iv_j\operatorname{adj}(P)_{ij}\). The adjugate of the symmetric matrix \(P\) is symmetric, so over \(\mathbb F_2\) this is \(\sum_iv_i\operatorname{adj}(P)_{ii}=\sum_ky_k\operatorname{adj}(P)_{k'k'}\), and (1) gives the first formula. For the second, insert the forest expansion of \(\det P(z[k\mapsto t],y)\) and use \(\prod_{\rho\in F}z[k\mapsto1]_\rho+\prod_{\rho\in F}z[k\mapsto0]_\rho=[k\in F]\,z^{F\setminus k}\).
theorem det_M5bG_forest {a : ι → ι → ZMod 2} {y : ι → ZMod 2} (hrec : Recip a y)
(z : ι → ZMod 2) :
(M5bG a y z).det = (1 + ∑ i, y i) * ∑ F ∈ (univ : Finset ι).powerset,
(∑ k ∈ F, y k * ∏ ρ ∈ F.erase k, z ρ) *
∑ f ∈ forests univ F, wt a (univ \ F) f *
∏ ρ ∈ F, ∑ v ∈ univ.filter (fun v => root f v = ρ), y v
theorem det_M5bG {a : ι → ι → ZMod 2} {y : ι → ZMod 2} (hrec : Recip a y) (z : ι → ZMod 2) :
(M5bG a y z).det = (1 + ∑ i, y i) * ∑ k, y k *
((Pmat a (Function.update z k 1) y).det + (Pmat a (Function.update z k 0) y).det)
theorem det_M1G {a : ι → ι → ZMod 2} {y : ι → ZMod 2} (hrec : Recip a y) (z : ι → ZMod 2) :
(M1G a z).det = (Pmat a z y).det * (1 + ∑ i, y i)
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 M5bG (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) : Matrix ((ι ⊕ ι) ⊕ Unit) ((ι ⊕ ι) ⊕ Unit) (ZMod 2) :=
border (M1G a z) (Sum.elim 0 y)
ZInQKernel/RouteK/Rank5b/Sec3/M5bForest.lean:24
def forests (U F : Finset ι) : Finset (ι → ι) := (mapsOn U (U \ F)).filter IsAcyc
ZInQKernel/RouteK/Rank5b/Sec3/Forest.lean:49
def wt (a : ι → ι → ZMod 2) (R : Finset ι) (f : ι → ι) : ZMod 2 := ∏ i ∈ R, a i (f i)
ZInQKernel/RouteK/Rank5b/Sec3/Forest.lean:34
def root (f : ι → ι) (i : ι) : ι := f^[Fintype.card ι] i
ZInQKernel/RouteK/Rank5b/Sec3/Forest.lean:41
def Pmat (a : ι → ι → ZMod 2) (c d : ι → ZMod 2) : Matrix (ι ⊕ ι) (ι ⊕ ι) (ZMod 2) :=
fromBlocks (diagonal d) (lapl a univ)ᵀ (lapl a univ) (diagonal c)
ZInQKernel/RouteK/Rank5b/Sec3/DetForest.lean:348
def M1G (a : ι → ι → ZMod 2) (z : ι → ZMod 2) : Matrix (ι ⊕ ι) (ι ⊕ ι) (ZMod 2) :=
fromBlocks (lapl a univ + (lapl a univ)ᵀ) (lapl a univ)ᵀ (lapl a univ) (diagonal z)
ZInQKernel/RouteK/Rank5b/Sec3/M5bForest.lean:20
Uses 5 · Used by 3
TheoremBlock weights as forest sums#✓
Let \(a,y,z\) be bits on a finite set \(V\) that satisfy reciprocity, and let \(B\subseteq V\). Let \(w_7(B)\), \(w_3(B)\) and \(w_1(B)\) be \(g(B)\) if \(B\) has class \(7\), \(3\), respectively \(1\), and \(0\) otherwise. For a forest \(f\) on \(B\) with root set \(S\subseteq B\) put $\(Y(f)=\prod_{\rho\in S}y(T_\rho),\)$ the product of the sums of \(y\) over its trees \(T_\rho=\{v\in B:\text{the root of }v\text{ is }\rho\}\), and let \(\mathrm{wt}(f)=\mathrm{wt}_{B\setminus S}(f)\). Then $\(w_7(B)=\sum_{f\text{ with one root }\rho}(y_\rho+z_\rho)\,\mathrm{wt}(f)\,Y(f),\qquad w_3(B)=\sum_{f\text{ with one root }\rho}z_\rho\,\mathrm{wt}(f)\,Y(f),\)$ $\(w_1(B)=\sum_{f\text{ with two roots }i,j}z_iz_j\,\mathrm{wt}(f)\,Y(f),\)$ the sums over the forests \(f\) on \(B\) with exactly one, respectively exactly two, roots in \(B\).
Along the way: grouping the forests on \(B\) by their root sets, a sum over the forests with \(k\) roots of \(e(S)\,\mathrm{wt}(f)\,Y(f)\) is \(\sum_{S\subseteq B,|S|=k}e(S)\sum_{f\text{ rooted at }S}\mathrm{wt}(f)\,Y(f)\); a forest with the single root \(\rho\) has \(Y(f)=y(B)\); and for any \(e_\rho\in\mathbb F_2\), \(\sum_{\rho\in B}e_\rho\,y(B)\,\kappa_\rho(B)=\sum_{f\text{ with one root }\rho}e_\rho\,\mathrm{wt}(f)\,Y(f)\).
Proof sketch. Classes 7 and 3. By the forest count of the cofactors in Lemma 2.2, \(\kappa_\rho(B)\) is the sum of \(\mathrm{wt}(f)\) over the forests on \(B\) with the single root \(\rho\), and for these \(Y(f)=y(B)\). So the right sides are \(\sum_\rho(y_\rho+z_\rho)\,y(B)\,\kappa_\rho(B)\) and \(\sum_\rho z_\rho\,y(B)\,\kappa_\rho(B)\). If \(y(B)=0\), both sides vanish. If \(y(B)=1\), (2.1) turns them into \((1+z(B))\,g(B)\) and \(z(B)\,g(B)\), which are \(w_7(B)\) and \(w_3(B)\).
Class 1. By (2.2) and a check of the two values of \(y(B)\), \(w_1(B)=(1+y(B))(1+z(B))\sum_\rho z_\rho\kappa_\rho(B)\). Since \(z_\rho(1+z_\rho)=0\), \((1+z(B))\sum_\rho z_\rho\kappa_\rho(B)\) is the sum over the ordered pairs \(\rho\ne j\) in \(B\) of \(z_\rho z_j\kappa_\rho(B)\), that is, the sum over the two-element sets \(\{i,j\}\subseteq B\) of \(z_iz_j(\kappa_i(B)+\kappa_j(B))\). By Lemma 2.2(3) this is \(z_iz_j\sum_\varphi\mathrm{wt}(\varphi)\sum_{v\in T_i}c_v\) over the forests \(\varphi\) rooted at \(\{i,j\}\), and by the column sums of Lemma 2.2, \(\sum_{v\in T_i}c_v=y(T_i)(1+y(B))\). As \(B\) is the union of the two trees, \(y(B)=y(T_i)+y(T_j)\), hence \((1+y(B))\,y(T_i)(1+y(B))=y(T_i)(1+y(T_i)+y(T_j))=y(T_i)\,y(T_j)=Y(\varphi)\). Grouping the forests with two roots by their root sets gives the formula for \(w_1(B)\).
theorem w1_eq {a : ι → ι → ZMod 2} {y : ι → ZMod 2} (hrec : Recip a y) (z : ι → ZMod 2)
(B : Finset ι) :
w1 a y z B = ∑ g ∈ allF B, blockH a y 2 (fun F => ∏ ρ ∈ F, z ρ) B g
theorem w7_eq {a : ι → ι → ZMod 2} {y : ι → ZMod 2} (hrec : Recip a y) (z : ι → ZMod 2)
(B : Finset ι) :
w7 a y z B = ∑ g ∈ allF B, blockH a y 1 (fun F => ∑ ρ ∈ F, (y ρ + z ρ)) B g
theorem w3_eq {a : ι → ι → ZMod 2} {y : ι → ZMod 2} (hrec : Recip a y) (z : ι → ZMod 2)
(B : Finset ι) :
w3 a y z B = ∑ g ∈ allF B, blockH a y 1 (fun F => ∏ ρ ∈ F, z ρ) B g
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
noncomputable def w1 (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) (B : Finset ι) : ZMod 2 :=
if ∑ i ∈ B, y i = 0 ∧ ∑ i ∈ B, z i = 0 then redeiG a y z B else 0
ZInQKernel/RouteK/Rank5b/Sec3/Genus.lean:41
def allF (U : Finset ι) : Finset (ι → ι) := U.powerset.biUnion fun F => forests U F
ZInQKernel/RouteK/Rank5b/Sec3/Glue.lean:28
def blockH (a : ι → ι → ZMod 2) (y : ι → ZMod 2) (k : ℕ) (e : Finset ι → ZMod 2) (B : Finset ι)
(g : ι → ι) : ZMod 2 :=
if (rootsOf B g).card = k then
e (rootsOf B g) * wt a (B \ rootsOf B g) g * treeY y B (rootsOf B g) g else 0
ZInQKernel/RouteK/Rank5b/Sec3/Genus.lean:27
noncomputable def w7 (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) (B : Finset ι) : ZMod 2 :=
if ∑ i ∈ B, y i = 1 ∧ ∑ i ∈ B, z i = 0 then redeiG a y z B else 0
ZInQKernel/RouteK/Rank5b/Sec3/Genus.lean:33
noncomputable def w3 (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) (B : Finset ι) : ZMod 2 :=
if ∑ i ∈ B, y i = 1 ∧ ∑ i ∈ B, z i = 1 then redeiG a y z B else 0
ZInQKernel/RouteK/Rank5b/Sec3/Genus.lean:37
Uses 5 · Used by 5
TheoremPartition sums with marked blocks#✓
Partly removed from the Lean development. Some Lean declarations of this page were removed from this fork's main with the congruent-number route (fork issue #77; they are at the tag route-k-final). The page belongs to the congruent-number route; Elliot's route is the other route to the same theorem.
Let \(a,y,z\) be bits on a finite set \(V\), and let \(w_7,w_3,w_1\) be the block weights: \(w_c(B)\) is \(g(B)\) if \(B\) has class \(c\) and \(0\) otherwise.
- (The genus sum.) For blocks \(B_7\ne B_3\) let \(m_{B_7,B_3}\) be \(w_7\) on \(B_7\), \(w_3\) on \(B_3\) and \(w_1\) on every other set. Then $\(T_{5b}=\sum_\pi\ \sum_{B_7\in\pi}\ \sum_{B_3\in\pi,\,B_3\ne B_7}\ \prod_{B\in\pi}m_{B_7,B_3}(B),\)$ the outer sum over all set partitions \(\pi\) of \(V\). If a product \(\prod_{B\in\pi}m_{B_7,B_3}(B)\) is nonzero, then \(B_7\) has class \(7\), \(B_3\) has class \(3\) and every other block of \(\pi\) has class \(1\).
- (One block of class \(7\), the others of class \(3\).) For a block \(B_7\) let \(m'_{B_7}\) be \(w_7\) on \(B_7\) and \(w_3\) on every other set. For every set partition \(\pi\) of \(V\), the sum \(\sum_{B_7\in\pi}\prod_{B\in\pi}m'_{B_7}(B)\) is \(\prod_{B\in\pi}g(B)\) if \(\pi\) has exactly one block of class \(7\) and all other blocks of class \(3\), and \(0\) otherwise.
Proof sketch. A factor \(w_c(B)\) vanishes unless \(B\) has class \(c\). So a nonzero marked product forces the classes of the marked blocks and of the others. (1) In a partition counted by \(T_{5b}\) the blocks of classes \(7\) and \(3\) are unique, so its marked sum has exactly one nonzero term, \(\prod_Bg(B)\); for any other partition every marked product vanishes. (2) If \(\pi\) has exactly one block of class \(7\) and the others of class \(3\), the only marked choice with nonzero product is that block, and the product is \(\prod_Bg(B)\). Otherwise a nonzero marked product would make \(B_7\) a block of class \(7\) and all other blocks of class \(3\), which is excluded.
theorem genusSum5b_eq_marked (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) :
genusSum5b a y z = ∑ P : Finpartition (univ : Finset ι), ∑ B7 ∈ P.parts,
∑ B3 ∈ P.parts.erase B7, ∏ B ∈ P.parts, markW a y z B7 B3 B
noncomputable def markW (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) (B7 B3 B : Finset ι) : ZMod 2 :=
if B = B7 then w7 a y z B else if B = B3 then w3 a y z B else w1 a y z B
theorem w7_eq_zero {a : ι → ι → ZMod 2} {y z : ι → ZMod 2} {B : Finset ι}
(h : ¬(∑ i ∈ B, y i = 1 ∧ ∑ i ∈ B, z i = 0)) : w7 a y z B = 0
noncomputable def genusSum5b (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) : ZMod 2 :=
∑ P : Finpartition (Finset.univ : Finset ι),
if Admissible5b y z P then ∏ B ∈ P.parts, redeiG a y z B else 0
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:65
noncomputable def markW (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) (B7 B3 B : Finset ι) : ZMod 2 :=
if B = B7 then w7 a y z B else if B = B3 then w3 a y z B else w1 a y z B
ZInQKernel/RouteK/Rank5b/Sec3/Genus.lean:218
noncomputable def w7 (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) (B : Finset ι) : ZMod 2 :=
if ∑ i ∈ B, y i = 1 ∧ ∑ i ∈ B, z i = 0 then redeiG a y z B else 0
ZInQKernel/RouteK/Rank5b/Sec3/Genus.lean:33
noncomputable def w3 (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) (B : Finset ι) : ZMod 2 :=
if ∑ i ∈ B, y i = 1 ∧ ∑ i ∈ B, z i = 1 then redeiG a y z B else 0
ZInQKernel/RouteK/Rank5b/Sec3/Genus.lean:37
noncomputable def w1 (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) (B : Finset ι) : ZMod 2 :=
if ∑ i ∈ B, y i = 0 ∧ ∑ i ∈ B, z i = 0 then redeiG a y z B else 0
ZInQKernel/RouteK/Rank5b/Sec3/Genus.lean:41
Lean
Removed from this fork's main with the congruent-number route and kept at the tag route-k-final:
ZInQ.RouteK.Rank5b.Sec3.markW', ZInQ.RouteK.Rank5b.Sec3.class73_eq_marked.
Sources
Uses 3 · Used by 2
TheoremThe root factors of a marked partition#✓
Let \(y,z\) be bits on a finite set \(V\), \(f\) a forest on \(V\) with root set \(R\), and write \(z^S=\prod_{\rho\in S}z_\rho\). For blocks \(B_7,B_3\) and a block \(B\), the root factor \(e_B(S)\) of a set \(S\) is \(y_\rho+z_\rho\) if \(B=B_7\) and \(S=\{\rho\}\); \(z_\rho\) if \(B=B_3\ne B_7\) and \(S=\{\rho\}\); \(z^S\) if \(B\notin\{B_7,B_3\}\) and \(|S|=2\); and \(0\) in all other cases.
For a set partition \(\pi\) of \(V\) compatible with \(f\), $\(\sum_{B_7\in\pi}\ \sum_{B_3\in\pi,\,B_3\ne B_7}\ \prod_{B\in\pi}e_B(B\cap R) =\sum_{\rho_7\in R}\ \sum_{\rho_3\in R,\,\rho_3\ne\rho_7}[\pi\in A(\rho_7,\rho_3)]\, (y_{\rho_7}+z_{\rho_7})\,z^{R\setminus\rho_7},\)$ where \(A(\rho_7,\rho_3)\) is the set of compatible partitions in which \(\rho_7\) and \(\rho_3\) are each the only root of their block and the block of every other root contains exactly two roots.
Along the way: for any set partition \(\pi\) of \(V\), any \(S\subseteq V\) and any \(\varphi:V\to\mathbb F_2\), \(\prod_{B\in\pi}\prod_{i\in B\cap S}\varphi(i)=\prod_{i\in S}\varphi(i)\).
Proof sketch. The last identity holds because the sets \(B\cap S\), \(B\in\pi\), are disjoint with union \(S\). For the main identity, every block of a compatible partition contains a root, and the block of a root determines it. A marked product \(\prod_Be_B(B\cap R)\) is nonzero only if \(B_7\) and \(B_3\) each contain exactly one root, \(\rho_7\) and \(\rho_3\), and every other block exactly two; then \(\pi\in A(\rho_7,\rho_3)\), \(B_7\) and \(B_3\) are the blocks of \(\rho_7\) and \(\rho_3\), and the product is \((y_{\rho_7}+z_{\rho_7})\,z_{\rho_3}\prod z^{B\cap R}\) over the other blocks, which is \((y_{\rho_7}+z_{\rho_7})\,z^{R\setminus\rho_7}\) by the last identity. So the pairs of distinct blocks with nonzero product correspond to the pairs of distinct roots \((\rho_7,\rho_3)\) with \(\pi\in A(\rho_7,\rho_3)\), with the same terms.
theorem sum_marked_eq_roots (y z : ι → ZMod 2) {f : ι → ι} (hf : f ∈ allF (univ : Finset ι))
{P : Finpartition (univ : Finset ι)} (hP : Resp f P) :
∑ B7 ∈ P.parts, ∑ B3 ∈ P.parts.erase B7, ∏ B ∈ P.parts, markE y z B7 B3 B (B ∩ rootsOf univ f) =
∑ ρ7 ∈ rootsOf univ f, ∑ ρ3 ∈ (rootsOf univ f).erase ρ7,
if P ∈ setA f ρ7 ρ3 then (y ρ7 + z ρ7) * ∏ ρ ∈ (rootsOf univ f).erase ρ7, z ρ else 0
def markE (y z : ι → ZMod 2) (B7 B3 B S : Finset ι) : ZMod 2 :=
if B = B7 then (if S.card = 1 then ∑ ρ ∈ S, (y ρ + z ρ) else 0)
else if B = B3 then (if S.card = 1 then ∏ ρ ∈ S, z ρ else 0)
else (if S.card = 2 then ∏ ρ ∈ S, z ρ else 0)
theorem prod_parts_inter (P : Finpartition (univ : Finset ι)) (S : Finset ι) (φ : ι → ZMod 2) :
∏ B ∈ P.parts, ∏ i ∈ B ∩ S, φ i = ∏ i ∈ S, φ i
def allF (U : Finset ι) : Finset (ι → ι) := U.powerset.biUnion fun F => forests U F
ZInQKernel/RouteK/Rank5b/Sec3/Glue.lean:28
def Resp (f : ι → ι) (P : Finpartition (univ : Finset ι)) : Prop := ∀ i, f i ∈ P.part i
ZInQKernel/RouteK/Rank5b/Sec3/Count.lean:217
def markE (y z : ι → ZMod 2) (B7 B3 B S : Finset ι) : ZMod 2 :=
if B = B7 then (if S.card = 1 then ∑ ρ ∈ S, (y ρ + z ρ) else 0)
else if B = B3 then (if S.card = 1 then ∏ ρ ∈ S, z ρ else 0)
else (if S.card = 2 then ∏ ρ ∈ S, z ρ else 0)
ZInQKernel/RouteK/Rank5b/Sec3/Thm36.lean:37
def rootsOf (U : Finset ι) (g : ι → ι) : Finset ι := U.filter fun i => g i = i
ZInQKernel/RouteK/Rank5b/Sec3/Glue.lean:25
def setA (f : ι → ι) (ρ7 ρ3 : ι) : Finset (Finpartition (univ : Finset ι)) :=
univ.filter fun P => Resp f P ∧ P.part ρ7 ∩ rootsOf univ f = {ρ7} ∧
P.part ρ3 ∩ rootsOf univ f = {ρ3} ∧
∀ ρ ∈ rootsOf univ f, ρ ≠ ρ7 → ρ ≠ ρ3 → (P.part ρ ∩ rootsOf univ f).card = 2
ZInQKernel/RouteK/Rank5b/Sec3/Count.lean:245
Uses 2 · Used by 1
TheoremThe genus sum as a forest sum#✓
Let \(a,y,z\) be bits on a finite set \(V\) that satisfy reciprocity, with \(y(V)=0\). Then $\(T_{5b}=\sum_f\Bigl(\sum_{k\in R}y_kz^{R\setminus k}\Bigr)\mathrm{wt}(f)\prod_{\rho\in R}y(T_\rho),\)$ the sum over the forests \(f\) on \(V\), with \(R\) the root set of \(f\), \(z^S=\prod_{\rho\in S}z_\rho\) and \(T_\rho\) the tree of \(\rho\).
Along the way, for a forest \(f\) on \(V\) with root set \(R\): if \(y(V)=0\) and every tree has \(y(T_\rho)=1\), then \(|R|\) is even; and if \(|R|\) is even, then summing over the set partitions \(\pi\) compatible with \(f\) and over the marked blocks \(B_7\ne B_3\) of \(\pi\) the product of the root factors \(\prod_{B\in\pi}e_B(B\cap R)\) gives \(\sum_{k\in R}y_kz^{R\setminus k}\), for any bits \(y,z\). For any \(B\subseteq V\), the roots of the restriction \(f|_B\) (the points of \(B\) fixed by \(f\)) are the roots of \(f\) in \(B\).
Proof sketch. Start from the marked form of \(T_{5b}\), with \(w_7\) on \(B_7\), \(w_3\) on \(B_3\) and \(w_1\) on the other blocks. Write each block weight as a forest sum on its block, with one root for \(w_7,w_3\) and two roots for \(w_1\), and glue along \(\pi\): each marked product becomes a sum over the forests \(f\) on \(V\) compatible with \(\pi\). For such \(f\) the roots of \(f|_B\) are the roots of \(f\) in \(B\), its trees are those of \(f\), and the products over the blocks of the factors indexed by \(B\cap R\) multiply to products over \(R\); so the glued term is \(\bigl(\prod_Be_B(B\cap R)\bigr)\,\mathrm{wt}(f)\prod_{\rho\in R}y(T_\rho)\). Exchange the sums and fix \(f\) with \(\prod_\rho y(T_\rho)\ne0\). Then every tree has \(y(T_\rho)=1\), and since \(V\) is the union of the trees, \(|R|\equiv y(V)=0\pmod2\). For a compatible partition the marked sum of the root factors is a sum over pairs of roots \(\rho_7\ne\rho_3\): the term is \((y_{\rho_7}+z_{\rho_7})z^{R\setminus\rho_7}\) if \(\rho_7\) and \(\rho_3\) are the only roots of their blocks and every other block holds exactly two roots, and \(0\) otherwise. For fixed \((\rho_7,\rho_3)\) these partitions are as many as the pairings of \(R\setminus\{\rho_7,\rho_3\}\), an odd number since \(|R|-2\) is even. Summing over the \(|R|-1\) choices of \(\rho_3\), again an odd number, leaves \(\sum_{\rho_7\in R}(y_{\rho_7}+z_{\rho_7})z^{R\setminus\rho_7}\), which is \(\sum_ky_kz^{R\setminus k}+|R|\,z^R=\sum_ky_kz^{R\setminus k}\).
theorem genusSum5b_eq_forest {a : ι → ι → ZMod 2} {y : ι → ZMod 2} (hrec : Recip a y)
(hy0 : ∑ i, y i = 0) (z : ι → ZMod 2) :
genusSum5b a y z = ∑ g ∈ allF (univ : Finset ι),
(∑ k ∈ rootsOf univ g, y k * ∏ ρ ∈ (rootsOf univ g).erase k, z ρ) *
(wt a (univ \ rootsOf univ g) g * treeY y univ (rootsOf univ g) g)
def markH (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) (B7 B3 B : Finset ι) (g : ι → ι) : ZMod 2 :=
if B = B7 then blockH a y 1 (fun F => ∑ ρ ∈ F, (y ρ + z ρ)) B g
else if B = B3 then blockH a y 1 (fun F => ∏ ρ ∈ F, z ρ) B g
else blockH a y 2 (fun F => ∏ ρ ∈ F, z ρ) B g
theorem markW_eq {a : ι → ι → ZMod 2} {y : ι → ZMod 2} (hrec : Recip a y) (z : ι → ZMod 2)
(B7 B3 B : Finset ι) : markW a y z B7 B3 B = ∑ g ∈ allF B, markH a y z B7 B3 B g
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
noncomputable def genusSum5b (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) : ZMod 2 :=
∑ P : Finpartition (Finset.univ : Finset ι),
if Admissible5b y z P then ∏ B ∈ P.parts, redeiG a y z B else 0
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:65
def allF (U : Finset ι) : Finset (ι → ι) := U.powerset.biUnion fun F => forests U F
ZInQKernel/RouteK/Rank5b/Sec3/Glue.lean:28
def rootsOf (U : Finset ι) (g : ι → ι) : Finset ι := U.filter fun i => g i = i
ZInQKernel/RouteK/Rank5b/Sec3/Glue.lean:25
def wt (a : ι → ι → ZMod 2) (R : Finset ι) (f : ι → ι) : ZMod 2 := ∏ i ∈ R, a i (f i)
ZInQKernel/RouteK/Rank5b/Sec3/Forest.lean:34
def treeY (y : ι → ZMod 2) (U F : Finset ι) (f : ι → ι) : ZMod 2 :=
∏ ρ ∈ F, ∑ v ∈ U.filter (fun v => root f v = ρ), y v
ZInQKernel/RouteK/Rank5b/Sec3/Genus.lean:23
def blockH (a : ι → ι → ZMod 2) (y : ι → ZMod 2) (k : ℕ) (e : Finset ι → ZMod 2) (B : Finset ι)
(g : ι → ι) : ZMod 2 :=
if (rootsOf B g).card = k then
e (rootsOf B g) * wt a (B \ rootsOf B g) g * treeY y B (rootsOf B g) g else 0
ZInQKernel/RouteK/Rank5b/Sec3/Genus.lean:27
noncomputable def markW (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) (B7 B3 B : Finset ι) : ZMod 2 :=
if B = B7 then w7 a y z B else if B = B3 then w3 a y z B else w1 a y z B
ZInQKernel/RouteK/Rank5b/Sec3/Genus.lean:218
def markH (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) (B7 B3 B : Finset ι) (g : ι → ι) : ZMod 2 :=
if B = B7 then blockH a y 1 (fun F => ∑ ρ ∈ F, (y ρ + z ρ)) B g
else if B = B3 then blockH a y 1 (fun F => ∏ ρ ∈ F, z ρ) B g
else blockH a y 2 (fun F => ∏ ρ ∈ F, z ρ) B g
ZInQKernel/RouteK/Rank5b/Sec3/Thm36.lean:43
Uses 8 · Used by 4
Theorem 3.6
TheoremThe genus sum of an odd number from its bits#✓
Let \(n\) be odd with set of primes \(P\) and bits \(a_{pq}\), \(y_p\), \(z_p\), and let \(B\subseteq P\). Then \(d_B=\prod_{p\in B}p\) is odd, \(y_p=\lambda(p)\) and \(z_p=\mu(p)\) for every \(p\in P\), and $\(y(B)=\lambda(d_B),\qquad z(B)=\mu(d_B),\)$ where \(\lambda(c)=[c\equiv3\pmod4]\) and \(\mu(c)=[c\equiv3,5\pmod8]\). Consequently \(d_B\equiv7\pmod8\) if and only if \(B\) has class \(7\), \(d_B\equiv3\pmod8\) if and only if \(B\) has class \(3\), and \(d_B\equiv7,3\) or \(1\pmod8\) if and only if \(B\) does not have class \(5\). So a set partition of \(P\) is counted by \(T_{5b}(n)\) if and only if it is counted by the genus sum \(T_{5b}\) of the bits of \(n\), and $\(T_{5b}(n)=T_{5b}\quad\text{for the bits }a_{pq},\,y_p,\,z_p\text{ of }n.\)$
Proof sketch. For a prime \(p\mid n\), \(y_p=(-1/p)_+=\lambda(p)\) and \(z_p=(2/p)_+=\mu(p)\). The maps \(\lambda\) and \(\mu\) are additive on the odd classes modulo \(8\), and \(d_B\) is a product of odd primes, so \(y(B)=\lambda(d_B)\) and \(z(B)=\mu(d_B)\). An odd class modulo \(8\) is determined by its values of \(\lambda\) and \(\mu\), which gives the three equivalences, checked on the four odd classes. So the conditions defining \(T_{5b}(n)\) and \(T_{5b}\) select the same set partitions, and the products \(\prod_Bg_n(B)\) are the same by definition.
theorem T5b_eq_genusSum5b (hd : Odd d) : T5b d = genusSum5b (aBit d) (yBit d) (zBit d)
theorem yBit_eq_lam8 (hd : Odd d) (q : d.primeFactors) : yBit d q = lam8 ((q : ℕ) : ZMod 8)
theorem zBit_eq_mu8 (hd : Odd d) (q : d.primeFactors) : zBit d q = mu8 ((q : ℕ) : ZMod 8)
noncomputable def T5b (d : ℕ) : ZMod 2 :=
∑ P : Finpartition (Finset.univ : Finset d.primeFactors),
if Admissible5bNat d P then ∏ B ∈ P.parts, gBit d B else 0
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:98
noncomputable def genusSum5b (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) : ZMod 2 :=
∑ P : Finpartition (Finset.univ : Finset ι),
if Admissible5b y z P then ∏ B ∈ P.parts, redeiG a y z B else 0
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:65
noncomputable def aBit (d : ℕ) (i j : d.primeFactors) : ZMod 2 := legBit (i : ℕ) ((j : ℕ) : ℤ)
ZInQKernel/RouteK/Rank5b/Matrices.lean:54
noncomputable def yBit (d : ℕ) (i : d.primeFactors) : ZMod 2 := lamBit (i : ℕ)
ZInQKernel/RouteK/Rank5b/Matrices.lean:57
noncomputable def zBit (d : ℕ) (i : d.primeFactors) : ZMod 2 := muBit (i : ℕ)
ZInQKernel/RouteK/Rank5b/Matrices.lean:60
def lam8 (c : ZMod 8) : ZMod 2 := if c = 3 ∨ c = 7 then 1 else 0
ZInQKernel/RouteK/System/Config.lean:22
def mu8 (c : ZMod 8) : ZMod 2 := if c = 3 ∨ c = 5 then 1 else 0
ZInQKernel/RouteK/System/Config.lean:25
Uses 3 · Used by 2
TheoremRow 5b of Smith's table (Theorem 3.6)#✓
Let \(n\) be squarefree with \(n\equiv5\pmod8\). Then $\(\det M_{5b}=T_{5b}(n).\)$ More generally, for bits \(a,y,z\) on a finite set \(V\) that satisfy reciprocity and \(y(V)=0\), the determinant of the matrix \(M_{5b}\) built from the bits is the genus sum \(T_{5b}\) of the bits.
Along the way: the bits of an odd number satisfy reciprocity, and for squarefree \(n\equiv5\pmod8\) with set of primes \(P\), \(y(P)=0\).
Proof sketch. Let the bits satisfy reciprocity and \(y(V)=0\). In the forest form of \(\det M_{5b}\) the factor \(1+y(V)\) is \(1\), and grouping the forests by their root sets turns it into \(\sum_f\bigl(\sum_{k\in R}y_kz^{R\setminus k}\bigr)\mathrm{wt}(f)\prod_{\rho\in R}y(T_\rho)\) over all forests \(f\) on \(V\), with \(R\) the root set of \(f\). This is the forest form of the genus sum, so \(\det M_{5b}=T_{5b}\).
For \(n\), the bits of the primes of \(n\) satisfy reciprocity, \(a_{pq}+a_{qp}=y_py_q\), by quadratic reciprocity. Since \(n\) is squarefree, it is the product of its primes, so \(y(P)=\lambda(n)=\lambda(5)=0\). The matrix \(M_{5b}\) of the bits is Smith's \(M_{5b}\), and the genus sum of the bits is \(T_{5b}(n)\).
theorem det_M5b_eq_T5b (hd5 : d % 8 = 5) (hsq : Squarefree d) : (M5b d).det = T5b d
theorem det_M5bG_eq_genusSum5b {a : ι → ι → ZMod 2} {y : ι → ZMod 2} (hrec : Recip a y)
(hy0 : ∑ i, y i = 0) (z : ι → ZMod 2) : (M5bG a y z).det = genusSum5b a y z
theorem recip_bits (hd : Odd d) : Recip (aBit d) (yBit d)
noncomputable def M5b (d : ℕ) :
Matrix ((d.primeFactors ⊕ d.primeFactors) ⊕ Unit)
((d.primeFactors ⊕ d.primeFactors) ⊕ Unit) (ZMod 2) :=
border (M1 d) (Sum.elim 0 (yBit d))
ZInQKernel/RouteK/Rank5b/Matrices.lean:74
noncomputable def T5b (d : ℕ) : ZMod 2 :=
∑ P : Finpartition (Finset.univ : Finset d.primeFactors),
if Admissible5bNat d P then ∏ B ∈ P.parts, gBit d B else 0
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:98
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 M5bG (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) : Matrix ((ι ⊕ ι) ⊕ Unit) ((ι ⊕ ι) ⊕ Unit) (ZMod 2) :=
border (M1G a z) (Sum.elim 0 y)
ZInQKernel/RouteK/Rank5b/Sec3/M5bForest.lean:24
noncomputable def genusSum5b (a : ι → ι → ZMod 2) (y z : ι → ZMod 2) : ZMod 2 :=
∑ P : Finpartition (Finset.univ : Finset ι),
if Admissible5b y z P then ∏ B ∈ P.parts, redeiG a y z B else 0
ZInQKernel/RouteK/Rank5b/Sec3/Defs.lean:65
noncomputable def aBit (d : ℕ) (i j : d.primeFactors) : ZMod 2 := legBit (i : ℕ) ((j : ℕ) : ℤ)
ZInQKernel/RouteK/Rank5b/Matrices.lean:54
noncomputable def yBit (d : ℕ) (i : d.primeFactors) : ZMod 2 := lamBit (i : ℕ)
ZInQKernel/RouteK/Rank5b/Matrices.lean:57
Uses 6 · Used by 5
TheoremTwo values of the genus sum#○
The congruent-number route. This page belongs to the congruent-number route to pole completeness, through Tian–Yuan–Zhang and Gross–Zagier. Elliot's route is the other route to the same theorem. This page's Lean declarations are not on this fork's main (fork issue #77); the route's Lean is kept at the tag route-k-final and pinned upstream in elliotglazer/diophantine-z-q.
\(T_{5b}(21)=1\) and \(T_{5b}(5)=0\).
Proof sketch. Both \(21=3\cdot7\) and \(5\) are squarefree and \(\equiv5\pmod8\), so by Theorem 3.6 the values are those of \(\det M_{5b}\), which is \(1\) for \(n=21\) and \(0\) for \(n=5\). For \(n=5\) there is also a direct argument: the only set partition of \(\{5\}\) has the single block \(\{5\}\), with \(d_B=5\), so no partition has a block with \(d_B\equiv7\pmod8\) and the sum is empty.
Uses 3
Propositions 3.3–3.5
The same forest expansions give \(\det M_1\) and \(\det M_{5b}\) as sums over set partitions, and compare the sums over the partitions into class-1 blocks and into class-3 blocks.
TheoremCompatible partitions with one or two roots per block#○
The congruent-number route. This page belongs to the congruent-number route to pole completeness, through Tian–Yuan–Zhang and Gross–Zagier. Elliot's route is the other route to the same theorem. This page's Lean declarations are not on this fork's main (fork issue #77); the route's Lean is kept at the tag route-k-final and pinned upstream in elliotglazer/diophantine-z-q.
Let \(f\) be a forest on a finite set \(V\) with root set \(R\), and let \(E\subseteq R\). The set partitions compatible with \(f\) in which every root in \(E\) is the only root of its block and every block containing a root outside \(E\) contains exactly two roots are as many as the fixed-point-free involutions of \(R\setminus E\). For \(E=R\) there is exactly one.
For \(k=1\) or \(2\), a set partition compatible with \(f\) has exactly \(k\) roots in every block if and only if it is one of the partitions of the count with \(E=R\), respectively \(E=\emptyset\). So the number of compatible partitions with exactly \(k\) roots in every block is the number for \(E=R\), respectively \(E=\emptyset\).
Proof sketch. A fixed-point-free involution \(s\) of \(R\setminus E\), extended by the identity on \(E\), gives the partition whose block at a root \(\rho\) is the set of points whose root is \(\rho\) or \(s(\rho)\); this is a bijection onto the partitions described. For \(E=R\) the only involution of the empty set gives the partition into the trees of \(f\). Since every block of a compatible partition contains a root, "every block has exactly \(k\) roots" is the condition of the count with \(E=R\) for \(k=1\) and with \(E=\emptyset\) for \(k=2\).
Uses 4 · Used by 3
Theorem\(\det M_1\) as a sum over partitions into class-3 blocks (Proposition 3.3)#○
The congruent-number route. This page belongs to the congruent-number route to pole completeness, through Tian–Yuan–Zhang and Gross–Zagier. Elliot's route is the other route to the same theorem. This page's Lean declarations are not on this fork's main (fork issue #77); the route's Lean is kept at the tag route-k-final and pinned upstream in elliotglazer/diophantine-z-q.
Let \(a,y,z\) be bits on a finite set \(V\) that satisfy reciprocity. Then $\(\det P(z,y)=\sum_{\pi}\prod_{B\in\pi}g(B)=\sum_f z^R\,\mathrm{wt}(f)\prod_{\rho\in R}y(T_\rho),\)$ the first sum over the set partitions \(\pi\) of \(V\) into blocks of class \(3\), the second over the forests \(f\) on \(V\), with \(R\) the root set of \(f\). If \(y(V)=0\), then \(\det M_1\) is the same sum over the partitions into blocks of class \(3\); if \(y(V)=1\), then \(\det M_1=0\).
The forest sum behind it: for every \(k\), $\(\sum_\pi\prod_{B\in\pi}\ \sum_{h\text{ with }k\text{ roots}}z^{S(h)}\,\mathrm{wt}(h)\,Y(h) =\sum_fN_k(f)\,z^R\,\mathrm{wt}(f)\prod_{\rho\in R}y(T_\rho),\)$ where \(h\) runs over the forests on the block \(B\) with exactly \(k\) roots, \(S(h)\) is the root set of \(h\), \(Y(h)\) is the product of the sums of \(y\) over its trees, and \(N_k(f)\) is the number of set partitions compatible with \(f\) in which every block contains exactly \(k\) roots.
Proof sketch. For the forest sum, glue along \(\pi\): the product over the blocks of the forest sums is a sum over the forests \(f\) on \(V\) compatible with \(\pi\), and for such \(f\) the product of the block terms of the restrictions \(f|_B\) is \(z^R\,\mathrm{wt}(f)\prod_{\rho\in R}y(T_\rho)\) if every block holds exactly \(k\) roots and \(0\) otherwise. Exchanging the sums gives the coefficient \(N_k(f)\).
Now take \(k=1\). For a set partition \(\pi\), \(\prod_{B\in\pi}w_3(B)\) is \(\prod_Bg(B)\) if all blocks have class \(3\) and \(0\) otherwise, and each \(w_3(B)\) is the sum over the forests on \(B\) with one root \(\rho\) of \(z_\rho\,\mathrm{wt}(h)\,Y(h)\). So the class-3 partition sum is \(\sum_fN_1(f)\,z^R\,\mathrm{wt}(f)\prod_\rho y(T_\rho)\), and \(N_1(f)=1\), since exactly one partition compatible with \(f\) has one root in every block, the partition into the trees of \(f\). Grouping the forests by their root sets, the forest expansion of \(\det P(z,y)\) is the same sum. Finally \(\det M_1=(1+y(V))\det P(z,y)\).
Uses 9 · Used by 2
Theorem\(\det M_{5b}\) as a sum over partitions into class-7 and class-3 blocks (Proposition 3.4)#○
The congruent-number route. This page belongs to the congruent-number route to pole completeness, through Tian–Yuan–Zhang and Gross–Zagier. Elliot's route is the other route to the same theorem. This page's Lean declarations are not on this fork's main (fork issue #77); the route's Lean is kept at the tag route-k-final and pinned upstream in elliotglazer/diophantine-z-q.
Let \(a,y,z\) be bits on a finite set \(V\) that satisfy reciprocity and \(y(V)=0\). Then $\(\det M_{5b}=\sum_\pi\prod_{B\in\pi}g(B),\)$ the sum over the set partitions \(\pi\) of \(V\) with exactly one block of class \(7\) and all other blocks of class \(3\).
Along the way, with \(m'_{B_7}\) equal to \(w_7\) on \(B_7\) and \(w_3\) on every other block: under reciprocity each marked product \(\prod_{B\in\pi}m'_{B_7}(B)\) is a sum over the forests on \(V\) compatible with \(\pi\), as in the proof below. For a forest \(f\) on \(V\) with root set \(R\) and a set partition \(\pi\) compatible with \(f\), the marked sum of the root factors (for each block, \(y_\rho+z_\rho\) on \(B_7\) and \(z_\rho\) on the others when the block contains the single root \(\rho\), and \(0\) when it contains another number of roots) is \(\sum_{\rho_7\in R}(y_{\rho_7}+z_{\rho_7})z^{R\setminus\rho_7}\) if every block of \(\pi\) contains exactly one root, and \(0\) otherwise.
Proof sketch. The partition sum is the marked sum \(\sum_\pi\sum_{B_7\in\pi}\prod_{B\in\pi}m'_{B_7}(B)\) over all set partitions. Write \(w_7\) and \(w_3\) as forest sums with one root per block and glue along \(\pi\); each marked product becomes a sum over the forests \(f\) compatible with \(\pi\) of the product of the root factors times \(\mathrm{wt}(f)\prod_{\rho\in R}y(T_\rho)\). Exchanging the sums, the coefficient of \(f\) is the sum, over the compatible partitions with exactly one root per block, of \(\sum_{\rho_7\in R}(y_{\rho_7}+z_{\rho_7})z^{R\setminus\rho_7}\). Exactly one compatible partition has one root in every block, the partition into the trees of \(f\). If \(\prod_\rho y(T_\rho)\ne0\), then \(|R|\) is even because \(y(V)=0\), so \(\sum_\rho z_\rho z^{R\setminus\rho}=|R|\,z^R\) vanishes and the coefficient is \(\sum_{k\in R}y_kz^{R\setminus k}\). This is the coefficient of \(f\) in the forest form of \(\det M_{5b}\), where \(1+y(V)=1\), after grouping the forests by their root sets.
TheoremFrom class-1 blocks to class-3 blocks (Proposition 3.5)#○
The congruent-number route. This page belongs to the congruent-number route to pole completeness, through Tian–Yuan–Zhang and Gross–Zagier. Elliot's route is the other route to the same theorem. This page's Lean declarations are not on this fork's main (fork issue #77); the route's Lean is kept at the tag route-k-final and pinned upstream in elliotglazer/diophantine-z-q.
Let \(a,y,z\) be bits on a finite set \(V\) that satisfy reciprocity and \(y(V)=0\). Then $\(\sum_{\pi\text{ into blocks of class }1}\ \prod_{B\in\pi}g(B)\;=\;\sum_{\pi\text{ into blocks of class }3}\ \prod_{B\in\pi}g(B),\)$ both sums over set partitions of \(V\).
Along the way, under reciprocity alone, $\(\sum_{\pi\text{ into blocks of class }1}\ \prod_{B\in\pi}g(B)=\sum_f\,p(R)\,z^R\,\mathrm{wt}(f)\prod_{\rho\in R}y(T_\rho),\)$ the sum over the forests \(f\) on \(V\) with root set \(R\), where \(p(R)\) is the number of fixed-point-free involutions of \(R\).
Proof sketch. Write \(w_1(B)\) as the sum over the forests on \(B\) with two roots \(i,j\) of \(z_iz_j\,\mathrm{wt}(h)\,Y(h)\), and glue along the partition. As in Proposition 3.3, the class-1 partition sum becomes \(\sum_fN_2(f)\,z^R\,\mathrm{wt}(f)\prod_\rho y(T_\rho)\), with \(N_2(f)\) the number of compatible partitions in which every block holds exactly two roots; by the count with \(E=\emptyset\), \(N_2(f)=p(R)\). By Proposition 3.3 the class-3 partition sum is \(\sum_fz^R\,\mathrm{wt}(f)\prod_\rho y(T_\rho)\). Compare the coefficients forest by forest. If \(\prod_\rho y(T_\rho)\ne0\), every tree has \(y(T_\rho)=1\), so \(|R|\equiv y(V)=0\pmod2\), and the number of pairings of a set of even size is odd; so \(p(R)\) is odd and the coefficients agree in \(\mathbb F_2\).
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.