Skip to content

ADA-Projects/Lean-AG

Formalizing GΓΆrtz-Wedhorn's Algebraic Geometry in Lean 4

License: Apache 2.0 Lean 4 Mathlib

A formalization project in Lean 4 of selected results from Ulrich GΓΆrtz and Torsten Wedhorn's "Algebraic Geometry I" (2nd Edition). This repository serves as a portfolio demonstration of formal mathematics and proof verification capabilities in modern algebraic geometry.

🎯 Project Overview

This is a learning project to develop expertise in formalizing advanced algebraic geometry using Lean 4. The ultimate goal is to work toward significant theorems like BΓ©zout's theorem, Zariski's Main Theorem, or other major results in algebraic geometry.

Currently, I'm building foundational infrastructure by formalizing basic results from GΓΆrtz-Wedhorn's textbook, starting with Chapter 5: Schemes and dimension theory. While these preliminary results (like Lemma 5.7) require substantial code due to the complexity of formalization, they're stepping stones toward the real mathematical milestones.

πŸ“š Reference & Methodology

  • Primary Source: Ulrich GΓΆrtz and Torsten Wedhorn, "Algebraic Geometry I", 2nd Edition
  • Current Phase: Foundational results on topological Krull dimension and scheme theory
  • Long-term Goals: Major theorems like BΓ©zout's theorem, Zariski's Main Theorem, or cohomological results
  • Purpose: Personal learning project to master Lean 4 formalization techniques in algebraic geometry

✨ Current Progress

Foundation Building (Chapter 5):

  • Lemma 5.7: Complete formalization of topological Krull dimension properties
  • Subspace dimension inequality: dim(Y) ≀ dim(X) for subspaces
  • Proper closed subset dimension: Strict inequality for proper closed subsets
  • Open cover dimension formula: dim(X) = sup{dim(U_i) : U_i open cover}
  • Irreducible components dimension: dim(X) = sup{dim(Y) : Y irreducible component}
  • Scheme dimension characterization: Connection between topological and ring-theoretic dimensions

Learning Outcomes So Far:

  • ~1350 lines of Lean 4 code (substantial due to formalization complexity, not mathematical depth)
  • Infrastructure development: Building the foundation needed for serious algebraic geometry
  • Technique mastery: Advanced proof techniques in topological spaces, order theory, and categorical constructions
  • Understanding the gap: Appreciating the difference between mathematical intuition and formal verification

πŸ”§ Setup and Installation

Prerequisites

Quick Start

git clone https://github.com/ADA-Projects/Lean-AG.git
cd Lean-AG
lake exe cache get
lake build

πŸ“ Repository Structure

Lean-AG/
β”œβ”€β”€ GWchap5/                    # Main formalization directory
β”‚   β”œβ”€β”€ gw_sect5-3.lean         # Core theorems and proofs (~1350 lines)
β”‚   └── Mathlib/                # Additional Mathlib extensions
β”œβ”€β”€ GWchap5.lean               # Root module imports
β”œβ”€β”€ lakefile.toml              # Lake build configuration
β”œβ”€β”€ lean-toolchain            # Lean version specification
└── README.md                  # This file

πŸ“‹ File Descriptions

  • GWchap5/gw_sect5-3.lean: Contains the main formalization work including:

    • Helper lemmas for closure operations in subspaces
    • Irreducible closed sets and their properties
    • Topological Krull dimension theory
    • Complete proof of Lemma 5.7 and related results
    • Scheme dimension characterizations
  • lakefile.toml: Lake build system configuration with Mathlib dependencies

  • lean-toolchain: Specifies Lean 4.21.0 for reproducible builds

πŸ—οΈ Formalized Theorems

Current Foundation: Lemma 5.7 (GΓΆrtz-Wedhorn)

This foundational lemma establishes basic properties of topological Krull dimension. While not a deep result in algebraic geometry, its formalization demonstrates the infrastructure needed for serious theorems:

theorem thm_scheme_dim :
  (βˆ€ (X : Type*) [TopologicalSpace X] (Y : Set X),
    topologicalKrullDim Y ≀ topologicalKrullDim X) ∧
  (βˆ€ (X : Type*) [TopologicalSpace X] (Y : Set X),
    IsIrreducible (Set.univ : Set X) β†’
    topologicalKrullDim X β‰  ⊀ β†’
    IsClosed Y β†’ Y βŠ‚ Set.univ β†’ Y.Nonempty β†’
    topologicalKrullDim Y < topologicalKrullDim X) ∧
  (βˆ€ (X : Type*) [TopologicalSpace X] (ΞΉ : Type*) (U : ΞΉ β†’ Set X),
    (βˆ€ i, IsOpen (U i)) β†’ (⋃ i, U i = Set.univ) β†’
    topologicalKrullDim X = ⨆ i, topologicalKrullDim (U i)) ∧
  (βˆ€ (X : Type*) [TopologicalSpace X],
    topologicalKrullDim X = ⨆ (Y ∈ irreducibleComponents X), topologicalKrullDim Y) ∧
  (βˆ€ (X : Scheme), schemeDim X = ⨆ x : X, ringKrullDim (X.presheaf.stalk x))

Supporting Results

Topological Foundations:

  • closure_in_subspace_eq_inter: Characterization of closures in subspace topology
  • map_irreducible_closed_injective: Injectivity of maps between irreducible closed sets
  • map_irreducible_closed_strictMono: Strict monotonicity properties

Dimension Theory:

  • top_KrullDim_subspace_le: Dimension inequality for subspaces
  • topological_dim_proper_closed_subset_lt: Strict inequality for proper subsets
  • topological_dim_open_cover: Dimension via open covers
  • topological_dim_irreducible_components: Dimension via irreducible components
  • scheme_dim_eq_sup_local_rings: Scheme dimension via local ring dimensions

πŸš€ Learning Roadmap

This project is building toward major algebraic geometry theorems through systematic foundation building:

Near-term (Building Infrastructure)

  1. Complete Chapter 5: Finish basic scheme theory and morphism properties
  2. Geometric Constructions: Projective spaces, blow-ups, and basic varieties
  3. Intersection Theory Foundations: Cycles, divisors, and intersection products

Medium-term (Substantial Results)

  1. BΓ©zout's Theorem: Intersection multiplicities and degree bounds
  2. Zariski's Main Theorem: Proper morphisms and normalizations
  3. Cohomology Theory: Sheaf cohomology and vanishing theorems

Long-term (Deep Theorems)

  1. Riemann-Roch: For curves and surfaces
  2. Resolution of Singularities: In characteristic zero
  3. Advanced Topics: Γ‰tale cohomology, scheme theory applications

Note: This is an ambitious learning timeline - each step involves substantial technical development.

🀝 Contributing & Collaboration

While this is primarily a portfolio project, I welcome:

  • Code Reviews: Feedback on proof techniques and organization
  • Mathematical Discussion: Insights on alternative approaches or generalizations
  • Educational Use: Feel free to use this as a learning resource for Lean 4

πŸ“š References & Acknowledgments


Note: This is an active learning project in mathematical formalization. The current results are foundational - the real mathematical goals lie ahead. The code compiles with Lean 4.21.0 and Mathlib 4.21.0.

About

Lean formalisation project in algebraic geometry.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published