My Works and Learning on Theorem Proving

From Z3 at Boulder to Lean at New Hampshire — what I built, what I learned, and how I tracked it, in date order. This page summarizes my own works and learning on theorem proving, not a general stance on the subject — and ends with the November 2026 news, and why a public Lean tutor matters.

Watch the video: https://youtu.be/WuoO5fCQK78

3:13 at 1.25× — the version posted on YouTube. Subtitles are here.

The story, in order

  1. Fall 2021 — Colorado Boulder. Markov Logic Networks. The smoking example, and why logic alone is too strict.
  2. May 2022 — Colorado Boulder. A prover on Hilbert's Entscheidungsproblem, with Microsoft's Z3. Presented on World No Tobacco Day.
  3. 15 September 2022 — Arizona. A brief introduction of theorem provers, formal verification, category theory, and SAT/SMT solvers, to the Natural Logic group.
  4. 29 September 2022 — Arizona. Natural language into first-order logic, on FOLIO data.
  5. 7 October 2022 — Arizona. Formal verification for language itself.
  6. September–December 2024 — New Hampshire. Learning Lean, and the deep mathematics behind it.
  7. November 2026. The news caught up, lightly — and a question about who gets to learn Lean.

Colorado Boulder — Fall 2021 and May 2022

Fall 2021: When Logic Needs Probability

My test was simple, and it came from Markov Logic Networks. Smoking causes cancer. Friends share habits. Alice smokes. Can Bob get cancer? I was motivated by that example by my own allergy to smoking. Logic alone is too strict, so I added probability: logic handles complexity, probability handles uncertainty.

In the Markov Logic Networks deck (DTSC 5000, Prof. James Bird, Fall 2021), the weights are 1.5 for ∀x, smokes(x) ⇒ cancer(x), and 1.1 for ∀x,y friends(x,y) ⇒ (smokes(x) ⇔ smokes(y)). Not everyone who smokes gets cancer. Not all friends smoke.

May 2022: Z3 and the Entscheidungsproblem

At Colorado Boulder, in spring 2022 (ATLS 5241), I built a prover on Hilbert's Entscheidungsproblem, with Microsoft's Z3. Z3 proves by refutation: it first tries to prove a claim wrong from the axioms. If it cannot, the claim stands.

Coincidentally, I gave that presentation on World No Tobacco Day, and the whole class laughed, in supportive good humor. Colorado was a really cool experience.

University of Arizona — September and October 2022

Natural Logic group, Prof. Mihai Surdeanu. Before giving these presentations, in 2021 and 2022, I had attended ESSLI workshops, and NeurIPS, ICLR, and more.

15 September 2022: A Brief Introduction

Theorem provers, formal verification, category theory, and SAT and SMT solvers. My generalized approach: formalize the proof, implement it, prove the code correct, run it inside the prover. Example: compilers.

29 September 2022: Language into First-Order Logic

On FOLIO data, a T5 model scored 0.00064 without fine-tuning, and 46.69 on evaluation after fine-tuning. Its errors were telling: Talent Shows became Alent Shows.

7 October 2022: Verifying Language Itself

First-order logic gives a concrete, deterministic line of reasoning — a white box, not a black box. I tested LangPro, with its analytic tableau proofs.

New Hampshire — September to December 2024

Lean and the Deep Mathematics

From September to December 2024, I volunteered to learn Lean for Professor Marek Petrik's RLLab. To understand its deep mathematics, I completed MIT's Functional Analysis and Measure Theory, and worked on proving E[E[x|y]] = E[x].

Lean builds bottom-up: sigma-algebras, measures, function maps in a measure space. Expectation is noncomputable — an integral over theoretical, symbolic functions. My proof-planning steps: write down the original proof; write down the relevant lemmas and axioms; check Lean's documentation for what is already available; what we want to prove may differ from what Lean provides; writing everything from scratch may be reinventing the wheel; tactics matter — for some claims, prove LHS = RHS and RHS = LHS.

My main project, October 24 to December 1, 2024, was verifying the Principle of Optimality — the foundational theorem of deterministic dynamic programming — in Lean4. The two theorems: the Principle of Optimality (an optimal control sequence stays optimal from every state along the way) and the Dynamic Programming Equations (the optimal value function is the unique solution of v*_T(s) = r_T(s), v*_t(s) = max_a [r_t(s, a) + v*_{t+1}(f_t(s, a))]). I proved the equations by backward induction, following a five-step plan, and implemented the definitions in Lean4 as a rough draft — FiniteProbability and MDP structures, value functions, and example principle_of_optimality … := by rfl — which gives errors and is not complete, as was expected from the start. The full content and discussion are on my Lean page: Main Project: the Principle of Optimality in Lean4.

My Lean work, in full

Below is the entire README from my lean-theorem-proving repo, exactly as written there — my volunteer work for the CS department at UNH, September 10 to December 5, 2024, with Prof. Marek Petrik's RLLab.

lean-theorem-proving

lean-rl

Sep 10 2024 - Dec 5th 2024

I started initially as a volunteer participant for giving knowledge transfer and as a courtesy participation, for the CS department, UNH. Thanks for the invite to participate and RLLab organized by Prof. Marek Petrik for Fall 2024.

Notes

The following contains weekly summaries from Oct 1st 2024. Presently this covers from Nov 4th 2024, work-in-progress to update from Oct 1st 2024. Please click on corresponding time-wise options to see the respective statuses.

The following notes with MM-DD-YYYY format is my notes of my own study that I included here.

10/8/2024

