Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Aether Catalog definitions — Tropical_Round7AgreementCharacter

Definition
Tropical_Round7AgreementCharacter

by raver1975 · Sep 13, 2026 · Mathlib c5ea003 (Lean v4.30.0)

aether-catalogtropical

Definition bundle for the Aether Catalog module Tropical.Round7AgreementCharacter, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.

Definition code
-- Def bundle generated from Tropical/Round7AgreementCharacter.lean by skeleton subtraction
import Mathlib

/-!
# Round-7 closure AGREEMENT: barrier-2-invariant character aggregates collapse

This file formalises experiment 325 of the round-7 batch.  For a semiprime
`N = p q` the **agreement set**

`A(N) = { a ∈ (ℤ/Nℤ)ˣ : (a/p) = (a/q) }`

is invariant under both barrier-2 symmetries (the swap `p ↔ q` and conjugation),
so it was a candidate for a factor-revealing aggregate that escapes the
residue/order classification.  It does not:

* `agree_card_two_mul` : `2 · |A(N)| = φ(N)`, i.e. `A(N) = φ(N)/2` exactly, for
  every semiprime with an odd prime factor — the count is a *function of `N`
  alone* (through `φ(N)`), hence carries no information about `p` and `q`;
* `mem_agree_iff_jacobiSym` : the agreement set *is* the set where the
  `N`-computable Jacobi symbol `J(a | N)` equals `1`, so the aggregate collapses
  onto the quadratic character mod `N` by character orthogonality.

The proof is a pairing argument: an element `u` that is a non-residue mod `p`
and `≡ 1 (mod q)` (produced by CRT) translates the agreement set bijectively
onto its complement.
-/

namespace Round7Agreement

open Finset

variable {p q : ℕ}

section Chars

variable [Fact p.Prime] [Fact q.Prime]

/-- Reduction `ℤ/pqℤ → ℤ/pℤ`. -/
def redP (p q : ℕ) : ZMod (p * q) →+* ZMod p := ZMod.castHom ⟨q, rfl⟩ (ZMod p)

/-- Reduction `ℤ/pqℤ → ℤ/qℤ`. -/
def redQ (p q : ℕ) : ZMod (p * q) →+* ZMod q := ZMod.castHom ⟨p, mul_comm p q⟩ (ZMod q)

/-- The Legendre character mod `p`, read on the units of `ℤ/pqℤ`. -/
noncomputable def chiP (p q : ℕ) [Fact p.Prime] (a : (ZMod (p * q))ˣ) : ℤ :=
  quadraticChar (ZMod p) (redP p q (a : ZMod (p * q)))

/-- The Legendre character mod `q`, read on the units of `ℤ/pqℤ`. -/
noncomputable def chiQ (p q : ℕ) [Fact q.Prime] (a : (ZMod (p * q))ˣ) : ℤ :=
  quadraticChar (ZMod q) (redQ p q (a : ZMod (p * q)))









/-! ## The agreement set -/

/-- The agreement set `A(N) = {a : (a/p) = (a/q)}`. -/
noncomputable def agree (p q : ℕ) [Fact p.Prime] [Fact q.Prime] :
    Finset ((ZMod (p * q))ˣ) :=
  Finset.univ.filter (fun a => chiP p q a = chiQ p q a)


end Chars

/-! ## A CRT witness: non-residue mod `p`, trivial mod `q` -/

section Witness

variable [Fact p.Prime] [Fact q.Prime]


end Witness

/-! ## The count -/

section Count

variable [Fact p.Prime] [Fact q.Prime]




end Count

/-! ## The collapse onto the Jacobi symbol -/

section Jacobi

variable [Fact p.Prime] [Fact q.Prime]




end Jacobi

end Round7Agreement

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