# Bernoulli numbers for Dirichlet characters, plus the final step from GRH to RH: its Lean files in plain English

Written by AI from the Lean source at commit 40e56bab; each sentence checked against the code by a second pass.

Alpöge original · Cluster k1091 (https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/) · 45 Lean files, by distance from Main.lean · data: https://riemannhypothesissolved.com/api/file-lines/k1091.json

## Contents

- 3 import steps from Main:
  - [Supplements.Kernels.MainTheorems](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Supplements.Kernels.MainTheorems)
- 4 import steps from Main:
  - [Development.AutomorphicArithmetic.CharacterBoxes.ClaimStrip](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.CharacterBoxes.ClaimStrip)
  - [Formalism.GammaFactorNonvanishing.CritLine](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Formalism.GammaFactorNonvanishing.CritLine)
- 5 import steps from Main:
  - [Development.AutomorphicArithmetic.CharacterBoxes.HalfPlane](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.CharacterBoxes.HalfPlane)
  - [Formalism.GammaFactorNonvanishing.RhOfRight](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Formalism.GammaFactorNonvanishing.RhOfRight)
- 9 import steps from Main:
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BOneSum](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BOneSum)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Condmap](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Condmap)
- 10 import steps from Main:
  - [Development.AbelianVarietyTheory.Definitions.Foundations.CoPtMu](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AbelianVarietyTheory.Definitions.Foundations.CoPtMu)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.MapGenBChar](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.MapGenBChar)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primmem](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primmem)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Sumval](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Sumval)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.OddResidueBounds.ChiFacts](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.OddResidueBounds.ChiFacts)
- 11 import steps from Main:
  - [Development.AbelianVarietyTheory.Definitions.Foundations.SumMulCoPtSbEqSumInv](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AbelianVarietyTheory.Definitions.Foundations.SumMulCoPtSbEqSumInv)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BNzC](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BNzC)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BNzany](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BNzany)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Denchar](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Denchar)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Denint](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Denint)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Parity](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Parity)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primeq](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primeq)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primmap](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primmap)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primval](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primval)
- 12 import steps from Main:
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BLprim](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BLprim)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BUpper](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BUpper)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Charbij](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Charbij)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Expand](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Expand)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.FeLFunctionConstMul](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.FeLFunctionConstMul)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.GeneralizedBernoulliChangeLevel](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.GeneralizedBernoulliChangeLevel)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primden](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primden)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primlevel](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primlevel)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.StickelbergerCharacterEval.GroupRingCharEvalStickelbergerYNeZeroOfParity](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.StickelbergerCharacterEval.GroupRingCharEvalStickelbergerYNeZeroOfParity)
- 13 import steps from Main:
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BLval](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BLval)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BRaabe](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BRaabe)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.DirichletCharacterLevelRaising](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.DirichletCharacterLevelRaising)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.GaussMulGaussInv](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.GaussMulGaussInv)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Polybound](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Polybound)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Sumicc](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Sumicc)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.StickelbergerCharacterEval.Chitheta](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.StickelbergerCharacterEval.Chitheta)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.StickelbergerElements.StickelbergerBernoulliCoeffExpansionModDenominat](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.StickelbergerElements.StickelbergerBernoulliCoeffExpansionModDenominat)
- 14 import steps from Main:
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Bcoef](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Bcoef)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BernoulliPolyReflection](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BernoulliPolyReflection)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Hurzero](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Hurzero)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.SumIccMulEq](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.SumIccMulEq)
- 15 import steps from Main:
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Termdiff](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Termdiff)
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Termsum](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Termsum)
- 16 import steps from Main:
  - [Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BTaylor2](https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/#Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BTaylor2)

## The files

### Supplements.Kernels.MainTheorems

3 import steps from Main · 16 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Supplements.Kernels.MainTheorems)

**Collects Dirichlet L-function nonvanishing and critical-line theorems, together with the Riemann hypothesis.**

The imported half-plane theorem gives nonvanishing for every Dirichlet L-function in Re(s) > 1/2 except at s = 1 for the principal character. In the open critical strip, the functional equation and gamma-factor nonvanishing reflect a primitive character’s zero at s to a zero for its inverse at 1 − s, so half-plane nonvanishing confines these zeros to Re(s) = 1/2. Conductor reduction extends the strip result to all characters. The modulus-one specialization gives zeta nonvanishing for Re(s) > 1/2 away from s = 1, and the zeta functional equation rules out nontrivial zeros to the left of the critical line.

Key declarations:

- `allChi`: Every Dirichlet L-function is nonzero in Re(s) > 1/2 except at the excluded pair of the principal character and s = 1.

  ```lean
  theorem allChi : UpperTheory.EveryCharacter := …
  ```
- `rhOfAll`: Every nontrivial zero of the Riemann zeta function has real part 1/2.

  ```lean
  theorem rhOfAll : RiemannHypothesis := …
  ```
- `critAll`: Every zero of a primitive Dirichlet L-function in 0 < Re(s) < 1 lies on Re(s) = 1/2.

  ```lean
  theorem critAll (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N) (hχ : χ.IsPrimitive) (s : ℂ)
      (h0 : 0 < s.re) (h1 : s.re < 1) (hz : LFunction χ s = 0) : s.re = 1 / 2 := …
  ```
- `claimAll`: The conjunction asserts half-plane nonvanishing, the critical-line statement for all Dirichlet characters in the open critical strip, and the Riemann hypothesis.

  ```lean
  theorem claimAll : Claim.HalfPlane ∧ Claim.Strip ∧ Claim.Zeta := …
  ```

Blueprint: [GRH for primitive characters](https://github.com/chrisflav/riemann-blueprint/blob/137d97602647e450901981a7decfb86ab3024a48/blueprint/main-theorems/thm-critical-line-primitive.md) (Merten's blueprint) · [GRH, critical-strip form](https://github.com/chrisflav/riemann-blueprint/blob/137d97602647e450901981a7decfb86ab3024a48/blueprint/main-theorems/thm-critical-line.md) (Merten's blueprint) · [GRH, half-plane form](https://github.com/chrisflav/riemann-blueprint/blob/137d97602647e450901981a7decfb86ab3024a48/blueprint/main-theorems/thm-half-plane.md) (Merten's blueprint) · [The Riemann Hypothesis](https://github.com/chrisflav/riemann-blueprint/blob/137d97602647e450901981a7decfb86ab3024a48/blueprint/main-theorems/thm-riemann-hypothesis.md) (Merten's blueprint) · [The two zeta exports share a proof](https://github.com/nasqret/riemann-rev/blob/6ccea03b21e96b70356c07afb85a88d581b61e86/data/model.json#L1638) (Naskręcki's atlas) · [All-character half-plane theorem](https://github.com/nasqret/riemann-rev/blob/6ccea03b21e96b70356c07afb85a88d581b61e86/data/model.json#L1662) (Naskręcki's atlas) · [Primitive critical-line wrapper](https://github.com/nasqret/riemann-rev/blob/6ccea03b21e96b70356c07afb85a88d581b61e86/data/model.json#L1686) (Naskręcki's atlas) · [Three endpoint propositions](https://github.com/nasqret/riemann-rev/blob/6ccea03b21e96b70356c07afb85a88d581b61e86/data/model.json#L1713) (Naskręcki's atlas)

### Development.AutomorphicArithmetic.CharacterBoxes.ClaimStrip

4 import steps from Main · 104 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.CharacterBoxes.ClaimStrip)

**Derives the Dirichlet critical-line statement and the Riemann hypothesis from right-half-plane nonvanishing.**

Assume Dirichlet L-functions are nonzero for Re s > 1/2, except at s = 1 for the principal character. Nonvanishing Euler factors transfer a strip zero to the inducing primitive character, and the completed functional equation reflects it to a zero for the inverse character at 1 − s. This forces all Dirichlet L-function zeros in the open critical strip onto Re s = 1/2. The modulus-one case and the zeta functional equation yield the Riemann hypothesis, which is definitionally equivalent to Claim.Zeta. Supplements.Kernels.MainTheorems uses Claim.strip and Claim.zeta to assemble claimAll.

Key declarations:

- `Claim.prim_zero`: A zero in the open critical strip persists for the inducing primitive character.

  ```lean
  theorem prim_zero {N : ℕ} [NeZero N] (χ : DirichletCharacter ℂ N) [NeZero χ.conductor] {s : ℂ}
      (hs0 : 0 < s.re) (hs1 : s.re < 1) (h : DirichletCharacter.LFunction χ s = 0) :
      DirichletCharacter.LFunction χ.primitiveCharacter s = 0 := …
  ```
- `Claim.prim_reflect`: A strip zero at s for a primitive character gives a zero at 1 − s for its inverse character.

  ```lean
  theorem prim_reflect {M : ℕ} [NeZero M] (ψ : DirichletCharacter ℂ M) (hψ : ψ.IsPrimitive) {s : ℂ}
      (hs0 : 0 < s.re) (hs1 : s.re < 1) (h : DirichletCharacter.LFunction ψ s = 0) :
      DirichletCharacter.LFunction ψ⁻¹ (1 - s) = 0 := …
  ```
- `Claim.strip`: Right-half-plane nonvanishing forces every Dirichlet L-function zero in the open critical strip onto Re s = 1/2.

  ```lean
  theorem strip (h : HalfPlane) : Strip := …
  ```
- `Claim.zeta`: The same nonvanishing hypothesis puts every nontrivial zero of the Riemann zeta function on Re s = 1/2.

  ```lean
  theorem zeta (h : HalfPlane) : Zeta := …
  ```
- `Claim.zeta_iff`: Claim.Zeta is equivalent to the Riemann hypothesis by definitional equality.

  ```lean
  theorem zeta_iff : Zeta ↔ RiemannHypothesis := …
  ```

Blueprint: [GRH, critical-strip form](https://github.com/chrisflav/riemann-blueprint/blob/137d97602647e450901981a7decfb86ab3024a48/blueprint/main-theorems/thm-critical-line.md) (Merten's blueprint) · [The Riemann Hypothesis](https://github.com/chrisflav/riemann-blueprint/blob/137d97602647e450901981a7decfb86ab3024a48/blueprint/main-theorems/thm-riemann-hypothesis.md) (Merten's blueprint) · [Reflect an arbitrary character](https://github.com/nasqret/riemann-rev/blob/6ccea03b21e96b70356c07afb85a88d581b61e86/data/model.json#L1844) (Naskręcki's atlas) · [Remove imprimitive Euler factors](https://github.com/nasqret/riemann-rev/blob/6ccea03b21e96b70356c07afb85a88d581b61e86/data/model.json#L1872) (Naskręcki's atlas) · [Nonzero removed Euler factor](https://github.com/nasqret/riemann-rev/blob/6ccea03b21e96b70356c07afb85a88d581b61e86/data/model.json#L1899) (Naskręcki's atlas) · [Transfer a primitive zero to 1−s](https://github.com/nasqret/riemann-rev/blob/6ccea03b21e96b70356c07afb85a88d581b61e86/data/model.json#L1926) (Naskręcki's atlas) · [Zeta component of the conjunction](https://github.com/nasqret/riemann-rev/blob/6ccea03b21e96b70356c07afb85a88d581b61e86/data/model.json#L1953) (Naskręcki's atlas)

### Formalism.GammaFactorNonvanishing.CritLine

4 import steps from Main · 32 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Formalism.GammaFactorNonvanishing.CritLine)

**Derives the primitive Dirichlet critical-line theorem and the Riemann hypothesis from right-half-plane nonvanishing.**

Character parity reduces gamma-factor nonvanishing for Re s > 0 to that of the real gamma factor at s or s + 1. Assume all Dirichlet L-functions are nonzero for Re s > 1/2, except for the principal character at s = 1. A primitive character’s zero in the left half of the critical strip gives a completed L-function zero, which the functional equation reflects to 1 − s for the inverse character, contradicting the assumption. The modulus-one character gives the corresponding zeta nonvanishing and hence the Riemann hypothesis. MainTheorems applies these implications in critAll and rhOfAll.

