Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Complex points of a scheme with the analytic topology, and rational Betti numbers

Definition
FiniteFields_BettiNumbers

by Idealson · Oct 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

algebraic-geometrybetti-numberscomplex-pointsweil-conjectures

This file provides the objects needed to state the Betti number part of the Weil conjectures: the complex points of a scheme over a ring, with their classical (analytic) topology, and the rational Betti numbers of a topological space.

  1. Projective space over a ring. For a commutative ring RRR and N≥0N\ge 0N≥0, PRN=Proj⁡R[x0,…,xN]\mathbb P^N_R=\operatorname{Proj}R[x_0,\dots,x_N]PRN​=ProjR[x0​,…,xN​] (polynomial ring graded by total degree), with its structure morphism PRN→Spec⁡R\mathbb P^N_R\to\operatorname{Spec}RPRN​→SpecR.
  2. Projectivity. A scheme π:Y→Spec⁡R\pi:Y\to\operatorname{Spec}Rπ:Y→SpecR is projective over RRR if there are NNN and a closed immersion i:Y↪PRNi:Y\hookrightarrow\mathbb P^N_Ri:Y↪PRN​ over Spec⁡R\operatorname{Spec}RSpecR.
  3. Complex points. For a ring homomorphism σ:R→C\sigma:R\to\mathbb Cσ:R→C, Y(C)Y(\mathbb C)Y(C) is the set of morphisms x:Spec⁡C→Yx:\operatorname{Spec}\mathbb C\to Yx:SpecC→Y with π∘x=Spec⁡σ\pi\circ x=\operatorname{Spec}\sigmaπ∘x=Specσ, i.e. the C\mathbb CC-points of Y×R,σCY\times_{R,\sigma}\mathbb CY×R,σ​C.
  4. Analytic topology. For an affine open U⊆YU\subseteq YU⊆Y, a section s∈Γ(Y,U)s\in\Gamma(Y,U)s∈Γ(Y,U) and an open V⊆CV\subseteq\mathbb CV⊆C, let
⟨U,s,V⟩={x∈Y(C): x factors through U and s(x)∈V},\langle U,s,V\rangle=\{x\in Y(\mathbb C):\ x \text{ factors through } U \text{ and } s(x)\in V\},⟨U,s,V⟩={x∈Y(C): x factors through U and s(x)∈V},

where s(x)∈Cs(x)\in\mathbb Cs(x)∈C is the value of sss at xxx. These sets generate the topology of Y(C)Y(\mathbb C)Y(C). For YYY locally of finite type over RRR this is the classical complex topology: on each U(C)U(\mathbb C)U(C) it is induced by x↦(s1(x),…,sm(x))∈Cmx\mapsto(s_1(x),\dots,s_m(x))\in\mathbb C^mx↦(s1​(x),…,sm​(x))∈Cm for generators s1,…,sms_1,\dots,s_ms1​,…,sm​ of Γ(Y,U)\Gamma(Y,U)Γ(Y,U). 5. Rational homology and Betti numbers. For a topological space TTT, Hi(T;Q)H_i(T;\mathbb Q)Hi​(T;Q) is singular homology with rational coefficients, and

bi(T)=dim⁡QHi(T;Q).b_i(T)=\dim_{\mathbb Q}H_i(T;\mathbb Q).bi​(T)=dimQ​Hi​(T;Q).

Formalization Note bi(T)b_i(T)bi​(T) is Mathlib's Module.finrank, which is 000 when Hi(T;Q)H_i(T;\mathbb Q)Hi​(T;Q) is infinite-dimensional; statements using it assert finite-dimensionality separately. Singular homology is Mathlib's singularHomologyFunctor with coefficients Q\mathbb QQ. Schemes live in universe 000.

Definition code
import Mathlib

/-!
Complex points of a scheme over a ring `R` along a ring map `σ : R → ℂ`, with their analytic
(complex) topology, and the rational Betti numbers of a topological space; together with
projective space `ℙ^N_R` over a commutative ring and projectivity over `R`.

* `ComplexPoints σ π` is the set of morphisms `Spec ℂ ⟶ Y` lying over `Spec σ : Spec ℂ ⟶ Spec R`,
  i.e. the `ℂ`-points of the base change `Y ×_R ℂ`.
* Its topology is generated by the sets `{x | x ∈ U(ℂ) and s(x) ∈ V}` for `U ⊆ Y` an affine open,
  `s ∈ Γ(Y, U)` and `V ⊆ ℂ` open. For `Y` locally of finite type over `R` this is the classical
  (analytic) topology: on `U(ℂ)` it is induced by the embedding `x ↦ (s₁(x), …, s_m(x)) ∈ ℂ^m`
  given by generators of `Γ(Y, U)`, and each `U(ℂ)` is open.
