Rado's Radical Reflections

Human Intuition, AI Formalization: A Real Analysis Case Study

Disclaimer - I wrote the core ideas; Claude helped flesh out and polish the article. See appendix for more on this.

This is a follow up to my previous post on leaning on Claude for Lean. I’ve now worked up to chapter 8.3 in Tao’s companion. The speed is great and Claude’s capabilities continue to impress (autoformalization is possible, but not my goal). I haven’t been stuck on anything so far. I’ve also upstreamed many typos to the companion repo.

There have been many great recent essays on math, AI and formalization:

But what I want to offer here is a specific case study on working through two real analysis problems from Chapter 8.2 with Claude and Lean.

Case Study - Riemann’s Divergence Theorem

This has to do with the classical result by Riemann — the Riemann series theorem.

Problem 8.2.5

The book outlines a sketch of a proof and the exercise is to complete the proof.

Problem 8.2.5 from Tao’s Analysis

The companion translates that to Lean as this exercise and again asks to complete it by removing the sorries.

Here is how I approached this:

Followup problem 8.2.6 - divergence after rearrangement

Once I understood 8.2.5, I was in a good position to solve 8.2.6 (which previously I couldn’t because I didn’t grasp the solution to 8.2.5).

This is the picture I had in my mind:

Intuition for the divergent rearrangement construction

Summary

I am surprisingly happy with this workflow and plan to keep charging ahead until I complete the Real Analysis exercises (likely another month or so). If I used Claude less I likely would have learned more about Lean and mathlib, but at the expense of 10x of my time, it doesn’t feel like the right tradeoff right now. I am happy that I can still engage the material on an intuition level. After the iteration we did, I feel the resulting lean proof is our proof not just Claude’s output. Admittedly I did much less work, but feel more like a collaborator than say a principal researcher whose name is on the paper because he provided the money (I did pay for the Claude $100/month subscription.)

As Terence Tao says in his interview:

There’s a big crowd of people who really, really want AI success stories. And then there’s an equal and opposite crowd of people who want to dismiss all AI progress. And what we have is a very complicated and nuanced story in between.

Practically, when using AI for writing Lean the two extremes are represented by:

I believe I am finding a nice middle ground through my usage of Claude and Lean.

When I was in grad school I had a repeated feeling of being unable to see the forest from the trees. I was grinding through definitions and proofs with no intuition in sight, until I left academia altogether. In the new human / LLM / Lean collaborative math world, I feel I can stay more fully in the intuitive level, converse on that level with the LLM, which can then translate it to the formal Lean level (paying the high time cost of that conversion instead of using my human time) and bring back any missing insight to me. Finally, I know enough of Lean to spot check the formal level, but I’m not required to fully (especially outside definitions).

I can dream up math ideas, while Claude can ground them in Lean and come back to me with the logical reality. I don’t see this as a bad development.

Appendix: Riemann’s original proof

I thought it would be curious to see how Riemann actually proved it — original text (PDF) (used Claude for translation)

The insight into the path to be taken in solving this problem came to him from the recognition that infinite series fall into two essentially different classes, depending on whether they remain convergent or not when all terms are made positive. In the former, the terms may be arbitrarily rearranged; the value of the latter, by contrast, depends on the ordering of the terms. Indeed, if in a series of the second class one denotes the positive terms in succession by a₁, a₂, a₃, …, and the negative ones by −b₁, −b₂, −b₃, …, it is clear that both Σa and Σb must be infinite; for if both were finite, the series would still converge after making all signs equal; but if one were infinite, the series would diverge. Now it is evident that the series can, by a suitable arrangement of its terms, be made to equal any arbitrarily given value C. For if one takes alternately positive terms of the series until their sum exceeds C, and then negative terms until their sum falls below C, the deviation from C will never be greater than the value of the term preceding the last change of sign. Since now both the quantities a and the quantities b ultimately become infinitely small as the index grows, the deviations from C will also, if one goes far enough in the series, become arbitrarily small — that is, the series will converge to C. Only to series of the first class are the laws of finite sums applicable; only they can truly be regarded as representing the totality of their terms — series of the second class cannot; a circumstance that was overlooked by the mathematicians of the previous century, mainly, it seems, because the series that proceed in ascending powers of a variable quantity belong, generally speaking (that is, with the exception of particular values of that quantity), to the first class.

Curiously, Riemann’s proof reads more like my handwavy intuition sketches than a modern textbook proof — of course, it was 150 years ago. We’ve since adopted much stricter standards of rigor, and rightly so, but I feel something got lost in the process. With this new human + AI + Lean workflow, I find myself writing proofs at Riemann’s level of intuition again, while Claude and Lean handle the formal details. It feels like coming full circle.

Back to top

Appendix: On AI-assisted writing

As an experiment I am leaving the initial pre-AI edits draft. I empathise with readers who are tired of plausible-looking but low-signal AI-generated articles. At the same time, I benefit from Claude’s efficiency in fleshing out my outlines. The raw draft should make clear this is not a one-shot post. Feedback welcome, we are all trying to figure out how this brave new world should work!

Back to top