Key declarations:

- `Formalism.VW.gammaFactor_ne_zero`: The gamma factor of any Dirichlet character is nonzero for Re s > 0.

  ```lean
  theorem Formalism.VW.gammaFactor_ne_zero {N : ℕ} (χ : DirichletCharacter ℂ N) {s : ℂ} (hs : 0 < s.re) : gammaFactor χ s ≠ 0 := …
  ```
- `Formalism.VW.critLine`: Under the stated nonvanishing hypothesis, every zero of a primitive Dirichlet L-function in 0 < Re s < 1 lies on Re s = 1/2.

  ```lean
  theorem Formalism.VW.critLine (h : UpperTheory.EveryCharacter) (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N) (hχ : χ.IsPrimitive) (s : ℂ)
      (h0 : 0 < s.re) (h1 : s.re < 1) (hz : LFunction χ s = 0) : s.re = 1 / 2 := …
  ```
- `Formalism.VW.rh_of_every`: The stated nonvanishing hypothesis implies the Riemann hypothesis.

  ```lean
  theorem Formalism.VW.rh_of_every (h : UpperTheory.EveryCharacter) : RiemannHypothesis := …
  ```

Blueprint: [GRH for primitive characters](https://github.com/chrisflav/riemann-blueprint/blob/137d97602647e450901981a7decfb86ab3024a48/blueprint/main-theorems/thm-critical-line-primitive.md) (Merten's blueprint) · [The Riemann Hypothesis](https://github.com/chrisflav/riemann-blueprint/blob/137d97602647e450901981a7decfb86ab3024a48/blueprint/main-theorems/thm-riemann-hypothesis.md) (Merten's blueprint) · [Specialize at modulus one](https://github.com/nasqret/riemann-rev/blob/6ccea03b21e96b70356c07afb85a88d581b61e86/data/model.json#L1737) (Naskręcki's atlas) · [Reflect a primitive character](https://github.com/nasqret/riemann-rev/blob/6ccea03b21e96b70356c07afb85a88d581b61e86/data/model.json#L1790) (Naskręcki's atlas) · [Gamma factors in the strip](https://github.com/nasqret/riemann-rev/blob/6ccea03b21e96b70356c07afb85a88d581b61e86/data/model.json#L1818) (Naskręcki's atlas)

### Development.AutomorphicArithmetic.CharacterBoxes.HalfPlane

5 import steps from Main · 10 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.CharacterBoxes.HalfPlane)

**Defines three propositions for Dirichlet L-function nonvanishing and the critical-line locations of Dirichlet and zeta zeros.**

Claim.HalfPlane states Dirichlet L-function nonvanishing for Re s > 1/2 except at s = 1 for the principal character. Claim.Strip places Dirichlet L-function zeros in the open critical strip on the critical line, and Claim.Zeta formulates the Riemann hypothesis. ClaimStrip uses Claim.HalfPlane as the hypothesis of separate implications to Claim.Strip and Claim.Zeta.

Key declarations:

- `Claim.HalfPlane`: For every Dirichlet character of positive modulus, its L-function is nonzero for Re s > 1/2, with the principal-character case at s = 1 excluded.

  ```lean
  def Claim.HalfPlane : Prop :=
    ∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N) (s : ℂ), 1 / 2 < s.re → (χ ≠ 1 ∨ s ≠ 1) → DirichletCharacter.LFunction χ s ≠ 0
  ```
- `Claim.Strip`: Every zero of a Dirichlet L-function of positive modulus in 0 < Re s < 1 lies on Re s = 1/2.

  ```lean
  def Claim.Strip : Prop :=
    ∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N) (s : ℂ), 0 < s.re → s.re < 1 → DirichletCharacter.LFunction χ s = 0 → s.re = 1 / 2
  ```
- `Claim.Zeta`: Every zero of the Riemann zeta function outside the negative even integers and s = 1 lies on Re s = 1/2.

  ```lean
  def Claim.Zeta : Prop :=
    ∀ s : ℂ, riemannZeta s = 0 → (¬ ∃ n : ℕ, s = -2 * (n + 1)) → s ≠ 1 → s.re = 1 / 2
  ```

Blueprint: [Non-vanishing right of the critical line](https://github.com/chrisflav/riemann-blueprint/blob/137d97602647e450901981a7decfb86ab3024a48/blueprint/main-theorems/def-nonvanishing-half-plane.md) (Merten's blueprint) · [The Riemann Hypothesis](https://github.com/chrisflav/riemann-blueprint/blob/137d97602647e450901981a7decfb86ab3024a48/blueprint/main-theorems/def-riemann-hypothesis.md) (Merten's blueprint) · [Zeros in the critical strip lie on the line](https://github.com/chrisflav/riemann-blueprint/blob/137d97602647e450901981a7decfb86ab3024a48/blueprint/main-theorems/def-zeros-on-line.md) (Merten's blueprint)

### Formalism.GammaFactorNonvanishing.RhOfRight

5 import steps from Main · 62 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Formalism.GammaFactorNonvanishing.RhOfRight)

**Derives the Riemann hypothesis from nonvanishing of ζ(s) for Re s > 1/2 away from s = 1.**

The assumed nonvanishing of ζ(s) for Re s > 1/2, s ≠ 1, rules out zeros to the right of the critical line. For a putative nontrivial zero s to the left, the proof evaluates the zeta functional equation at 1 − s and shows that every factor on its right-hand side is nonzero. A vanishing cosine would force s to be an even integer, and the condition Re s < 1/2, ζ(0) ≠ 0, and the exclusion of trivial zeros eliminate those cases. CritLine specializes its EveryCharacter hypothesis to the trivial character modulo 1 and rewrites the resulting L-function as ζ to apply the theorem.

Key declarations:

- `Formalism.VW.rh_of_right`: If ζ(s) is nonzero for every s with Re s > 1/2 and s ≠ 1, then every nontrivial zero of ζ lies on Re s = 1/2.

  ```lean
  theorem Formalism.VW.rh_of_right (hz : ∀ s : ℂ, 1 / 2 < s.re → s ≠ 1 → riemannZeta s ≠ 0) : RiemannHypothesis := …
  ```

Blueprint: [The Riemann Hypothesis](https://github.com/chrisflav/riemann-blueprint/blob/137d97602647e450901981a7decfb86ab3024a48/blueprint/main-theorems/thm-riemann-hypothesis.md) (Merten's blueprint) · [Reflect a zeta zero](https://github.com/nasqret/riemann-rev/blob/6ccea03b21e96b70356c07afb85a88d581b61e86/data/model.json#L1763) (Naskręcki's atlas)

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BOneSum

9 import steps from Main · 45 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BOneSum)

**Proves a weighted-sum formula for the first generalized Bernoulli number of a function whose values sum to zero.**

For a positive modulus N and a function Φ from the residue classes modulo N to a commutative ℚ-algebra, if the values of Φ sum to zero, then N times its first generalized Bernoulli number equals the sum of aΦ(a mod N) over a = 1, …, N. The proof reindexes the residue-class sum using these representatives and substitutes the first Bernoulli polynomial x − 1/2, whose constant term cancels by the zero-sum hypothesis. LemmaX applies the formula to an odd product of Dirichlet characters, and ResidualBernoulliNonvanishing uses it to evaluate a sum over units weighted by a nontrivial Dirichlet character.

Key declarations:

- `UpperTheory.V.Bern.b_one_sum`: For a positive modulus N, summing an additive-commutative-monoid-valued function over the residue classes modulo N gives the same result as summing its values on the representatives 1, …, N.

  ```lean
  private theorem UpperTheory.V.Bern.b_one_sum {R : Type} [AddCommMonoid R] {N : ℕ} [NeZero N] (Φ : ZMod N → R) :
      ∑ a ∈ Icc 1 N, Φ (a : ZMod N) = ∑ a : ZMod N, Φ a := …
  ```
- `UpperTheory.V.Bern.b_one`: For a positive modulus N and a function Φ from the residue classes modulo N to a commutative ℚ-algebra whose values sum to zero, N times its first generalized Bernoulli number equals the sum of aΦ(a mod N) over a = 1, …, N.

  ```lean
  theorem UpperTheory.V.Bern.b_one :
      ∀ {R : Type} [CommRing R] [Algebra ℚ R] {N : ℕ} [NeZero N] (Φ : ZMod N → R), ∑ a : ZMod N, Φ a = 0 → (N : R) * genB 1 Φ = ∑ a ∈ Icc 1 N, Φ (a : ZMod N) * (a : R) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Condmap

9 import steps from Main · 49 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Condmap)

**Proves that injective coefficient maps preserve Dirichlet character conductors and commute with passage to primitive characters.**

Composing a Dirichlet character of positive modulus with an injective homomorphism of commutative rings preserves its kernel on units and its conductor, and applies the homomorphism pointwise to the associated primitive character. The proof recovers the conductor from the divisors through which the character factors, as determined by its kernel, and compares primitive values by injectivity of inflation to the original modulus. Primmap uses the conductor and value identities to transport primitive generalized Bernoulli numbers, while ChrInvNeg and ZeNorm use conductor preservation to retain primitivity under coefficient maps.

Key declarations:

- `UpperTheory.V.Bern.b_condmap`: Composing a Dirichlet character of positive modulus with an injective homomorphism of commutative rings preserves its conductor and kernel on units and sends each primitive character value at a natural number to its image under the homomorphism.

  ```lean
  theorem UpperTheory.V.Bern.b_condmap :
      ∀ {R S : Type} [CommRing R] [CommRing S] {N : ℕ} [NeZero N] (f : R →+* S), Function.Injective f → ∀ χ : DirichletCharacter R N, DirichletCharacter.conductor (χ.ringHomComp f) = χ.conductor ∧ (∀ a : ℕ, primVal (χ.ringHomComp f) a = f (primVal χ a)) ∧ (χ.ringHomComp f).toUnitHom.ker = χ.toUnitHom.ker := …
  ```
- `change_level_value_eq`: For characters of the same modulus dividing a positive common modulus, if their inflations agree after applying a coefficient homomorphism to the first, then the second character's value at each natural number is the image of the first character's value.

  ```lean
  private theorem change_level_value_eq {R S : Type} [CommRing R] [CommRing S] {N : ℕ} [NeZero N] (f : R →+* S)
      {d e : ℕ} (hde : e = d) (hd : d ∣ N) (he : e ∣ N) (φ : DirichletCharacter R d) (ψ : DirichletCharacter S e)
      (h : DirichletCharacter.changeLevel he ψ = (DirichletCharacter.changeLevel hd φ).ringHomComp f) (a : ℕ) :
      ψ (a : ZMod e) = f (φ (a : ZMod d)) := …
  ```

### Development.AbelianVarietyTheory.Definitions.Foundations.CoPtMu

10 import steps from Main · 32 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AbelianVarietyTheory.Definitions.Foundations.CoPtMu)

**Defines two signed divisor-sum sequences, their Cauchy convolution, and a four-term smoothing.**

The two divisor sums retain factorizations s = uv for which p divides neither factor and subtract the contribution selected by −v from that selected by v, using congruences modulo N. The first multiplies the Dirichlet character modulo p^m evaluated at the signed quotient by that quotient raised to max(k−2, 0), while the second evaluates the inverse character on the correspondingly signed divisor. Their Cauchy convolution gives the sequence used in the four-term smoothing, which a direct importer identifies with the b = 1 specialization of its two-residue smoothing.

Key declarations:

- `GlobalTheory.KummerEisensteinGalois.ffMu`: Sums the difference of the contributions from v and −v in the class a modulo N, weighting each signed quotient by its character value times its power of exponent max(k−2, 0).

  ```lean
  def ffMu (N p m k : ℕ) (ψ : DirichletCharacter K (p ^ m)) (a : ℤ) (s : ℕ) : K :=
    ∑ d ∈ s.divisors, if ¬ p ∣ d ∧ ¬ p ∣ (s / d) then
      ((if ((s / d : ℕ) : ℤ) ≡ a [ZMOD N] then ψ ((s / d : ℕ) : ZMod (p ^ m)) * ((s / d : ℕ) : K) ^ (k - 2) else 0) -
       (if (-((s / d : ℕ) : ℤ)) ≡ a [ZMOD N] then ψ (-((s / d : ℕ) : ZMod (p ^ m))) * (-((s / d : ℕ) : K)) ^ (k - 2) else 0))
      else 0
  ```
- `GlobalTheory.KummerEisensteinGalois.eeMu`: Sums inverse-character values at u and subtracts those at −u, selecting each term by whether the corresponding signed quotient v or −v lies in the class b modulo N.

  ```lean
  def eeMu (N p m : ℕ) (ψ : DirichletCharacter K (p ^ m)) (b : ℤ) (s : ℕ) : K :=
    ∑ d ∈ s.divisors, if ¬ p ∣ d ∧ ¬ p ∣ (s / d) then
      ((if ((s / d : ℕ) : ℤ) ≡ b [ZMOD N] then ψ⁻¹ ((d : ℕ) : ZMod (p ^ m)) else 0) -
       (if (-((s / d : ℕ) : ℤ)) ≡ b [ZMOD N] then ψ⁻¹ (-((d : ℕ) : ZMod (p ^ m))) else 0))
      else 0
  ```
- `GlobalTheory.KummerEisensteinGalois.coPtMu`: Takes the Cauchy convolution of the two divisor-sum sequences associated to a and b.

  ```lean
  def coPtMu (N p m k : ℕ) (ψ : DirichletCharacter K (p ^ m)) (a b : ℤ) : ℕ → K :=
    cmul (ffMu N p m k ψ a) (eeMu N p m ψ b)
  ```
- `GlobalTheory.KummerEisensteinGalois.coPtS`: Forms a weighted alternating sum of the convolution at residue pairs (x, 1), (cx, 1), (x, d), and (cx, d), with weights built from powers of c and d and inverse-character values.

  ```lean
  def coPtS (N p m k : ℕ) (ψ : DirichletCharacter K (p ^ m)) (c d x : ℤ) (s : ℕ) : K :=
    (c : K) ^ 2 * (d : K) ^ 2 * coPtMu N p m k ψ x 1 s
      - (c : K) ^ ((3 : ℤ) - k) * ψ⁻¹ (c : ZMod (p ^ m)) * (d : K) ^ 2 * coPtMu N p m k ψ (c * x) 1 s
      - (c : K) ^ 2 * (d : K) * ψ⁻¹ (d : ZMod (p ^ m)) * coPtMu N p m k ψ x d s
      + (c : K) ^ ((3 : ℤ) - k) * ψ⁻¹ (c : ZMod (p ^ m)) * (d : K) * ψ⁻¹ (d : ZMod (p ^ m)) * coPtMu N p m k ψ (c * x) d s
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.MapGenBChar