* `bettiNumber i T` is `dim_ℚ H_i(T; ℚ)`, singular homology with rational coefficients (Mathlib's
  `AlgebraicTopology.singularHomologyFunctor`); it equals `dim_ℚ H^i(T; ℚ)` whenever finite.
-/

namespace FiniteFields.Betti

open AlgebraicGeometry CategoryTheory

attribute [local instance] MvPolynomial.gradedAlgebra

section Projective

variable (R : Type) [CommRing R]

/-- Projective `N`-space over a commutative ring `R`: `ℙ^N_R = Proj R[x₀, …, x_N]`, the
polynomial ring graded by total degree. -/
noncomputable abbrev projectiveSpaceOver (N : ℕ) : Scheme :=
  Proj (MvPolynomial.homogeneousSubmodule (Fin (N + 1)) R)

/-- The structure morphism `ℙ^N_R ⟶ Spec R`. -/
noncomputable def projectiveSpaceOver.toSpec (N : ℕ) : projectiveSpaceOver R N ⟶ Spec (.of R) :=
  Proj.toSpecZero (MvPolynomial.homogeneousSubmodule (Fin (N + 1)) R) ≫
    Spec.map (CommRingCat.ofHom
      (algebraMap R (MvPolynomial.homogeneousSubmodule (Fin (N + 1)) R 0)))

/-- An `R`-scheme `π : Y ⟶ Spec R` is projective if there is a closed immersion `Y ⟶ ℙ^N_R`
over `Spec R` for some `N`. -/
def IsProjectiveOverRing {Y : Scheme} (π : Y ⟶ Spec (.of R)) : Prop :=
  ∃ (N : ℕ) (i : Y ⟶ projectiveSpaceOver R N),
    IsClosedImmersion i ∧ i ≫ projectiveSpaceOver.toSpec R N = π

end Projective

section ComplexPoints

variable {R : Type} [CommRing R] (σ : R →+* ℂ) {Y : Scheme.{0}} (π : Y ⟶ Spec (.of R))

/-- The complex points of `Y` along `σ : R → ℂ`: morphisms `Spec ℂ ⟶ Y` over `Spec σ`. -/
def ComplexPoints : Type :=
  {x : Spec (.of ℂ) ⟶ Y // x ≫ π = Spec.map (CommRingCat.ofHom σ)}

/-- The subbasic set of complex points lying in the open `U` at which the section `s ∈ Γ(Y, U)`
takes a value in `V ⊆ ℂ`. -/
def ComplexPoints.basicSet (U : Y.Opens) (s : Γ(Y, U)) (V : Set ℂ) : Set (ComplexPoints σ π) :=
  {x | ∃ h : ⊤ ≤ x.1 ⁻¹ᵁ U,
    (Scheme.ΓSpecIso (CommRingCat.of ℂ)).hom ((x.1.appLE U ⊤ h) s) ∈ V}

/-- The analytic topology on complex points, generated by the sets `basicSet U s V` for `U`
affine open, `s ∈ Γ(Y, U)` and `V ⊆ ℂ` open. -/
instance : TopologicalSpace (ComplexPoints σ π) :=
  TopologicalSpace.generateFrom
    {S | ∃ (U : Y.Opens) (_ : IsAffineOpen U) (s : Γ(Y, U)) (V : Set ℂ),
      IsOpen V ∧ S = ComplexPoints.basicSet σ π U s V}

end ComplexPoints

section Betti

/-- Rational singular homology `H_i(T; ℚ)` of a topological space, as a `ℚ`-module. -/
noncomputable def rationalHomology (i : ℕ) (T : Type) [TopologicalSpace T] : ModuleCat.{0} ℚ :=
  ((AlgebraicTopology.singularHomologyFunctor (ModuleCat.{0} ℚ) i).obj
    (ModuleCat.of ℚ ℚ)).obj (TopCat.of T)

/-- The `i`-th Betti number `b_i(T) = dim_ℚ H_i(T; ℚ)` (`0` if infinite-dimensional). -/
noncomputable def bettiNumber (i : ℕ) (T : Type) [TopologicalSpace T] : ℕ :=
  Module.finrank ℚ (rationalHomology i T)

end Betti

end FiniteFields.Betti
Source
A. Weil, *Numbers of solutions of equations in finite fields*, Bull. Amer. Math. Soc. 55 (1949), 497–508 (the conjectures are stated at the end of the paper); R. Hartshorne, *Algebraic Geometry*, GTM 52, Springer 1977, Appendix C (Betti numbers of the complex variety); J.-P. Serre, *Géométrie algébrique et géométrie analytique*, Ann. Inst. Fourier 6 (1956), 1–42, §2, n° 5, Proposition 2 and the following Remarque (pp. 8–9): the topology of the analytic space associated to X is the coarsest one making the regular functions on the Zariski-open subsets of X continuous (complex topology of X(ℂ)). Lean: original formalization for this project (Lean v4.33.1, Mathlib 0df444a), file `Definitions/Def_FiniteFields_BettiNumbers.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