# grh-lean — Lean 4 Formalization of GRH for Dirichlet L-functions, Shortened with Anthropic

> A Lean 4 proof of the Riemann Hypothesis and GRH for Dirichlet L-functions, built on Mathlib with only standard axioms. This repo is a shorter edition made with Anthropic and Claude.

- **Category**: REPO
- **Impact**: MAJOR
- **Publisher**: lsernau (Levent Alpöge) with Anthropic
- **Published**: 2026-11-25T21:48:10Z
- **Canonical URL**: https://aitrending.dev/news/grh-lean-lean4-grh-dirichlet-l-functions/

## Quick Facts

- **Language**: Lean 4, built on Mathlib
- **Axioms Used**: propext, Classical.choice, Quot.sound only
- **Readable Edition**: grh/ — about 300,000 lines
- **Compact Edition**: grh-compact/ — about 76,000 lines, same five theorems
- **Toolchain**: Lean v4.35.0, Mathlib commit 56a00585
- **Build Time**: 1–2 hours on 12 cores with 24 GB RAM
- **License**: Apache 2.0, Copyright 2026 Anthropic, PBC
- **Verification Status**: Machine-checked only; no mathematician has read it through

## What Is It

This repository contains a Lean 4 formal proof of the Riemann Hypothesis and the Generalized Riemann Hypothesis for Dirichlet L-functions. It is based on a proof by Levent Alpöge developed with Claude, and this version was produced in collaboration with colleagues at Anthropic and Claude. The repo ships two editions: a readable one of about 300,000 lines and a compact one of about 76,000 lines covering the same five theorems. It is a research artifact, not maintained and not accepting contributions.

## How It Works

The proof is written in Lean 4 on top of Mathlib and relies only on the axioms propext, Classical.choice, and Quot.sound. Each edition folder is its own Lake project with its own README; you fetch the Mathlib cache, run lake build, and then run a script that prints the axioms each theorem depends on. A full build takes one to two hours on 12 cores with 24 GB of memory, plus roughly 85 minutes if the Mathlib cache is missing.

## Why It Matters

The artifact gives researchers a machine-checked Lean 4 development they can inspect, rebuild, and audit themselves rather than take on trust. The main caveat is stated plainly in the repo: the proof has passed machine checks only, no mathematician has read it end to end, and no accompanying paper exists. Teams evaluating it should budget for long build times and treat the result as a starting point for human review, not a settled result.

## Verified Sources (5)

1. [Much shorter version of GRH Lean verification from Anthropic](https://github.com/lsernau/grh-lean) *(Primary)*
2. [Hacker News Discussion (182 pts · 79 comments)](https://news.ycombinator.com/item?id=50648050)
3. [GitHub Repository hosting, code review, and collaboration](https://github.com/platform) *(Primary)*
4. [Copilot AI coding agent for tasks, projects, and automated work](https://github.com/features/copilot) *(Primary)*
5. [Actions CI/CD and automation](https://github.com/features/actions) *(Primary)*