10 import steps from Main · 66 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.MapGenBChar)

**Defines generalized Bernoulli numbers and proves their compatibility with coefficient maps and subalgebras.**

The degree-k generalized Bernoulli number of a function on residues modulo N is the sum of its values at a = 1, …, N weighted by N^(k−1) B_k(a/N). The primitive Bernoulli number and primitive L-function use the associated primitive character at its conductor. Ring homomorphisms between commutative ℚ-algebras preserve the rational weights and carry the sum to the sum for the mapped function, including for Dirichlet characters. The sum also lies in every ℚ-subalgebra containing the function values. BNzany uses coefficient compatibility to transport nonvanishing along an injective map.

Key declarations:

- `UpperTheory.V.Bern.genB`: Defines the degree-k generalized Bernoulli number as a sum over a = 1, …, N with weights N^(k−1) B_k(a/N).

  ```lean
  def genB {R : Type*} [CommRing R] [Algebra ℚ R] {N : ℕ} (k : ℕ) (Φ : ZMod N → R) : R :=
    ∑ a ∈ Icc 1 N, Φ (a : ZMod N) * algebraMap ℚ R (bcoef N k a)
  ```
- `UpperTheory.V.Bern.Bprim_eq`: Expresses the primitive generalized Bernoulli number as a weighted sum over a = 1, …, f, evaluating the associated primitive character at each a modulo its conductor f.

  ```lean
  theorem Bprim_eq {R : Type*} [CommRing R] [Algebra ℚ R] {N : ℕ} (k : ℕ) (χ : DirichletCharacter R N) :
      Bprim k χ = ∑ a ∈ Icc 1 χ.conductor, primVal χ a * algebraMap ℚ R (bcoef χ.conductor k a) := …
  ```
- `UpperTheory.V.Bern.map_genB`: Applying a ring homomorphism between commutative ℚ-algebras to a generalized Bernoulli number gives the number for the pointwise image of the function.

  ```lean
  theorem map_genB {R S : Type*} [CommRing R] [Algebra ℚ R] [CommRing S] [Algebra ℚ S] {N : ℕ} (f : R →+* S) (k : ℕ)
      (Φ : ZMod N → R) : f (genB k Φ) = genB k (fun a => f (Φ a)) := …
  ```
- `UpperTheory.V.Bern.map_genB_char`: The generalized Bernoulli number of a Dirichlet character composed with a ring homomorphism between commutative ℚ-algebras is the image of the original number.

  ```lean
  theorem map_genB_char {R S : Type*} [CommRing R] [Algebra ℚ R] [CommRing S] [Algebra ℚ S] {N : ℕ} (f : R →+* S) (k : ℕ)
      (χ : DirichletCharacter R N) : f (genB k χ) = genB k (χ.ringHomComp f : ZMod N → S) := …
  ```
- `UpperTheory.V.Bern.genB_mem`: The generalized Bernoulli number lies in any ℚ-subalgebra that contains every value of the function.

  ```lean
  theorem genB_mem {R : Type*} [CommRing R] [Algebra ℚ R] {N : ℕ} (k : ℕ) (Φ : ZMod N → R) (A : Subalgebra ℚ R)
      (h : ∀ a, Φ a ∈ A) : genB k Φ ∈ A := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primmem

10 import steps from Main · 54 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primmem)

**Proves subring membership and integrality for generalized Bernoulli numbers after clearing denominators.**

For a Dirichlet character of positive modulus N with values in a commutative ℚ-algebra, its primitive degree-k Bernoulli number lies in every ℚ-subalgebra containing its values on units. Multiplying by D = N·primorial(k+1) gives membership in every subring containing those values and makes both the primitive and original numbers integral over ℤ. The proof uses finite order on units and the divisibility of the conductor's denominator factor by way of its inclusion as a divisor of D. Prodint uses the integrality result for products, and PrimCase uses subring membership to place the scaled primitive number in a p-adic valuation ring.

Key declarations:

- `UpperTheory.V.Bern.b_primmem`: The primitive generalized Bernoulli number lies in every ℚ-subalgebra containing the character values on units, its multiple by N·primorial(k+1) lies in every subring containing those values, and the same factor makes both primitive and original numbers integral over ℤ.

  ```lean
  theorem UpperTheory.V.Bern.b_primmem :
      ∀ {R : Type} [CommRing R] [Algebra ℚ R] {N : ℕ} [NeZero N] (k : ℕ) (χ : DirichletCharacter R N), (∀ A : Subalgebra ℚ R, (∀ u : (ZMod N)ˣ, χ u ∈ A) → Bprim k χ ∈ A) ∧ (∀ A : Subring R, (∀ u : (ZMod N)ˣ, χ u ∈ A) → (den N k : R) * Bprim k χ ∈ A) ∧ IsIntegral ℤ ((den N k : R) * Bprim k χ) ∧ IsIntegral ℤ ((den N k : R) * genB k χ) := …
  ```
- `dirichletCharacter_unit_isIntegral`: The value of a Dirichlet character on a unit is integral over ℤ because raising it to the order of the unit gives 1.

  ```lean
  private theorem dirichletCharacter_unit_isIntegral {R : Type} [CommRing R] {N : ℕ} [NeZero N]
      (χ : DirichletCharacter R N) (u : (ZMod N)ˣ) : IsIntegral ℤ (χ u) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Sumval

10 import steps from Main · 30 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Sumval)

**Proves an elementary bound on the logarithmically weighted prime valuations of a nonzero integer.**

For a nonzero integer M, the proof identifies v_p(M) with the exponent of p in the factorization of |M| and bounds the sum of v_p(M) log p over any finite set of primes by the full factorization sum, log |M|, since all terms are nonnegative. ProdVal applies this inequality to the integer product of denominator-cleared primitive generalized Bernoulli numbers.

Key declarations:

- `UpperTheory.V.Bern.b_sumval`: For every nonzero integer M and finite set T of primes, the sum of v_p(M) log p over p in T is at most log |M|.

  ```lean
  theorem UpperTheory.V.Bern.b_sumval :
      ∀ (M : ℤ), M ≠ 0 → ∀ T : Finset ℕ, (∀ l ∈ T, l.Prime) → ∑ l ∈ T, (padicValInt l M : ℝ) * Real.log l ≤ Real.log |(M : ℝ)| := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.OddResidueBounds.ChiFacts

10 import steps from Main · 28 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.OddResidueBounds.ChiFacts)

**Proves injectivity, kernel parity, and Bernoulli coefficient ring membership for pulled-back Dirichlet characters.**

Pullback along a surjection ρ from the units modulo N onto Autℚ(E) is injective on O-valued unit characters, since evaluation on preimages recovers the original character. The pullback kernel contains ker ρ and contains −1 exactly when k is even if χ(−1) = (−1)^k. The subring membership theorem for scaled Bernoulli numbers puts den(N,k) times the kth Bernoulli number of the primitive character associated to χ in O. AtPrime uses the parity and kernel condition for membership in the prescribed character set and injectivity to reindex the sum over the image. PsiReal uses the ring membership to apply a valuation bound.

Key declarations:

- `UpperTheory.V.Odd.chiFacts`: For a number field E, a surjective ρ from the units modulo N onto Autℚ(E), and a ℤℓ-subalgebra O of an algebraic closure of ℚℓ, pullback of O-unit-valued characters is injective, the kernel of each parity-matching pullback contains ker ρ and contains −1 exactly when k is even, and the denominator-scaled kth Bernoulli number of the associated primitive character belongs to O for every k.

  ```lean
  theorem UpperTheory.V.Odd.chiFacts :
      ∀ (E : Type) [Field E] [NumberField E] (N : ℕ) [NeZero N] (ρ : (ZMod N)ˣ →* (E ≃ₐ[ℚ] E)), Function.Surjective ρ → ∀ (l : ℕ) [Fact l.Prime] (O : Subalgebra ℤ_[l] (PadicAlgCl l)), Function.Injective (fun ψ : (E ≃ₐ[ℚ] E) →* Oˣ => chiOf ρ ψ) ∧ ∀ (ψ : (E ≃ₐ[ℚ] E) →* Oˣ) (k : ℕ), (chiOf ρ ψ (-1) = (-1) ^ k → chiOf ρ ψ ∈ charSet (PadicAlgCl l) (parE ρ k)) ∧ ∃ a : O, (a : PadicAlgCl l) = alN k (chiOf ρ ψ) := …
  ```

### Development.AbelianVarietyTheory.Definitions.Foundations.SumMulCoPtSbEqSumInv

11 import steps from Main · 133 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AbelianVarietyTheory.Definitions.Foundations.SumMulCoPtSbEqSumInv)

**Defines a four-term smoothing and proves inversion and unit-scaling identities for its character-weighted sums.**

The smoothing combines convolution values at (a,b), (ca,b), (a,db), and (ca,db) and depends only on the classes of a and b modulo N. For nonzero N, the average sums values at (xδ,δ) over units δ modulo N with reciprocal weights. For weights from a Dirichlet character χ modulo N, inversion rewrites the average as a χ-weighted sum at (xδ⁻¹,δ⁻¹), and scaling both arguments by a unit t multiplies the average by χ(t). The direct importer ChiProj uses the same smoothing with weights χ(δ).

Key declarations:

- `GlobalTheory.LambdaValuationPowers.coPtSb`: Forms a weighted alternating sum of four convolution values by scaling the first residue by c, the second by d, or both.

  ```lean
  def coPtSb (N p m k : ℕ) (ψ : DirichletCharacter K (p ^ m)) (c d a b : ℤ) (s : ℕ) : K :=
    (c : K) ^ 2 * (d : K) ^ 2 * GlobalTheory.KummerEisensteinGalois.coPtMu N p m k ψ a b s
      - (c : K) ^ ((3 : ℤ) - k) * ψ⁻¹ (c : ZMod (p ^ m)) * (d : K) ^ 2 * GlobalTheory.KummerEisensteinGalois.coPtMu N p m k ψ (c * a) b s
      - (c : K) ^ 2 * (d : K) * ψ⁻¹ (d : ZMod (p ^ m)) * GlobalTheory.KummerEisensteinGalois.coPtMu N p m k ψ a (d * b) s
      + (c : K) ^ ((3 : ℤ) - k) * ψ⁻¹ (c : ZMod (p ^ m)) * (d : K) * ψ⁻¹ (d : ZMod (p ^ m)) *
          GlobalTheory.KummerEisensteinGalois.coPtMu N p m k ψ (c * a) (d * b) s
  ```
- `GlobalTheory.LambdaValuationPowers.coPtSb_congr`: Shows that the smoothed convolution is unchanged when either argument is replaced by a congruent integer modulo N.

  ```lean
  theorem coPtSb_congr (N p m k : ℕ) (ψ : DirichletCharacter K (p ^ m)) (c d : ℤ) {a a' b b' : ℤ} (ha : a ≡ a' [ZMOD N])
      (hb : b ≡ b' [ZMOD N]) : coPtSb N p m k ψ c d a b = coPtSb N p m k ψ c d a' b' := …
  ```
- `GlobalTheory.LambdaValuationPowers.chiAvg`: Sums the smoothed convolution at (xδ,δ) over units δ modulo N, with the reciprocal of the supplied weight at each unit.

  ```lean
  def chiAvg (N p m k : ℕ) [NeZero N] (ψ : DirichletCharacter K (p ^ m)) (χ : ℕ → K) (c d x : ℤ) (s : ℕ) : K :=
    ∑ δ : (ZMod N)ˣ, (χ (δ : ZMod N).val)⁻¹ * coPtSb N p m k ψ c d (x * ((δ : ZMod N).val : ℤ)) ((δ : ZMod N).val : ℤ) s
  ```
- `GlobalTheory.LambdaValuationPowers.chiAvg_eq_sum_inv`: Expresses the reciprocal-weighted average for χ as a χ-weighted sum with the smoothing evaluated at (xδ⁻¹,δ⁻¹).

  ```lean
  theorem chiAvg_eq_sum_inv (N p m k : ℕ) [NeZero N] (ψ : DirichletCharacter K (p ^ m)) (χ : DirichletCharacter K N)
      (c d x : ℤ) (s : ℕ) :
      chiAvg N p m k ψ (fun n => χ (n : ZMod N)) c d x s =
        ∑ δ : (ZMod N)ˣ, χ (δ : ZMod N) *
          coPtSb N p m k ψ c d (x * (((δ⁻¹ : (ZMod N)ˣ) : ZMod N).val : ℤ)) (((δ⁻¹ : (ZMod N)ˣ) : ZMod N).val : ℤ) s := …
  ```
- `GlobalTheory.LambdaValuationPowers.chiAvg_shift`: Shows that for a Dirichlet character χ modulo nonzero N, scaling both arguments of the smoothing by a unit t multiplies the reciprocal-weighted average by χ(t).

  ```lean
  theorem chiAvg_shift (N p m k : ℕ) [NeZero N] (ψ : DirichletCharacter K (p ^ m)) (χ : DirichletCharacter K N)
      (c d x : ℤ) (t : (ZMod N)ˣ) (s : ℕ) :
      ∑ δ : (ZMod N)ˣ, (χ (δ : ZMod N))⁻¹ * coPtSb N p m k ψ c d (((t : ZMod N).val : ℤ) * (x * ((δ : ZMod N).val : ℤ)))
          (((t : ZMod N).val : ℤ) * ((δ : ZMod N).val : ℤ)) s =
        χ (t : ZMod N) * chiAvg N p m k ψ (fun n => χ (n : ZMod N)) c d x s := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BNzC

11 import steps from Main · 70 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BNzC)

**Proves nonvanishing of generalized Bernoulli numbers for complex Dirichlet characters of matching parity.**

For a complex Dirichlet character χ of positive modulus with χ(−1) = (−1)^k, the primitive generalized Bernoulli number is nonzero for k ≥ 1, and the number at the original modulus is nonzero for k ≥ 2. The proof relates the primitive number to the L-value at 1−k and uses the functional equation and nonvanishing for the inverse primitive character at k. At the original modulus, each Euler factor is nonzero because the term subtracted from 1 has absolute value either 0 or p^(k−1) > 1. BNzany extends both conclusions to characteristic-zero fields.

Key declarations:

- `UpperTheory.V.Bern.b_nzC`: For a complex Dirichlet character χ of positive modulus with χ(−1) = (−1)^k and k ≥ 1, the degree-k primitive generalized Bernoulli number is nonzero, and the degree-k generalized Bernoulli number at the original modulus is nonzero when k ≥ 2.

  ```lean
  theorem UpperTheory.V.Bern.b_nzC :
      ∀ {N : ℕ} [NeZero N] (χ : DirichletCharacter ℂ N) (k : ℕ), 1 ≤ k → χ (-1) = (-1) ^ k → Bprim k χ ≠ 0 ∧ (2 ≤ k → genB k χ ≠ 0) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BNzany

11 import steps from Main · 43 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BNzany)

**Extends generalized Bernoulli nonvanishing for Dirichlet characters of matching parity to every characteristic-zero field.**

For a Dirichlet character χ of positive modulus over a characteristic-zero field with χ(−1) = (−1)^k, the primitive generalized Bernoulli number is nonzero for k ≥ 1, and the number at the original modulus is nonzero for k ≥ 2. The proof lifts χ to the algebraic closure of its coefficient field, descends the lifted character to an algebraic closure of ℚ, and applies the complex theorem via an embedding into ℂ. Field embeddings preserve and reflect the parity condition and both nonvanishing claims. PsiReal and ZeNorm use primitive nonvanishing over algebraic closures of p-adic fields.

Key declarations:

- `UpperTheory.V.Bern.b_nzany`: Over any characteristic-zero field, a Dirichlet character χ of positive modulus with χ(−1) = (−1)^k has a nonzero primitive generalized Bernoulli number for k ≥ 1 and a nonzero generalized Bernoulli number at the original modulus for k ≥ 2.

  ```lean
  theorem UpperTheory.V.Bern.b_nzany :
      ∀ {Ω : Type} [Field Ω] [CharZero Ω] {N : ℕ} [NeZero N] (χ : DirichletCharacter Ω N) (k : ℕ), 1 ≤ k → χ (-1) = (-1) ^ k → Bprim k χ ≠ 0 ∧ (2 ≤ k → genB k χ ≠ 0) := …
  ```
- `nz_iff`: A homomorphism between characteristic-zero fields preserves and reflects the equality χ(−1) = (−1)^k and the nonvanishing of both degree-k generalized Bernoulli numbers, at the conductor and at the original modulus.

  ```lean
  private theorem nz_iff {R S : Type} [Field R] [Algebra ℚ R] [Field S] [Algebra ℚ S] {N : ℕ} [NeZero N]
      (f : R →+* S) (χ : DirichletCharacter R N) (k : ℕ) :
      ((χ.ringHomComp f : DirichletCharacter S N) (-1) = (-1) ^ k ↔ χ (-1) = (-1) ^ k) ∧
      (Bprim k (χ.ringHomComp f : DirichletCharacter S N) ≠ 0 ↔ Bprim k χ ≠ 0) ∧
      (genB k (χ.ringHomComp f : ZMod N → S) ≠ 0 ↔ genB k χ ≠ 0) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Denchar

11 import steps from Main · 17 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Denchar)

**Proves that an explicit denominator factor puts a generalized Bernoulli number in every subring containing the input values.**

Multiplying the degree-k generalized Bernoulli number by N times the product of the primes up to k+1 makes each rational weight in its defining sum an integer, so every summand belongs to any subring containing the input values. Primmem applies this lemma at both the conductor and the original modulus to prove integrality over ℤ after denominator clearing.

Key declarations:

- `UpperTheory.V.Bern.b_denchar`: For a positive modulus N and a function from residues modulo N into a commutative ℚ-algebra, multiplying its degree-k generalized Bernoulli number by N·primorial(k+1) puts it in every subring containing the function's values.

  ```lean
  theorem UpperTheory.V.Bern.b_denchar :
      ∀ {R : Type} [CommRing R] [Algebra ℚ R] {N : ℕ} (k : ℕ) (Φ : ZMod N → R) (A : Subring R), 0 < N → (∀ a, Φ a ∈ A) → (den N k : R) * genB k Φ ∈ A := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Denint

11 import steps from Main · 26 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Denint)

**Proves that N times the primorial of k+1 clears the denominators of the degree-k Bernoulli weights at modulus N.**

The proof expands the Bernoulli polynomial and clears denominators term by term: the primorial of k+1 clears the denominators of the ordinary Bernoulli numbers through degree k, and the extra factor N turns each power N^(j−1) into N^j. Denchar applies this lemma to entire generalized Bernoulli sums, and ExistsIntHigherStickelbergerDenomSmul uses it to clear denominators in higher Stickelberger elements.

Key declarations:

- `UpperTheory.V.Bern.b_denint`: For every positive integer N and nonnegative integers k and a, multiplying the weight N^(k−1) B_k(a/N) by N times the product of the primes up to k+1 gives an integer.

  ```lean
  theorem UpperTheory.V.Bern.b_denint :
      ∀ (N k a : ℕ), 0 < N → ∃ z : ℤ, (den N k : ℚ) * bcoef N k a = z := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Parity

11 import steps from Main · 29 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Parity)

**Relates Dirichlet character parity to the kernel on units and shows that passage to the primitive character preserves parity.**

For a Dirichlet character χ over a characteristic-zero field, χ(−1) = (−1)^k is equivalent to the condition that −1 belongs to the kernel on units precisely for even k, and inflation from the conductor gives the same value at −1 for χ and its associated primitive character. Prodint uses the kernel criterion to check the parity of the characters in its product, and BNzC uses the primitive character's parity in the nonvanishing proof.

Key declarations:

- `UpperTheory.V.Bern.b_parity`: For a Dirichlet character χ of positive modulus over a characteristic-zero field, the condition that −1 belongs to the kernel on units exactly when k is even is equivalent to χ(−1) = (−1)^k, and the associated primitive character has the same value at −1 as χ.

  ```lean
  theorem UpperTheory.V.Bern.b_parity :
      ∀ {Ω : Type} [Field Ω] [CharZero Ω] {N : ℕ} [NeZero N] (k : ℕ) (χ : DirichletCharacter Ω N), (χ.toUnitHom.ker ∈ parKer N k ↔ χ (-1) = (-1) ^ k) ∧ (χ.primitiveCharacter (-1) = χ (-1)) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primeq

11 import steps from Main · 26 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primeq)

**Proves that the primitive Bernoulli number and primitive character values are invariant under raising the modulus.**

Injectivity of inflation from a fixed modulus shows that a primitive character has its original values and generalized Bernoulli number at the conductor, and that raising the modulus to any positive multiple preserves both primitive quantities. ZeNorm uses the primitive-character identity to replace the primitive Bernoulli number by the generalized Bernoulli number at the given modulus.

Key declarations:

- `UpperTheory.V.Bern.b_primeq`: For a positive-level Dirichlet character over a commutative ℚ-algebra, inflation to a positive multiple preserves the primitive Bernoulli number and primitive values, which for a primitive character agree with the generalized Bernoulli number and character values at the given modulus.

  ```lean
  theorem UpperTheory.V.Bern.b_primeq :
      ∀ {R : Type} [CommRing R] [Algebra ℚ R] {N : ℕ} [NeZero N] (k : ℕ) (χ : DirichletCharacter R N), (χ.IsPrimitive → Bprim k χ = genB k χ ∧ ∀ a : ℕ, primVal χ a = χ (a : ZMod N)) ∧ ∀ (M : ℕ) [NeZero M] (h : N ∣ M), Bprim k (DirichletCharacter.changeLevel h χ) = Bprim k χ ∧ ∀ a : ℕ, primVal (DirichletCharacter.changeLevel h χ) a = primVal χ a := …
  ```
- `key_primeq`: Two characters of the same modulus whose inflations to a common positive multiple agree have equal generalized Bernoulli numbers and equal values at every natural number.

  ```lean
  private theorem key_primeq {R : Type} [CommRing R] [Algebra ℚ R] {M c c' : ℕ} [NeZero M] (k : ℕ)
      (ψ : DirichletCharacter R c) (ψ' : DirichletCharacter R c') (e : c = c') (h : c ∣ M) (h' : c' ∣ M)
      (hψ : DirichletCharacter.changeLevel h ψ = DirichletCharacter.changeLevel h' ψ') :
      genB k (ψ : ZMod c → R) = genB k (ψ' : ZMod c' → R) ∧ ∀ a : ℕ, ψ (a : ZMod c) = ψ' (a : ZMod c') := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primmap

11 import steps from Main · 13 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primmap)

**Proves that primitive generalized Bernoulli numbers commute with injective coefficient maps.**

The proof compares the defining sums at the common conductor term by term: an injective coefficient map transports the primitive character values and preserves the rational Bernoulli weights. BNzany uses this identity to transfer primitive Bernoulli nonvanishing across field embeddings.

Key declarations:

- `UpperTheory.V.Bern.b_primmap`: For a Dirichlet character of positive modulus, applying an injective ring homomorphism between commutative ℚ-algebras to its degree-k primitive generalized Bernoulli number gives the corresponding number for the character composed with that homomorphism.

  ```lean
  theorem UpperTheory.V.Bern.b_primmap :
      ∀ {R S : Type} [CommRing R] [Algebra ℚ R] [CommRing S] [Algebra ℚ S] {N : ℕ} [NeZero N] (f : R →+* S), Function.Injective f → ∀ (k : ℕ) (χ : DirichletCharacter R N), f (Bprim k χ) = Bprim k (χ.ringHomComp f) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primval

11 import steps from Main · 18 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primval)

**Shows that every nonzero primitive character value is attained on a unit by the original Dirichlet character.**

The associated primitive character vanishes on nonunits, while every unit modulo the conductor lifts to a unit modulo the original modulus with the same character value. Primmem uses this fact to pass from membership of the original unit values in a subring or subalgebra to membership of all primitive character values.

Key declarations:

- `UpperTheory.V.Bern.b_primval`: For a Dirichlet character of positive modulus N over a commutative ring, each value of its associated primitive character is either zero or equal to the original character's value at some unit modulo N.

  ```lean
  theorem UpperTheory.V.Bern.b_primval :
      ∀ {R : Type} [CommRing R] {N : ℕ} [NeZero N] (χ : DirichletCharacter R N) (x : ZMod χ.conductor), χ.primitiveCharacter x = 0 ∨ ∃ u : (ZMod N)ˣ, χ.primitiveCharacter x = χ u := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BLprim

12 import steps from Main · 13 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BLprim)

**Gives the Bernoulli special-value formulas for a Dirichlet character and its associated primitive character.**

For every k ≥ 1, the L-value at 1−k is −1/k times the degree-k generalized Bernoulli number, both for the original character and for its associated primitive character, by applying the same formula at the original modulus and at the conductor. BNzC applies the first formula to the primitive character and uses the functional equation and the nonzero L-value of its inverse at k to deduce primitive Bernoulli nonvanishing.

Key declarations:

- `UpperTheory.V.Bern.b_lprim`: For a complex Dirichlet character χ of positive modulus and every k ≥ 1, L(1−k, χ) equals −genB(k, χ)/k, and the L-value of the associated primitive character at 1−k equals −Bprim(k, χ)/k.

  ```lean
  theorem UpperTheory.V.Bern.b_lprim :
      ∀ {N : ℕ} [NeZero N] (χ : DirichletCharacter ℂ N) (k : ℕ), 1 ≤ k → χ.LFunction (1 - k) = -genB k χ / k ∧ Lprim χ (1 - k) = -Bprim k χ / k := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BUpper

12 import steps from Main · 39 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BUpper)

**Bounds generalized Bernoulli numbers for complex-valued functions of modulus at most one.**

For a function Φ on residues modulo a positive integer N with |Φ(a)| ≤ 1, its degree-k generalized Bernoulli number has absolute value at most 4N^k k!/(2π)^k. The proof applies the bound for the Bernoulli polynomial on [0,1] to each of the N summands and uses the triangle inequality. Denupper multiplies this estimate by the denominator factor to bound the scaled Bernoulli numbers, and NormCharEvalHigherStickelbergerLe uses it to bound character evaluations of higher Stickelberger elements.

Key declarations:

- `UpperTheory.V.Bern.b_upper`: For every nonnegative integer k and positive modulus N, the degree-k generalized Bernoulli number of a complex-valued function bounded in absolute value by one is bounded in absolute value by 4N^k k!/(2π)^k.

  ```lean
  theorem UpperTheory.V.Bern.b_upper :
      ∀ {N : ℕ} (k : ℕ) (Φ : ZMod N → ℂ), 0 < N → (∀ a, ‖Φ a‖ ≤ 1) → ‖genB k Φ‖ ≤ 4 * (N : ℝ) ^ k * (k.factorial : ℝ) / (2 * Real.pi) ^ k := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Charbij

12 import steps from Main · 49 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Charbij)

**Proves a kernel-preserving bijection of Dirichlet characters under field embeddings when the source has the requisite roots of unity.**

Let N be positive and e the exponent of the unit group modulo N. If the source field contains a primitive e-th root of unity, a field embedding induces a bijection on Dirichlet characters whose kernels on units lie in any prescribed family of subgroups. Injectivity preserves the kernel, and surjectivity follows because the target character's values on units are e-th roots of unity and can be pulled back through the embedding. BNzany extends the values of its input character from the characteristic-zero field Ω to its algebraic closure and uses surjectivity to lift it along a chosen embedding from the algebraic closure of ℚ.

Key declarations:

- `UpperTheory.V.Bern.b_charbij`: For a field embedding whose source contains a primitive root of unity of order equal to the exponent of the unit group modulo N, composition bijects the source- and target-valued Dirichlet characters of positive modulus N whose kernels on units belong to a prescribed family.

  ```lean
  theorem UpperTheory.V.Bern.b_charbij :
      ∀ {N : ℕ} [NeZero N] {K Ω : Type} [Field K] [Field Ω] [HasEnoughRootsOfUnity K (Monoid.exponent (ZMod N)ˣ)] (f : K →+* Ω) (P : Set (Subgroup (ZMod N)ˣ)), Set.BijOn (fun χ : DirichletCharacter K N => (χ.ringHomComp f : DirichletCharacter Ω N)) (charSet K P) (charSet Ω P) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Expand

12 import steps from Main · 22 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Expand)

**Expands the scaled Bernoulli polynomial weight as a finite sum of ordinary Bernoulli numbers.**

Evaluating the monomial expansion of B_k at a/N and collecting powers of N gives the weight N^(k−1) B_k(a/N) as a sum with j-th term binom(k,j) B_j N^(j−1) a^(k−j). Denint uses this expansion to clear denominators term by term.

Key declarations:

- `UpperTheory.V.Bern.b_expand`: For every positive integer N and nonnegative integers k and a, the scaled Bernoulli weight N^(k−1) B_k(a/N) equals the sum of binom(k,j) B_j N^(j−1) a^(k−j) over j = 0, …, k.

  ```lean
  theorem UpperTheory.V.Bern.b_expand :
      ∀ (N k a : ℕ), 0 < N → bcoef N k a = ∑ j ∈ range (k + 1), (k.choose j : ℚ) * bernoulli j * (N : ℚ) ^ ((j : ℤ) - 1) * (a : ℚ) ^ (k - j) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.FeLFunctionConstMul

12 import steps from Main · 81 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.FeLFunctionConstMul)

**Specializes the Dirichlet L-function functional equation to an absolute-value identity at integers of matching parity.**

For a primitive complex Dirichlet character χ of conductor N and an integer k ≥ 1 with χ(−1) = (−1)^k, the identity expresses |L(1−k, χ)| as 2(k−1)!N^(k−1/2)/(2π)^k times |L(k, χ⁻¹)|. The proof substitutes the finite Fourier transforms of χ and χ composed with negation into the functional equation, combines the two phases using parity, and uses Γ(k) = (k−1)! and the Gauss sum magnitude √N. BNzC uses the identity to transfer nonvanishing at k to the primitive special value at 1−k.

Key declarations:

- `UpperTheory.V.Bern.b_fe`: If χ is a primitive complex Dirichlet character of positive conductor N and k ≥ 1 satisfies χ(−1) = (−1)^k, then |L(1−k, χ)| = 2(k−1)!N^(k−1/2)/(2π)^k · |L(k, χ⁻¹)|.

  ```lean
  theorem UpperTheory.V.Bern.b_fe :
      ∀ {N : ℕ} [NeZero N] (χ : DirichletCharacter ℂ N) (k : ℕ), χ.IsPrimitive → 1 ≤ k → χ (-1) = (-1) ^ k → ‖χ.LFunction (1 - k)‖ = 2 * ((k - 1).factorial : ℝ) * (N : ℝ) ^ ((k : ℝ) - 1 / 2) / (2 * Real.pi) ^ k * ‖χ⁻¹.LFunction k‖ := …
  ```
