Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Arbitrarily large prime-conductor quadratic characters with prescribed parity

Proved
HorizontalPadicL.exists_prime_quadraticCharacter_prescribed_sign

by riccardo.brasca · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

dirichlet-theoremquadratic-charactersquadratic-reciprocity

Let AAA be a positive integer, let b≥0b\ge0b≥0, and choose a sign s∈{1,−1}s\in\{1,-1\}s∈{1,−1}. There is a prime q>bq>bq>b and a primitive Dirichlet character η\etaη of modulus and conductor qqq such that

q≡s(mod8A),ord⁡(η)=2,(A,q)=1,η(−1)=s.q\equiv s\pmod{8A},\qquad \operatorname{ord}(\eta)=2,\qquad (A,q)=1,\qquad\eta(-1)=s.q≡s(mod8A),ord(η)=2,(A,q)=1,η(−1)=s.

Moreover,

η(n)=1for every positive divisor n∣A.\eta(n)=1\qquad\text{for every positive divisor }n\mid A.η(n)=1for every positive divisor n∣A.

Thus quadratic characters of either parity can be chosen with arbitrarily large prime conductor avoiding a prescribed finite set, while being trivial at the corresponding unramified local components. The conductor congruence also makes every even nebentype of level dividing AAA take value one at qqq. This provides the arithmetic seed used in the horizontal nonvanishing argument; it asserts no nonvanishing of a modular LLL-value.

Formalization Note. The sign is encoded by a Boolean, with true corresponding to 111. Characters take values in the fixed algebraic closure of the rationals and are paired with their positive levels. Primitivity identifies this level with the conductor.

Preamble
import Definitions.Def_KN_HorizontalPadicL

set_option autoImplicit false
Formal statement
theorem HorizontalPadicL.exists_prime_quadraticCharacter_prescribed_sign
    (A : ℕ) (hA : 0 < A) (s : Bool) (b : ℕ) :
    ∃ η : DirichletCharacterWithLevel,
      η.1.1.Prime ∧ b < η.1.1 ∧
      (η.1.1 : ZMod (8 * A)) = (if s then 1 else -1) ∧
      η.2.IsPrimitive ∧ orderOf η.2 = 2 ∧ Nat.Coprime A η.2.conductor ∧
      η.2 (-1) = (if s then 1 else -1) ∧
      (∀ n : ℕ, 0 < n → n ∣ A → η.2 n = 1) := by sorry
Source
A derived consequence of Dirichlet's theorem and quadratic reciprocity, formalized directly from Mathlib revision 0df444a360eaa60ab8c11dca51a86af692955474. Dirichlet: Mathlib/NumberTheory/LSeries/PrimesInAP.lean, Nat.forall_exists_prime_gt_and_eq_mod, https://github.com/leanprover-community/mathlib4/blob/0df444a360eaa60ab8c11dca51a86af692955474/Mathlib/NumberTheory/LSeries/PrimesInAP.lean#L443. Reciprocity and supplementary law at two: Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/GaussSum.lean, quadraticChar_odd_prime and quadraticChar_two, https://github.com/leanprover-community/mathlib4/blob/0df444a360eaa60ab8c11dca51a86af692955474/Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/GaussSum.lean#L93 and https://github.com/leanprover-community/mathlib4/blob/0df444a360eaa60ab8c11dca51a86af692955474/Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/GaussSum.lean#L37. The theorem combines these established results with the prime-modulus conductor criterion; it is not claimed as a verbatim theorem from a paper.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me