I previously studied about Proof systems, Theory of Computation, Linguistics, First Order Logic, Second Order Logic, Decidability, Godel's theorem, Symbolic Logic, Semiotics, etc. My powerpoint slides attempt to depict how proof theory and systems intersect with each one of these theoretical topics and can help with assimilating the information for better understanding:

Proof Systems

The list of topics covered in this presentation are as follows:

The meeting minutes

The actual weekly meeting minutes and discussions are noted here:

lean-meeting-notes The tabs in this document provide information of weekly meetings and the zulip chats.

11/4/2024

To understand the implementation of Mathlib.MeasureTheory.Function.ConditionalExpectation.Basic, I completed two MIT courses: "Introduction of Functional Analysis" and "MeasureTheory". Both are available on MIT Opencourseware. After completing this course, understanding MeasureTheory implementation on LeanProver - helped to make sense why the Lean developers implemented it the way they did. These two courses are each 8 - 10 hours duration along with pausing to understand some additional stuff. MIT Opencourseware has a 100+ page lecture notes for each one of this.

YouTube playlist, lectures 1, 2,4,6,7,8,9, and 10 are sufficient. Introduction to Functional Analysis

The LeanProver's implementation is bottom up - for example, to build a theorem on conditional expectation, define sigma-algebras, measures, function maps in Measurespace, define probability as a Measure space, define random variable as a map to probability to generate a measurespace.

My proof for E[E[x|y]] = E[x] in one of homework questions also contains one proof using Omega notations i.e. Measure theoretic but its not as deep as that of LeanProver. But then I thought, I could create my own functions, theorems, axioms but in reverse direction - create something abstract like E as a function, P as a probability as a function, define axioms involving probability, just that which is required for Conditional Expectation. But as per Marek's suggestion on Nov 4th 2024's meeting, I understand why this direction of top to-bottom approach i.e. abstract implementation to specific is more work and possibly re-work.

After completing the MIT courses, I went over the implementation of Mathlib.MeasureTheory.Function.ConditionalExpectation.Basic.

Random Variable in Lean
variable {Ω : Type*} [MeasurableSpace Ω] {X : Ω → ℝ } (hX : Measurable X)
Keyword Noncomputable

There is one keyword called as noncomputable which is interesting which explains a lot why lean is not SymPy or NumPy.

Probability Mass Function (PMF) in LEAN

-- I was hoping this should have been defined by the axioms of the probability, but I dont know PMF is defined by itself as a standalone function that can be overwritten or extended.

-- Basically a function mapping α → ℝ0∞ such that Σf = 1.

HasSum is a Topological Monoid

11/7/2024

Drafting steps to follow for designing proofs in LeanProver

  1. Write down the original proof of theorem/claim/lemma.
  2. Write down relevant lemmas, axioms required for written proof.
  3. Check Lean Prover documentation to find out what axioms, lemmas, proofs are available.
  4. In my experience, what we want to prove, and the proof we write might be different from what Lean Prover provides.
  5. Alternative to 4, would be to write all required axioms, proofs from the scratch in Lean Prover, which may be reinventing the wheel.
  6. Tactics is an important part of proof. For some claims, we want to prove LHS = RHS and RHS = LHS.

Proof Planning

Missing theorems, proofs for proving E[E[x|y]] = E[x]

It may be easier to prove using Omega notations (measure theory implementations that already exist in Lean4).

Discrete case
Continuous case

Research work

Tactics

RFL - Reflexive

11/12/2024

Review comments from Marek for DeterministicDP.lean

How I tracked it, in order

Write the proof first, check what the prover already has, and do not reinvent the wheel.

Tracking evidence

Proof Systems presentation slides — Google Slides (published) lean-meeting-notes — Google Doc (weekly meetings and Zulip chats) Zulip chats — Google Drive folder (unhlean-status)

November 2026: lightly, the news caught up (though the news itself is unverified)

119 → 333

Problems solved — until 2025, then in 2026. That count is as shown in the video in the post below; it was not independently verified here.

“Mathematicians have been building castles in the sky, at a rate of a couple lovingly handcrafted bricks per year. The industrial age of math has begun in 2026.”

Axiom claimed two results in Lean: the Extended Riemann Hypothesis (RH for Dedekind zeta functions) of totally real and CM fields, and a new route to the generalized Ramanujan–Petersson conjecture using the Weil conjectures. A skill I never thought would help is suddenly everywhere. Yet LeanTutor is still a Berkeley classroom tool, not a public one.

Why a public Lean tutor matters

Here is the pattern: first, AI claims challenge age-old science. Then, the tool used to verify it is released, to fast-track learning. But right now, LeanTutor is still not publicly available.

And that matters, because Lean is a language in itself. Switching from English to Lean, or from Python to Lean, is a huge context jump, and a cognitively overloading task. Lean also changes versions fast, so there is always significant catching up. That is why a public Lean tutoring tool matters, so many mathematicians and scientists can access it and keep up.

Resources

My work at CU Boulder — research-experience / university-of-colorado-boulder My work at the University of Arizona — research-experience / university-of-arizona My work at the University of New Hampshire — research-experience / university-of-new-hampshire My works at lean-theorem-proving Theorem Prover demo (ATLS 5241, Boulder) Markov Logic Networks repo (Boulder) LeanTutor — Berkeley Axiom — Extended Riemann Hypothesis repo Axiom — ERH preprint Axiom — Ramanujan–Petersson repo Axiom — Ramanujan–Petersson technical report X post — AxiomMathAI, November 2026 X post — Plinz, November 2026