- `fe_LFunction_const_mul`: Multiplying a complex-valued function on residues modulo a positive integer by a scalar multiplies its associated L-function by that scalar at every complex argument.

  ```lean
  private lemma fe_LFunction_const_mul {N : ℕ} [NeZero N] (c : ℂ) (Φ : ZMod N → ℂ) (s : ℂ) :
      ZMod.LFunction (fun j => c * Φ j) s = c * ZMod.LFunction Φ s := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.GeneralizedBernoulliChangeLevel

12 import steps from Main · 60 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.GeneralizedBernoulliChangeLevel)

**Proves the Euler-factor formula for generalized Bernoulli numbers under inflation to a multiple of the modulus.**

For k ≥ 1, inflating a Dirichlet character χ from modulus N to a positive multiple M multiplies its degree-k generalized Bernoulli number by the product of 1 − χ(p)p^(k−1) over primes p dividing M. The proof iterates the one-prime formula along the factorization of M/N: a prime already dividing the intermediate modulus contributes no new factor, while a new prime retains its original character value. Primlevel applies the formula to inflation from the conductor to the given modulus.

Key declarations:

- `UpperTheory.V.Bern.b_level`: For a Dirichlet character χ over a commutative ℚ-algebra, k ≥ 1, and a positive multiple M of its modulus, inflation to M multiplies the generalized Bernoulli number by the product of 1 − χ(p)p^(k−1) over the distinct prime divisors of M.

  ```lean
  theorem UpperTheory.V.Bern.b_level :
      ∀ {R : Type} [CommRing R] [Algebra ℚ R] {N M : ℕ} (h : N ∣ M) (k : ℕ) (χ : DirichletCharacter R N), 0 < M → 1 ≤ k → genB k (DirichletCharacter.changeLevel h χ : ZMod M → R) = genB k χ * ∏ p ∈ M.primeFactors, (1 - χ (p : ZMod N) * (p : R) ^ (k - 1)) := …
  ```
- `UpperTheory.V.Bern.generalized_bernoulli_change_level`: For positive N and m and k ≥ 1, the generalized Bernoulli number after inflation from N to M = Nm equals the original number times the product of 1 − χ(p)p^(k−1) over the distinct primes dividing M.

  ```lean
  private theorem UpperTheory.V.Bern.generalized_bernoulli_change_level {R : Type} [CommRing R] [Algebra ℚ R] {N : ℕ} (k : ℕ)
      (χ : DirichletCharacter R N) (hN : 0 < N) (hk : 1 ≤ k) (m : ℕ) :
      0 < m → ∀ (M : ℕ) (h : N ∣ M), M = N * m →
        genB k (DirichletCharacter.changeLevel h χ : ZMod M → R)
          = genB k χ * ∏ p ∈ M.primeFactors, (1 - χ (p : ZMod N) * (p : R) ^ (k - 1)) := …
  ```
- `UpperTheory.V.Bern.level_zero`: A Dirichlet character vanishes at every prime dividing its modulus.

  ```lean
  private theorem UpperTheory.V.Bern.level_zero {R : Type} [CommRing R] {N p : ℕ} (χ : DirichletCharacter R N)
      (hp : p.Prime) (hpN : p ∣ N) : χ (p : ZMod N) = 0 := …
  ```
- `UpperTheory.V.Bern.level_val`: Inflation from N to a multiple M preserves the character value at every prime that does not divide M.

  ```lean
  private theorem UpperTheory.V.Bern.level_val {R : Type} [CommRing R] {N M p : ℕ} (h : N ∣ M)
      (χ : DirichletCharacter R N) (hp : p.Prime) (hpM : ¬ p ∣ M) :
      DirichletCharacter.changeLevel h χ (p : ZMod M) = χ (p : ZMod N) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primden

12 import steps from Main · 38 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primden)

**Proves that the product of the primes up to k+1 clears the denominators of all ordinary Bernoulli numbers through index k.**

The proof uses von Staudt–Clausen at even indices, since each prime contributing to the denominator of B_j satisfies p−1 ∣ j and p ≤ j+1, and handles odd indices using B_1 = −1/2 and vanishing for odd j > 1. Denint uses this common denominator to clear the ordinary Bernoulli coefficients in the expansion of the scaled Bernoulli polynomial weights.

Key declarations:

- `UpperTheory.V.Bern.b_primden`: For nonnegative integers j ≤ k, multiplying B_j by the product of all primes up to k+1 gives an integer.

  ```lean
  theorem UpperTheory.V.Bern.b_primden :
      ∀ (k j : ℕ), j ≤ k → ∃ z : ℤ, (primorial (k + 1) : ℚ) * bernoulli j = z := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primlevel

12 import steps from Main · 13 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Primlevel)

**Expresses a generalized Bernoulli number as its primitive counterpart times a product of Euler factors.**

Applying the change-of-modulus formula to inflation from the conductor to the given modulus N gives one factor 1 − χ*(p)p^(k−1) for each distinct prime p dividing N, where χ* is the associated primitive character. BNzC uses this factorization to extend primitive nonvanishing to the original modulus for k ≥ 2.

Key declarations:

- `UpperTheory.V.Bern.b_primlevel`: For a Dirichlet character χ of positive modulus N over a commutative ℚ-algebra and k ≥ 1, the degree-k generalized Bernoulli number equals its primitive counterpart times the product of 1 − χ*(p)p^(k−1) over the distinct primes p dividing N.

  ```lean
  theorem UpperTheory.V.Bern.b_primlevel :
      ∀ {R : Type} [CommRing R] [Algebra ℚ R] {N : ℕ} (k : ℕ) (χ : DirichletCharacter R N), 0 < N → 1 ≤ k → genB k χ = Bprim k χ * ∏ p ∈ N.primeFactors, (1 - primVal χ p * (p : R) ^ (k - 1)) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.StickelbergerCharacterEval.GroupRingCharEvalStickelbergerYNeZeroOfParity

12 import steps from Main · 29 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.StickelbergerCharacterEval.GroupRingCharEvalStickelbergerYNeZeroOfParity)

**Factors the character evaluation of the modified Stickelberger element and proves nonvanishing for parity-matching complex characters.**

For N ≥ 2 and a coprime to N, write η for the Dirichlet character given on units by the inverse of χ pulled back along π. The evaluation formula multiplies the unmodified Stickelberger evaluation −Bₖ(η)/k by 1 − aᵏη(a), with Bₖ(η) the generalized Bernoulli number at level N and division by zero taken as zero. For complex χ and a, k ≥ 2, matching parity gives Bernoulli nonvanishing, and |η(a)| = 1 gives |aᵏη(a)| > 1. Detint uses this nonvanishing in a determinant product, while NormCharEvalHigherStickelbergerLe uses the factorization to bound the absolute value of the evaluation.

Key declarations:

- `UpperTheory.V.B5.groupRingCharEval_stickelbergerY_eq_euler_mul_genBernoulli`: For N ≥ 2, a coprime to N and every natural k, the character evaluation of the modified Stickelberger element over any characteristic-zero field is (1 − aᵏη(a))(−Bₖ(η)/k), where η is the Dirichlet character given on units by the inverse pullback of χ along π and division by zero is zero.

  ```lean
  theorem UpperTheory.V.B5.groupRingCharEval_stickelbergerY_eq_euler_mul_genBernoulli :
      ∀ {Ω : Type} [Field Ω] [CharZero Ω] {N : ℕ} [NeZero N] {Γ : Type} [CommGroup Γ] (π : (ZMod N)ˣ →* Γ) (χ : Γ →* Ωˣ) (a : ℕ) (ha : a.Coprime N) (k : ℕ), 2 ≤ N → ev ℚ χ (yEl k a ha π) = (1 - (a : Ω) ^ k * dirOf π χ (a : ZMod N)) * (-genB k (dirOf π χ) / k) := …
  ```
- `UpperTheory.V.B5.groupRingCharEval_stickelbergerY_ne_zero_of_parity`: For N, a, k ≥ 2 with a coprime to N, the evaluation of the modified Stickelberger element at a complex character χ is nonzero whenever χ(π(−1)) = (−1)ᵏ.

  ```lean
  theorem UpperTheory.V.B5.groupRingCharEval_stickelbergerY_ne_zero_of_parity :
      ∀ {N : ℕ} [NeZero N] {Γ : Type} [CommGroup Γ] (π : (ZMod N)ˣ →* Γ) (χ : Γ →* ℂˣ) (a : ℕ) (ha : a.Coprime N) (k : ℕ), 2 ≤ N → 2 ≤ a → 2 ≤ k → ((χ (π (-1)) : ℂˣ) : ℂ) = (-1) ^ k → ev ℚ χ (yEl k a ha π) ≠ 0 := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BLval

13 import steps from Main · 40 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BLval)

**Evaluates the L-function of a complex-valued residue-class function at nonpositive integers using generalized Bernoulli numbers.**

For a function Φ on residues modulo a positive integer N and k ≥ 1, its L-value at 1−k equals −genB(k, Φ)/k. The proof writes this L-value as N^(k−1) times the sum of Φ(a) ζ(1−k, a/N) over a = 1, …, N and substitutes ζ(1−k, a/N) = −B_k(a/N)/k, treating k = 1 with the value at zero and k > 1 with the negative-integer formula. BLprim applies the identity to a Dirichlet character and its associated primitive character.

Key declarations:

- `UpperTheory.V.Bern.b_lval`: For every complex-valued function Φ on residues modulo a positive integer and every k ≥ 1, its associated L-function at 1−k equals −1/k times its degree-k generalized Bernoulli number.

  ```lean
  theorem UpperTheory.V.Bern.b_lval :
      ∀ {N : ℕ} [NeZero N] (Φ : ZMod N → ℂ) (k : ℕ), 1 ≤ k → ZMod.LFunction Φ (1 - k) = -genB k Φ / k := …
  ```
- `hurwitzZeta_one_sub_eq_bernoulli`: For k ≥ 1 and 0 < x ≤ 1, the Hurwitz zeta value at 1−k with parameter x equals −B_k(x)/k.

  ```lean
  private theorem hurwitzZeta_one_sub_eq_bernoulli (k : ℕ) (hk : 1 ≤ k) (x : ℝ) (h0 : 0 < x) (h1 : x ≤ 1) :
      HurwitzZeta.hurwitzZeta (x : UnitAddCircle) (1 - k) =
        -1 / k * ((Polynomial.bernoulli k).map (algebraMap ℚ ℂ)).eval (x : ℂ) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BRaabe

13 import steps from Main · 48 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BRaabe)

**Proves Raabe’s distribution formula for scaled Bernoulli polynomial values.**

The theorem expresses N^(k−1) B_k(a/N) as the sum of the corresponding scaled values at level Nm over the arguments a+jN for 0 ≤ j < m. The proof factors exp(Nm t)−1 as a geometric sum times exp(Nt)−1, applies the exponential generating function over the rationals, and extracts the coefficient of t^k. The identity is used to prove invariance of generalized Bernoulli sums under pullback to a multiple modulus and to compare sums over unit classes when raising the modulus by a power of a prime that already divides it.

Key declarations:

- `UpperTheory.V.Bern.b_raabe`: For positive integers N and m and nonnegative integers k and a, bcoef(N,k,a) equals the sum of bcoef(Nm,k,a+jN) over 0 ≤ j < m.

  ```lean
  theorem UpperTheory.V.Bern.b_raabe :
      ∀ (N m k a : ℕ), 0 < N → 0 < m → bcoef N k a = ∑ j ∈ range m, bcoef (N * m) k (a + j * N) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.DirichletCharacterLevelRaising

13 import steps from Main · 60 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.DirichletCharacterLevelRaising)

**Proves the Euler-factor formula for generalized Bernoulli numbers when a Dirichlet character’s modulus is multiplied by a prime.**

For k ≥ 1, inducing a Dirichlet character χ from modulus N to Np multiplies its kth generalized Bernoulli number by 1 − χ(p)p^(k−1). The proof starts with the Bernoulli sum for the pullback along reduction modulo N, subtracts the terms at multiples of p, and reindexes them by a = pb. Character multiplicativity and the scaling of Bernoulli coefficients give the correction factor. The formula supplies the induction step for the product formula at arbitrary multiple moduli.

Key declarations:

- `UpperTheory.V.Bern.b_step`: For N > 0, p prime, and k ≥ 1, the kth generalized Bernoulli number of the character induced from χ modulo N to modulus Np is (1 − χ(p)p^(k−1)) times that of χ.

  ```lean
  theorem UpperTheory.V.Bern.b_step :
      ∀ {R : Type} [CommRing R] [Algebra ℚ R] {N p : ℕ} (k : ℕ) (χ : DirichletCharacter R N), 0 < N → p.Prime → 1 ≤ k → genB k (DirichletCharacter.changeLevel (dvd_mul_right N p) χ : ZMod (N * p) → R) = (1 - χ (p : ZMod N) * (p : R) ^ (k - 1)) * genB k χ := …
  ```
- `valuation_power_identity`: The character induced to modulus Np is obtained from the pullback of χ by setting its values at multiples of p to zero.

  ```lean
  private theorem valuation_power_identity {R : Type} [CommRing R] {N p : ℕ} (χ : DirichletCharacter R N) (hp : p.Prime) (a : ℕ) :
      DirichletCharacter.changeLevel (dvd_mul_right N p) χ (a : ZMod (N * p))
        = χ (a : ZMod N) - if p ∣ a then χ (a : ZMod N) else 0 := …
  ```
- `sum_divisible_eq_sum_mul`: For p > 0, the sum of f(a) over multiples of p in [1,Np] equals the sum of f(pb) over b in [1,N].

  ```lean
  private theorem sum_divisible_eq_sum_mul {R : Type} [AddCommMonoid R] {N p : ℕ} (hp : 0 < p) (f : ℕ → R) :
      ∑ a ∈ Icc 1 (N * p), (if p ∣ a then f a else 0) = ∑ b ∈ Icc 1 N, f (p * b) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.GaussMulGaussInv

