Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Counting ideals of trivial ray class by points of the ray fundamental domain

Definition
TauCeti_NumberTheory_NumberField_Global_Counting_Ray_Ideal_Count

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

number-theorytauceti-chebotarev

The geometric counting carrier consists of bounded-norm ray-domain integer points; the arithmetic carrier consists of the corresponding principal ideals. The map sends a point represented by an algebraic integer aaa to (a)(a)(a), and its norm agrees with the mixed norm of the point. These constructions compare point counts with ideal counts.

Formalization Note. These foundational declarations are transplanted from the Tau Ceti contributors' original source (Apache-2.0, commit 948fe4751b1fe528b6d580c522ca5d743d47f185), with compatibility adaptations for Lean 4.33.1. Mathematical proofs requiring separate theorem nodes are published separately.

Definition code
/- Transplanted from https://github.com/TauCetiProject/TauCeti at 948fe4751b1fe528b6d580c522ca5d743d47f185.
Original source copyright/license notices are retained below.
Generated exclusively from compiler declaration, command, and reference facts. -/
import Definitions.Def_TauCeti_NumberTheory_NumberField_Global_Counting_RayFundamentalDomain_Basic
import Definitions.Def_TauCeti_NumberTheory_NumberField_Global_Counting_RayFundamentalDomain_IntegerSet
import Definitions.Def_TauCeti_NumberTheory_NumberField_Global_RayClass_Basic
import Definitions.Def_TauCeti_NumberTheory_NumberField_Global_RayClass_Integral
import Definitions.Def_TauCeti_NumberTheory_NumberField_Global_RayClass_Modulus
import Definitions.Def_TauCeti_NumberTheory_NumberField_Ideal_Away
import Definitions.Def_TauCeti_RingTheory_DedekindDomain_Factorization
import Definitions.Def_TauCeti_RingTheory_DedekindDomain_Ideal
import Mathlib.Algebra.Group.Pi.Units
import Mathlib.Algebra.Group.Subgroup.Ker
import Mathlib.Algebra.Module.Submodule.Lattice
import Mathlib.Algebra.Order.Ring.Units
import Mathlib.Algebra.Ring.Int.Units
import Mathlib.Data.Nat.Prime.Basic
import Mathlib.Data.Nat.Prime.Defs
import Mathlib.GroupTheory.Index
import Mathlib.GroupTheory.IndexNormal
import Mathlib.GroupTheory.Solvable
import Mathlib.GroupTheory.Subgroup.Center
import Mathlib.LinearAlgebra.FreeModule.Finite.CardQuotient
import Mathlib.LinearAlgebra.FreeModule.IdealQuotient
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic
import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.FundamentalCone
import Mathlib.NumberTheory.NumberField.ClassNumber
import Mathlib.NumberTheory.NumberField.Discriminant.Basic
import Mathlib.NumberTheory.NumberField.FractionalIdeal
import Mathlib.NumberTheory.NumberField.InfinitePlace.Basic
import Mathlib.NumberTheory.NumberField.InfinitePlace.TotallyRealComplex
import Mathlib.RingTheory.ClassGroup.Basic
import Mathlib.RingTheory.DedekindDomain.AdicValuation
import Mathlib.RingTheory.DedekindDomain.Factorization
import Mathlib.RingTheory.DedekindDomain.Ideal.Lemmas
import Mathlib.RingTheory.Ideal.Operations
import Mathlib.RingTheory.Ideal.Quotient.Defs
import Mathlib.RingTheory.Valuation.Discrete.IsDiscreteValuationRing
import Mathlib.Tactic.Group

section
set_option autoImplicit true
/-
Copyright (c) 2026 The Tau Ceti contributors. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: The Tau Ceti contributors
-/
/-!
# Counting ideals of trivial ray class by points of the ray fundamental domain

Let `𝔪` be a modulus of a number field `K` and `𝔞` a nonzero integral ideal prime to `𝔪`.  This
file matches the integral ideals prime to `𝔪` that are multiples of `𝔞`, have trivial ray class
and have norm at most `s`, against the points of `rayIdealSet 𝔪 𝔞` of mixed norm at most `s`:
each such ideal accounts for exactly `Nat.card (unitsCongruenceTorsion 𝔪)` points.

