Ambiguous classes and genus characters
This section is the genus theory of \(K=\mathbb Q(\sqrt{-n})\), in the notation of the chapter: \(\mathcal O\), \(\sigma\), \(N\), \(\mathrm{Cl}\), the set \(T_n\) with \(t=|T_n|\), the prime ideals \(\mathfrak p_p\) and the residue bits \([a/q]\). The main results assume \(n\) odd and squarefree; each article states its own hypotheses, and some auxiliary facts hold for every \(n\ge1\).
- For \(n\) odd and squarefree, the ambiguous class map \(\psi:\mathbb F_2^{T_n}\to\mathrm{Cl}\) sends \(e\) to \(\prod_p[\mathfrak p_p]^{e_p}\). By Hilbert 90 for ideals its image is \(\mathrm{Cl}[2]\), and its kernel contains the exponent vector \(e_n\) of \((\sqrt{-n})\), so \(|\mathrm{Cl}[2]|\le2^{t-1}\) for \(n>1\).
- For each prime \(q\mid n\), the genus character \(\chi_q\) sends the class of a nonzero ideal \(I\) with \(q\nmid N(I)\) to \([N(I)/q]\). It is well defined because norms of elements are squares modulo \(q\), and on the ambiguous classes it is given by the Rédei matrix.
- Through the slot lemma, Dirichlet's theorem shows that the genus characters take every family of values \((\varepsilon_q)_{q\mid n}\), subject only to \(\sum_q\varepsilon_q=0\) when \(n\equiv3\pmod4\).
Ambiguous classes
TheoremHilbert 90 for ideals#✓
Let \(n\ge1\), \(\mathcal O\) the ring of integers of \(K=\mathbb Q(\sqrt{-n})\) and \(\sigma\) the nontrivial automorphism. Let \(I\) be a nonzero ideal of \(\mathcal O\) and \(x,y\in\mathcal O\) with \(x\ne0\) and $\((x)\,\sigma(I)=(y)\,I.\)$ Then there is \(\nu\in\mathcal O\), \(\nu\ne0\), with \(\sigma\bigl((\nu)I\bigr)=(\nu)I\).
Along the way, for every automorphism \(\tau\) of \(K\) and \(x,y\in\mathcal O\): \(\tau\bigl((x)\bigr)=(\tau(x))\); \(\tau(x)\ne0\) if \(x\ne0\); and \((x)\,\tau(I)=(y)\,I\) with \(I\ne0\) implies \(N(x)=N(y)\). Also \(\sigma(\sigma(x))=x\).
Proof sketch. Taking ideal norms gives \(|N(x)|\,N(\sigma I)=|N(y)|\,N(I)\). Since \(N(\sigma I)=N(I)\ne0\) and norms of elements are nonnegative, \(N(x)=N(y)\), that is, \(x\,\sigma(x)=y\,\sigma(y)\).
- If \(x+y=0\), then \((y)=(x)\), so \((x)\,\sigma I=(x)\,I\); cancelling \((x)\) gives the claim with \(\nu=1\).
- Otherwise put \(\nu=\sigma(x)(x+y)\ne0\). Then \(\sigma(\nu)=x(\sigma(x)+\sigma(y))\), and \(x\sigma(x)=y\sigma(y)\) gives \(y\,\sigma(\nu)=x\nu\). So $\((x)\,\sigma\bigl((\nu)I\bigr)=(\sigma(\nu))(y)\,I=(y\,\sigma(\nu))\,I=(x\nu)\,I=(x)(\nu)I,\)$ and cancelling \((x)\) gives the claim.
theorem ambig_hilbert90 (σ : K ≃ₐ[ℚ] K) (hσ : σ ≠ 1) {I : Ideal O} (hI : I ≠ ⊥) {x y : O}
(hx : x ≠ 0) (h : Ideal.span {x} * (σ • I) = Ideal.span {y} * I) :
∃ ν : O, ν ≠ 0 ∧ σ • (Ideal.span {ν} * I) = Ideal.span {ν} * I
theorem ambig_normZ_eq (σ : K ≃ₐ[ℚ] K) {I : Ideal O} (hI : I ≠ ⊥) {x y : O}
(h : Ideal.span {x} * (σ • I) = Ideal.span {y} * I) :
Algebra.norm ℤ x = Algebra.norm ℤ y
theorem ambig_smul_smul (σ : K ≃ₐ[ℚ] K) (hσ : σ ≠ 1) (x : O) : σ • σ • x = x
Uses 3 · Used by 1
DefinitionThe ambiguous class map \(\psi\)#✓
Let \(n\ge1\) and let \(\mathrm{Cl}\) be the class group of the ring of integers \(\mathcal O\) of \(\mathbb Q(\sqrt{-n})\). For \(p\in T_n\), let \(c_p=[\mathfrak p_p]\) if \([\mathfrak p_p]^2=1\), and \(c_p=1\) otherwise; so \(c_p^2=1\) in every case. The ambiguous class map is $\(\psi:\mathbb F_2^{T_n}\to\mathrm{Cl},\qquad \psi(e)=\prod_{p\in T_n}c_p^{\,e_p},\)$ where each exponent \(e_p\in\mathbb F_2\) is read as \(0\) or \(1\). For an element \(c\) of a group with \(c^2=1\) and \(a,b\in\mathbb F_2\), \(c^{a+b}=c^ac^b\); so \(\psi\) is a homomorphism from the additive group \(\mathbb F_2^{T_n}\) to \(\mathrm{Cl}\), and \(\psi(e)^2=1\) for every \(e\).
def psi : Multiplicative (ramSet n → ZMod 2) →* ClassGroup O where
toFun e := ∏ p, ambigClass n p ^ (Multiplicative.toAdd e p).val
map_one' := by
simp only [toAdd_one, Pi.zero_apply, ZMod.val_zero, pow_zero, Finset.prod_const_one]
map_mul' e f := by
rw [← Finset.prod_mul_distrib]
refine Finset.prod_congr rfl fun p _ => ?_
rw [toAdd_mul, Pi.add_apply, ambig_pow_val_add (ambigClass_sq p)]
def ambigClass (p : ramSet n) : ClassGroup O :=
if ClassGroup.mk0 ⟨ramIdeal n p, ramIdeal_mem n p⟩ ^ 2 = 1 then
ClassGroup.mk0 ⟨ramIdeal n p, ramIdeal_mem n p⟩ else 1
theorem ambigClass_sq (p : ramSet n) : ambigClass n p ^ 2 = 1
def ramSet : Finset ℕ := if n % 4 = 3 then n.primeFactors else insert 2 n.primeFactors
ZInQKernel/RouteK/Redei/Primes.lean:335
def ambigClass (p : ramSet n) : ClassGroup O :=
if ClassGroup.mk0 ⟨ramIdeal n p, ramIdeal_mem n p⟩ ^ 2 = 1 then
ClassGroup.mk0 ⟨ramIdeal n p, ramIdeal_mem n p⟩ else 1
ZInQKernel/RouteK/Redei/Ambiguous.lean:116
def ramIdeal (p : ℕ) : Ideal O :=
if hp : p.Prime then Classical.choose (exists_maximal_liesOver (n := n) hp) else ⊤
ZInQKernel/RouteK/Redei/Primes.lean:345
theorem ramIdeal_mem (p : ℕ) : ramIdeal n p ∈ (Ideal O)⁰
ZInQKernel/RouteK/Redei/Primes.lean:393
Uses 2 · Used by 6
TheoremThe classes of the ramified primes#✓
Let \(n\) be odd and squarefree. Then \([\mathfrak p_p]^2=1\), so \(c_p=[\mathfrak p_p]\), for every \(p\in T_n\); and \(\psi\) sends the basis vector \(\delta_p\) (equal to \(1\) at \(p\) and \(0\) elsewhere) to \([\mathfrak p_p]\). Let \(e_n\in\mathbb F_2^{T_n}\) be \(1\) at the primes dividing \(n\) and \(0\) elsewhere (that is, at \(2\) when \(n\equiv1\pmod4\)), the exponent vector of \((\omega)\). Then $\(\psi(e_n)=1.\)$ This uses the following, for every \(n\ge1\): for every finite set \(S\) of natural numbers, the class of \(\prod_{p\in S}\mathfrak p_p\) is \(\prod_{p\in S}[\mathfrak p_p]\).
Proof sketch. \(\mathfrak p_p^2=p\mathcal O\) is principal, so \([\mathfrak p_p]^2=1\) and \(c_p=[\mathfrak p_p]\); then \(\psi(\delta_p)=c_p=[\mathfrak p_p]\). Since the class map is multiplicative, \(\psi(e_n)=\prod_{p\mid n}[\mathfrak p_p]=\bigl[\prod_{p\mid n}\mathfrak p_p\bigr]=[(\omega)]=1\).
theorem psi_ones (hn : Odd n) (hsq : Squarefree n) :
psi n (Multiplicative.ofAdd fun p : ramSet n =>
if (p : ℕ) ∈ n.primeFactors then (1 : ZMod 2) else 0) = 1
theorem psi_single (hn : Odd n) (hsq : Squarefree n) (p : ramSet n) :
psi n (Multiplicative.ofAdd (Pi.single p 1)) =
ClassGroup.mk0 ⟨ramIdeal n p, ramIdeal_mem n p⟩
theorem ambigClass_eq (hn : Odd n) (hsq : Squarefree n) (p : ramSet n) :
ambigClass n p = ClassGroup.mk0 ⟨ramIdeal n p, ramIdeal_mem n p⟩
def psi : Multiplicative (ramSet n → ZMod 2) →* ClassGroup O where
toFun e := ∏ p, ambigClass n p ^ (Multiplicative.toAdd e p).val
map_one' := by
simp only [toAdd_one, Pi.zero_apply, ZMod.val_zero, pow_zero, Finset.prod_const_one]
map_mul' e f := by
rw [← Finset.prod_mul_distrib]
refine Finset.prod_congr rfl fun p _ => ?_
rw [toAdd_mul, Pi.add_apply, ambig_pow_val_add (ambigClass_sq p)]
ZInQKernel/RouteK/Redei/Ambiguous.lean:147
def ramSet : Finset ℕ := if n % 4 = 3 then n.primeFactors else insert 2 n.primeFactors
ZInQKernel/RouteK/Redei/Primes.lean:335
def ramIdeal (p : ℕ) : Ideal O :=
if hp : p.Prime then Classical.choose (exists_maximal_liesOver (n := n) hp) else ⊤
ZInQKernel/RouteK/Redei/Primes.lean:345
theorem ramIdeal_mem (p : ℕ) : ramIdeal n p ∈ (Ideal O)⁰
ZInQKernel/RouteK/Redei/Primes.lean:393
def ambigClass (p : ramSet n) : ClassGroup O :=
if ClassGroup.mk0 ⟨ramIdeal n p, ramIdeal_mem n p⟩ ^ 2 = 1 then
ClassGroup.mk0 ⟨ramIdeal n p, ramIdeal_mem n p⟩ else 1
ZInQKernel/RouteK/Redei/Ambiguous.lean:116
Uses 3 · Used by 4
TheoremClasses of invariant ideals are ambiguous#✓
Let \(n\) be odd and squarefree, \(\sigma\) the nontrivial automorphism of \(\mathbb Q(\sqrt{-n})\) and \(I\) a nonzero ideal of \(\mathcal O\) with \(\sigma I=I\). Then \([I]\) lies in the image of \(\psi\).
Along the way:
- for \(n\) odd and squarefree, every nonzero ideal \(J\ne\mathcal O\) with \(\sigma J=J\) is divisible by a nonzero ideal \(Q\ne\mathcal O\) with \(\sigma Q=Q\) whose class lies in the image of \(\psi\);
- for every \(n\) with \(n\equiv1\pmod4\), \(2\in T_n\).
Proof sketch. For the divisor: take a maximal ideal \(P\supseteq J\); it is nonzero, so it lies over a prime \(p\).
- If \(P\) is split, then \(J=\sigma J\subseteq\sigma P\), so \(J\subseteq P\cap\sigma P=P\cdot\sigma P=p\mathcal O\). Take \(Q=p\mathcal O\), which is \(\sigma\)-stable and principal, of class \(1\).
- If \(P\) is inert, take \(Q=P=p\mathcal O\), again of class \(1\).
- If \(P\) is ramified, then \(p\mid n\), or \(p=2\) and \(n\equiv1\pmod4\); in both cases \(p\in T_n\), so \(P=\mathfrak p_p\) is the only prime over \(p\). Take \(Q=P\), which is \(\sigma\)-stable, with class \([\mathfrak p_p]=\psi(\delta_p)\).
Then argue by strong induction on \(N(I)\). If \(I=\mathcal O\), its class is \(1\). Otherwise \(I=QJ\) with \(Q\) as above; cancelling \(Q=\sigma Q\) in \(Q\,\sigma J=QJ\) gives \(\sigma J=J\), and \(N(J)<N(I)\) since \(N(Q)\ge2\). So \([I]=[Q][J]\) lies in the image of \(\psi\).
theorem mem_range_psi_of_conj_eq (σ : K ≃ₐ[ℚ] K) (hσ : σ ≠ 1) (hn : Odd n) (hsq : Squarefree n)
(I : (Ideal O)⁰) (hI : σ • (I : Ideal O) = I) : ClassGroup.mk0 I ∈ (psi n).range
theorem ambig_exists_dvd (σ : K ≃ₐ[ℚ] K) (hσ : σ ≠ 1) (hn : Odd n) (hsq : Squarefree n)
(J : Ideal O) (hJ : J ≠ ⊥) (hJt : J ≠ ⊤) (hs : σ • J = J) :
∃ Q : Ideal O, Q ∣ J ∧ Q ≠ ⊤ ∧ σ • Q = Q ∧ ∃ hQ : Q ∈ (Ideal O)⁰,
ClassGroup.mk0 ⟨Q, hQ⟩ ∈ (psi n).range
theorem ambig_two_mem_ramSet (h1 : n % 4 = 1) : 2 ∈ ramSet n
def psi : Multiplicative (ramSet n → ZMod 2) →* ClassGroup O where
toFun e := ∏ p, ambigClass n p ^ (Multiplicative.toAdd e p).val
map_one' := by
simp only [toAdd_one, Pi.zero_apply, ZMod.val_zero, pow_zero, Finset.prod_const_one]
map_mul' e f := by
rw [← Finset.prod_mul_distrib]
refine Finset.prod_congr rfl fun p _ => ?_
rw [toAdd_mul, Pi.add_apply, ambig_pow_val_add (ambigClass_sq p)]
ZInQKernel/RouteK/Redei/Ambiguous.lean:147
def ramSet : Finset ℕ := if n % 4 = 3 then n.primeFactors else insert 2 n.primeFactors
ZInQKernel/RouteK/Redei/Primes.lean:335
Uses 6 · Used by 1
TheoremThe ambiguous classes fill \(\mathrm{Cl}[2]\)#✓
Let \(n\) be odd and squarefree and \(\mathrm{Cl}\) the class group of the ring of integers of \(\mathbb Q(\sqrt{-n})\). Then the image of \(\psi\) is the 2-torsion subgroup: $\(\psi\bigl(\mathbb F_2^{T_n}\bigr)=\mathrm{Cl}[2]=\{c\in\mathrm{Cl}: c^2=1\}.\)$
Proof sketch. The values of \(\psi\) have square \(1\). Conversely, let \(c=[I]\) with \(I\ne0\) and \(c^2=1\). Since \(I\cdot\sigma I=(N(I))\) is principal, \([\sigma I]=c^{-1}=c\). So \((x)\,\sigma I=(y)\,I\) for some nonzero \(x,y\in\mathcal O\). Hilbert 90 gives \(\nu\ne0\) with \((\nu)I\) invariant under \(\sigma\), so its class, which is \(c\), lies in the image of \(\psi\).
theorem range_psi (hn : Odd n) (hsq : Squarefree n) :
(psi n).range = (powMonoidHom 2 : ClassGroup O →* ClassGroup O).ker
def psi : Multiplicative (ramSet n → ZMod 2) →* ClassGroup O where
toFun e := ∏ p, ambigClass n p ^ (Multiplicative.toAdd e p).val
map_one' := by
simp only [toAdd_one, Pi.zero_apply, ZMod.val_zero, pow_zero, Finset.prod_const_one]
map_mul' e f := by
rw [← Finset.prod_mul_distrib]
refine Finset.prod_congr rfl fun p _ => ?_
rw [toAdd_mul, Pi.add_apply, ambig_pow_val_add (ambigClass_sq p)]
ZInQKernel/RouteK/Redei/Ambiguous.lean:147
Uses 5 · Used by 3
TheoremA bound for the 2-torsion of the class group#✓
Let \(n>1\) be odd and squarefree, \(\mathrm{Cl}\) the class group of the ring of integers of \(\mathbb Q(\sqrt{-n})\) and \(t=|T_n|\). Then $\(|\mathrm{Cl}[2]|\le2^{t-1}.\)$
Proof sketch. \(|\ker\psi|\cdot|\mathrm{im}\,\psi|=|\mathbb F_2^{T_n}|=2^t\), and \(\mathrm{im}\,\psi=\mathrm{Cl}[2]\). The kernel contains \(e_n\), which is nonzero because \(n>1\) has a prime factor; so \(|\ker\psi|\ge2\), and in particular \(t\ge1\). Hence \(|\mathrm{Cl}[2]|\le2^t/2=2^{t-1}\).
theorem card_ker_sq_le (hn : Odd n) (hsq : Squarefree n) (h1 : 1 < n) :
Nat.card (powMonoidHom 2 : ClassGroup O →* ClassGroup O).ker ≤
2 ^ ((ramSet n).card - 1)
def ramSet : Finset ℕ := if n % 4 = 3 then n.primeFactors else insert 2 n.primeFactors
ZInQKernel/RouteK/Redei/Primes.lean:335
Uses 5 · Used by 1
Genus characters
Each genus character is computed on a representative of norm prime to \(q\); that its value does not depend on the representative comes from the fact that norms of elements are squares modulo the primes of \(n\).
TheoremEvery class has a representative of norm prime to \(q\)#✓
Let \(n\ge1\), \(\mathcal O\) the ring of integers of \(\mathbb Q(\sqrt{-n})\) and \(q\) a prime. Every ideal class of \(\mathcal O\) contains a nonzero ideal \(I\) with \(q\nmid N(I)\). Along the way, an ideal \(I\) with \(I+q\mathcal O=\mathcal O\) satisfies \(q\nmid N(I)\).
Proof sketch. Let \(c\) be the class, and take a nonzero ideal \(J\) in \(c^{-1}\). Since \(\mathcal O\) is a Dedekind domain and \(J\cdot q\mathcal O\subseteq J\) is nonzero, there is \(a\in J\) with \(J\cdot q\mathcal O+(a)=J\). As \(a\in J\), write \((a)=JM\). Then \(J(q\mathcal O+M)=J=J\mathcal O\), and cancelling \(J\) gives \(M+q\mathcal O=\mathcal O\). Also \(M\ne0\), since otherwise \(q\mathcal O=\mathcal O\) and \(q\) would divide \(1\) in \(\mathcal O\), hence in \(\mathbb Z\). From \([J][M]=[(a)]=1\), \([M]=c\). Finally, if \(q\) divided \(N(M)\), some maximal ideal over \(q\) would divide \(M\); it would contain both \(M\) and \(q\), hence \(M+q\mathcal O=\mathcal O\), which is impossible for a maximal ideal.
theorem exists_mk0_coprime (q : ℕ) (hq : q.Prime) (c : ClassGroup O) :
∃ I : (Ideal O)⁰, ClassGroup.mk0 I = c ∧ ¬ q ∣ Ideal.absNorm (I : Ideal O)
theorem not_dvd_absNorm_of_sup_span_eq_top {q : ℕ} (hq : q.Prime) {I : Ideal O}
(h : I ⊔ Ideal.span {(q : O)} = ⊤) : ¬ q ∣ Ideal.absNorm I
Uses 3 · Used by 2
TheoremNorms are squares modulo the primes of \(n\)#✓
Let \(n\ge1\) be squarefree, \(\mathcal O\) the ring of integers of \(\mathbb Q(\sqrt{-n})\) and \(q\) a prime dividing \(n\). For every \(x\in\mathcal O\), the norm \(N(x)\) is a square modulo \(q\). Hence \([N((x))/q]=0\) for every principal ideal \((x)\) of \(\mathcal O\).
Proof sketch. As \(n\) is squarefree and \(q\mid n\), the ideal \(\mathfrak p_q\) over \(q\) is ramified: \(\mathfrak p_q^2=q\mathcal O\), so \(N(\mathfrak p_q)=q\) and \(\sigma\mathfrak p_q=\mathfrak p_q\). So \(x\equiv m\pmod{\mathfrak p_q}\) for an integer \(m\), and \(x-\sigma(x)\in\mathfrak p_q\). Then $\(N(x)-m^2=x\bigl(\sigma(x)-x\bigr)+(x-m)(x+m)\in\mathfrak p_q\cap\mathbb Z=q\mathbb Z.\)$ The ideal norm of \((x)\) is \(|N(x)|=N(x)\), since norms are nonnegative, so its residue bit is \(0\). No coordinates on \(\mathcal O\) are needed.
theorem isSquare_normZ_mod (hsq : Squarefree n) {q : ℕ} (hq : q ∈ n.primeFactors) (x : O) :
IsSquare ((Algebra.norm ℤ x : ℤ) : ZMod q)
theorem legBit_absNorm_span (hsq : Squarefree n) {q : ℕ} (hq : q ∈ n.primeFactors) (x : O) :
legBit q ((Ideal.absNorm (Ideal.span {x}) : ℕ) : ℤ) = 0
noncomputable def legBit (p : ℕ) (a : ℤ) : ZMod 2 := if IsSquare (a : ZMod p) then 0 else 1
ZInQKernel/RouteK/Slots/Symbols.lean:17
Uses 6 · Used by 1
TheoremThe norm residue bit depends only on the class#✓
Let \(n\ge1\) be squarefree, \(\mathcal O\) the ring of integers of \(\mathbb Q(\sqrt{-n})\) and \(q\) a prime dividing \(n\). If \(I\) and \(J\) are nonzero ideals of \(\mathcal O\) in the same ideal class, with \(q\nmid N(I)\) and \(q\nmid N(J)\), then $\([N(I)/q]=[N(J)/q].\)$ Along the way, for every \(n\ge1\), every prime \(q\) and ideals \(I,J\) of \(\mathcal O\) with \(q\nmid N(I)\) and \(q\nmid N(J)\): \(q\nmid N(IJ)\) and \([N(IJ)/q]=[N(I)/q]+[N(J)/q]\). (A natural number not divisible by \(q\) is nonzero modulo \(q\).)
Proof sketch. Take a nonzero ideal \(M\) in the inverse class of \([I]\) with \(q\nmid N(M)\). For every nonzero \(L\) in the class of \(I\) with \(q\nmid N(L)\), the ideal \(LM=(\alpha)\) is principal, so \([N(L)/q]+[N(M)/q]=[N(LM)/q]=[N((\alpha))/q]=0\), because norms are squares modulo \(q\) and the residue bit is additive on integers prime to \(q\). In \(\mathbb F_2\), \(a+b=0\) means \(a=b\), so \([N(L)/q]=[N(M)/q]\). Apply this to \(L=I\) and \(L=J\).
theorem legBit_absNorm_eq_of_mk0_eq (hsq : Squarefree n) {q : ℕ} (hq : q ∈ n.primeFactors)
{I J : (Ideal O)⁰} (hIJ : ClassGroup.mk0 I = ClassGroup.mk0 J)
(hI : ¬ q ∣ Ideal.absNorm (I : Ideal O)) (hJ : ¬ q ∣ Ideal.absNorm (J : Ideal O)) :
legBit q ((Ideal.absNorm (I : Ideal O) : ℕ) : ℤ) =
legBit q ((Ideal.absNorm (J : Ideal O) : ℕ) : ℤ)
theorem legBit_absNorm_mul {q : ℕ} (hq : q.Prime) {I J : Ideal O}
(hI : ¬ q ∣ Ideal.absNorm I) (hJ : ¬ q ∣ Ideal.absNorm J) :
legBit q ((Ideal.absNorm (I * J) : ℕ) : ℤ) =
legBit q ((Ideal.absNorm I : ℕ) : ℤ) + legBit q ((Ideal.absNorm J : ℕ) : ℤ)
theorem not_dvd_absNorm_mul {q : ℕ} (hq : q.Prime) {I J : Ideal O}
(hI : ¬ q ∣ Ideal.absNorm I) (hJ : ¬ q ∣ Ideal.absNorm J) : ¬ q ∣ Ideal.absNorm (I * J)
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
DefinitionThe genus characters#✓
Let \(n\ge1\), \(\mathrm{Cl}\) the class group of the ring of integers \(\mathcal O\) of \(\mathbb Q(\sqrt{-n})\), and \(q\) a prime dividing \(n\). For each class \(c\in\mathrm{Cl}\) fix a nonzero ideal \(I_c\in c\) with \(q\nmid N(I_c)\); one exists by the choice of representatives prime to \(q\). If \(n\) is squarefree, the genus character \(\chi_q:\mathrm{Cl}\to\mathbb F_2\) is $\(\chi_q(c)=[N(I_c)/q];\)$ if \(n\) is not squarefree, \(\chi_q=0\).
For squarefree \(n\) the value does not depend on the choice: \(\chi_q([I])=[N(I)/q]\) for every nonzero ideal \(I\) of \(\mathcal O\) with \(q\nmid N(I)\). And \(\chi_q\) is a homomorphism, \(\chi_q(cd)=\chi_q(c)+\chi_q(d)\), because for representatives \(I\in c\) and \(J\in d\) prime to \(q\), \(IJ\in cd\) is prime to \(q\) and \([N(IJ)/q]=[N(I)/q]+[N(J)/q]\).
def chi (q : n.primeFactors) : ClassGroup O →* Multiplicative (ZMod 2) :=
if hsq : Squarefree n then
MonoidHom.mk' (fun c => Multiplicative.ofAdd (chiBit n q c)) fun c d => by
rw [chiBit_mul hsq, ofAdd_add]
else 1
def chiBit (q : n.primeFactors) (c : ClassGroup O) : ZMod 2 :=
legBit q ((Ideal.absNorm ((Classical.choose
(exists_mk0_coprime n q (Nat.prime_of_mem_primeFactors q.2) c) : (Ideal O)⁰) : Ideal O) : ℕ) :
ℤ)
theorem chiBit_mk0 (hsq : Squarefree n) (q : n.primeFactors) (I : (Ideal O)⁰)
(hI : ¬ (q : ℕ) ∣ Ideal.absNorm (I : Ideal O)) :
chiBit n q (ClassGroup.mk0 I) = legBit q ((Ideal.absNorm (I : Ideal O) : ℕ) : ℤ)
def chiBit (q : n.primeFactors) (c : ClassGroup O) : ZMod 2 :=
legBit q ((Ideal.absNorm ((Classical.choose
(exists_mk0_coprime n q (Nat.prime_of_mem_primeFactors q.2) c) : (Ideal O)⁰) : Ideal O) : ℕ) :
ℤ)
ZInQKernel/RouteK/Redei/Genus.lean:166
noncomputable def legBit (p : ℕ) (a : ℤ) : ZMod 2 := if IsSquare (a : ZMod p) then 0 else 1
ZInQKernel/RouteK/Slots/Symbols.lean:17
theorem exists_mk0_coprime (q : ℕ) (hq : q.Prime) (c : ClassGroup O) :
∃ I : (Ideal O)⁰, ClassGroup.mk0 I = c ∧ ¬ q ∣ Ideal.absNorm (I : Ideal O)
ZInQKernel/RouteK/Redei/Genus.lean:58
Uses 3 · Used by 4
TheoremThe genus characters on the ambiguous classes#✓
Let \(n\) be odd and squarefree, \(q\) a prime dividing \(n\) and \(R\) the Rédei matrix of \(n\). For every \(e\in\mathbb F_2^{T_n}\), $\(\chi_q\bigl(\psi(e)\bigr)=\chi_q\Bigl(\prod_{p\in T_n}[\mathfrak p_p]^{e_p}\Bigr)=\sum_{p\in T_n}R_{qp}\,e_p .\)$ In particular \(\chi_q([\mathfrak p_p])=R_{qp}\) for every \(p\in T_n\), and \(\chi_q([\mathfrak p_q])=\bigl[(n/q)/q\bigr]\).
Proof sketch. As \(n\) is odd, \(q\ne2\), and \(N(\mathfrak p_p)=p\) for every \(p\in T_n\).
- For \(p=2\): \(q\nmid2\), so \(\chi_q([\mathfrak p_2])=[2/q]=R_{q2}\).
- For \(p\ne q\) odd: \(q\nmid p\), so \(\chi_q([\mathfrak p_p])=[p/q]=R_{qp}\).
- For \(p=q\): the ideal \(J=\prod_{p\mid n,\,p\ne q}\mathfrak p_p\) satisfies \(\mathfrak p_qJ=(\omega)\), which is principal, and \(N(J)=\prod_{p\mid n,\,p\ne q}p=n/q\) is prime to \(q\). Hence \(\chi_q([\mathfrak p_q])=-\chi_q([J])=[(n/q)/q]=R_{qq}\), as \(-a=a\) in \(\mathbb F_2\).
The formula for \(\prod_p[\mathfrak p_p]^{e_p}\) follows because \(\chi_q\) is a homomorphism, and it is the formula for \(\psi(e)\) because \(c_p=[\mathfrak p_p]\) for odd squarefree \(n\).
theorem chi_psi (hn : Odd n) (hsq : Squarefree n) (q : n.primeFactors)
(e : ramSet n → ZMod 2) :
Multiplicative.toAdd (chi n q (psi n (Multiplicative.ofAdd e))) =
∑ p, redeiEntry n q p * e p
theorem chi_ramIdeal (hn : Odd n) (hsq : Squarefree n) (q : n.primeFactors) (p : ramSet n) :
chi n q (ClassGroup.mk0 ⟨ramIdeal n p, ramIdeal_mem n p⟩) =
Multiplicative.ofAdd (redeiEntry n q p)
theorem chi_ramIdeal_self (hn : Odd n) (hsq : Squarefree n) (q : n.primeFactors) :
chi n q (ClassGroup.mk0 ⟨ramIdeal n q, ramIdeal_mem n q⟩) =
Multiplicative.ofAdd (legBit q ((n / q : ℕ) : ℤ))
def ramSet : Finset ℕ := if n % 4 = 3 then n.primeFactors else insert 2 n.primeFactors
ZInQKernel/RouteK/Redei/Primes.lean:335
def chi (q : n.primeFactors) : ClassGroup O →* Multiplicative (ZMod 2) :=
if hsq : Squarefree n then
MonoidHom.mk' (fun c => Multiplicative.ofAdd (chiBit n q c)) fun c d => by
rw [chiBit_mul hsq, ofAdd_add]
else 1
ZInQKernel/RouteK/Redei/Genus.lean:191
def psi : Multiplicative (ramSet n → ZMod 2) →* ClassGroup O where
toFun e := ∏ p, ambigClass n p ^ (Multiplicative.toAdd e p).val
map_one' := by
simp only [toAdd_one, Pi.zero_apply, ZMod.val_zero, pow_zero, Finset.prod_const_one]
map_mul' e f := by
rw [← Finset.prod_mul_distrib]
refine Finset.prod_congr rfl fun p _ => ?_
rw [toAdd_mul, Pi.add_apply, ambig_pow_val_add (ambigClass_sq p)]
ZInQKernel/RouteK/Redei/Ambiguous.lean:147
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
def ramIdeal (p : ℕ) : Ideal O :=
if hp : p.Prime then Classical.choose (exists_maximal_liesOver (n := n) hp) else ⊤
ZInQKernel/RouteK/Redei/Primes.lean:345
theorem ramIdeal_mem (p : ℕ) : ramIdeal n p ∈ (Ideal O)⁰
ZInQKernel/RouteK/Redei/Primes.lean:393
noncomputable def legBit (p : ℕ) (a : ℤ) : ZMod 2 := if IsSquare (a : ZMod p) then 0 else 1
ZInQKernel/RouteK/Slots/Symbols.lean:17
Uses 6 · Used by 1
The values of the genus characters
A prime \(\ell\nmid 2n\) with \(-n\) a square modulo \(\ell\) is the norm of an ideal, and the slot lemma supplies such primes with prescribed residue bits.
TheoremSplit primes#✓
Let \(n\ge1\), \(\mathcal O\) the ring of integers of \(\mathbb Q(\sqrt{-n})\), and \(p\) an odd prime with \(p\nmid n\) such that \(-n\) is a square modulo \(p\). Then \(\mathcal O\) has a nonzero ideal of norm \(p\).
Proof sketch. Take a maximal ideal \(P\) over \(p\); it is nonzero. If \(P\) is split, \(N(P)=p\). It is not ramified, since a ramified prime divides \(n\) or is \(2\). It is not inert either: if \(P=p\mathcal O\) and \(m^2\equiv-n\pmod p\), then \((m+\omega)(m-\omega)=m^2+n\in P\). As \(P\) is prime and \(\sigma\)-stable, and \(\sigma\) exchanges the two factors, both lie in \(P\), so their sum \(2m\in P\cap\mathbb Z=p\mathbb Z\). As \(p\) is odd, \(p\mid m\), and then \(p\mid(m^2+n)-m^2=n\), a contradiction.
theorem exists_absNorm_eq_of_isSquare {p : ℕ} (hp : p.Prime) (hp2 : p ≠ 2) (hpn : ¬ p ∣ n)
(hsq : IsSquare (-(n : ZMod p))) :
∃ P : (Ideal O)⁰, Ideal.absNorm (P : Ideal O) = p
TheoremThe genus characters take all allowed values#✓
Let \(n\) be odd and squarefree, and let \(\varepsilon\) assign a bit \(\varepsilon_q\in\mathbb F_2\) to each prime \(q\mid n\), with \(\sum_q\varepsilon_q=0\) if \(n\equiv3\pmod4\). Then there is an ideal class \(c\) of \(\mathbb Q(\sqrt{-n})\) with \(\chi_q(c)=\varepsilon_q\) for every prime \(q\mid n\).
Along the way:
- \(\prod_i(-1)^{f_i}=(-1)^{\sum_if_i}\) for finitely many bits \(f_i\in\mathbb F_2\);
- for an integer \(a\) and finitely many nonzero natural numbers \(m_i\), the Jacobi symbol satisfies \(\bigl(a/\prod_im_i\bigr)=\prod_i(a/m_i)\);
- the primes dividing an odd number are different from \(2\).
Proof sketch. The primes \(q\mid n\) are odd. By the slot lemma there is a prime \(\ell\nmid n\) with \([\ell/q]=\varepsilon_q\) for every \(q\mid n\), and with \(\ell\equiv1\pmod8\) if \(\sum_q\varepsilon_q=0\) and \(\ell\equiv3\pmod8\) otherwise; so \(\ell\) is odd. As \(n=\prod_{q\mid n}q\), multiplicativity gives \((\ell/n)=\prod_q(\ell/q)=(-1)^{\sum_q\varepsilon_q}\). Then \((-n/\ell)=\chi_4(\ell)\,(n/\ell)\), and Jacobi reciprocity gives \((-n/\ell)=1\):
- if \(\sum_q\varepsilon_q=0\), then \(\ell\equiv1\pmod4\), so \(\chi_4(\ell)=1\) and \((n/\ell)=(\ell/n)=1\);
- otherwise \(n\equiv1\pmod4\) by the hypothesis on \(\varepsilon\), and \(\ell\equiv3\pmod4\), so \(\chi_4(\ell)=-1\) and \((n/\ell)=(\ell/n)=-1\).
So \(-n\) is a square modulo \(\ell\), and \(\mathcal O\) has a nonzero ideal \(P\) of norm \(\ell\). As \(q\nmid\ell\) for every \(q\mid n\), its class has \(\chi_q([P])=[\ell/q]=\varepsilon_q\).
theorem exists_chi_eq (hn : Odd n) (hsq : Squarefree n) (ε : n.primeFactors → ZMod 2)
(hε : n % 4 = 3 → ∑ q, ε q = 0) :
∃ c : ClassGroup O, ∀ q, chi n q c = Multiplicative.ofAdd (ε q)
theorem prod_ite_bit_eq {ι : Type*} (s : Finset ι) (f : ι → ZMod 2) :
∏ i ∈ s, (if f i = 0 then (1 : ℤ) else -1) = if ∑ i ∈ s, f i = 0 then 1 else -1
theorem jacobiSym_finsetProd_right {ι : Type*} (a : ℤ) (s : Finset ι) (f : ι → ℕ)
(hf : ∀ i ∈ s, f i ≠ 0) : jacobiSym a (∏ i ∈ s, f i) = ∏ i ∈ s, jacobiSym a (f i)
def chi (q : n.primeFactors) : ClassGroup O →* Multiplicative (ZMod 2) :=
if hsq : Squarefree n then
MonoidHom.mk' (fun c => Multiplicative.ofAdd (chiBit n q c)) fun c d => by
rw [chiBit_mul hsq, ofAdd_add]
else 1
ZInQKernel/RouteK/Redei/Genus.lean:191
Uses 5 · Used by 1
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.