13 import steps from Main · 38 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.GaussMulGaussInv)

**Proves that a primitive Dirichlet character modulo N has Gauss sum of absolute value √N and root number of absolute value 1.**

Applying the finite Fourier transform twice and evaluating at 1 gives τ(χ)τ(χ⁻¹) = χ(−1)N for primitive χ. Complex conjugation in the Gauss sum gives the sum for the inverse character with the additive character reversed, producing the factor χ(−1). Together these identities give |τ(χ)|² = N, and the root-number normalization gives absolute value 1. The Gauss sum magnitude is used to evaluate the absolute-value factor in the Dirichlet L-function functional equation at 1−k.

Key declarations:

- `gauss_mul_gauss_inv`: For primitive χ modulo N, the standard Gauss sums satisfy τ(χ)τ(χ⁻¹)χ(−1) = N.

  ```lean
  private theorem gauss_mul_gauss_inv {N : ℕ} [NeZero N] (χ : DirichletCharacter ℂ N) (hχ : χ.IsPrimitive) :
      gaussSum χ ZMod.stdAddChar * gaussSum χ⁻¹ ZMod.stdAddChar * χ (-1) = N := …
  ```
- `conj_gauss`: For any complex Dirichlet character χ modulo N, the complex conjugate of τ(χ) is χ(−1)τ(χ⁻¹).

  ```lean
  private theorem conj_gauss {N : ℕ} [NeZero N] (χ : DirichletCharacter ℂ N) :
      (starRingEnd ℂ) (gaussSum χ ZMod.stdAddChar) = gaussSum χ⁻¹ ZMod.stdAddChar * χ (-1) := …
  ```
- `UpperTheory.V.Bern.b_gauss`: For primitive χ modulo N, the standard Gauss sum has absolute value √N and the root number has absolute value 1.

  ```lean
  theorem UpperTheory.V.Bern.b_gauss :
      ∀ {N : ℕ} [NeZero N] (χ : DirichletCharacter ℂ N), χ.IsPrimitive → ‖gaussSum χ ZMod.stdAddChar‖ = Real.sqrt N ∧ ‖χ.rootNumber‖ = 1 := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Polybound

13 import steps from Main · 68 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Polybound)

**Proves the uniform bound |B_k(x)| ≤ 4k!/(2π)^k for rational x in [0,1] and every k ≥ 0.**

For k ≥ 2 and real x in [0,1], the proof pairs opposite frequencies in the Fourier expansion of B_k(x) and uses the unit modulus of each Fourier character to bound the normalized series by 2ζ(2) = π²/3 < 4. Agreement of rational and real polynomial evaluation transfers the estimate to rational inputs, and direct evaluation handles k = 0 and k = 1. The bound is applied term by term to generalized Bernoulli sums with complex weights of absolute value at most one.

Key declarations:

- `UpperTheory.V.Bern.b_polybound`: For every k ≥ 0 and rational x in [0,1], the Bernoulli polynomial satisfies |B_k(x)| ≤ 4k!/(2π)^k.

  ```lean
  theorem UpperTheory.V.Bern.b_polybound :
      ∀ (k : ℕ) (x : ℚ), 0 ≤ x → x ≤ 1 → |(((Polynomial.bernoulli k).eval x : ℚ) : ℝ)| ≤ 4 * (k.factorial : ℝ) / (2 * Real.pi) ^ k := …
  ```
- `polybound_big`: For k ≥ 2 and real x in [0,1], the normalized value (2π)^k |B_k(x)|/k! is at most 4.

  ```lean
  private theorem polybound_big {k : ℕ} (hk : 2 ≤ k) {x : ℝ} (hx : x ∈ Set.Icc (0 : ℝ) 1) :
      (2 * Real.pi) ^ k / (k.factorial : ℝ) * |bernoulliFun k x| ≤ 4 := …
  ```
- `polybound_norm_fourier`: Every integer-frequency Fourier character on the unit circle has absolute value one.

  ```lean
  private theorem polybound_norm_fourier (n : ℤ) (y : UnitAddCircle) : ‖fourier n y‖ = 1 := …
  ```
- `polybound_cast`: Evaluating a Bernoulli polynomial at a rational argument and embedding the result in the reals agrees with real evaluation.

  ```lean
  private theorem polybound_cast (k : ℕ) (x : ℚ) :
      (((Polynomial.bernoulli k).eval x : ℚ) : ℝ) = bernoulliFun k (x : ℝ) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Sumicc

13 import steps from Main · 34 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Sumicc)

**Proves an elementary reindexing lemma for sums over residue classes modulo a positive integer.**

Reduction modulo N identifies the integers 1 through N with the residue classes modulo N, using N as the representative of zero and the least positive representative for every other class. The reindexing is used in the Bernoulli formula for L-values at 1−k, in rewriting generalized Bernoulli sums over units, and in evaluating Stickelberger elements at characters.

Key declarations:

- `UpperTheory.V.Bern.b_sumicc`: For N > 0 and any additive commutative monoid M, summing a function G from ℤ/Nℤ to M over the reductions of 1 through N equals summing G over all residue classes.

  ```lean
  theorem UpperTheory.V.Bern.b_sumicc :
      ∀ {M : Type} [AddCommMonoid M] {N : ℕ} [NeZero N] (G : ZMod N → M), ∑ a ∈ Icc 1 N, G (a : ZMod N) = ∑ a : ZMod N, G a := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.StickelbergerCharacterEval.Chitheta

13 import steps from Main · 36 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.StickelbergerCharacterEval.Chitheta)

**Evaluates the higher Stickelberger element at a character in terms of a generalized Bernoulli number.**

The evaluation at χ is −Bₖ(η)/k, where η is the pullback of χ⁻¹ along π, extended by zero on nonunits. The proof reindexes the Bernoulli sum over 1 through N as a sum over residue classes modulo N, then restricts it to units using that vanishing. The identity supplies the Bernoulli factor in the evaluation formula for the modified Stickelberger element.

Key declarations:

- `UpperTheory.V.B5.groupRingCharEval_stickelbergerTheta_eq_neg_genBernoulli`: For N ≥ 2, a homomorphism π from the units modulo N to an abelian group, and a character χ of that group over a characteristic-zero field, evaluation of the kth Stickelberger element at χ equals −Bₖ(η)·k⁻¹, where η is the Dirichlet character extending χ⁻¹ ∘ π and the formula uses 0⁻¹ = 0.

  ```lean
  theorem UpperTheory.V.B5.groupRingCharEval_stickelbergerTheta_eq_neg_genBernoulli :
      ∀ {Ω : Type} [Field Ω] [CharZero Ω] {N : ℕ} [NeZero N] {Γ : Type} [CommGroup Γ] (π : (ZMod N)ˣ →* Γ) (χ : Γ →* Ωˣ) (k : ℕ), 2 ≤ N → ev ℚ χ (thetaEl k π) = -genB k (dirOf π χ) / k := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.StickelbergerElements.StickelbergerBernoulliCoeffExpansionModDenominat

13 import steps from Main · 46 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.StickelbergerElements.StickelbergerBernoulliCoeffExpansionModDenominat)

**Expands the normalized Stickelberger Bernoulli coefficient into two power terms with an explicit denominator bound for the remainder.**

For positive integers M and k and a nonnegative integer b, the degree-k coefficient divided by k is b^k/(kM) − b^(k−1)/2 modulo integer multiples of 2M/dk(k). The proof isolates the B₀ and B₁ terms in the Bernoulli polynomial expansion and clears the remaining Bernoulli denominators with the product of primes at most k+1. GenBUnits and TwistedBernoulliValueCongrPowMulFirst apply the expansion at pairs of residues to prove congruences for combinations of coefficients.

Key declarations:

- `UpperTheory.V.Stk.stickelbergerBernoulliCoeff_expansion_mod_denominator`: For integers M, k ≥ 1 and b ≥ 0, bcoef(M,k,b)/k equals b^k/(kM) − b^(k−1)/2 + (2M/dk(k))z for some integer z, where dk(k) is 2k times the product of primes at most k+1.

  ```lean
  theorem UpperTheory.V.Stk.stickelbergerBernoulliCoeff_expansion_mod_denominator :
      ∀ (M e b : ℕ), 0 < M → ∃ z : ℤ,
        bcoef M (e + 1) b / ((e + 1 : ℕ) : ℚ) =
          (b : ℚ) ^ (e + 1) / (((e + 1 : ℕ) : ℚ) * M) - (b : ℚ) ^ e / 2 + 2 * (M : ℚ) / (dk (e + 1) : ℚ) * z := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Bcoef

14 import steps from Main · 25 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Bcoef)

**Proves the exponential generating function for scaled Bernoulli polynomial values.**

For natural numbers N > 0 and a ≥ 0, the formal series with coefficients N^(k−1) B_k(a/N)/k! becomes t exp(at) after multiplication by exp(Nt)−1. The proof substitutes Nt for t in the Bernoulli polynomial generating identity at a/N and divides the resulting series by N. This identity is used to prove Raabe’s distribution formula.

Key declarations:

- `UpperTheory.V.Bern.b_egf`: For integers N > 0 and a ≥ 0, the exponential generating series of N^(k−1) B_k(a/N), multiplied by exp(Nt)−1, equals t exp(at) as a formal power series over ℚ.

  ```lean
  theorem UpperTheory.V.Bern.b_egf :
      ∀ (N a : ℕ), 0 < N → (PowerSeries.mk fun k => bcoef N k a / (k.factorial : ℚ)) * (PowerSeries.rescale (N : ℚ) (PowerSeries.exp ℚ) - 1) = PowerSeries.X * PowerSeries.rescale (a : ℚ) (PowerSeries.exp ℚ) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BernoulliPolyReflection

14 import steps from Main · 36 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BernoulliPolyReflection)

**Proves translation, scaling, and reflection identities for scaled Bernoulli polynomial values.**

For N > 0, write C(N,k,a) = N^(k−1) B_k(a/N). Translating a by N adds k a^(k−1), with zero increment at k = 0, and reflecting a to N−a for 0 ≤ a ≤ N multiplies the value by (−1)^k. These identities follow from the translation and reflection formulas for B_k, while scaling N and a by the same positive integer m fixes a/N and contributes a factor of m^(k−1). The scaling identity is used to derive the Euler factor when a Dirichlet character’s modulus is multiplied by a prime.

Key declarations:

- `UpperTheory.V.Bern.b_shift`: For N > 0, shifting a by N adds k a^(k−1) for k ≥ 1 and zero for k = 0, scaling N and a by m > 0 multiplies C(N,k,a) by m^(k−1), and reflecting a to N−a for a ≤ N multiplies it by (−1)^k.

  ```lean
  theorem UpperTheory.V.Bern.b_shift :
      ∀ (N k a : ℕ), 0 < N → bcoef N k (a + N) = bcoef N k a + (k : ℚ) * (a : ℚ) ^ (k - 1) ∧ (∀ m : ℕ, 0 < m → bcoef (m * N) k (m * a) = (m : ℚ) ^ ((k : ℤ) - 1) * bcoef N k a) ∧ (a ≤ N → bcoef N k (N - a) = (-1) ^ k * bcoef N k a) := …
  ```
- `bernoulli_poly_reflection`: For rational x and k ≥ 0, B_k(1−x) = (−1)^k B_k(x).

  ```lean
  private theorem bernoulli_poly_reflection (k : ℕ) (x : ℚ) :
      (Polynomial.bernoulli k).eval (1 - x) = (-1) ^ k * (Polynomial.bernoulli k).eval x := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Hurzero

14 import steps from Main · 36 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Hurzero)

**Proves that the Hurwitz zeta function satisfies ζ(0,x) = 1/2 − x for 0 < x ≤ 1.**

For Re s > 1, a series with a telescoping correction represents ζ(s,x) − ζ(s,1) − (1−x). The common pole terms at s = 1 cancel, and the identity theorem extends the series identity to the region Re s > −1/2 and |s| < 3. Every summand vanishes at s = 0, so ζ(0,1) = −1/2 gives the claimed value. The result supplies the k = 1 case of the generalized Bernoulli formula for L-values at 1−k.

Key declarations:

- `UpperTheory.V.Bern.b_hurzero`: For real x with 0 < x ≤ 1, the Hurwitz zeta value at s = 0 is 1/2 − x.

  ```lean
  theorem UpperTheory.V.Bern.b_hurzero :
      ∀ (x : ℝ), 0 < x → x ≤ 1 → HurwitzZeta.hurwitzZeta (x : UnitAddCircle) 0 = 1 / 2 - (x : ℂ) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.SumIccMulEq

14 import steps from Main · 38 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.SumIccMulEq)

**Proves that generalized Bernoulli sums are invariant under pulling back weights to a multiple modulus.**

For N dividing M with M > 0, pulling a weight function on ℤ/Nℤ back along reduction from ℤ/Mℤ preserves its generalized Bernoulli sum in every degree. Writing M = Nm, the proof splits the summation interval into m blocks of length N, regroups terms by their representatives a in [1,N], and applies Raabe’s formula to the coefficients at a+jN. The invariance gives the uncorrected pullback sum in the proof of the prime-step formula for Dirichlet characters.

Key declarations:

- `UpperTheory.V.Bern.b_comp`: For N dividing M with M > 0, the kth generalized Bernoulli sum of a weight function into a commutative ℚ-algebra equals that of its pullback to ℤ/Mℤ.

  ```lean
  theorem UpperTheory.V.Bern.b_comp :
      ∀ {R : Type} [CommRing R] [Algebra ℚ R] {N M : ℕ} (h : N ∣ M) (k : ℕ) (Φ : ZMod N → R), 0 < M → genB k (fun a : ZMod M => Φ (ZMod.castHom h (ZMod N) a)) = genB k Φ := …
  ```
- `sum_Icc_mul_eq`: The sum over 1 through Nm equals the sum over the m blocks indexed by a+jN with 1 ≤ a ≤ N and 0 ≤ j < m.

  ```lean
  private theorem sum_Icc_mul_eq {R : Type} [AddCommMonoid R] (f : ℕ → R) (N m : ℕ) :
      ∑ x ∈ Icc 1 (N * m), f x = ∑ j ∈ range m, ∑ a ∈ Icc 1 N, f (a + j * N) := …
  ```
- `sum_Icc_one_eq`: Summing f over 1 through n is equivalent to summing f(i+1) over 0 ≤ i < n.

  ```lean
  private theorem sum_Icc_one_eq {R : Type} [AddCommMonoid R] (f : ℕ → R) (n : ℕ) :
      ∑ x ∈ Icc 1 n, f x = ∑ i ∈ range n, f (i + 1) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Termdiff

15 import steps from Main · 77 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Termdiff)

**Proves holomorphy of a corrected Hurwitz zeta difference series on Re s > −1/2 and |s| < 3.**

For 0 < x ≤ 1, the correction to the difference of the Hurwitz summands at x and 1 cancels the linear Taylor terms about n+1. The two second-order remainders give the uniform summable majorant 24((n+x)^(−3/2) + (n+x)^(−5)) on the stated region. Each summand is entire in s, so the sum is holomorphic there. This holomorphy lets the identity theorem carry the series formula to s = 0 in the evaluation of ζ(0,x).

Key declarations:

- `UpperTheory.V.Bern.b_termdiff`: For 0 < x ≤ 1, the series with summands (n+x)^(−s) − (n+1)^(−s) − (1−x)((n+1)^(−s) − (n+2)^(−s)) is holomorphic on Re s > −1/2 and |s| < 3.

  ```lean
  theorem UpperTheory.V.Bern.b_termdiff :
      ∀ (x : ℝ), 0 < x → x ≤ 1 → DifferentiableOn ℂ (fun s : ℂ => ∑' n : ℕ, ((((n : ℝ) + x : ℝ) : ℂ) ^ (-s) - (((n : ℝ) + 1 : ℝ) : ℂ) ^ (-s) - (1 - (x : ℂ)) * ((((n : ℝ) + 1 : ℝ) : ℂ) ^ (-s) - (((n : ℝ) + 2 : ℝ) : ℂ) ^ (-s)))) ({s : ℂ | -1 / 2 < s.re} ∩ Metric.ball 0 3) := …
  ```
- `termdiff_rpow_le`: For a > 0 and −5 ≤ e ≤ −3/2, the real power a^e is bounded above by a^(−3/2) + a^(−5).

  ```lean
  private theorem termdiff_rpow_le {a e : ℝ} (ha : 0 < a) (h1 : -5 ≤ e) (h2 : e ≤ -(3 / 2)) :
      a ^ e ≤ 1 / |a| ^ (3 / 2 : ℝ) + 1 / |a| ^ (5 : ℝ) := …
  ```
- `termdiff_cpow`: For a positive real base a, the function s ↦ a^(−s) is entire.

  ```lean
  private theorem termdiff_cpow {a : ℝ} (ha : 0 < a) : Differentiable ℂ (fun s : ℂ => (a : ℂ) ^ (-s)) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Termsum

15 import steps from Main · 32 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.Termsum)

**Sums a corrected difference of Hurwitz zeta series on the half-plane Re s > 1.**

For 0 < x ≤ 1, the corrected difference of the Hurwitz series at x and 1 sums to ζ(s,x) − ζ(s,1) − (1−x). The proof shifts the series at 1 by one term, leaving the initial term 1 as the sum of the telescoping difference. This identity supplies the equality on Re s > 1 that is continued to s = 0 to evaluate ζ(0,x).

Key declarations:

- `UpperTheory.V.Bern.b_termsum`: For 0 < x ≤ 1 and Re s > 1, summing (n+x)^(−s) − (n+1)^(−s) − (1−x)((n+1)^(−s) − (n+2)^(−s)) over n ≥ 0 gives ζ(s,x) − ζ(s,1) − (1−x).

  ```lean
  theorem UpperTheory.V.Bern.b_termsum :
      ∀ (x : ℝ), 0 < x → x ≤ 1 → ∀ s : ℂ, 1 < s.re → ∑' n : ℕ, ((((n : ℝ) + x : ℝ) : ℂ) ^ (-s) - (((n : ℝ) + 1 : ℝ) : ℂ) ^ (-s) - (1 - (x : ℂ)) * ((((n : ℝ) + 1 : ℝ) : ℂ) ^ (-s) - (((n : ℝ) + 2 : ℝ) : ℂ) ^ (-s))) = HurwitzZeta.hurwitzZeta (x : UnitAddCircle) s - HurwitzZeta.hurwitzZeta ((1 : ℝ) : UnitAddCircle) s - (1 - (x : ℂ)) := …
  ```
- `hasSum_hurwitzZeta`: For 0 ≤ x ≤ 1 and Re s > 1, the series with terms (n+x)^(−s) for n ≥ 0 sums to the Hurwitz zeta value at the class of x modulo 1, using the formal convention for complex powers at zero.

  ```lean
  private theorem hasSum_hurwitzZeta (x : ℝ) (h0 : 0 ≤ x) (h1 : x ≤ 1) (s : ℂ) (hs : 1 < s.re) :
      HasSum (fun n : ℕ => (((n : ℝ) + x : ℝ) : ℂ) ^ (-s)) (HurwitzZeta.hurwitzZeta (x : UnitAddCircle) s) := …
  ```

### Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BTaylor2

16 import steps from Main · 79 lines · Checked against the code · [Open in the Lean viewer](https://riemannhypothesissolved.com/file/Development.AutomorphicArithmetic.AutomorphicVarieties.GaloisLibrary.BernoulliNumbers.BTaylor2)

**Bounds the first-order Taylor remainder of t ↦ t^(−s) on positive real intervals for Re s ≥ −2.**

For u,v ≥ a > 0 and Re s ≥ −2, the error in the linear approximation at u is bounded by |s| |s+1| a^(−Re s−2)(v−u)². The proof differentiates complex powers along the positive real axis and applies the mean-value inequality twice, first to bound the variation of the derivative and then to bound the remainder. The estimate is used to obtain a summable majorant for the corrected Hurwitz zeta difference series.

Key declarations:

- `UpperTheory.V.Bern.b_taylor2`: For u,v ≥ a > 0 and Re s ≥ −2, the modulus of v^(−s) − u^(−s) + s(v−u)u^(−s−1) is at most |s| |s+1| a^(−Re s−2)(v−u)².

  ```lean
  theorem UpperTheory.V.Bern.b_taylor2 :
      ∀ (s : ℂ) (a u v : ℝ), 0 < a → a ≤ u → a ≤ v → -2 ≤ s.re → ‖(v : ℂ) ^ (-s) - (u : ℂ) ^ (-s) + s * ((v : ℂ) - u) * (u : ℂ) ^ (-s - 1)‖ ≤ ‖s‖ * ‖s + 1‖ * a ^ (-s.re - 2) * (v - u) ^ 2 := …
  ```
- `lip`: For Re s ≥ −2, the function t ↦ t^(−s−1) is Lipschitz on [a,∞) with constant |s+1| a^(−Re s−2) for each a > 0.

  ```lean
  private lemma lip (s : ℂ) (a x y : ℝ) (ha : 0 < a) (hx : a ≤ x) (hy : a ≤ y) (hs : -2 ≤ s.re) :
      ‖(y : ℂ) ^ (-s - 1) - (x : ℂ) ^ (-s - 1)‖ ≤ ‖s + 1‖ * a ^ (-s.re - 2) * ‖y - x‖ := …
  ```
- `hd_cpow`: For a complex exponent c and positive real t, the derivative of t ↦ t^c with respect to t is c t^(c−1).

  ```lean
  private lemma hd_cpow (c : ℂ) (t : ℝ) (ht : 0 < t) :
      HasDerivAt (fun x : ℝ => (x : ℂ) ^ c) (c * (t : ℂ) ^ (c - 1)) t := …
  ```


---

Bernoulli numbers for Dirichlet characters… · Alpöge Lean readings. Web page: https://riemannhypothesissolved.com/cluster/k1091-bernoulli-numbers-for-dirichlet-characters-plus-the-final/lean/ · updated 2026-11-30 · site map for machines: https://riemannhypothesissolved.com/llms.txt