The correspondence sends a point to the ideal generated by the algebraic integer it is the image
of; the generator criterion `idealClass_eq_one_iff_exists_generator` identifies the ideals of
trivial ray class as exactly those arising this way.

## Main results

* `TauCeti.GlobalNumberFields.card_idealClass_eq_one_dvd_norm_le`: the number of multiples of `𝔞`
  prime to `𝔪` of trivial ray class and norm at most `s`, times the number of roots of unity
  congruent to one modulo `𝔪`, is the number of points of `rayIdealSet 𝔪 𝔞` of mixed norm at
  most `s`.
-/

 section

open NumberField NumberField.mixedEmbedding

open scoped nonZeroDivisors

namespace TauCeti.GlobalNumberFields

variable {K : Type*} [Field K] [NumberField K]

/-- A unit congruent to one modulo `𝔪` keeps an algebraic integer congruent to one modulo `𝔪₀`. -/
 theorem unit_mul_sub_one_mem {𝔪 : Modulus K} {u : (𝓞 K)ˣ}
    (hu : u ∈ unitsCongruenceSubgroup 𝔪) {α : 𝓞 K} (hα : α - 1 ∈ 𝔪.finitePart) :
    (u : 𝓞 K) * α - 1 ∈ 𝔪.finitePart := by
  convert add_mem (Ideal.mul_mem_left _ (u : 𝓞 K) hα)
    (sub_one_mem_of_isCongrOne (a := u) (by simp) (mem_unitsCongruenceSubgroup.mp hu)) using 1
  ring

/-- The algebraic integer underlying a point of `rayIntegerSet 𝔪` is positive at the real places
of the infinite part of `𝔪`. -/
 theorem pos_preimageOfMemRayIntegerSet {𝔪 : Modulus K} (a : rayIntegerSet 𝔪)
    {w : {w : InfinitePlace K // w.IsReal}} (hw : w ∈ 𝔪.infinitePart) :
    0 < InfinitePlace.embedding_of_isReal w.2
      (algebraMap (𝓞 K) K (preimageOfMemRayIntegerSet a)) := by
  have h := mem_posRegion.mp
    (mem_posRegion_of_mem_rayFundamentalDomain (mem_rayIntegerSet.mp a.prop).1) w hw
  rwa [← mixedEmbedding_preimageOfMemRayIntegerSet a, mixedEmbedding_apply_isReal] at h

/-- The absolute norm of the principal ideal generated by the algebraic integer underlying a point
of `rayIntegerSet 𝔪` is the mixed norm of the point. -/
 theorem absNorm_span_preimageOfMemRayIntegerSet {𝔪 : Modulus K} (a : rayIntegerSet 𝔪) :
    (Ideal.absNorm (Ideal.span {(preimageOfMemRayIntegerSet a : 𝓞 K)}) : ℝ) =
      mixedEmbedding.norm (a : mixedSpace K) := by
  rw [← mixedEmbedding_preimageOfMemRayIntegerSet, norm_eq_norm, ← Algebra.coe_norm_int]
  simp [Ideal.absNorm_span_singleton]



variable (𝔪 : Modulus K) (𝔞 : integralIdealsPrimeTo 𝔪) (s : ℝ)

/-- The points of `rayIntegerSet 𝔪` counted on the geometric side. -/
 abbrev PointSet : Type _ :=
  {a : rayIntegerSet 𝔪 // ((preimageOfMemRayIntegerSet a : 𝓞 K) ∈ (𝔞 : Ideal (𝓞 K)) ∧
      (preimageOfMemRayIntegerSet a : 𝓞 K) - 1 ∈ 𝔪.finitePart) ∧
    mixedEmbedding.norm (a : mixedSpace K) ≤ s}

/-- The ideals counted on the arithmetic side. -/
 abbrev IdealCountSet : Type _ :=
  {I : integralIdealsPrimeTo 𝔪 // 𝔞 ∣ I ∧ idealClass 𝔪 I = 1 ∧
    (Ideal.absNorm (I : Ideal (𝓞 K)) : ℝ) ≤ s}

variable {𝔪 𝔞 s}

/-- The ideal generated by the algebraic integer underlying a counted point. -/
 noncomputable def toIdeal (a : PointSet 𝔪 𝔞 s) : IdealCountSet 𝔪 𝔞 s :=
  ⟨⟨Ideal.span {(preimageOfMemRayIntegerSet a.1 : 𝓞 K)}, Modulus.mem_integralIdealsPrimeTo.mpr <|
      Modulus.isCoprimeTo_iff_sup_eq_top.mpr ⟨fun h ↦ nonZeroDivisors.coe_ne_zero _
        (Ideal.span_singleton_eq_bot.mp h), (Ideal.eq_top_iff_one _).mpr <| by
          simpa using Submodule.sub_mem _
            (Ideal.mem_sup_left (Ideal.mem_span_singleton_self
              (preimageOfMemRayIntegerSet a.1 : 𝓞 K)))
            (Ideal.mem_sup_right a.2.1.2)⟩⟩,
    NumberFieldArithmetic.integralIdealsAway_dvd_iff_dvd_coe.mpr
      (Ideal.dvd_span_singleton.mpr a.2.1.1),
    (idealClass_eq_one_iff_exists_generator _).mpr
      ⟨_, a.2.1.2, fun _ hw ↦ pos_preimageOfMemRayIntegerSet a.1 hw, rfl⟩,
    (absNorm_span_preimageOfMemRayIntegerSet a.1).symm ▸ a.2.2⟩

/-- `toIdeal` sends a point to `I` exactly when its algebraic integer generates `I`. -/
 theorem toIdeal_eq_iff {a : PointSet 𝔪 𝔞 s} {I : IdealCountSet 𝔪 𝔞 s} :
    toIdeal a = I ↔
      Ideal.span {(preimageOfMemRayIntegerSet a.1 : 𝓞 K)} = ((I : integralIdealsPrimeTo 𝔪) :
        Ideal (𝓞 K)) :=
  Subtype.ext_iff.trans Subtype.ext_iff

/-- Every counted ideal is generated by the algebraic integer underlying a counted point. -/
 theorem exists_toIdeal_eq (I : IdealCountSet 𝔪 𝔞 s) : ∃ a, toIdeal a = I := by
  obtain ⟨α, hα1, hαpos, hI⟩ := (idealClass_eq_one_iff_exists_generator I.1).mp I.2.2.1
  -- `α ≠ 0` because `I ≠ ⊥`, so the mixed norm of `α` is nonzero
  obtain ⟨u, hu, hdom⟩ := exists_unitsCongruenceSubgroup_smul_mem_rayFundamentalDomain 𝔪
    ((norm_eq_zero_iff' (Set.mem_range_self _)).not.mpr <| (map_ne_zero _).mpr <|
      RingOfIntegers.coe_ne_zero_iff.mpr fun h ↦
        (NumberFieldArithmetic.mem_integralIdealsAway_iff.mp I.1.prop).1
          (hI.trans (Ideal.span_singleton_eq_bot.mpr h)))
    (mem_posRegion.mpr hαpos)
  have hmem : mixedEmbedding K ((u * α : 𝓞 K) : K) ∈ rayIntegerSet 𝔪 :=
    mem_rayIntegerSet.mpr ⟨by rwa [unitSMul_smul, ← map_mul] at hdom, _, rfl⟩
  have hpre := preimageOfMemRayIntegerSet_mixedEmbedding hmem
  have hspan : Ideal.span {(u * α : 𝓞 K)} = (I.1 : Ideal (𝓞 K)) := by
    rw [Ideal.span_singleton_mul_left_unit u.isUnit, hI]
  refine ⟨⟨⟨_, hmem⟩, ⟨?_, ?_⟩, ?_⟩, toIdeal_eq_iff.mpr (by rw [hpre, hspan])⟩
  · rw [hpre]
    exact Ideal.dvd_span_singleton.mp
      (hspan ▸ NumberFieldArithmetic.integralIdealsAway_dvd_iff_dvd_coe.mp I.2.1)
  · rw [hpre]
    exact unit_mul_sub_one_mem hu hα1
  · rw [← absNorm_span_preimageOfMemRayIntegerSet, hpre, hspan]
    exact I.2.2.2





end TauCeti.GlobalNumberFields

end
end
Source
https://github.com/TauCetiProject/TauCeti/blob/948fe4751b1fe528b6d580c522ca5d743d47f185/TauCeti/NumberTheory/NumberField/Global/Counting/Ray/Ideal/Count.lean

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