<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Proof &amp; Machine</title>
  <subtitle>Essays on artificial intelligence and mathematics: theorem provers, olympiad solvers, computer-assisted proofs, and the puzzles that still break both.</subtitle>
  <link href="https://proofandmachine.github.io/feed.xml" rel="self"/>
  <link href="https://proofandmachine.github.io/"/>
  <updated>2026-08-25T00:00:00.000Z</updated>
  <id>https://proofandmachine.github.io/</id>
  <author><name>The Editors</name></author>
  <entry>
    <title>Maple at Forty: The Algebra System Built to Fit in a Shared Terminal</title>
    <link href="https://proofandmachine.github.io/articles/maple-at-forty/"/>
    <updated>2026-08-25T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/maple-at-forty/</id>
    <author><name>Miriam Adler</name></author>
    <category term="History"/>
    <summary>Maple started in 1980 because a Waterloo research group could not afford enough memory to run the computer algebra system they wanted. The constraint shaped everything that followed.</summary>
    <content type="html">&lt;p&gt;In November 1980, a group at the University of Waterloo had a problem that sounds quaint now and was not quaint then. They wanted to teach and do research with a computer algebra system. The systems available, chiefly MACSYMA and Reduce, needed more memory than the department could give to more than a handful of simultaneous users. MACSYMA in particular ran on a PDP-10 under a Lisp environment that assumed it owned the machine.&lt;/p&gt;
&lt;p&gt;Waterloo had a shared VAX and a lot of students. Keith Geddes and Gaston Gonnet decided the way out was to write a system small enough that many people could run it at once.&lt;/p&gt;
&lt;p&gt;The result was Maple. The name is a nod to Canada, and the design is a direct consequence of that memory constraint, in ways that are still visible in the product forty-five years later.&lt;/p&gt;
&lt;h2&gt;Small kernel, large library&lt;/h2&gt;
&lt;p&gt;The decision that defined Maple was splitting the system in two.&lt;/p&gt;
&lt;p&gt;A small kernel, written in C, handles the things that must be fast and must always be resident: the data structures for expressions, arithmetic on integers and rationals of arbitrary size, memory management, the simplifier, and the interpreter for Maple&#39;s own programming language.&lt;/p&gt;
&lt;p&gt;Everything else lives in a library written in that language, loaded on demand. Integration, differential equations, linear algebra, number theory, statistics, plotting. If you never call the differential equation solver, its code never enters memory.&lt;/p&gt;
&lt;p&gt;The kernel started at something like a hundred kilobytes. The library was and is enormous, and it grows with every release, but you only pay for the parts you touch.&lt;/p&gt;
&lt;p&gt;This looks obvious in retrospect. It was not the prevailing design. MACSYMA was a Lisp image, largely monolithic, and its footprint was its footprint. Writing the mathematical library in an interpreted language layered over a compiled core traded some speed for a great deal of flexibility, and it meant the library could be written by mathematicians rather than by systems programmers.&lt;/p&gt;
&lt;p&gt;It also meant the library was readable. For most of Maple&#39;s history you could type the name of a library procedure with the right settings and see its source. Students learned the algorithms by reading the implementation. That property has eroded somewhat as parts of the system moved into the kernel or into compiled modules, and it remains truer of Maple than of most commercial mathematical software.&lt;/p&gt;
&lt;h2&gt;The company, and the split&lt;/h2&gt;
&lt;p&gt;Maple was commercialised through Waterloo Maple Software, founded in 1988, later Maplesoft. The University of Waterloo and the founders held the rights, and the system was sold into universities and engineering firms.&lt;/p&gt;
&lt;p&gt;The most consequential business event in Maple&#39;s history is one that happened to a competitor. In 1988 Stephen Wolfram released Mathematica, with a notebook interface, aggressive marketing, and a pitch aimed as much at scientists generally as at symbolic mathematics specialists. The two systems have been paired in comparisons ever since, usually to Maple&#39;s disadvantage in visibility and to nobody&#39;s clear advantage in capability.&lt;/p&gt;
&lt;p&gt;There is a footnote worth recording. In the early 1990s the Maple kernel was licensed to a company building a competing product, which is how MathCad got its symbolic engine. For a period, part of Maple was inside a product that competed with Maple.&lt;/p&gt;
&lt;p&gt;Maplesoft was acquired by Cybernet Systems, a Japanese company, in 2009. Development continues, with annual releases, and the current emphasis is as much on Maple Flow and MapleSim, which target engineering documentation and physical modelling, as on the symbolic core.&lt;/p&gt;
&lt;h2&gt;What the language is like&lt;/h2&gt;
&lt;p&gt;Maple&#39;s programming language is a genuine language, not a command syntax, and it is idiosyncratic in ways that reward a little patience.&lt;/p&gt;
&lt;p&gt;Everything is an expression, and expressions are represented internally as a directed acyclic graph with structure sharing. Identical subexpressions are stored once. This is invisible until you work with something large, at which point it is the reason a computation that should have exhausted memory did not.&lt;/p&gt;
&lt;p&gt;Assignment uses &lt;code&gt;:=&lt;/code&gt;, which is Pascal&#39;s convention and predates the systems most people learn first. A statement ending in a semicolon prints its result; one ending in a colon does not. That distinction catches every new user exactly once, usually when a computation prints a screenful of output they did not want.&lt;/p&gt;
&lt;p&gt;Procedures are first class. The language has lexical scoping, remember tables that cache results automatically when you ask for them, and a type system rich enough to dispatch on structural properties of expressions. &lt;code&gt;type(x, &#39;polynom(rational, y)&#39;)&lt;/code&gt; asks whether x is a polynomial in y with rational coefficients, and the answer is a real structural check rather than a guess.&lt;/p&gt;
&lt;p&gt;The unevaluated quote is the piece that confuses people coming from other languages. Single quotes delay evaluation by one level, which matters because Maple evaluates aggressively. You use it to pass a name rather than a value, most commonly when a procedure needs somewhere to put a result.&lt;/p&gt;
&lt;h2&gt;Assumptions, and why they matter&lt;/h2&gt;
&lt;p&gt;The feature Maple users cite most, and the one that most repays understanding, is the assumption system.&lt;/p&gt;
&lt;p&gt;Symbolic mathematics is full of statements that are true under conditions and false without them. The square root of x squared is x when x is non-negative and the absolute value of x otherwise. The logarithm of a product is the sum of the logarithms on a branch. An integral converges for some parameter ranges.&lt;/p&gt;
&lt;p&gt;A system that does not track conditions has two options, both bad. It can simplify aggressively and be wrong sometimes, or it can refuse to simplify and be useless often.&lt;/p&gt;
&lt;p&gt;Maple&#39;s answer is &lt;code&gt;assume&lt;/code&gt;, which attaches properties to a name, and &lt;code&gt;assuming&lt;/code&gt;, which applies them to a single expression. Tell it that x is real and positive and the square root simplifies. Tell it a parameter exceeds one and an integral evaluates. The properties live in a lattice, so declaring that something is a positive integer implies that it is an integer, rational, real and non-zero, and every relevant simplification unlocks at once.&lt;/p&gt;
&lt;p&gt;The system announces its awareness of the constraint by decorating the variable with a tilde in output. This annoys people. It is the system telling you that the result you are looking at is conditional, which is exactly the thing a symbolic answer needs to communicate.&lt;/p&gt;
&lt;p&gt;The general lesson transfers to any symbolic tool. When a computer algebra system refuses to simplify something you know is simplifiable, the usual cause is a condition you know and it does not.&lt;/p&gt;
&lt;h2&gt;Where Maple sits now&lt;/h2&gt;
&lt;p&gt;The honest picture of the current landscape has four kinds of tool, and Maple&#39;s position in it has narrowed without becoming marginal.&lt;/p&gt;
&lt;p&gt;Mathematica has more visibility, a larger curated data layer, and a language that people either love or find impenetrable. SymPy is free, embedded in the Python ecosystem, and good enough for a large fraction of what students and engineers need. Sage bundles many open-source engines behind a single interface. Maple retains particular strengths in differential equations, where its solver is widely regarded as the best available, and in exact arithmetic performance on certain classes of problem.&lt;/p&gt;
&lt;p&gt;Its other position is institutional. Maple is embedded in engineering curricula and in the workflows of firms that adopted it decades ago, along with Maple T.A. and its successors for automated assessment. That kind of adoption is slow to build and slow to leave.&lt;/p&gt;
&lt;h2&gt;The connection to everything else on this site&lt;/h2&gt;
&lt;p&gt;Maple belongs in a publication about artificial intelligence and mathematics for a reason that has nothing to do with Maple having AI features, though recent releases do.&lt;/p&gt;
&lt;p&gt;It is the clearest available example of the component that supplies certainty. When a language model produces an integral, the integral is a guess shaped like an answer. When Maple produces one, it ran the Risch algorithm or a decision procedure derived from it, and the result is correct or the system tells you it could not find one in closed form.&lt;/p&gt;
&lt;p&gt;The failure modes are opposite in the most useful way. Maple fails loudly, returning an unevaluated expression, and it fails on input it cannot parse or conditions it has not been told. A language model fails silently, in fluent prose, and it fails most often on exactly the long exact computations Maple was built for.&lt;/p&gt;
&lt;p&gt;Every reliable workflow described elsewhere on this site is some arrangement of those two halves. The forty-five-year-old system is the half that cannot be wrong, and the reason it cannot be wrong is that a group in Waterloo could not afford the memory to run anything bigger.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Getting a Straight Answer Out of Maple</title>
    <link href="https://proofandmachine.github.io/articles/getting-a-straight-answer-out-of-maple/"/>
    <updated>2026-08-24T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/getting-a-straight-answer-out-of-maple/</id>
    <author><name>Dana Reisman</name></author>
    <category term="Practice"/>
    <summary>The complaints about computer algebra systems are mostly about six behaviours. Each has a cause, and knowing the cause turns an argument with the software into a two-line fix.</summary>
    <content type="html">&lt;p&gt;People who give up on computer algebra systems usually give up for the same handful of reasons. The system refuses to simplify something obvious. It returns an answer in a form nobody wants. It hands back a result three pages long. It says nothing at all and sits there.&lt;/p&gt;
&lt;p&gt;None of these are bugs. Each is the system behaving correctly under a constraint you have not seen. The examples below use Maple&#39;s syntax, and the causes apply to Mathematica, SymPy, Maxima and Sage with the names changed.&lt;/p&gt;
&lt;h2&gt;It will not simplify the square root&lt;/h2&gt;
&lt;p&gt;You ask for the square root of x squared and get back the square root of x squared.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; simplify(sqrt(x^2));
                              csgn(x) x
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The answer is not x, because x might be negative. It is not the absolute value of x either, because x might be complex, and Maple defaults to assuming a symbol could be any complex number. What comes back is x multiplied by a sign function that resolves once the system knows where x lives.&lt;/p&gt;
&lt;p&gt;Tell it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; simplify(sqrt(x^2)) assuming x::real, x &amp;gt;= 0;
                                  x
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is the single most common source of frustration with any symbolic system, and the fix is always the same. State the domain. A symbol with no declared properties is a complex number, and most of the identities you learned are real-valued identities.&lt;/p&gt;
&lt;p&gt;The habit worth building is to declare properties at the point where you introduce a variable rather than at the point where a simplification fails. It costs one line and it prevents a category of confusion rather than resolving instances of it.&lt;/p&gt;
&lt;h2&gt;It gives an answer, in the wrong shape&lt;/h2&gt;
&lt;p&gt;Symbolic results have many equivalent forms, and the system has no way of knowing which one you want. A partial fraction decomposition and a single rational expression are the same function. A product of factors and an expanded polynomial are the same polynomial.&lt;/p&gt;
&lt;p&gt;Maple&#39;s approach is a set of transformation commands, each moving toward a specific normal form: &lt;code&gt;expand&lt;/code&gt;, &lt;code&gt;factor&lt;/code&gt;, &lt;code&gt;normal&lt;/code&gt;, &lt;code&gt;combine&lt;/code&gt;, &lt;code&gt;collect&lt;/code&gt;, &lt;code&gt;convert&lt;/code&gt;, &lt;code&gt;rationalize&lt;/code&gt;, and &lt;code&gt;simplify&lt;/code&gt; as a general-purpose heuristic.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;simplify&lt;/code&gt; is the one to reach for last, not first. It applies a large collection of rules and tries to reduce some internal measure of complexity, and its notion of simpler does not always match yours. When you know the form you want, name it. &lt;code&gt;collect(expr, x)&lt;/code&gt; gathers powers of x. &lt;code&gt;convert(expr, parfrac, x)&lt;/code&gt; gives partial fractions. These are deterministic and they do what they say.&lt;/p&gt;
&lt;p&gt;A useful diagnostic when two expressions ought to be equal and do not look it: subtract them and call &lt;code&gt;simplify&lt;/code&gt;, or better, &lt;code&gt;normal&lt;/code&gt; on the difference. Zero settles it. Comparing two complicated forms by eye settles nothing.&lt;/p&gt;
&lt;h2&gt;The answer is three pages long&lt;/h2&gt;
&lt;p&gt;Expression swell is intrinsic to exact computation and it is not a sign that anything went wrong.&lt;/p&gt;
&lt;p&gt;The mechanism is easy to see with a determinant. A symbolic matrix of modest size produces a determinant with a number of terms that grows factorially, and the intermediate expressions produced along the way can be much larger than the final result even when the final result is small. Gröbner basis computation is doubly exponential in the worst case and reaches that worst case on inputs that look unremarkable.&lt;/p&gt;
&lt;p&gt;Three responses, in order of how often they help.&lt;/p&gt;
&lt;p&gt;Substitute numbers earlier. If half your parameters are known constants in the end, putting them in before the expensive step rather than after can change the computation from impossible to instant.&lt;/p&gt;
&lt;p&gt;Ask for less. &lt;code&gt;RootOf&lt;/code&gt; is Maple&#39;s representation for a root of a polynomial that has no useful radical form, and leaving an answer in that representation is often better than forcing it into radicals, which for a quartic produces something nobody can read and nothing can use.&lt;/p&gt;
&lt;p&gt;Work modulo something. Many structural questions about polynomials can be settled over a finite field far faster than over the rationals, and the answer transfers.&lt;/p&gt;
&lt;h2&gt;It returns the integral unevaluated&lt;/h2&gt;
&lt;p&gt;This is Maple telling you something specific and true, and it is worth appreciating rather than resenting.&lt;/p&gt;
&lt;p&gt;For elementary functions, the Risch algorithm decides whether an antiderivative exists in elementary terms. When Maple returns an integral unevaluated, the usual meaning is that no elementary antiderivative exists, or that the integrand falls outside the class the implemented algorithm decides completely.&lt;/p&gt;
&lt;p&gt;The integral of e to the minus x squared has no elementary antiderivative. That is a theorem, not a limitation of the software. What you want in that case is the error function, and Maple will give you that if you ask for the definite integral or convert the result.&lt;/p&gt;
&lt;p&gt;For definite integrals, an unevaluated result more often means the system could not establish convergence, which is a conditions problem again. Supplying assumptions on the parameters frequently unlocks it.&lt;/p&gt;
&lt;p&gt;The general principle: a symbolic system that returns your input unchanged has told you it could not do the thing, which is more information than a confident wrong answer. Treat the unevaluated result as a message rather than a failure.&lt;/p&gt;
&lt;h2&gt;It disagrees with the numerical answer&lt;/h2&gt;
&lt;p&gt;When a symbolic result and a numerical check disagree, three causes cover almost every case.&lt;/p&gt;
&lt;p&gt;Branch cuts. Complex-valued functions like logarithm and fractional powers have discontinuities, and an identity that holds on one branch fails across it. Evaluating at a point on the wrong side of a cut produces a genuine disagreement between two correct expressions.&lt;/p&gt;
&lt;p&gt;Assumptions you supplied that are false at the test point. If you told the system a parameter is positive and then evaluate at a negative value, the simplified form is not valid there.&lt;/p&gt;
&lt;p&gt;Floating point in the numerical check. Maple&#39;s &lt;code&gt;evalf&lt;/code&gt; takes a precision argument for a reason. If a computation is ill-conditioned, the default fifteen digits can be inadequate, and raising &lt;code&gt;Digits&lt;/code&gt; to fifty and seeing the disagreement shrink identifies the cause immediately.&lt;/p&gt;
&lt;p&gt;Test at several random points, not one, and prefer points well away from zero, one, and any singularity. Agreement at twenty random points to twenty digits is not a proof, and it is enough to act on.&lt;/p&gt;
&lt;h2&gt;It is slow&lt;/h2&gt;
&lt;p&gt;The first question is whether you are computing symbolically when you need numbers.&lt;/p&gt;
&lt;p&gt;Symbolic computation is expensive because it is exact. If the end product is a plot or a table of values, &lt;code&gt;evalf&lt;/code&gt; early and use the numerical routines. Maple&#39;s &lt;code&gt;evalhf&lt;/code&gt; evaluates in hardware floating point and is dramatically faster than software arbitrary precision when the extra precision is not needed.&lt;/p&gt;
&lt;p&gt;The second question is whether you are recomputing. Maple procedures can carry a remember table, caching results by argument, and turning it on for a recursive function changes exponential work into linear work. This is memoisation with one option rather than a rewrite.&lt;/p&gt;
&lt;h2&gt;Where a language model fits&lt;/h2&gt;
&lt;p&gt;The pattern that works is narrow and it is the same one that applies to every symbolic tool.&lt;/p&gt;
&lt;p&gt;Use the model to produce the Maple, not the answer. Describing a problem in English and asking for the commands that express it plays to what a language model is genuinely good at, which is translating between informal statement and formal syntax. Then run the commands. What comes back is computed by an algorithm, not predicted.&lt;/p&gt;
&lt;p&gt;Use the model to interpret a result you already trust. A page of output containing &lt;code&gt;RootOf&lt;/code&gt; and hypergeometric functions is correct and unreadable, and asking for an explanation of what the expression represents is low-risk, because the expression is already known correct.&lt;/p&gt;
&lt;p&gt;Do not use the model as the source of the answer and the tool as a rubber stamp. The failure mode there is that a wrong answer arrives with a plausible verification attached, and the whole value of the algorithm is that it does not care what anyone expected.&lt;/p&gt;
&lt;p&gt;The division holds throughout. One half of the workflow guesses well and fails silently. The other half never guesses and says so when it cannot proceed. Keeping track of which half produced a given line is most of the skill.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Why Mathematics Is So Hard to Get Out of a PDF</title>
    <link href="https://proofandmachine.github.io/articles/why-mathematics-is-hard-to-get-out-of-a-pdf/"/>
    <updated>2026-08-22T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/why-mathematics-is-hard-to-get-out-of-a-pdf/</id>
    <author><name>Yonatan Peled</name></author>
    <category term="Explainers"/>
    <summary>A PDF does not contain an equation. It contains instructions for putting marks at coordinates. Everything difficult about extracting mathematics follows from that one fact.</summary>
    <content type="html">&lt;p&gt;Copy a paragraph out of a research paper and paste it somewhere. The text arrives, more or less. Now copy an equation from the same page. What arrives is something like &lt;code&gt;f (x) = 1 2π e−x2/2&lt;/code&gt;, with the fraction flattened, the exponent inline, and the square root gone entirely.&lt;/p&gt;
&lt;p&gt;This is not a bug in your reader. It is what the file contains.&lt;/p&gt;
&lt;h2&gt;What a PDF actually is&lt;/h2&gt;
&lt;p&gt;PDF is a page description language, descended from PostScript, and its job is to make a page look identical everywhere. It achieves that by describing the page as a sequence of drawing operations.&lt;/p&gt;
&lt;p&gt;A text-showing operation says: using this font resource, at this position, with this transformation matrix, draw these glyph codes. That is the whole model. There are no paragraphs, no sentences, no words in any structural sense. There is not even a space character in many PDFs, because a typesetter that wants a gap simply moves the drawing position and starts the next run of glyphs somewhere else.&lt;/p&gt;
&lt;p&gt;Reading text out of a PDF therefore means reconstructing structure that was never stored. An extractor collects the glyphs, sorts them by position, guesses where words end from the gaps, guesses where lines end from the vertical positions, and guesses reading order from the geometry. For ordinary prose in a single column, those guesses are reliable enough that the loss is invisible.&lt;/p&gt;
&lt;p&gt;Mathematics breaks every one of them.&lt;/p&gt;
&lt;h2&gt;Why formulas break the reconstruction&lt;/h2&gt;
&lt;p&gt;Consider a fraction. In the file it is three things: a run of glyphs at one vertical position, a run of glyphs lower down, and a thin filled rectangle between them. There is nothing marking the relationship. The rectangle is a rectangle, indistinguishable from a rule under a heading or a border on a table.&lt;/p&gt;
&lt;p&gt;A superscript is a glyph drawn slightly higher and slightly smaller. Whether that means exponentiation, a footnote marker, or a transpose depends on context the file does not record.&lt;/p&gt;
&lt;p&gt;An integral sign is a glyph. Its limits are two small glyph runs positioned above and below it. The relationship is spatial and nothing else.&lt;/p&gt;
&lt;p&gt;A square root is a radical glyph plus a horizontal rule whose length happens to cover the expression underneath. The scope of the root is expressed entirely by how long somebody drew a line.&lt;/p&gt;
&lt;p&gt;So an extractor faced with mathematics has to infer a tree from a two-dimensional arrangement of marks, using conventions that are typographic rather than semantic. Sorting by position, which works for prose, actively destroys the information: it flattens a two-dimensional layout into one dimension, and the layout was the meaning.&lt;/p&gt;
&lt;h2&gt;The font problem on top&lt;/h2&gt;
&lt;p&gt;TeX, which typeset most of the mathematics published in the last forty years, made this worse in a specific way.&lt;/p&gt;
&lt;p&gt;The Computer Modern math fonts were built with custom encodings. A glyph&#39;s code in the font is not its Unicode code point, and for many mathematical symbols there was no Unicode code point when the fonts were designed. A PDF produced by older TeX pipelines may contain glyph code 1 in a font named &lt;code&gt;cmmi10&lt;/code&gt;, and what that means requires knowing that font&#39;s encoding table.&lt;/p&gt;
&lt;p&gt;Well-behaved PDFs carry a &lt;code&gt;ToUnicode&lt;/code&gt; map that translates glyph codes back to characters. Many older ones do not, or carry an incomplete one. When the map is missing, extraction produces plausible-looking garbage: Greek letters that come out as Latin ones, minus signs that come out as hyphens or as nothing.&lt;/p&gt;
&lt;p&gt;Ligatures compound it. A single glyph may represent two characters, and without the map there is no way to know.&lt;/p&gt;
&lt;h2&gt;The three kinds of PDF&lt;/h2&gt;
&lt;p&gt;Practically, documents fall into three groups, and which group you have determines what is possible.&lt;/p&gt;
&lt;p&gt;A born-digital PDF from a modern LaTeX pipeline has correct fonts, a usable &lt;code&gt;ToUnicode&lt;/code&gt; map, and sometimes tagging. Text extraction works; mathematics still requires layout analysis, but the raw glyph identities are trustworthy.&lt;/p&gt;
&lt;p&gt;A born-digital PDF from an older pipeline has correct positioning and unreliable character identity. This is the frustrating case, because the file looks perfect and extracts into nonsense.&lt;/p&gt;
&lt;p&gt;A scanned PDF contains images of pages and no text at all. Everything must come from optical character recognition, and now you have the layout problem and the recognition problem together.&lt;/p&gt;
&lt;p&gt;Journals have been scanning back catalogues for decades, so a large share of the mathematical literature before roughly 1995 exists only in the third form.&lt;/p&gt;
&lt;h2&gt;What tagging was supposed to fix&lt;/h2&gt;
&lt;p&gt;PDF has had a structural layer since 2001. Tagged PDF, standardised as PDF/UA, lets a document carry a logical structure tree alongside the drawing instructions: this run of glyphs is a heading, these are paragraphs, this is a table with these cells.&lt;/p&gt;
&lt;p&gt;For mathematics, the intended mechanism is embedding MathML in the structure tree, so the file carries both the marks and the meaning.&lt;/p&gt;
&lt;p&gt;Adoption is poor. Producing tagged PDF requires the generating tool to emit the structure, and most mathematical typesetting pipelines historically did not. This is improving: recent LaTeX releases have made tagged output a priority, and accessibility regulation in several jurisdictions now requires it for public sector documents. The effect on the existing corpus is nil, because the existing corpus is already written.&lt;/p&gt;
&lt;p&gt;The accessibility consequence is the one that matters most and gets discussed least. A screen reader on an untagged mathematical PDF reads the flattened glyph sequence, which is meaningless. A blind mathematician reading a paper from 1998 has no route to the equations short of someone transcribing them.&lt;/p&gt;
&lt;h2&gt;What actually works&lt;/h2&gt;
&lt;p&gt;Three approaches, with different failure modes.&lt;/p&gt;
&lt;p&gt;Get the source. For anything on arXiv since 1991, the LaTeX source is usually available for download alongside the PDF, and the source contains the mathematics as markup. This solves the problem completely and it is consistently the first thing people forget to try.&lt;/p&gt;
&lt;p&gt;Rule-based layout analysis. Tools like INFTY and various open-source successors treat formula recognition as a structured problem: identify symbols, build a spatial relationship graph, parse it into a tree using typesetting conventions. These work well on clean input and degrade on anything unusual.&lt;/p&gt;
&lt;p&gt;Neural image-to-markup. Treat a cropped formula image as input and generate LaTeX as output, the same architecture as image captioning. This is where most current work sits, and models such as Nougat and the various formula recognition systems have pushed accuracy on clean printed mathematics to a level that is genuinely useful.&lt;/p&gt;
&lt;p&gt;The last approach has a failure mode worth naming. The output is always syntactically valid LaTeX, because the model learned to produce LaTeX. Whether it is the right LaTeX is a separate question, and a wrong exponent or a dropped subscript renders perfectly and looks correct. Silent corruption of a formula is worse than a visible failure, and it means any pipeline that extracts mathematics at scale needs a verification step that does not come from the same model.&lt;/p&gt;
&lt;h2&gt;The practical shape of it&lt;/h2&gt;
&lt;p&gt;If you need mathematics out of a document, work down this list.&lt;/p&gt;
&lt;p&gt;Look for the source. arXiv, the author&#39;s page, the publisher&#39;s HTML version if one exists.&lt;/p&gt;
&lt;p&gt;If the PDF is born-digital, check whether text extraction produces sane characters at all before investing in layout analysis. If Greek letters arrive as Latin, the font map is broken and no amount of layout work fixes it.&lt;/p&gt;
&lt;p&gt;If you must recognise formulas from images, render what you extracted and compare it against the original visually. This is the only cheap check that catches silent corruption, and comparing two rendered images is much easier than comparing two strings of LaTeX.&lt;/p&gt;
&lt;p&gt;For anything consequential, transcribe by hand. This sounds defeatist and it is the correct answer more often than people expect. A page of dense mathematics takes twenty minutes to type and the result is certainly right.&lt;/p&gt;
&lt;p&gt;The underlying situation is unlikely to change for the existing literature. Millions of papers were published in a format that records how a page looked and not what it said, and that decision is now permanent for everything already printed.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Machines Reading the Mathematical Literature</title>
    <link href="https://proofandmachine.github.io/articles/machines-reading-the-mathematical-literature/"/>
    <updated>2026-08-20T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/machines-reading-the-mathematical-literature/</id>
    <author><name>Dana Reisman</name></author>
    <category term="Analysis"/>
    <summary>Turning a century of PDFs into something a computer can reason over is the unglamorous bottleneck under every claim about AI doing mathematics at scale.</summary>
    <content type="html">&lt;p&gt;Every ambitious claim about artificial intelligence and mathematics rests on a quiet assumption: that the mathematical literature is available to the machine. Millions of papers, a couple of centuries of results, sitting there as training data or as a corpus to search.&lt;/p&gt;
&lt;p&gt;It is available in the sense that the files exist. It is available in the sense a library is available to someone who cannot read the shelf labels. The corpus is overwhelmingly PDF, PDF records how a page looked rather than what it said, and the gap between those two things is where a surprising amount of the actual work in this field happens.&lt;/p&gt;
&lt;h2&gt;The scale of what is there&lt;/h2&gt;
&lt;p&gt;arXiv holds well over two million preprints and takes more than twenty thousand a month. For submissions since 1991 the LaTeX source is usually available, which makes it the single most valuable mathematical corpus in existence, because the mathematics arrives as markup rather than as marks on a page.&lt;/p&gt;
&lt;p&gt;Everything else is harder. zbMATH Open and MathSciNet index millions of items with reviews and metadata, but the reviews are prose about papers rather than the papers. Journal back catalogues digitised in the 1990s and 2000s are page images. Books are mostly scans. Theses vary by institution and are frequently the worst-formed documents in the whole ecosystem.&lt;/p&gt;
&lt;p&gt;A reasonable estimate is that the fraction of the mathematical literature available in a form where the formulas are machine-readable, without recognition, is well under half, and heavily skewed toward physics-adjacent fields that adopted arXiv early and toward the last thirty years.&lt;/p&gt;
&lt;h2&gt;What extraction pipelines do&lt;/h2&gt;
&lt;p&gt;A modern pipeline has four stages, and each loses something.&lt;/p&gt;
&lt;p&gt;Layout analysis decides what is on the page: body text, headings, figures, captions, tables, display equations, footnotes, page furniture. This is object detection on a rendered page image, and it is largely solved for standard journal layouts and reliably wrong on two-column pages with figures spanning columns, on marginal notes, and on anything from before typesetting standardised.&lt;/p&gt;
&lt;p&gt;Reading order reconstructs the sequence. Column detection carries most of it. Failures here produce text that is individually correct and globally scrambled, which is worse than it sounds because the scrambling is invisible in the output.&lt;/p&gt;
&lt;p&gt;Text and formula recognition converts regions to characters and markup. Inline mathematics is the difficult case, because a symbol embedded in a sentence has to be recognised as mathematics before it can be parsed as mathematics, and the visual cue is often just an italic font.&lt;/p&gt;
&lt;p&gt;Semantic recovery, where anyone attempts it, turns markup into meaning. LaTeX says how something is printed, not what it denotes. The same rendered expression can be a product, a function application, or a group action, and the source usually does not distinguish them.&lt;/p&gt;
&lt;h2&gt;The evaluation problem&lt;/h2&gt;
&lt;p&gt;Reporting accuracy on formula recognition is harder than it looks, and the reported numbers are softer than they appear.&lt;/p&gt;
&lt;p&gt;Exact string match against reference LaTeX punishes correct output that differs cosmetically. Writing &lt;code&gt;&#92;frac{1}{2}&lt;/code&gt; where the reference has &lt;code&gt;&#92;dfrac{1}{2}&lt;/code&gt;, or omitting braces that were not needed, counts as a miss while rendering identically.&lt;/p&gt;
&lt;p&gt;Rendered-image comparison fixes that by compiling both and comparing pixels, which is the metric most current work uses. It has its own hole: two expressions that render identically can carry different meaning, and an expression that renders slightly differently may be mathematically identical.&lt;/p&gt;
&lt;p&gt;Neither metric captures the failure that matters most in practice. A model trained to emit LaTeX emits syntactically valid LaTeX essentially always. When it is wrong, it is wrong in a way that compiles and renders and looks like mathematics. A dropped subscript, a sign that flipped, an exponent that migrated. Nothing downstream flags it.&lt;/p&gt;
&lt;p&gt;That asymmetry is the reason extraction at scale needs verification from something that is not the extractor. Rendering the output and comparing images against the source crop is the cheap version and it catches most of it.&lt;/p&gt;
&lt;h2&gt;Where this bites&lt;/h2&gt;
&lt;p&gt;Three consequences follow, and they are more concrete than the general worry.&lt;/p&gt;
&lt;p&gt;Training data quality. A model trained on the mathematical literature is trained on whatever came out of somebody&#39;s extraction pipeline. Where the pipeline mangled formulas, the model learned mangled formulas. This is one plausible contributor to a pattern people notice: models are markedly better at mathematics phrased in prose and in common notation than at anything requiring unusual symbols, and the corpus is cleaner in exactly the same places.&lt;/p&gt;
&lt;p&gt;Literature search. Searching for a theorem by its statement rather than by keywords requires the statements to be machine-readable. This is the capability mathematicians most consistently say they want, and it is blocked mainly by extraction rather than by search. Formula search exists in zbMATH and in specialised systems, and its coverage tracks the availability of clean markup.&lt;/p&gt;
&lt;p&gt;Autoformalisation. Translating a paper into Lean requires reading the paper. If the pipeline delivers a corrupted statement, the formalisation is a faithful rendering of the wrong theorem, and the proof assistant will happily verify a proof of it. The type checker guarantees the proof matches the statement. Nothing guarantees the statement matches the paper.&lt;/p&gt;
&lt;p&gt;That last point deserves emphasis because it inverts the usual comfort. Formal verification removes doubt about the proof and relocates all the remaining risk into the statement, and the statement came through the part of the pipeline with the weakest guarantees.&lt;/p&gt;
&lt;h2&gt;What has improved&lt;/h2&gt;
&lt;p&gt;The last few years produced real gains, and they are worth stating precisely rather than dismissively.&lt;/p&gt;
&lt;p&gt;End-to-end document models that take a page image and emit structured markup, Nougat being the widely used example, handle full pages including inline mathematics rather than requiring formula regions to be cropped first. On clean printed pages from the last two decades they are good enough to use as a first pass.&lt;/p&gt;
&lt;p&gt;Vision-language models handle unusual layouts considerably better than rule-based systems, because they were not built around assumptions about column geometry. They also hallucinate more inventively, which is the tradeoff.&lt;/p&gt;
&lt;p&gt;Handwriting recognition for mathematics has improved to the point where it is practical for lecture notes, which was not true five years ago.&lt;/p&gt;
&lt;p&gt;None of this touches the fundamental issue. A recognised formula is a hypothesis about what was printed. Confidence in that hypothesis has gone from low to fairly high, and it has not become certainty, and the pipelines mostly do not report calibrated confidence at all.&lt;/p&gt;
&lt;h2&gt;What would actually fix it&lt;/h2&gt;
&lt;p&gt;Two things, one boring and one already happening.&lt;/p&gt;
&lt;p&gt;Publish the source. Where an author has LaTeX, making it available alongside the PDF eliminates the entire problem for that paper. arXiv has done this since the beginning. Most journals do not. This costs nothing technically and is a policy question.&lt;/p&gt;
&lt;p&gt;Tag the output. PDF has carried a structural layer since 2001, and embedding MathML in it makes a document carry meaning alongside appearance. Recent LaTeX releases have made tagged output a priority and accessibility regulation is pushing publishers toward it. New documents will increasingly be fine.&lt;/p&gt;
&lt;p&gt;Neither helps the existing corpus, which is the whole point. A century of mathematics was published in formats that record appearance, and no policy change reaches backwards. Whatever we recover from it, we recover by recognition, with the error rates that implies.&lt;/p&gt;
&lt;p&gt;The framing that holds up: the bottleneck under machine mathematics at scale is not reasoning and is not compute. It is that the input is a picture of a page, and turning a picture into a statement is a guess, dressed in markup that renders perfectly whether or not the guess was right.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>How Machines Learned to Do Mathematics</title>
    <link href="https://proofandmachine.github.io/articles/how-machines-learned-to-do-mathematics/"/>
    <updated>2026-08-18T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/how-machines-learned-to-do-mathematics/</id>
    <author><name>Dana Reisman</name></author>
    <category term="History"/>
    <summary>Seventy years of trying to teach computers arithmetic, algebra and proof, and what changed when the machines stopped following rules and started guessing.</summary>
    <content type="html">&lt;p&gt;The first program that proved a mathematical theorem ran in 1956 on a machine with less memory than a modern doorbell. It was called Logic Theorist, written by Allen Newell, Herbert Simon and Cliff Shaw, and it worked its way through propositions from Whitehead and Russell&#39;s &lt;em&gt;Principia Mathematica&lt;/em&gt;. It proved thirty-eight of the first fifty-two. For one of them it found a shorter argument than the one in the book. Simon wrote to Bertrand Russell about it. Russell replied that he was delighted to learn the propositions could be proved by machine, and added that if the work had been available earlier he and Whitehead might have saved themselves some years.&lt;/p&gt;
&lt;p&gt;That exchange contains the whole argument that has run ever since. A machine did something that looked like mathematics. A mathematician conceded that it was useful. Nobody agreed on whether the machine understood anything.&lt;/p&gt;
&lt;h2&gt;Rules first&lt;/h2&gt;
&lt;p&gt;The early decades belonged to symbol manipulation. If mathematics is a formal game with pieces and legal moves, then a computer that knows the moves should be able to play. That premise produced a genuinely impressive line of software, and it is still the software most working scientists actually depend on.&lt;/p&gt;
&lt;p&gt;MACSYMA, begun at MIT in 1968, could integrate functions symbolically, factor polynomials and simplify expressions that would take a graduate student an afternoon. Its descendants are Maple, Mathematica, Maxima, SymPy and Sage. When you ask one of these systems for the indefinite integral of a rational function, it does not search or guess. It runs the Risch algorithm, a decision procedure published in 1969 that determines whether an elementary antiderivative exists and constructs it when it does. The answer is not a plausible answer. It is the answer, in the same sense that long division gives the answer.&lt;/p&gt;
&lt;p&gt;Alongside computer algebra grew automated theorem proving. Resolution provers, tableau provers, model checkers, SAT and SMT solvers. These systems do not integrate functions; they decide whether a logical statement follows from a set of premises. Modern SAT solvers are one of the quiet triumphs of computer science. They routinely settle problems with millions of variables, and industry uses them for chip verification, scheduling and dependency resolution. The package manager that installs your software probably runs one.&lt;/p&gt;
&lt;p&gt;The limitation was never correctness. It was reach. A rule-following system can only follow the rules it has. Ask a computer algebra system to prove something that requires an idea, a substitution nobody has seen before, a clever choice of auxiliary construction, and it has nothing to offer. The search space of possible proofs grows faster than any amount of hardware can absorb. Mathematics, it turned out, is mostly about knowing which branches not to explore, and rules do not encode taste.&lt;/p&gt;
&lt;h2&gt;Statistics second&lt;/h2&gt;
&lt;p&gt;The alternative approach spent decades looking hopeless. Instead of encoding the rules of mathematics, train a statistical model on examples of mathematics and let it learn whatever regularities exist in the data. For most of the history of the field this produced systems that could not reliably add two three-digit numbers.&lt;/p&gt;
&lt;p&gt;Two things changed. The transformer architecture arrived in 2017 and made it practical to train very large sequence models on very large corpora. And it became clear that a model trained to predict the next token across the internet, including textbooks, forums, homework solutions, arXiv papers and Stack Exchange threads, absorbs an enormous amount of mathematical pattern along the way.&lt;/p&gt;
&lt;p&gt;By 2022, large language models could solve grade-school word problems at a rate that surprised the people who built them. By 2024, systems built on the same foundations were scoring at the level of national olympiad medallists on competition geometry and combinatorics. In July 2024, DeepMind&#39;s AlphaProof and AlphaGeometry 2 together solved four of the six problems at the International Mathematical Olympiad, a silver medal performance. In 2025, several systems reached gold medal scores on the same competition.&lt;/p&gt;
&lt;p&gt;The interesting part is how they did it. AlphaGeometry pairs a language model with a symbolic deduction engine. The symbolic engine grinds out every consequence it can derive from the given configuration. When it gets stuck, the language model proposes an auxiliary construction, the extra point or line that unlocks the problem, which is exactly the step that pure search could never afford to guess at. Then the symbolic engine takes over again and checks everything. Neither half works alone. The neural component supplies intuition and the symbolic component supplies certainty.&lt;/p&gt;
&lt;h2&gt;What the split means&lt;/h2&gt;
&lt;p&gt;This is the shape almost every serious mathematical AI system now has. A component that guesses well, and a component that verifies. The guessing component is fast, creative, and wrong a meaningful fraction of the time. The verification component is slow, unimaginative, and never wrong about the things it checks.&lt;/p&gt;
&lt;p&gt;It matches, uncomfortably closely, how mathematicians describe their own practice. Nobody derives a theorem by exhaustive deduction from axioms. They see a shape, form a hunch, sketch an argument, and then spend most of their time checking whether the hunch survives contact with the details. Most hunches do not. The formal write-up is a record of the ones that did.&lt;/p&gt;
&lt;p&gt;The difference is that a mathematician&#39;s verification step is a human referee with limited attention, and a machine&#39;s verification step can be a proof assistant that checks every inference down to the axioms. Lean, Coq, Isabelle and HOL Light will not accept a hand wave. When Peter Scholze wanted to be certain of a result whose proof he found exhausting to check, he put it to the Lean community as a challenge. The formalisation was completed. He described the outcome as removing a genuine doubt.&lt;/p&gt;
&lt;h2&gt;What still does not work&lt;/h2&gt;
&lt;p&gt;It is worth being precise about the current failure modes, because the marketing is not.&lt;/p&gt;
&lt;p&gt;Language models are unreliable at long arithmetic, for structural reasons involving how numbers are broken into tokens. They will produce a confident proof of a false statement if the false statement resembles a true one. They cannot tell you how confident they are in any calibrated way. They perform worse on problems phrased in unfamiliar notation even when the mathematics is identical. And a large share of headline benchmark performance is contested, because the benchmark problems and their solutions were plausibly in the training data.&lt;/p&gt;
&lt;p&gt;None of these are fatal. All of them mean that an unverified model output is a conjecture, not a result.&lt;/p&gt;
&lt;h2&gt;Where this is going&lt;/h2&gt;
&lt;p&gt;The near-term picture is not machines replacing mathematicians. It is a change in what counts as a routine step. Terence Tao has written about using these tools as a slightly unreliable but very fast collaborator, useful for generating candidate approaches, formalising tedious lemmas and searching literature. Formalisation projects that would have taken a decade are now taking a year or two.&lt;/p&gt;
&lt;p&gt;The longer question is whether a system that guesses statistically can produce a genuinely new mathematical idea, as opposed to recombining ideas it has seen. Nobody knows. The honest position is that we have built something that is extremely good at the parts of mathematics that look like pattern recognition, which turns out to be a much larger share of the subject than the romantic story admits, and that the remaining part has not yet been touched.&lt;/p&gt;
&lt;p&gt;Russell&#39;s reply to Simon is still the right note to end on. The machine did something useful. Whether it understood anything is a separate question, and seventy years later it is still open.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Why a Language Model Cannot Count the R&#39;s in Strawberry</title>
    <link href="https://proofandmachine.github.io/articles/why-language-models-cannot-count/"/>
    <updated>2026-08-14T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/why-language-models-cannot-count/</id>
    <author><name>Yonatan Peled</name></author>
    <category term="Explainers"/>
    <summary>The most famous failure of modern AI is not a reasoning failure. It is a data representation problem, and understanding it tells you exactly when to trust a model with numbers.</summary>
    <content type="html">&lt;p&gt;Ask a state-of-the-art language model how many times the letter R appears in the word strawberry, and for several years the answer was two. The correct answer is three. This became a running joke, then a benchmark, then a genre of screenshot. It is worth understanding properly, because the same mechanism explains a much more consequential failure: why models are shaky at arithmetic on numbers they have not effectively memorised.&lt;/p&gt;
&lt;h2&gt;The model does not see letters&lt;/h2&gt;
&lt;p&gt;A language model does not receive text. It receives tokens, which are integer identifiers drawn from a fixed vocabulary of typically 50,000 to 200,000 entries. The text is chopped into these pieces by a tokeniser before the model sees anything, usually with an algorithm called byte pair encoding.&lt;/p&gt;
&lt;p&gt;Byte pair encoding builds its vocabulary greedily. Start with individual bytes, then repeatedly find the most frequent adjacent pair in the training corpus and merge it into a new single token. Do this a hundred thousand times and you end up with a vocabulary where common words are single tokens, common word fragments are single tokens, and rare sequences fall back to smaller pieces.&lt;/p&gt;
&lt;p&gt;Under a typical vocabulary, strawberry becomes something like &lt;code&gt;str&lt;/code&gt; &lt;code&gt;aw&lt;/code&gt; &lt;code&gt;berry&lt;/code&gt;. Three integers. The model never receives a sequence of eight characters. It receives three opaque symbols whose internal spelling is not part of the input at all.&lt;/p&gt;
&lt;p&gt;So when you ask how many R&#39;s it contains, the model has to answer a question about information that was destroyed before the first layer of the network ran. It can only answer from statistical association: what it has read &lt;em&gt;about&lt;/em&gt; the spelling of words, in text that discusses spelling. That is a much weaker signal than looking, and it is why the failure was so stubborn.&lt;/p&gt;
&lt;p&gt;Think of it as asking someone to count the letters in a word they have only ever heard spoken in a language whose spelling is irregular. They can often guess correctly. They are guessing.&lt;/p&gt;
&lt;h2&gt;The same problem, with digits&lt;/h2&gt;
&lt;p&gt;Now consider a number like 4,817,293. How does a tokeniser split that?&lt;/p&gt;
&lt;p&gt;It depends entirely on the tokeniser. Some split digits into groups of three from the left, which is not how place value works. Some produce chunks of one, two or three digits based on frequency in the training corpus, so &lt;code&gt;481&lt;/code&gt; might be a single token because it appeared often, while &lt;code&gt;7293&lt;/code&gt; becomes &lt;code&gt;72&lt;/code&gt; and &lt;code&gt;93&lt;/code&gt;. Some tokenisers used to split inconsistently depending on whether a comma or a space preceded the number.&lt;/p&gt;
&lt;p&gt;The consequence is that the model&#39;s internal representation of a number is not positional in any clean way. To add two numbers correctly, an algorithm needs to align digits by place value and propagate carries. A model working from irregular chunks has to reconstruct place value from context before it can do anything else.&lt;/p&gt;
&lt;p&gt;The best current models handle this considerably better than earlier ones, mostly through two fixes. Several vocabularies now force digits to tokenise one at a time or in fixed groups, which restores a consistent positional structure. And models are explicitly trained on large quantities of synthetic arithmetic with worked intermediate steps.&lt;/p&gt;
&lt;p&gt;But the underlying situation has not changed. Arithmetic in a language model is a learned approximation of an algorithm, not the algorithm. It degrades as numbers get longer, exactly where a real algorithm would not.&lt;/p&gt;
&lt;h2&gt;Why chain of thought helps&lt;/h2&gt;
&lt;p&gt;If you ask a model for the product of two four-digit numbers and demand only the answer, accuracy is poor. If you ask it to work through the multiplication in the way a schoolchild would, writing partial products and adding them, accuracy improves a great deal.&lt;/p&gt;
&lt;p&gt;The reason is not that the model is thinking harder. A transformer performs a fixed amount of computation per token generated. There is a hard ceiling on how much work can happen between reading your question and emitting the first token of the answer. It is a fixed-depth circuit, and long multiplication requires a number of sequential steps that grows with the length of the numbers.&lt;/p&gt;
&lt;p&gt;Writing intermediate steps moves that computation into the output sequence, where it is no longer bounded by network depth. Each partial product is a small enough operation to fit in one forward pass. The model then reads its own written work as context for the next step. Chain of thought converts a depth problem into a length problem, and length is cheap.&lt;/p&gt;
&lt;p&gt;This is a genuinely useful mental model. When a task needs a number of sequential dependent operations, either the model writes those operations out, or it does not perform them.&lt;/p&gt;
&lt;h2&gt;The correct fix&lt;/h2&gt;
&lt;p&gt;Neither better tokenisation nor longer chains of thought is the real answer for arithmetic. The real answer is that the model should not be doing arithmetic at all.&lt;/p&gt;
&lt;p&gt;Calculators exist. They are exact, they are older than the transistor, and they cost nothing to run. Any serious deployment gives the model a tool: a sandboxed interpreter, a calculator function, a computer algebra system. The model&#39;s job becomes translating the problem into a form the tool can evaluate, reading the result, and interpreting it. That is the part language models are genuinely good at.&lt;/p&gt;
&lt;p&gt;This pattern generalises far past arithmetic. The model is a translator between informal human framing and formal machinery. The formal machinery is what you trust. When someone shows you an impressive mathematical output from an AI system, the useful question is always which component produced the guarantee.&lt;/p&gt;
&lt;h2&gt;What this means for you&lt;/h2&gt;
&lt;p&gt;Three practical rules follow.&lt;/p&gt;
&lt;p&gt;First, treat any unverified number in a model&#39;s output as a rough estimate, including numbers that look precise. Precision in the rendering tells you nothing about precision in the derivation. A model will write 0.03847 with the same confidence it writes 0.04.&lt;/p&gt;
&lt;p&gt;Second, when you need arithmetic, make the tool call explicit. Ask for code, run the code. If the interface offers a code execution tool, turn it on. The difference in reliability is not marginal.&lt;/p&gt;
&lt;p&gt;Third, remember that the failure is silent. A model that cannot count letters does not tell you it cannot count letters. It answers two, in a fluent sentence, with no hedge. This is the general shape of the problem: the confidence of the output is roughly uncorrelated with its correctness on tasks the architecture cannot support.&lt;/p&gt;
&lt;h2&gt;A footnote on the strawberry&lt;/h2&gt;
&lt;p&gt;Newer models mostly answer three now, and it would be easy to read that as the problem being solved. It is worth being careful there. Some of the improvement is better tokenisation. Some is that models now often spell the word out character by character before counting, which is the chain of thought fix. And some is simply that the strawberry question appeared in so much training text, complete with its answer, that the response is now close to memorised.&lt;/p&gt;
&lt;p&gt;Test it yourself on a word nobody has written a viral post about. Pick something long with a repeated letter buried in the middle. The failure mode is often still there, just less famous.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Inside a Proof Assistant: What Lean Actually Checks</title>
    <link href="https://proofandmachine.github.io/articles/inside-a-proof-assistant/"/>
    <updated>2026-08-10T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/inside-a-proof-assistant/</id>
    <author><name>Dana Reisman</name></author>
    <category term="Formal Methods"/>
    <summary>A proof assistant does not find proofs. It refuses bad ones. Here is what happens between typing a theorem and the machine agreeing that you proved it.</summary>
    <content type="html">&lt;p&gt;There is a persistent confusion about proof assistants. People hear the name and imagine software that helps you find a proof, in the way a spellchecker helps you find a typo. That is not what these systems do. A proof assistant is a machine that reads a proof you already wrote and refuses to accept it if any step is unjustified. The assistance is in the refusing.&lt;/p&gt;
&lt;p&gt;Lean, Coq, Isabelle, Agda and HOL Light differ in their logical foundations and their culture, but they share this. You state a theorem. You construct a term. The system checks the term against the statement. If the check passes, the theorem holds, subject to a small set of assumptions we will get to.&lt;/p&gt;
&lt;h2&gt;Proofs as programs&lt;/h2&gt;
&lt;p&gt;The idea underneath most modern proof assistants is the Curry-Howard correspondence, and it is one of the genuinely beautiful facts in logic. Propositions correspond to types. Proofs correspond to programs that inhabit those types.&lt;/p&gt;
&lt;p&gt;If A and B are propositions, then &amp;quot;A implies B&amp;quot; corresponds to the type of functions from A to B. A proof of the implication is a function that takes any proof of A and returns a proof of B. Conjunction corresponds to a pair type: a proof of &amp;quot;A and B&amp;quot; is a pair containing a proof of A and a proof of B. Universal quantification corresponds to a dependent function type. Existential quantification corresponds to a dependent pair.&lt;/p&gt;
&lt;p&gt;Once you accept this dictionary, checking a proof becomes type checking, which is a mechanical, decidable procedure. There is no cleverness in the checker. It walks the term, applies typing rules, and either everything lines up or it does not.&lt;/p&gt;
&lt;p&gt;This is why proof assistants are trustworthy in a way that is difficult to achieve otherwise. The interesting, complicated, potentially buggy parts of the system are the parts that help you &lt;em&gt;write&lt;/em&gt; the term. The part that decides whether to believe you is small.&lt;/p&gt;
&lt;h2&gt;The kernel&lt;/h2&gt;
&lt;p&gt;That small part is called the kernel. In HOL Light it is a few hundred lines. In Lean 4 it is a few thousand. Everything else in the system, the tactic language, the elaborator, the automation, the library, the editor integration, can be arbitrarily elaborate and buggy, because none of it is trusted. Whatever those layers produce is handed to the kernel, and the kernel checks it from scratch.&lt;/p&gt;
&lt;p&gt;This design is called the de Bruijn criterion, after Nicolaas de Bruijn, who built the Automath system in the late 1960s. It means the trusted computing base of a formal proof is a piece of code that a determined person can read in an afternoon. Several projects have written independent checkers that verify Lean&#39;s output, precisely so that a bug in Lean&#39;s own kernel would be caught by a program that shares none of its code.&lt;/p&gt;
&lt;p&gt;What you actually trust when you trust a Lean proof: the kernel implementation, the compiler that compiled it, the hardware it ran on, and the axioms the proof used. That is a short and inspectable list. Compare it to what you trust when a referee reads a ninety-page paper.&lt;/p&gt;
&lt;h2&gt;Tactics: the part that feels like work&lt;/h2&gt;
&lt;p&gt;Nobody writes proof terms by hand. They are enormous. Instead you write tactics, which are commands that build the term for you.&lt;/p&gt;
&lt;p&gt;A Lean proof of a small lemma might read:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-lean&quot;&gt;theorem add_zero_right (n : Nat) : n + 0 = n := by
  induction n with
  | zero =&amp;gt; rfl
  | succ k ih =&amp;gt; simp [Nat.succ_add, ih]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;induction&lt;/code&gt; splits the goal into the base case and the inductive step. &lt;code&gt;rfl&lt;/code&gt; closes a goal where both sides are definitionally equal. &lt;code&gt;simp&lt;/code&gt; rewrites using a database of simplification lemmas. Each tactic is a program that manipulates the proof state and ultimately emits a term.&lt;/p&gt;
&lt;p&gt;The proof state is the thing you spend your time staring at. It shows your current hypotheses and the goal you still owe. Every tactic transforms it. Proving in Lean feels less like writing and more like playing a puzzle game where you are trying to reduce the goal to nothing.&lt;/p&gt;
&lt;p&gt;The learning curve here is real and it is not about mathematics. It is about learning which of several thousand library lemmas is the one that closes your goal, and what it is called. Mathlib, Lean&#39;s mathematics library, now contains well over a million lines and something like two hundred thousand theorems. Finding the right one is the daily difficulty.&lt;/p&gt;
&lt;p&gt;This is also, not coincidentally, the part where machine learning has been most useful. Premise selection, the problem of picking which lemmas are relevant to the current goal, is a search problem over a large corpus with weak signals, which is exactly what neural retrieval is good at. Tools that suggest tactics or complete proofs from the current state are now routine parts of the workflow.&lt;/p&gt;
&lt;h2&gt;What formalisation costs, and what it buys&lt;/h2&gt;
&lt;p&gt;The classical estimate is the de Bruijn factor: the ratio between the size of a formal proof and the size of the informal one. For a long time it sat around four. For well-supported areas with mature libraries it is now often close to one or two. For areas where the library has nothing, it can be enormous, because you have to build the foundations before you can state the theorem.&lt;/p&gt;
&lt;p&gt;The famous case studies show the range. Georges Gonthier&#39;s formalisation of the four colour theorem took several years. His formalisation of the odd order theorem, a 255-page paper by Feit and Thompson, took six years and produced 170,000 lines of Coq. The Flyspeck project, formalising Thomas Hales&#39;s proof of the Kepler conjecture, ran from 1998 to 2014.&lt;/p&gt;
&lt;p&gt;Set against that: the Liquid Tensor Experiment. In 2020 Peter Scholze posted a challenge asking whether a particular theorem of his could be formalised, saying he wanted to be sure of it and found the proof difficult to fully check by hand. A community effort led by Johan Commelin completed the main result in about eighteen months. In the process they found that one lemma as originally stated was slightly wrong, in a way that did not break the proof but did need fixing.&lt;/p&gt;
&lt;p&gt;That is the actual value proposition. Not certainty for its own sake, but a way to check work that has grown too large or too intricate for the referee system to handle honestly.&lt;/p&gt;
&lt;h2&gt;Where the AI fits&lt;/h2&gt;
&lt;p&gt;Two roles, and they are worth keeping separate.&lt;/p&gt;
&lt;p&gt;The first is proof search. Given a goal, produce a tactic or a sequence of tactics that closes it. This is what systems like AlphaProof do, in combination with reinforcement learning against the proof assistant itself as an environment. The proof assistant is an unusually good training signal because it gives a clean, non-negotiable reward: the proof checks or it does not. There is no reward hacking available when the referee is a type checker.&lt;/p&gt;
&lt;p&gt;The second is autoformalisation. Given a theorem written in ordinary mathematical English, produce the formal statement. This is much harder to evaluate, because a wrong formalisation can be perfectly provable. If you formalise &amp;quot;every continuous function on a compact set is bounded&amp;quot; but get the definition of compact subtly wrong, you will prove something true and useless. There is no automated check for whether the formal statement means what the English meant. A human has to read it.&lt;/p&gt;
&lt;p&gt;That asymmetry is the thing to remember. Once a statement is formalised, the machine can be trusted completely with the proof. Getting to the formal statement in the first place remains a human judgement, and no amount of proof automation removes it.&lt;/p&gt;
&lt;h2&gt;Starting&lt;/h2&gt;
&lt;p&gt;If you want to try it, the standard entry point is the Natural Number Game, a browser-based tutorial that has you rebuild arithmetic from the Peano axioms using Lean tactics. It takes a few hours and it will tell you very quickly whether you find this kind of work satisfying or maddening. Both reactions are common and both are reasonable.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Ten Math Riddles and How Machines Handle Them</title>
    <link href="https://proofandmachine.github.io/articles/ten-riddles-that-break-ai/"/>
    <updated>2026-08-06T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/ten-riddles-that-break-ai/</id>
    <author><name>Yonatan Peled</name></author>
    <category term="Puzzles"/>
    <summary>Some puzzles a language model solves instantly. Some it solves by pattern-matching a famous answer that does not apply. The gap between the two is the interesting part.</summary>
    <content type="html">&lt;p&gt;Riddles are a poor benchmark and an excellent diagnostic. Poor benchmark because the famous ones are all over the training data, complete with worked solutions, so a correct answer proves nothing about reasoning. Excellent diagnostic because you can take a famous riddle, change one detail so the standard answer becomes wrong, and watch what happens.&lt;/p&gt;
&lt;p&gt;Here are ten, with the honest picture of how current models handle each. Try them yourself first.&lt;/p&gt;
&lt;h2&gt;1. The bat and the ball&lt;/h2&gt;
&lt;p&gt;A bat and a ball cost 1.10 together. The bat costs 1.00 more than the ball. How much is the ball?&lt;/p&gt;
&lt;p&gt;The intuitive answer is 0.10, and it is wrong. If the ball were 0.10 the bat would be 1.10 and the total 1.20. Let the ball be x. Then x plus x plus 1 equals 1.10, so x is 0.05.&lt;/p&gt;
&lt;p&gt;This is the most-cited item from Shane Frederick&#39;s Cognitive Reflection Test, and roughly half of tested undergraduates get it wrong. Modern language models get it right essentially always, which tells you nothing, because it appears thousands of times in training text.&lt;/p&gt;
&lt;p&gt;Change the numbers. Bat and ball cost 5.40, bat costs 4.60 more. Ball is 0.40. Models still handle this reliably, which does suggest the structure was learned rather than the answer memorised.&lt;/p&gt;
&lt;h2&gt;2. The lily pads&lt;/h2&gt;
&lt;p&gt;A patch of lily pads doubles in size every day. It covers the lake on day 48. On what day did it cover half the lake?&lt;/p&gt;
&lt;p&gt;Day 47. Reliable across models and worth keeping because it is the cleanest illustration of how badly human intuition handles exponentials, which is a habit worth carrying into any argument about growth curves.&lt;/p&gt;
&lt;h2&gt;3. Monty Hall&lt;/h2&gt;
&lt;p&gt;Three doors, a car behind one, goats behind two. You pick door one. The host, who knows where the car is, opens door three to reveal a goat and offers you the switch. Do you switch?&lt;/p&gt;
&lt;p&gt;Yes. Switching wins two times in three. The intuition that trips people is that the host&#39;s choice is not random. He will never open the door with the car and never open your door, so his action carries information about doors two and three collectively.&lt;/p&gt;
&lt;p&gt;Models answer this correctly and confidently. Now change it. Suppose the host does not know where the car is, opens door three at random, and it happens to contain a goat. Now switching gives no advantage; both remaining doors are at 1/2. This variant, sometimes called Monty Fall, is a good stress test. Models are noticeably less reliable here, and a common failure is reciting the standard 2/3 answer with the standard justification while the premise no longer supports it.&lt;/p&gt;
&lt;h2&gt;4. Two envelopes&lt;/h2&gt;
&lt;p&gt;You are given two envelopes. One contains twice as much money as the other. You open one and find 100. Should you switch?&lt;/p&gt;
&lt;p&gt;The tempting argument: the other envelope holds either 50 or 200, each equally likely, so its expected value is 125, so switch. But by symmetry the same argument applies before you open anything, and after you switch it applies again, which would have you swapping forever.&lt;/p&gt;
&lt;p&gt;The error is assuming a uniform prior over an unbounded range, which is not a probability distribution. Once you specify an actual prior over the amounts, the paradox dissolves and switching is sometimes right and sometimes wrong depending on what you found.&lt;/p&gt;
&lt;p&gt;Models usually identify this as the two-envelope problem and produce a serviceable summary. Push them on which specific step of the naive expected-value calculation is invalid and the answers get vaguer.&lt;/p&gt;
&lt;h2&gt;5. The hundred prisoners and the boxes&lt;/h2&gt;
&lt;p&gt;A hundred prisoners are numbered. In a room are a hundred boxes, each containing one prisoner&#39;s number in random order. Each prisoner may open fifty boxes, looking for their own number. All must succeed or all are executed. No communication once it starts. What strategy gives the best odds?&lt;/p&gt;
&lt;p&gt;Random opening gives each prisoner 1/2 and the group 2 to the power of minus 100, which is nothing. The good strategy: each prisoner opens the box with their own number, reads the number inside, opens that box, and follows the chain.&lt;/p&gt;
&lt;p&gt;This succeeds for everyone exactly when the random permutation has no cycle longer than fifty. The probability of a long cycle is a harmonic sum, and the survival probability comes out around 31 percent. Not 31 percent per prisoner. Thirty-one percent for all hundred simultaneously.&lt;/p&gt;
&lt;p&gt;The result feels impossible and it is correct. Models will produce it, with the cycle argument, because it is a well-known puzzle. Ask for the exact probability as a harmonic expression and the derivation is where errors creep in.&lt;/p&gt;
&lt;h2&gt;6. Blue eyes&lt;/h2&gt;
&lt;p&gt;An island has a hundred people with blue eyes and a hundred with brown. Nobody knows their own eye colour, no mirrors, no discussion of eyes. Anyone who deduces their own colour must leave at midnight. A visitor announces publicly that they can see at least one person with blue eyes.&lt;/p&gt;
&lt;p&gt;Everyone already knew that. Yet on the hundredth midnight, all hundred blue-eyed people leave.&lt;/p&gt;
&lt;p&gt;The induction: with one blue-eyed person, they see nobody else blue and leave immediately. With two, each sees one other, expects them to leave on night one, and when they do not, both deduce their own colour on night two. And so upward.&lt;/p&gt;
&lt;p&gt;What the announcement adds is not the fact but the common knowledge of the fact. Everyone knew it; not everyone knew that everyone knew that everyone knew it, to the required depth. This distinction between mutual and common knowledge is the whole content of the puzzle, and it is a real concept with real consequences in distributed systems and game theory.&lt;/p&gt;
&lt;p&gt;Models reproduce the induction competently. They are much weaker when asked to state precisely what changes in the knowledge structure at each level.&lt;/p&gt;
&lt;h2&gt;7. The surprise examination&lt;/h2&gt;
&lt;p&gt;A teacher announces an exam next week that will be a surprise: on the morning of the exam, students will not know it is that day. A student argues it cannot be Friday, since by Thursday evening only Friday remains and it would not be a surprise. Eliminating Friday, it cannot be Thursday by the same reasoning. And so on back through Monday. The exam cannot happen. On Wednesday it happens, and it is a surprise.&lt;/p&gt;
&lt;p&gt;There is no consensus resolution. The literature runs to hundreds of papers, with treatments through epistemic logic, self-reference and the Knower paradox. This is a good item precisely because there is no answer to memorise. A model that presents a confident resolution is telling you more about its calibration than about the paradox.&lt;/p&gt;
&lt;h2&gt;8. The wine and water&lt;/h2&gt;
&lt;p&gt;Two glasses, one of wine and one of water, equal volumes. Take a spoonful of wine, stir it into the water. Take a spoonful of that mixture back into the wine. Is there more wine in the water glass or more water in the wine glass?&lt;/p&gt;
&lt;p&gt;Exactly equal. Both glasses end at their original volume, so whatever volume of wine is missing from the wine glass has been replaced by exactly that volume of water. No calculation required, and the result is independent of how much you stirred, how many spoonfuls you moved, or whether the mixing was thorough.&lt;/p&gt;
&lt;p&gt;The conservation argument is short and total. Models often reach the right answer through an algebraic slog with a specific spoon size instead, which works but misses the point.&lt;/p&gt;
&lt;h2&gt;9. Three hats&lt;/h2&gt;
&lt;p&gt;Three people in a line, each wearing a hat that is black or white, each able to see only the hats in front. Starting from the back, each says whether they know their own colour. Given a particular pattern of answers, deduce the arrangement.&lt;/p&gt;
&lt;p&gt;These are cleanly solvable by case elimination and models handle them well. The failure mode appears when you change the visibility rules or let the participants answer out of order. Then the model frequently applies the standard solution&#39;s reasoning steps to a configuration where they no longer hold.&lt;/p&gt;
&lt;h2&gt;10. Ants on a pole&lt;/h2&gt;
&lt;p&gt;Twenty-five ants are placed on a metre-long pole at random positions, each facing left or right. All walk at one centimetre per second. When two meet, both reverse direction instantly. What is the longest time before the pole is clear?&lt;/p&gt;
&lt;p&gt;One hundred seconds. Two ants colliding and reversing is indistinguishable from two ants walking through each other, if you stop tracking identities. So treat them as passing through. Each ant then walks in a straight line and the worst case is one ant at one end walking the full length.&lt;/p&gt;
&lt;p&gt;This is the loveliest reframing in the list, and it is the sort of insight that pure search never finds. Models produce it, because the puzzle is well known. Change it to ants of different speeds and the pass-through trick fails, since identities now matter, and the answers degrade quickly.&lt;/p&gt;
&lt;h2&gt;What the pattern suggests&lt;/h2&gt;
&lt;p&gt;Across all ten, the reliable answers cluster on famous problems with famous solutions. The unreliable answers cluster on variants where the famous solution is a trap.&lt;/p&gt;
&lt;p&gt;That does not mean nothing is being learned. The bat-and-ball generalises to new numbers, which is genuine. But it does mean that a correct answer to a classic puzzle is close to worthless as evidence about reasoning, and that if you want to know what a system can actually do, you have to write a problem nobody has written before.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Olympiad Geometry and the Machine That Draws the Extra Line</title>
    <link href="https://proofandmachine.github.io/articles/olympiad-geometry-and-the-machine/"/>
    <updated>2026-08-02T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/olympiad-geometry-and-the-machine/</id>
    <author><name>Dana Reisman</name></author>
    <category term="Systems"/>
    <summary>AlphaGeometry solves competition problems at medallist level with a design that says something specific about where intuition sits in mathematical work.</summary>
    <content type="html">&lt;p&gt;Olympiad geometry is a strange corner of mathematics. The problems are elementary in the sense that they need no machinery past secondary school: circles, triangles, angles, similar figures. They are also brutally hard, because solving them depends almost entirely on seeing the one construction that makes everything collapse. Draw the right auxiliary line and the problem takes four steps. Miss it and you can work for hours.&lt;/p&gt;
&lt;p&gt;That property makes olympiad geometry an unusually clean laboratory for asking what mathematical intuition is.&lt;/p&gt;
&lt;h2&gt;Why brute force fails here&lt;/h2&gt;
&lt;p&gt;A geometry problem gives you a configuration and asks you to prove a relationship. In principle you could just derive consequences. Angle chasing is mechanical: this angle equals that one because of the inscribed angle theorem, therefore these triangles are similar, therefore these lengths are proportional. Software has done this well since the 1990s. Wu&#39;s method and Gröbner basis approaches can decide large classes of geometric statements algebraically, and they are complete in the sense that if the statement is true in the algebraic model, they will find that out.&lt;/p&gt;
&lt;p&gt;The problem is that many olympiad problems are not provable from the given configuration alone. You have to add something. Extend a segment to meet a circle. Drop a perpendicular. Mark the midpoint of an arc nobody mentioned. Construct the reflection of a point over a line.&lt;/p&gt;
&lt;p&gt;Once you allow additions, the search space explodes. There are infinitely many points you could add, and no way to score a candidate short of trying it and seeing whether the proof then goes through. This is where classical automated geometry stalls: not on deduction, on invention.&lt;/p&gt;
&lt;h2&gt;The two-component design&lt;/h2&gt;
&lt;p&gt;AlphaGeometry, published by a DeepMind team in &lt;em&gt;Nature&lt;/em&gt; in January 2024, attacks exactly this split. It has two parts that alternate.&lt;/p&gt;
&lt;p&gt;The symbolic engine is a deduction system that takes the current configuration and derives every consequence it can, exhaustively, using a fixed rule set covering angles, ratios, similar triangles and a rule for handling algebraic consequences. It runs to saturation: it keeps deriving until nothing new appears. If the goal shows up in the derived set, the problem is solved and the proof is a trace through the derivation.&lt;/p&gt;
&lt;p&gt;The language model is trained to propose auxiliary constructions. When the symbolic engine saturates without reaching the goal, the model looks at the configuration and suggests a new point or line. That gets added, and the symbolic engine runs again on the enlarged configuration.&lt;/p&gt;
&lt;p&gt;Loop until solved or out of budget.&lt;/p&gt;
&lt;p&gt;The result on a benchmark of thirty IMO geometry problems from 2000 to 2022: twenty-five solved. The average human gold medallist solves about twenty-six. The previous best automated system solved ten.&lt;/p&gt;
&lt;h2&gt;The training data problem, and the trick&lt;/h2&gt;
&lt;p&gt;There is no corpus of a hundred million worked olympiad geometry proofs. There are a few thousand problems in total, which is far short of what training a useful model requires.&lt;/p&gt;
&lt;p&gt;The team generated data synthetically, and the method is the clever part. Rather than trying to produce problems and then solve them, they ran the process backwards. Sample a random geometric configuration. Run the symbolic engine to saturation, producing a large set of true statements about it. Pick one of those statements as a goal, and trace back which premises the derivation actually used.&lt;/p&gt;
&lt;p&gt;Now here is the step that matters. Some points used in the derivation do not appear in the statement of the goal. Those points are, by definition, auxiliary constructions. Strip them from the problem statement and you have a problem whose solution requires inventing exactly those points, together with a proof that does so.&lt;/p&gt;
&lt;p&gt;They generated around a hundred million such synthetic proofs, of which roughly nine million involved at least one auxiliary construction. That is the training set: not human proofs, but machine-generated problems that were reverse-engineered to require the skill being taught.&lt;/p&gt;
&lt;h2&gt;What the division of labour tells us&lt;/h2&gt;
&lt;p&gt;The architecture is a claim about mathematics, whether or not it was meant that way. It says that deduction is mechanical and can be trusted to a rule engine, and that the creative act is narrow and specific: knowing what to add.&lt;/p&gt;
&lt;p&gt;That matches how strong competitors describe their own experience. They do not report agonising over whether an angle chase is valid. They report staring at a diagram until something suggests itself. The valid-step-checking is background; the seeing is the work.&lt;/p&gt;
&lt;p&gt;It also means the system&#39;s output is trustworthy in a way that a language model&#39;s essay is not. The proof is produced by the symbolic engine, which only applies sound rules. The language model&#39;s contribution is a suggestion that gets checked. If it suggests a useless construction, nothing breaks; the deduction engine simply fails again and another suggestion comes.&lt;/p&gt;
&lt;p&gt;This is the pattern worth extracting. Put the neural component where being wrong is cheap. Put the symbolic component where being wrong is expensive.&lt;/p&gt;
&lt;h2&gt;The follow-up work&lt;/h2&gt;
&lt;p&gt;AlphaGeometry 2, reported in 2025, extended coverage to problems involving movement of objects and equations of linear angles, and pushed the solve rate on IMO geometry problems from 2000 onward to around 84 percent. Combined with AlphaProof, a Lean-based system for the non-geometry problems, the pair achieved a silver medal score at the 2024 IMO, one point below gold. In 2025 several systems, including general-purpose reasoning models running without a bespoke geometry engine, reached gold medal scores.&lt;/p&gt;
&lt;p&gt;That last detail complicates the story. If a general reasoning model can score gold without any symbolic deduction engine, does the two-component argument still hold?&lt;/p&gt;
&lt;p&gt;Partly. The general models are considerably slower, use vastly more computation, and produce proofs in natural language that need human checking. They are not producing machine-verified output. What they demonstrate is that enough scale and enough reinforcement learning on reasoning traces can approximate the same capability without an explicit architecture for it. Whether the approximation holds up outside competition mathematics is not yet established.&lt;/p&gt;
&lt;h2&gt;What olympiad performance does not mean&lt;/h2&gt;
&lt;p&gt;Competition mathematics is a specific genre. Problems have known-length solutions, are guaranteed solvable, use a bounded set of techniques, and were written by humans intending them to be found. Research mathematics has none of those properties. You do not know whether the statement is true. You do not know whether the tools exist. You do not know whether the problem is worth the time.&lt;/p&gt;
&lt;p&gt;Tim Gowers, who helped grade AlphaProof&#39;s 2024 output, made the point that the system&#39;s answers were correct but arrived through search rather than through the kind of structural understanding that generalises. A human solving these problems builds intuitions that transfer. Whether these systems do is an open empirical question and not one that a competition score answers.&lt;/p&gt;
&lt;p&gt;The honest summary: machines now solve a category of hard, human-designed problems at the level of the strongest human competitors, using a method that separates guessing from checking. That is a real result. It is not the same as doing mathematics, and the people who built it are generally more careful about saying so than the coverage has been.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>The Four Colour Theorem and the First Proof Nobody Could Read</title>
    <link href="https://proofandmachine.github.io/articles/the-four-colour-theorem/"/>
    <updated>2026-07-29T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/the-four-colour-theorem/</id>
    <author><name>Miriam Adler</name></author>
    <category term="History"/>
    <summary>In 1976 a computer checked 1,936 cases and settled a problem open for 124 years. Mathematicians have been arguing about what that means ever since.</summary>
    <content type="html">&lt;p&gt;In October 1852, a student named Francis Guthrie was colouring a map of the counties of England and noticed he never needed more than four colours to keep adjacent counties distinct. He mentioned it to his brother, who mentioned it to Augustus De Morgan, who wrote to William Rowan Hamilton about it the same day. Hamilton was unimpressed and did not reply for a fortnight.&lt;/p&gt;
&lt;p&gt;The question sat open for 124 years. It has a claim to being the first major theorem whose proof a human cannot check.&lt;/p&gt;
&lt;h2&gt;What the statement actually says&lt;/h2&gt;
&lt;p&gt;Any map drawn in the plane, divided into contiguous regions, can be coloured with four colours so that no two regions sharing a border segment get the same colour. Regions touching at a single point do not count as adjacent. Regions must be connected, which rules out awkward cases like a country with an overseas territory.&lt;/p&gt;
&lt;p&gt;Translated to graph theory: every planar graph has chromatic number at most four. Place a vertex in each region, connect vertices whose regions share a border, and the resulting graph can be drawn in the plane without crossings. The claim is that four colours suffice for any such graph.&lt;/p&gt;
&lt;p&gt;Three colours are not enough, as any map with four mutually adjacent regions shows. Five colours were proven sufficient by Percy Heawood in 1890, with an argument short enough to fit in an undergraduate lecture. The gap between five and four took another 86 years.&lt;/p&gt;
&lt;h2&gt;Kempe&#39;s wrong proof, and why it mattered&lt;/h2&gt;
&lt;p&gt;In 1879 Alfred Kempe published a proof. It was accepted, celebrated, and got him elected to the Royal Society. In 1890 Heawood found the error.&lt;/p&gt;
&lt;p&gt;Kempe&#39;s method is still the foundation of everything that came after, which is why the failure was productive rather than merely embarrassing. His idea was reducibility. Suppose a counterexample exists. Take the smallest one, by number of regions. Every planar graph contains a vertex of degree five or less, a consequence of Euler&#39;s formula. So the minimal counterexample contains such a vertex. Remove it, colour the smaller map by minimality, then put the vertex back and try to find a colour for it.&lt;/p&gt;
&lt;p&gt;For a vertex of degree three or four, this works directly. Degree five is where it gets difficult, and Kempe&#39;s argument for that case involved chains of alternating colours that could be swapped to free up a colour. Heawood produced a configuration where the chain-swapping argument breaks: two swaps interfere with each other.&lt;/p&gt;
&lt;p&gt;The framework survived. What was needed was a much larger collection of configurations, each proven reducible, such that every planar graph must contain at least one of them. Such a collection is called an unavoidable set.&lt;/p&gt;
&lt;h2&gt;Appel and Haken&lt;/h2&gt;
&lt;p&gt;Kenneth Appel and Wolfgang Haken at the University of Illinois spent years, building on work by Heinrich Heesch, developing a discharging procedure that would generate an unavoidable set, and a computational test for reducibility. In June 1976 they announced a proof.&lt;/p&gt;
&lt;p&gt;The unavoidable set had 1,936 configurations. Each had to be checked for reducibility by computer. The computation took roughly 1,200 hours on an IBM 370. The paper ran to 741 pages including microfiche supplements.&lt;/p&gt;
&lt;p&gt;The University of Illinois mathematics department started stamping its outgoing mail with &amp;quot;FOUR COLORS SUFFICE&amp;quot;.&lt;/p&gt;
&lt;p&gt;The reception was mixed in a way that had nothing to do with whether people believed the result. It was about whether the object produced was a proof. A proof, in the traditional understanding, is an argument that a competent reader can follow and be convinced by. No human has ever verified 1,936 reducibility checks by hand, and no human ever will.&lt;/p&gt;
&lt;p&gt;The philosopher Thomas Tymoczko argued in 1979 that the proof introduced empirical elements into mathematics: to accept it you have to accept that a particular machine ran a particular program correctly, which is a claim about the physical world rather than about logic. Others countered that a 741-page hand proof would also be beyond any single reader&#39;s ability to verify with confidence, and that the machine is more reliable than the reader.&lt;/p&gt;
&lt;h2&gt;The errors were real&lt;/h2&gt;
&lt;p&gt;The critics had a concrete point, not just a philosophical one. The original proof contained errors. Appel and Haken published corrections. Further errors were found in 1986 and addressed. In 1989 they published a book-length version with a full corrected discussion.&lt;/p&gt;
&lt;p&gt;In 1996, Neil Robertson, Daniel Sanders, Paul Seymour and Robin Thomas produced a new proof with a smaller unavoidable set of 633 configurations and a cleaner discharging argument. They wrote that they had been unable to verify the Appel-Haken proof themselves, which was part of their motivation. Their version was still computer-dependent, but the computation was far more tractable and the human-readable part far shorter.&lt;/p&gt;
&lt;h2&gt;Gonthier closes it&lt;/h2&gt;
&lt;p&gt;In 2005, Georges Gonthier at Microsoft Research Cambridge completed a fully formal proof in the Coq proof assistant, in collaboration with Benjamin Werner. Every step, including the case checks, was verified by Coq&#39;s kernel.&lt;/p&gt;
&lt;p&gt;This changed the epistemic situation substantially. The question is no longer whether a program that nobody has audited computed correctly. It is whether Coq&#39;s kernel, a small and heavily scrutinised piece of code, is correct, and whether the formal statement in Coq says what the English statement says. Both are checkable by a person in a reasonable amount of time.&lt;/p&gt;
&lt;p&gt;Gonthier&#39;s work is also where the modern connection to AI-assisted mathematics starts. The techniques he developed for managing a formalisation of that size, particularly the small-scale reflection approach that became the SSReflect library, fed directly into Mathlib and the current generation of formalisation projects.&lt;/p&gt;
&lt;h2&gt;What this predicted&lt;/h2&gt;
&lt;p&gt;The four colour theorem was the first case of a pattern that is now common. A result is established by a computation too large for human inspection. The mathematical community accepts it provisionally, argues about its status, and eventually a formal verification settles the question of correctness while leaving the question of understanding open.&lt;/p&gt;
&lt;p&gt;The Kepler conjecture followed the same arc. Thomas Hales proved it in 1998 using extensive computation. The referees at the &lt;em&gt;Annals of Mathematics&lt;/em&gt; spent four years and reported they were 99 percent certain but could not fully verify the computational parts. Hales then spent over a decade leading the Flyspeck project to formalise it, completing in 2014.&lt;/p&gt;
&lt;p&gt;The Boolean Pythagorean triples problem produced a 200-terabyte SAT solver proof in 2016, which was subsequently checked by a verified checker.&lt;/p&gt;
&lt;p&gt;In every case the argument recurs: we now know it is true, and we still do not know why. Nobody can look at the four colour theorem&#39;s proof and extract an idea about planarity that explains the number four. The proof establishes the fact without illuminating it.&lt;/p&gt;
&lt;p&gt;That is the real complaint, and it has never been answered. It is also the exact complaint people are now making about proofs produced by machine learning systems, which suggests the argument has another few decades to run.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>The Benchmark Problem: Why Math Scores Keep Going Up and Meaning Less</title>
    <link href="https://proofandmachine.github.io/articles/benchmarks-and-the-contamination-problem/"/>
    <updated>2026-07-25T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/benchmarks-and-the-contamination-problem/</id>
    <author><name>Yonatan Peled</name></author>
    <category term="Analysis"/>
    <summary>GSM8K, MATH, MMLU, AIME. Every headline number rests on an assumption that the test questions were not in the training data, and that assumption is usually unverifiable.</summary>
    <content type="html">&lt;p&gt;In 2021 a language model that scored 55 percent on GSM8K was a research result. By 2024 the benchmark was effectively saturated, with frontier systems above 95 percent. The natural reading is that models got roughly twice as good at grade-school arithmetic word problems in three years.&lt;/p&gt;
&lt;p&gt;The natural reading may be right. It is also not something anyone can verify, and the reasons why are worth understanding in detail, because they apply to every benchmark number you will ever read.&lt;/p&gt;
&lt;h2&gt;The benchmarks&lt;/h2&gt;
&lt;p&gt;GSM8K is 8,500 grade-school word problems written by human contractors, released by OpenAI in 2021. Two to eight steps of elementary arithmetic each. It was designed to be easy for a person and hard for the models of the time.&lt;/p&gt;
&lt;p&gt;MATH is 12,500 competition problems from AMC, AIME and similar sources, released by Dan Hendrycks and colleagues, graded by difficulty from one to five. Full worked solutions in LaTeX. Considerably harder.&lt;/p&gt;
&lt;p&gt;MMLU includes mathematics subsets alongside 57 other subjects. AIME problems from recent years get used as a rolling benchmark because new ones appear annually. FrontierMath, released by Epoch AI in late 2024, consists of unpublished research-level problems specifically designed to resist the contamination problem. GPQA does something similar for graduate science.&lt;/p&gt;
&lt;h2&gt;What contamination means&lt;/h2&gt;
&lt;p&gt;A benchmark measures generalisation only if the model has not seen the test items. Language models are trained on scraped web text. GSM8K is on GitHub, on Hugging Face, in dozens of papers, in blog posts explaining individual problems, in forum threads where people paste problems and discuss solutions.&lt;/p&gt;
&lt;p&gt;There is no clean way to exclude all of that. Model developers run decontamination filters, typically looking for n-gram overlap between training documents and test items. These filters catch exact copies. They do not catch a paraphrase, a translation, a problem with the numbers changed, or a discussion that states the answer without quoting the question.&lt;/p&gt;
&lt;p&gt;Nor do they catch the fact that a benchmark&#39;s &lt;em&gt;distribution&lt;/em&gt; leaks even when its items do not. If a thousand blog posts explain how to solve GSM8K-style problems, a model trained on them learns the genre. That is arguably legitimate learning. It also means the benchmark no longer measures what it was designed to measure.&lt;/p&gt;
&lt;h2&gt;The evidence that this is happening&lt;/h2&gt;
&lt;p&gt;Several studies have tried to separate genuine capability from memorisation, and the results are consistent enough to take seriously.&lt;/p&gt;
&lt;p&gt;The GSM1K study from Scale AI in 2024 built a new benchmark matching GSM8K&#39;s distribution as closely as they could, with fresh problems written to the same specification. They then compared model performance on the two. Some model families performed nearly identically, which is the expected result if capability is real. Others dropped by up to thirteen percentage points. The drops correlated with how likely a model was to reproduce GSM8K items verbatim when prompted with their opening lines.&lt;/p&gt;
&lt;p&gt;The GSM-Symbolic work from Apple researchers in 2024 took GSM8K problems and generated variants by changing names and numbers through templates. Performance dropped across every model tested. They also added a variant, GSM-NoOp, that inserted a clause which was topically relevant but logically irrelevant to the answer. Performance fell sharply, in some cases by more than half. A model that understood the problem would ignore an irrelevant clause. Many models incorporated it into the arithmetic.&lt;/p&gt;
&lt;p&gt;Functional benchmarks, where each item is a template instantiated with fresh values at evaluation time, show similar gaps. The size of the gap is the closest thing we have to a contamination estimate.&lt;/p&gt;
&lt;h2&gt;Why this is nobody&#39;s fault exactly&lt;/h2&gt;
&lt;p&gt;It would be easy to read this as developers gaming benchmarks. Mostly they are not. The structural problem is that a public benchmark is a public document, and any public document becomes training data for the next model. A benchmark begins to decay the moment it is published.&lt;/p&gt;
&lt;p&gt;The obvious fix, a private held-out test set, has its own failure mode. If you cannot inspect the items, you cannot check that they are correctly labelled, that the problems are well-posed, or that the grading is fair. Several public benchmarks have known error rates in their answer keys, in the range of one to five percent, which puts a ceiling on meaningful scores that nobody accounts for when reporting 97 versus 98.&lt;/p&gt;
&lt;p&gt;There is also a subtler pressure. Benchmark scores drive funding, hiring, publication and coverage. Nobody has to cheat for that pressure to distort what gets optimised. If a metric is the target, work flows toward the metric.&lt;/p&gt;
&lt;h2&gt;How to read a benchmark claim&lt;/h2&gt;
&lt;p&gt;A few questions cut through most of the noise.&lt;/p&gt;
&lt;p&gt;When was the benchmark released relative to the model&#39;s training cutoff? A model trained on data through 2025 evaluated on a benchmark published in 2021 tells you very little. The same model on a benchmark published after its cutoff tells you a great deal.&lt;/p&gt;
&lt;p&gt;Was the evaluation run with the same prompting, tooling and sampling as the comparison points? Reported numbers often differ by ten points depending on whether tools were available, how many samples were taken, and whether the best of several attempts was scored. A pass-at-64 number and a pass-at-1 number are not comparable and are frequently presented side by side.&lt;/p&gt;
&lt;p&gt;Is there a perturbed variant? If a paper reports performance on both the original benchmark and a symbolically perturbed version, and the gap is small, that is meaningful evidence. If the paper only reports the original, the number is an upper bound.&lt;/p&gt;
&lt;p&gt;What is the human baseline, and was it measured the same way? Many benchmarks quote a human baseline collected under different conditions, sometimes from crowdworkers with a time limit, sometimes from experts with none.&lt;/p&gt;
&lt;h2&gt;What is being done&lt;/h2&gt;
&lt;p&gt;FrontierMath took the approach of commissioning new, unpublished problems from research mathematicians and keeping most of them private. Early frontier model performance was in the low single digits, which was itself informative: the gap between competition mathematics and research mathematics is much wider than benchmark saturation suggested.&lt;/p&gt;
&lt;p&gt;Live benchmarks that draw fresh items from ongoing competitions, such as AIME and Codeforces, get around contamination for as long as they stay ahead of training cutoffs. They have a natural sample-size limit, since a competition produces fifteen problems a year and the variance on fifteen items is large.&lt;/p&gt;
&lt;p&gt;Formal verification benchmarks like miniF2F and the Lean-based evaluations sidestep the grading problem entirely, because a proof either type-checks or it does not. They do not sidestep contamination.&lt;/p&gt;
&lt;h2&gt;The reasonable position&lt;/h2&gt;
&lt;p&gt;None of this means benchmark progress is fake. Models really did get much better at mathematics between 2021 and 2026, and anyone who has used them across that period can feel the difference without consulting a table.&lt;/p&gt;
&lt;p&gt;It means the numbers are softer than they look, that differences of a few points between systems are usually noise, and that a jump from 92 to 96 on a saturated benchmark is not evidence of anything in particular. The useful signal now comes from problems that did not exist when the model was trained. Everything else is a measurement of how much of the internet ended up in the weights.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>The Collatz Conjecture and the Limits of Brute Force</title>
    <link href="https://proofandmachine.github.io/articles/collatz-and-the-limits-of-brute-force/"/>
    <updated>2026-07-21T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/collatz-and-the-limits-of-brute-force/</id>
    <author><name>Miriam Adler</name></author>
    <category term="Open Problems"/>
    <summary>We have checked every starting number below 2 to the 68. That is not a proof, it is not close to a proof, and the reason why is the most useful lesson in computational mathematics.</summary>
    <content type="html">&lt;p&gt;Take any positive integer. If it is even, halve it. If it is odd, triple it and add one. Repeat. The conjecture is that you always reach 1.&lt;/p&gt;
&lt;p&gt;Start at 27 and the sequence climbs to 9,232 before descending, taking 111 steps. Start at 97 and it takes 118. Start at anything anyone has ever tried and it reaches 1.&lt;/p&gt;
&lt;p&gt;Paul Erdős said mathematics is not yet ready for such problems, and offered 500 dollars for a solution. Jeffrey Lagarias, who has written the standard surveys, has advised people not to work on it. The problem is genuinely, unusually hard, and it is hard in a way that illustrates something important about what computation can and cannot settle.&lt;/p&gt;
&lt;h2&gt;What has been verified&lt;/h2&gt;
&lt;p&gt;Distributed computing projects have verified the conjecture for every starting value up to roughly 2 to the power of 68, which is about 295 quintillion. The verification uses clever optimisations: you only need to check that a number&#39;s trajectory drops below its starting value, since everything smaller has already been confirmed, and large classes of residues can be eliminated by modular arguments before any iteration happens.&lt;/p&gt;
&lt;p&gt;That is an extraordinary amount of checking. It also establishes nothing about the conjecture.&lt;/p&gt;
&lt;p&gt;The reason is simple and worth stating plainly. There are infinitely many positive integers. Any finite verification, no matter how large, covers a proportion of them equal to zero. The set of unchecked cases after verifying 2 to the 68 values is exactly as infinite as the set was before anyone started.&lt;/p&gt;
&lt;h2&gt;When brute force does work&lt;/h2&gt;
&lt;p&gt;This is not an argument that computation is useless in number theory. It is an argument about the logical structure of a claim.&lt;/p&gt;
&lt;p&gt;Computation settles a universal claim when the search space is finite, or can be reduced to a finite one. The four colour theorem was settled by computation because the discharging argument reduced infinitely many planar graphs to 1,936 configurations. That reduction is the mathematics; the computation is bookkeeping.&lt;/p&gt;
&lt;p&gt;Computation also settles an existential claim, by producing an example. Euler conjectured that no fourth power is the sum of three fourth powers. Noam Elkies found a counterexample in 1988, and Roger Frye then found the smallest one by direct search. One example, and a 200-year-old conjecture is dead.&lt;/p&gt;
&lt;p&gt;The Pólya conjecture, that most numbers below any bound have an odd number of prime factors, held for every value anyone checked for decades and fails first at 906,150,257. The Mertens conjecture was disproven in 1985 without anyone producing an explicit counterexample; the smallest one is believed to be beyond 10 to the power of 30 and possibly far beyond.&lt;/p&gt;
&lt;p&gt;Those cases are the reason &amp;quot;verified up to a large bound&amp;quot; carries so little weight. Counterexamples to plausible conjectures are known to hide at scales no search will reach.&lt;/p&gt;
&lt;h2&gt;What we do know about Collatz&lt;/h2&gt;
&lt;p&gt;The problem is not untouched. There are real partial results, and they show what progress looks like when a full proof is out of reach.&lt;/p&gt;
&lt;p&gt;Terence Tao proved in 2019 that almost all Collatz orbits reach a value smaller than any prescribed function that goes to infinity, however slowly. Informally, almost every starting number eventually gets small. The technique routes through a probabilistic model of the iteration and a transfer to the actual deterministic sequence.&lt;/p&gt;
&lt;p&gt;This is genuinely close, and the gap is instructive. &amp;quot;Almost all&amp;quot; here means with logarithmic density one, which permits an exceptional set. A single starting value with a divergent orbit, or a single cycle other than the trivial one, would falsify the conjecture while being invisible to a density argument.&lt;/p&gt;
&lt;p&gt;Other constraints are known. Any non-trivial cycle must have length in the hundreds of millions at minimum, from bounds derived through continued fraction approximations to the logarithm of 3 over the logarithm of 2. The count of starting values below a bound that reach 1 grows at least as fast as a specific power of that bound.&lt;/p&gt;
&lt;h2&gt;Why it resists&lt;/h2&gt;
&lt;p&gt;The generalised problem is undecidable. John Conway showed in 1972 that a natural generalisation, where the multiplier and offset vary by residue class modulo some fixed number, produces a system that can simulate arbitrary computation. There is no algorithm that decides, for an arbitrary such system, whether all orbits reach 1.&lt;/p&gt;
&lt;p&gt;Collatz itself is one specific instance, so undecidability of the general family does not imply that Collatz is undecidable. But it explains the difficulty. The iteration mixes two structures that do not interact cleanly: division by two is transparent in base two, multiplication by three plus one is transparent in base three, and there is no representation in which both are simple. The sequence behaves like a pseudorandom process while being entirely deterministic, and there is no known handle on it.&lt;/p&gt;
&lt;h2&gt;What AI has and has not done here&lt;/h2&gt;
&lt;p&gt;Several groups have applied machine learning to Collatz-adjacent questions, mostly in the mode of searching for structure rather than searching for proofs. Neural networks have been trained to predict stopping times from binary representations, with moderate success, which is unsurprising since the first several steps are determined by the low-order bits.&lt;/p&gt;
&lt;p&gt;More interestingly, automated conjecture-generation systems have produced candidate lemmas about the iteration, some of which turned out to be provable and none of which turned out to be useful. That distinction matters. A system that produces true statements is not the same as a system that produces progress. Mathematics is full of true statements nobody needs.&lt;/p&gt;
&lt;p&gt;The formalisation angle has been more productive. Parts of the known partial results have been formalised in Lean, which does not advance the problem but does make the existing literature checkable. There is an active project to formalise Tao&#39;s almost-all result.&lt;/p&gt;
&lt;h2&gt;The lesson to carry&lt;/h2&gt;
&lt;p&gt;When you see a claim that something has been verified computationally, ask what logical form the claim has.&lt;/p&gt;
&lt;p&gt;If it is existential, a computation can settle it outright and one example is a proof.&lt;/p&gt;
&lt;p&gt;If it is universal over a finite domain, a computation can settle it, and the interesting work was the argument that reduced the domain to something finite.&lt;/p&gt;
&lt;p&gt;If it is universal over an infinite domain, a computation can only refute it, never confirm it. Verification up to any bound is evidence about where to look, not evidence about whether the statement is true. It is entirely reasonable to find such evidence persuasive, since a conjecture that survives 2 to the 68 tests is more likely true than one that does not. It is not reasonable to call it settled.&lt;/p&gt;
&lt;p&gt;Erdős was probably right that we are not ready. The useful part is understanding precisely which readiness is missing, and it is not compute.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>How to Check an AI&#39;s Mathematics Without Being a Mathematician</title>
    <link href="https://proofandmachine.github.io/articles/how-to-check-an-ai-s-mathematics/"/>
    <updated>2026-07-17T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/how-to-check-an-ai-s-mathematics/</id>
    <author><name>Dana Reisman</name></author>
    <category term="Practice"/>
    <summary>A practical procedure for deciding whether a plausible-looking derivation is correct, built around the observation that verifying is much easier than deriving.</summary>
    <content type="html">&lt;p&gt;The central asymmetry in mathematics is that checking an answer is usually far easier than finding it. Factoring a large number is hard; multiplying the factors back is trivial. Finding an integral is hard; differentiating the result is mechanical. Constructing a proof is hard; following one is manageable.&lt;/p&gt;
&lt;p&gt;That asymmetry is what makes AI-generated mathematics usable despite being unreliable. You do not need to be able to produce the derivation. You need a procedure for testing it. Here is one.&lt;/p&gt;
&lt;h2&gt;Step one: check the units and the type&lt;/h2&gt;
&lt;p&gt;Before looking at any arithmetic, check that the answer is the right kind of object.&lt;/p&gt;
&lt;p&gt;If the question asked for a probability and the answer is 1.4, stop. If it asked for a length and the answer carries units of area, stop. If it asked for an integer count and the answer is 6.5, stop. If it asked for a function and the answer is a number, stop.&lt;/p&gt;
&lt;p&gt;This sounds too simple to be worth a step. In practice it catches a meaningful fraction of errors, because type violations are exactly the kind of mistake a system optimising for plausible-looking text makes. The output is shaped like a solution. Whether it is the right shape is a separate question that nothing in the generation process enforced.&lt;/p&gt;
&lt;p&gt;Dimensional analysis is the physics version of the same idea and it is more powerful than it gets credit for. Any physical formula must be dimensionally consistent, and checking consistency requires no understanding of the derivation at all.&lt;/p&gt;
&lt;h2&gt;Step two: test the boundaries&lt;/h2&gt;
&lt;p&gt;Take the answer and evaluate it at the extreme cases where you know what should happen.&lt;/p&gt;
&lt;p&gt;If the answer is a formula in n, what does it give for n equal to 0, 1, or 2? You can usually work out those cases by hand, sometimes by direct enumeration. If a combinatorics formula gives 3 when the answer for n equal to 1 is obviously 1, the formula is wrong regardless of how elegant it looks.&lt;/p&gt;
&lt;p&gt;If the answer is a formula involving a parameter, what happens as the parameter goes to zero or infinity? Does the behaviour match what the problem demands? A probability that goes to 2 as some parameter grows is a wrong probability.&lt;/p&gt;
&lt;p&gt;If the answer involves a limit or an approximation, check the case where the approximation should be exact.&lt;/p&gt;
&lt;p&gt;This step is close to free and it is the single most productive check available. Most incorrect closed-form expressions fail at n equal to 1.&lt;/p&gt;
&lt;h2&gt;Step three: substitute back&lt;/h2&gt;
&lt;p&gt;For anything that is the solution to an equation, put it in the equation.&lt;/p&gt;
&lt;p&gt;Solved for x? Substitute and check both sides agree. Found an integral? Differentiate it. Found an eigenvector? Multiply by the matrix. Found a root of a polynomial? Evaluate the polynomial there.&lt;/p&gt;
&lt;p&gt;This is complete verification, not a heuristic. If the substitution works, the answer is correct for that equation, full stop. There is no need to look at the derivation at all.&lt;/p&gt;
&lt;p&gt;The failure mode to watch is a model that presents the substitution check itself and reports that it worked when it did not. Do the substitution yourself, or better, have a tool do it.&lt;/p&gt;
&lt;h2&gt;Step four: use a second system, not a second prompt&lt;/h2&gt;
&lt;p&gt;Asking the same model whether its answer is correct is nearly worthless. It will usually agree with itself, and when it disagrees the disagreement carries almost no information.&lt;/p&gt;
&lt;p&gt;Asking a different system is better but not much better, since models trained on overlapping data share failure modes.&lt;/p&gt;
&lt;p&gt;Asking a fundamentally different kind of system is what actually works. Put the expression into a computer algebra system. Write six lines of Python and check numerically. Run the combinatorial enumeration for small cases. These tools have no opinion about what looks plausible; they compute.&lt;/p&gt;
&lt;p&gt;A worked example. Suppose a model tells you the sum of the first n cubes equals the square of the sum of the first n integers. That is true, but you should not take it on trust. Three lines of Python settles it for the first thousand values in under a second, and while that is not a proof, it converts an unverified claim into a claim you would bet on.&lt;/p&gt;
&lt;h2&gt;Step five: check the reasoning only if the answer survives&lt;/h2&gt;
&lt;p&gt;This ordering is deliberate. Reading a derivation is slow and it is where you are most likely to be persuaded by fluency. Do it last, after the cheap checks have already had a chance to fail.&lt;/p&gt;
&lt;p&gt;When you do read, look for specific things rather than reading for overall coherence.&lt;/p&gt;
&lt;p&gt;Watch for a step where a general claim is applied to a case that does not satisfy its conditions. This is the most common substantive error: invoking a theorem correctly stated but wrongly applicable, dividing by something that could be zero, taking a square root and silently discarding the negative branch, swapping the order of two limits.&lt;/p&gt;
&lt;p&gt;Watch for a step that asserts something without justification and where the assertion is doing real work. Phrases like &amp;quot;it is clear that&amp;quot;, &amp;quot;one can show&amp;quot;, and &amp;quot;by symmetry&amp;quot; are sometimes correct shorthand and sometimes a gap. Ask specifically about them.&lt;/p&gt;
&lt;p&gt;Watch for an answer that changes between the working and the summary. Models produce a derivation and then a concluding line, and these occasionally do not match.&lt;/p&gt;
&lt;h2&gt;The three sentences that matter&lt;/h2&gt;
&lt;p&gt;When you have a specific step you doubt, the useful prompts are narrow and adversarial.&lt;/p&gt;
&lt;p&gt;&amp;quot;Justify the step from line four to line five in full detail, citing the specific theorem used and verifying its hypotheses hold here.&amp;quot; This forces the model onto the specific claim rather than letting it restate the argument.&lt;/p&gt;
&lt;p&gt;&amp;quot;Give a counterexample to the following claim, or prove no counterexample exists.&amp;quot; Asking for a counterexample is a different search than asking for a proof and often surfaces the flaw.&lt;/p&gt;
&lt;p&gt;&amp;quot;Verify this numerically with code and show the output.&amp;quot; Any interface with code execution turns this into an actual check rather than another generated assertion.&lt;/p&gt;
&lt;h2&gt;Where this procedure fails&lt;/h2&gt;
&lt;p&gt;It fails on existence proofs that produce no object. If the claim is that some structure exists, and the proof is non-constructive, there is nothing to substitute back.&lt;/p&gt;
&lt;p&gt;It fails on asymptotic claims. A statement about behaviour as n goes to infinity cannot be tested at n equal to 5, and the small cases can actively mislead. The Pólya conjecture holds for every value below nine hundred million.&lt;/p&gt;
&lt;p&gt;It fails on anything requiring the full strength of the argument, which is most of research mathematics. At that level there is no substitute for reading, and the reading requires expertise.&lt;/p&gt;
&lt;p&gt;For the vast majority of practical mathematics, homework, engineering calculations, statistical reasoning, financial modelling, the procedure is adequate. The answer either survives boundary checks and substitution or it does not, and the derivation matters much less than people assume.&lt;/p&gt;
&lt;h2&gt;The habit worth building&lt;/h2&gt;
&lt;p&gt;Treat every generated derivation as a conjecture with an attached argument, in that order. The conjecture is the part you test. The argument is context that helps you test it and occasionally teaches you something.&lt;/p&gt;
&lt;p&gt;This is not a special posture for machines. It is what careful people already do with any result they did not derive themselves, including results from colleagues and from textbooks. The only thing that changed is the volume.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>P versus NP for People Who Write Code</title>
    <link href="https://proofandmachine.github.io/articles/p-versus-np-for-people-who-write-code/"/>
    <updated>2026-07-13T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/p-versus-np-for-people-who-write-code/</id>
    <author><name>Yonatan Peled</name></author>
    <category term="Explainers"/>
    <summary>The million-dollar question, stated without hand-waving, and why the practical situation is stranger than the headline version suggests.</summary>
    <content type="html">&lt;p&gt;The usual popular framing is that P versus NP asks whether problems that are easy to check are also easy to solve. That is accurate and it is not enough to work with. Here is the version that survives contact with actual programming.&lt;/p&gt;
&lt;h2&gt;The setup&lt;/h2&gt;
&lt;p&gt;A decision problem is a question with a yes or no answer, parameterised by an input. Does this graph have a Hamiltonian cycle? Is this Boolean formula satisfiable? Does this set of integers contain a subset summing to zero?&lt;/p&gt;
&lt;p&gt;P is the class of decision problems solvable by an algorithm whose running time is bounded by a polynomial in the input size. Sorting is in P. Shortest path is in P. Primality testing is in P, proven in 2002 by Agrawal, Kayal and Saxena, which was a surprise at the time.&lt;/p&gt;
&lt;p&gt;NP is the class of decision problems where a yes answer has a certificate that can be checked in polynomial time. If a graph has a Hamiltonian cycle, the cycle itself is a certificate, and checking it is a linear scan. If a formula is satisfiable, the satisfying assignment is the certificate.&lt;/p&gt;
&lt;p&gt;Note what NP does not mean. It is not &amp;quot;non-polynomial&amp;quot;. It stands for nondeterministic polynomial time, and the definition is about the existence of a checkable certificate, not about hardness. Everything in P is in NP, since you can ignore the certificate and just solve the problem.&lt;/p&gt;
&lt;p&gt;The question is whether the inclusion is strict. Is there a problem with an efficiently checkable certificate but no efficient algorithm?&lt;/p&gt;
&lt;h2&gt;Why anyone cares&lt;/h2&gt;
&lt;p&gt;Because of completeness. Stephen Cook in 1971 and Leonid Levin independently showed that Boolean satisfiability is NP-complete: every problem in NP reduces to it in polynomial time. Richard Karp then produced 21 more NP-complete problems in 1972, and the list now runs into the thousands.&lt;/p&gt;
&lt;p&gt;Complete means maximally hard within the class. If any one NP-complete problem has a polynomial algorithm, they all do, and P equals NP. If any one of them provably does not, none of them do.&lt;/p&gt;
&lt;p&gt;So the thousands of NP-complete problems, which span scheduling, routing, packing, circuit design, protein folding models, game solving and puzzle generation, all stand or fall together. That is why the question is worth a million dollars and why it is one of the seven Clay Millennium Problems.&lt;/p&gt;
&lt;h2&gt;What the answer would mean&lt;/h2&gt;
&lt;p&gt;If P equals NP, with a practical algorithm, most modern cryptography breaks. Public key systems rely on the gap between finding a factorisation and checking one. So does much of the security infrastructure of the internet. On the other side, optimisation problems that are currently approximated would become exactly solvable, which would reshape logistics, chip design, and drug discovery. Scott Aaronson has argued that it would also mean mathematics itself becomes largely automatable, since finding a proof of bounded length is an NP search.&lt;/p&gt;
&lt;p&gt;Almost nobody expects this. Informal polls of theoretical computer scientists put the fraction expecting P not equal to NP somewhere above 80 percent, and rising over time.&lt;/p&gt;
&lt;p&gt;If P does not equal NP, which is the expected answer, nothing about daily practice changes. We would have a proof of something everybody already assumed.&lt;/p&gt;
&lt;h2&gt;Why it is so hard to settle&lt;/h2&gt;
&lt;p&gt;Three barriers are known, and each one killed a promising line of attack.&lt;/p&gt;
&lt;p&gt;Relativisation, from Baker, Gill and Solovay in 1975. There exist oracles relative to which P equals NP, and other oracles relative to which it does not. Any proof technique that works the same way when the machines have access to an oracle cannot settle the question, because it would have to prove both. That rules out the diagonalisation arguments that had settled earlier separation questions.&lt;/p&gt;
&lt;p&gt;Natural proofs, from Razborov and Rudich in 1994. Most circuit lower bound techniques share two properties: they apply to a large fraction of all functions, and the property they use can be checked efficiently. Razborov and Rudich showed that any proof technique with both properties would also break the pseudorandom generators that are widely believed to exist. So either those generators do not exist, which would itself be a shock, or this whole family of techniques cannot work.&lt;/p&gt;
&lt;p&gt;Algebrization, from Aaronson and Wigderson in 2008, extended the relativisation barrier to cover algebraic techniques that had been developed specifically to get around it.&lt;/p&gt;
&lt;p&gt;Each barrier does not say the question is unanswerable. It says a particular kind of argument cannot answer it. What remains is techniques that are non-relativising, non-naturalising and non-algebrising, and nobody has much idea what those look like.&lt;/p&gt;
&lt;h2&gt;The practical situation, which is stranger&lt;/h2&gt;
&lt;p&gt;Here is what a working programmer should actually take from this.&lt;/p&gt;
&lt;p&gt;NP-hardness is a worst-case statement. It says no algorithm is fast on every instance. It says nothing about the instances you have.&lt;/p&gt;
&lt;p&gt;Modern SAT solvers routinely handle industrial instances with millions of variables. Chip verification, dependency resolution in package managers, hardware model checking, and automated planning all run on SAT and SMT solvers in production. The problem is NP-complete and the solvers work anyway, because real instances have structure that the solvers exploit through conflict-driven clause learning, restarts and good heuristics.&lt;/p&gt;
&lt;p&gt;Integer programming is NP-hard and commercial solvers handle enormous scheduling and routing problems daily. The travelling salesman problem is NP-hard and the Concorde solver has found provably optimal tours through tens of thousands of cities.&lt;/p&gt;
&lt;p&gt;So the correct reading of &amp;quot;your problem is NP-hard&amp;quot; is not &amp;quot;give up&amp;quot;. It is &amp;quot;there is no algorithm guaranteed fast on all inputs, so find out whether your inputs are adversarial or merely large&amp;quot;. Usually they are merely large.&lt;/p&gt;
&lt;p&gt;The genuinely hard instances tend to be constructed rather than encountered. Random instances near the satisfiability threshold are hard. Cryptographic instances are hard by design. Instances arising from a logistics problem at a real company are usually not.&lt;/p&gt;
&lt;h2&gt;Where machine learning enters&lt;/h2&gt;
&lt;p&gt;Two connections, both active.&lt;/p&gt;
&lt;p&gt;The first is heuristic learning. SAT solver performance depends heavily on branching heuristics, which decide which variable to assign next. This is a decision problem with a clear objective and enormous amounts of available training data, and learned heuristics have produced measurable gains. The solver remains complete and its answers remain exact; only the search order is learned. This is the same architecture as AlphaGeometry: neural guidance, symbolic guarantee.&lt;/p&gt;
&lt;p&gt;The second is the reverse direction. NP-hardness results are used to characterise what neural networks can and cannot do. Training a small network to optimality is NP-hard. Verifying that a network satisfies a robustness property is NP-hard. These results shape what verification tooling is realistic.&lt;/p&gt;
&lt;h2&gt;The claims to distrust&lt;/h2&gt;
&lt;p&gt;Every year brings several claimed proofs. Gerhard Woeginger maintained a list that reached over a hundred entries before he stopped updating it, split roughly evenly between claims in each direction, including several people who claimed both at different times.&lt;/p&gt;
&lt;p&gt;The base rate on these is not encouraging, and the reason is the barriers. A proof that does not explain how it evades relativisation and natural proofs is almost certainly wrong, and the author usually has not addressed either. Language models, asked about the problem, will occasionally produce confident-sounding arguments in one direction or the other. Those arguments are worth exactly what any other unrefereed claimed proof of a Millennium Problem is worth.&lt;/p&gt;
&lt;p&gt;If you want a single sentence to carry away: the question is open, the expected answer changes nothing practical, the barriers explain why fifty years of effort has not settled it, and NP-hardness in your own work is a statement about the worst case that your actual inputs probably do not achieve.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>The Busy Beaver and What Cannot Be Computed</title>
    <link href="https://proofandmachine.github.io/articles/the-busy-beaver-and-what-cannot-be-computed/"/>
    <updated>2026-07-09T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/the-busy-beaver-and-what-cannot-be-computed/</id>
    <author><name>Miriam Adler</name></author>
    <category term="Open Problems"/>
    <summary>A function that grows faster than anything a computer can calculate, and how an internet collaboration settled its fifth value after forty years.</summary>
    <content type="html">&lt;p&gt;Consider a Turing machine with n states, a two-symbol alphabet and a tape that starts blank. Some of these machines halt. Most run forever. Among the ones that halt, some run longer than others.&lt;/p&gt;
&lt;p&gt;Define BB(n) as the maximum number of steps any halting n-state machine takes before stopping. This is the busy beaver function, introduced by Tibor Radó in 1962.&lt;/p&gt;
&lt;p&gt;BB(1) is 1. BB(2) is 6. BB(3) is 21. BB(4) is 107.&lt;/p&gt;
&lt;p&gt;BB(5) is 47,176,870.&lt;/p&gt;
&lt;p&gt;BB(6) is greater than 10 raised to the power of 10 raised to the power of 10 raised to the power of 10 raised to the power of 7, and that is only a lower bound from a specific machine somebody found.&lt;/p&gt;
&lt;h2&gt;Why the growth is not just fast&lt;/h2&gt;
&lt;p&gt;Any function you can write down with a computer program is eventually exceeded by the busy beaver function. Not eventually exceeded by a bit. Exceeded permanently and by an unbounded margin.&lt;/p&gt;
&lt;p&gt;The proof is short. Suppose f is computable and f(n) is at least BB(n) for all n. Then you could decide the halting problem: to determine whether an n-state machine halts, compute f(n), run the machine for that many steps, and if it has not halted by then it never will. But the halting problem is undecidable, so no such f exists.&lt;/p&gt;
&lt;p&gt;That is the whole argument, and it is worth sitting with. The busy beaver function is not hard to compute in the way that factoring is hard. It is uncomputable, in the strict sense that no algorithm produces it. The values are perfectly well defined. Each BB(n) is a specific finite integer. There is simply no procedure that finds them all.&lt;/p&gt;
&lt;h2&gt;The connection to open problems&lt;/h2&gt;
&lt;p&gt;Because busy beaver values encode halting behaviour, they encode mathematics.&lt;/p&gt;
&lt;p&gt;You can build a Turing machine that searches for a counterexample to Goldbach&#39;s conjecture and halts if it finds one. Whether that machine halts is equivalent to whether Goldbach is false. Someone has built such a machine with 27 states. So knowing BB(27) would settle Goldbach: run every 27-state machine for BB(27) steps, and if the Goldbach machine has not halted, no counterexample exists.&lt;/p&gt;
&lt;p&gt;The same trick has been done for the Riemann hypothesis, with a machine in the low hundreds of states, later reduced considerably.&lt;/p&gt;
&lt;p&gt;More dramatically, Yuri Matiyasevich, Stefan O&#39;Rear and Scott Aaronson&#39;s collaborators constructed a machine of 748 states, later improved to 745, that halts if and only if Zermelo-Fraenkel set theory is inconsistent. Since ZFC cannot prove its own consistency, ZFC cannot determine whether that machine halts. Therefore ZFC cannot determine BB(745). The value exists; standard mathematics cannot reach it.&lt;/p&gt;
&lt;p&gt;The threshold where busy beaver values become independent of ZFC is somewhere between 6 and 745, and narrowing it is an active pursuit.&lt;/p&gt;
&lt;h2&gt;BB(5), settled in 2024&lt;/h2&gt;
&lt;p&gt;For forty years the fifth value was a conjecture. Heiner Marxen and Jürgen Buntrock found a five-state machine running 47,176,870 steps in 1989, and nobody found anything longer, but proving that no five-state machine runs longer requires eliminating every non-halting candidate.&lt;/p&gt;
&lt;p&gt;There are roughly 17 trillion five-state machines before symmetry reduction, cut to about 180 million distinct cases. Most are dispatched quickly. The difficulty is the residue: machines whose non-halting is not obvious and requires a proof.&lt;/p&gt;
&lt;p&gt;The bbchallenge project, an open online collaboration begun in 2022, worked through them. Contributors built deciders, programs that prove a class of machines never halts, each covering a different behavioural pattern. Cyclers, translated cyclers, machines whose tape configuration satisfies a closed-form invariant, machines analysable through a finite automaton reduction.&lt;/p&gt;
&lt;p&gt;A handful of machines resisted every automated decider and needed individual analysis. The most famous is Antihydra, a machine implementing a Collatz-like iteration on integers, whose non-halting depends on a statement about the distribution of a particular sequence that nobody has proven. It was ultimately handled by a bespoke argument.&lt;/p&gt;
&lt;p&gt;In July 2024 the project announced that BB(5) equals 47,176,870, with the entire proof formalised in the Coq proof assistant. The formalisation matters here more than usual. The proof is a collection of programs run over hundreds of millions of cases, exactly the situation where a subtle bug would be invisible. Formal verification converts a claim about software into a claim checked by a kernel.&lt;/p&gt;
&lt;h2&gt;BB(6) is out of reach&lt;/h2&gt;
&lt;p&gt;The sixth value will not be determined. The current lower bound, established through analysis of a specific machine in 2025, involves a tower of exponentials.&lt;/p&gt;
&lt;p&gt;The obstruction is not compute. It is that six-state machines can implement iterations whose behaviour depends on open number-theoretic questions. Several known six-state candidates run Collatz-like processes. Deciding whether they halt would require settling those processes, and nobody can.&lt;/p&gt;
&lt;p&gt;This is the practical face of undecidability. Not an abstract limit at some distant horizon, but a wall that appears at six states and a two-symbol alphabet, which is about as small as a computational system can be.&lt;/p&gt;
&lt;h2&gt;Why this belongs in a discussion about AI&lt;/h2&gt;
&lt;p&gt;Because it draws a boundary that no amount of scaling crosses.&lt;/p&gt;
&lt;p&gt;There is a persistent framing in which AI capability is a matter of resources: more parameters, more data, more compute, more capability. Within the space of computable functions that framing is roughly right, and progress has been startling.&lt;/p&gt;
&lt;p&gt;The busy beaver function is outside that space entirely. No system that runs as a computation can produce it, regardless of size or architecture. A language model asked for BB(7) can output a number. That number will be wrong, and no training procedure could make it right, because the mapping from n to BB(n) is not a computable function to approximate.&lt;/p&gt;
&lt;p&gt;This is not a claim that AI is limited in some vague philosophical way. It is a specific mathematical fact with a two-line proof, and it applies equally to human mathematicians running as physical processes.&lt;/p&gt;
&lt;p&gt;What it does mean is that the discourse about machines eventually solving all mathematical problems has a well-defined false component. There are true arithmetic statements not provable in any given consistent formal system, that is Gödel, and there are specific finite integers that no algorithm computes, that is Radó. Both were established before the first neural network was trained and neither has an escape hatch.&lt;/p&gt;
&lt;p&gt;The busy beaver function is the cleanest illustration because it is so concrete. BB(745) is a particular integer. You could write it down if you knew it. Nothing that computes will ever tell you what it is.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Symbolic or Neural: Choosing the Right Machine for the Job</title>
    <link href="https://proofandmachine.github.io/articles/symbolic-versus-neural/"/>
    <updated>2026-07-05T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/symbolic-versus-neural/</id>
    <author><name>Dana Reisman</name></author>
    <category term="Practice"/>
    <summary>Computer algebra systems and language models fail in opposite directions. Knowing which failure you are exposed to is most of the skill in using either.</summary>
    <content type="html">&lt;p&gt;There are two kinds of mathematical software and they are almost perfect opposites.&lt;/p&gt;
&lt;p&gt;A computer algebra system executes an algorithm. Ask Mathematica or SymPy or Maxima to factor a polynomial and it runs a factorisation algorithm whose correctness was proven before it was implemented. The answer is right. If the system cannot solve your problem, it says so, or it runs until you stop it.&lt;/p&gt;
&lt;p&gt;A language model produces the most likely continuation of your text. Ask it to factor a polynomial and it produces something shaped like a factorisation. Usually correct for small cases. Sometimes confidently wrong. Never explicitly unable.&lt;/p&gt;
&lt;p&gt;Both are useful. They are useful for different things, and the most common expensive mistake is using one where the other belongs.&lt;/p&gt;
&lt;h2&gt;What symbolic systems are actually good at&lt;/h2&gt;
&lt;p&gt;Exact manipulation of well-specified expressions. Integration, differentiation, series expansion, polynomial arithmetic, linear algebra over exact fields, solving systems of equations, simplification, number theory, combinatorial enumeration.&lt;/p&gt;
&lt;p&gt;These are areas with decision procedures. The Risch algorithm decides elementary integrability. Gröbner bases decide membership in a polynomial ideal. Cylindrical algebraic decomposition handles quantifier elimination over the reals. Each of these is a theorem-backed procedure that terminates with a correct answer or a correct declaration that no answer of the requested form exists.&lt;/p&gt;
&lt;p&gt;The value is not just correctness. It is that failure is visible. If SymPy cannot integrate your function, it returns an unevaluated integral. You know you did not get an answer. That property is worth a great deal and it is exactly what the alternative lacks.&lt;/p&gt;
&lt;h2&gt;Where symbolic systems fall down&lt;/h2&gt;
&lt;p&gt;The input has to be formal. Every symbol declared, every assumption stated, every domain specified. If you forget to tell the system that x is positive, it will refuse to simplify the square root of x squared to x, correctly, and you will spend twenty minutes wondering why.&lt;/p&gt;
&lt;p&gt;Expression swell is the other chronic problem. Intermediate results in symbolic computation grow explosively even when the final answer is small. A determinant of a modest symbolic matrix can produce intermediate terms that exhaust memory. Gröbner basis computation is doubly exponential in the worst case and reaches that worst case on ordinary-looking inputs.&lt;/p&gt;
&lt;p&gt;And they cannot read. A problem stated in English is not input. Translating a paragraph into a system of equations is exactly the step a computer algebra system does not perform.&lt;/p&gt;
&lt;h2&gt;What language models are actually good at&lt;/h2&gt;
&lt;p&gt;Translation between informal and formal. That is the core competence and everything else follows from it.&lt;/p&gt;
&lt;p&gt;Given a paragraph describing a physical situation, produce the equations. Given a table of data, propose which statistical test applies. Given a vague sense of what you want, produce the Mathematica syntax that expresses it. Given an error message, explain what the system was objecting to.&lt;/p&gt;
&lt;p&gt;They are also good at recall across an enormous surface. Which theorem covers this case, what is this identity called, where did this technique come from, what is a standard approach to this genre of problem. This is retrieval with fuzzy matching, and it beats searching for the name of something you do not know the name of.&lt;/p&gt;
&lt;p&gt;And they are good at explanation. Taking a correct derivation and rendering it at a chosen level of detail is genuinely useful and low-risk, because the derivation is already known correct.&lt;/p&gt;
&lt;h2&gt;Where language models fall down&lt;/h2&gt;
&lt;p&gt;Long exact computation, for architectural reasons covered elsewhere. Consistency across a long derivation, where an error in step three propagates silently. Anything requiring the system to know it does not know.&lt;/p&gt;
&lt;p&gt;That last one is the expensive failure. A computer algebra system that cannot do something returns an unevaluated expression. A language model that cannot do something returns a wrong answer in the same tone as a right one. The output distribution does not contain an &amp;quot;I cannot&amp;quot; for most mathematical questions, because the training text did not contain many people saying so.&lt;/p&gt;
&lt;h2&gt;The pairing that works&lt;/h2&gt;
&lt;p&gt;Use the model to reach a formal statement. Use the symbolic system to evaluate it. Use the model again to interpret the result.&lt;/p&gt;
&lt;p&gt;In practice this means asking for code rather than answers. Instead of asking for the eigenvalues of a matrix, ask for the three lines of SymPy that compute them, then run those lines. You have then used the model for the part where it is strong, translation, and the algorithm for the part where it is strong, computation.&lt;/p&gt;
&lt;p&gt;This is not a workaround. It is the correct division of labour, and it is what every serious tool-using deployment does. When an assistant with code execution answers a numerical question, it is running this pattern internally.&lt;/p&gt;
&lt;h2&gt;A decision table&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Exact integral, derivative, series&lt;/td&gt;
&lt;td&gt;Computer algebra system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Arithmetic on numbers longer than a few digits&lt;/td&gt;
&lt;td&gt;Calculator or interpreter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Turning a word problem into equations&lt;/td&gt;
&lt;td&gt;Language model, then verify the equations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Solving those equations&lt;/td&gt;
&lt;td&gt;Computer algebra system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Finding the name of a theorem you half-remember&lt;/td&gt;
&lt;td&gt;Language model&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Checking whether a claimed identity is true&lt;/td&gt;
&lt;td&gt;Numerical evaluation at random points&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Explaining a known-correct proof at a different level&lt;/td&gt;
&lt;td&gt;Language model&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Producing a proof you will rely on&lt;/td&gt;
&lt;td&gt;Proof assistant, with either system suggesting steps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enumerating small cases of a combinatorial structure&lt;/td&gt;
&lt;td&gt;Write the loop, run it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deciding whether an approach is worth trying&lt;/td&gt;
&lt;td&gt;Language model, as a cheap prior&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The row that gets ignored most often is the third. People ask for the answer rather than the setup, and the setup is where the model adds value and where a human can still check the work.&lt;/p&gt;
&lt;h2&gt;Numerical verification deserves its own note&lt;/h2&gt;
&lt;p&gt;For any claimed identity between expressions, evaluate both sides at several random points. If they disagree at one point, the identity is false and you are done. If they agree at twenty random points to fifteen decimal places, the identity is not proven, but the probability of coincidence is negligible for anything you would encounter in practice.&lt;/p&gt;
&lt;p&gt;This takes about four lines of code and catches most errors from either kind of system. It is underused relative to how cheap it is.&lt;/p&gt;
&lt;p&gt;Two cautions. Choose points away from singularities and branch cuts, since complex-valued functions with branch cuts will legitimately disagree in regions where the identity holds only on a principal branch. And use enough precision that floating point error does not masquerade as disagreement.&lt;/p&gt;
&lt;h2&gt;The general shape&lt;/h2&gt;
&lt;p&gt;Every reliable mathematical workflow built on modern tooling has the same structure. Something creative and unreliable proposes. Something mechanical and reliable disposes.&lt;/p&gt;
&lt;p&gt;AlphaGeometry does it with a language model and a deduction engine. Proof search in Lean does it with a neural tactic suggester and a type checker. A working engineer does it with a chatbot and a Jupyter notebook.&lt;/p&gt;
&lt;p&gt;The pattern is identical at every scale, and the mistake is always the same: letting the proposing component&#39;s output through without passing it to the disposing component.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Machines That Generate Conjectures</title>
    <link href="https://proofandmachine.github.io/articles/machines-that-generate-conjectures/"/>
    <updated>2026-07-01T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/machines-that-generate-conjectures/</id>
    <author><name>Miriam Adler</name></author>
    <category term="Systems"/>
    <summary>Finding a proof is one problem. Deciding what to try to prove is a different one, and it is where automated mathematics has been quietly interesting for thirty years.</summary>
    <content type="html">&lt;p&gt;Most discussion of AI in mathematics concerns proof: given a statement, find an argument. That framing skips the part working mathematicians spend most of their time on, which is deciding what statement to consider in the first place.&lt;/p&gt;
&lt;p&gt;A conjecture is a bet. It has to be plausible enough to be worth effort, hard enough to be worth stating, and connected to something that matters. Producing true statements is easy; a computer can produce them forever. Producing true statements that anyone should care about is the whole difficulty.&lt;/p&gt;
&lt;p&gt;Several systems have tried, with results that are genuinely mixed in an instructive way.&lt;/p&gt;
&lt;h2&gt;Graffiti&lt;/h2&gt;
&lt;p&gt;Siemion Fajtlowicz began writing Graffiti in the 1980s. It looks at graph invariants, quantities like the independence number, the chromatic number, the average distance between vertices, and proposes inequalities between them. It tests each candidate against a database of graphs and discards anything with a counterexample.&lt;/p&gt;
&lt;p&gt;Then it applies filters designed to discard uninteresting survivors. If a proposed inequality follows immediately from one already proposed, drop it. If it is weaker than something already on the list, drop it. Fajtlowicz called these the Dalmatian heuristic and spent considerable effort on them, because without them the output is unusable.&lt;/p&gt;
&lt;p&gt;Graffiti&#39;s conjectures produced published papers. Several dozen, by mathematicians including Fan Chung, Ronald Graham and Paul Erdős. A number were proven, a number refuted, and the refutations were often as interesting as the proofs because they exhibited graphs nobody had thought to construct.&lt;/p&gt;
&lt;p&gt;The lesson from Graffiti is that the generation step was never the hard part. Fajtlowicz&#39;s real contribution was the filtering, which encoded a great deal of human taste about what makes a graph inequality worth stating.&lt;/p&gt;
&lt;h2&gt;The Ramanujan Machine&lt;/h2&gt;
&lt;p&gt;A group at the Technion launched the Ramanujan Machine in 2019, aimed at a specific target: continued fraction expressions for mathematical constants.&lt;/p&gt;
&lt;p&gt;Ramanujan produced formulas like continued fractions converging to expressions involving pi and e, often without proof, and often with no indication of how he found them. The project asked whether a search could find comparable formulas.&lt;/p&gt;
&lt;p&gt;The method is numerical. Generate candidate continued fractions with polynomial coefficient patterns. Evaluate them to high precision. Compare against a table of constants and their simple algebraic combinations. When a match appears to many digits, you have a conjecture.&lt;/p&gt;
&lt;p&gt;It found several previously unknown formulas, including expressions for the Catalan constant and for combinations involving pi and e. Some were subsequently proven, a few by the group and a few by outside mathematicians who read the output.&lt;/p&gt;
&lt;p&gt;The honest assessment is that these are attractive identities rather than important ones. They do not unlock anything. But the project made a clean methodological point: high-precision numerical search over a structured space finds relationships that nobody would find by hand, and integer relation algorithms like PSLQ make the matching step reliable.&lt;/p&gt;
&lt;p&gt;That technique predates the project. David Bailey, Peter Borwein and Simon Plouffe used it in 1995 to find the BBP formula for pi, which allows computing the nth hexadecimal digit without computing the preceding ones. That formula was found by numerical search and proven afterward, and it changed what people believed was possible about digit extraction.&lt;/p&gt;
&lt;h2&gt;Deep learning as a microscope&lt;/h2&gt;
&lt;p&gt;A different approach appeared in a 2021 &lt;em&gt;Nature&lt;/em&gt; paper from DeepMind working with Geordie Williamson and with András Juhász and Marc Lackenby.&lt;/p&gt;
&lt;p&gt;Here the model does not propose the conjecture. It is used to detect whether a relationship exists at all.&lt;/p&gt;
&lt;p&gt;The procedure: take two collections of mathematical objects you suspect are connected. Train a network to predict one from the other. If the network cannot learn the mapping, that is weak evidence against a relationship. If it can, use attribution methods to identify which input features carry the signal. Then a human looks at those features and tries to formulate a precise statement.&lt;/p&gt;
&lt;p&gt;Applied to knot theory, this produced a relationship between hyperbolic and algebraic invariants of knots, specifically involving the signature and geometric quantities, which Lackenby and Juhász then proved. Applied to representation theory, it produced progress on the combinatorial invariance conjecture for Kazhdan-Lusztig polynomials, with Williamson identifying structure in the network&#39;s attention that suggested a new construction.&lt;/p&gt;
&lt;p&gt;The framing that stuck was that the network functions as a microscope. It does not do the mathematics. It points at where the mathematics is.&lt;/p&gt;
&lt;p&gt;This seems more durable than conjecture generation as such, because it keeps the human in the role humans are still best at, deciding what is meaningful, while using the machine for the part humans are bad at, detecting weak signal in high-dimensional data.&lt;/p&gt;
&lt;h2&gt;The pattern-matching problem&lt;/h2&gt;
&lt;p&gt;There is a persistent failure mode across all of these systems, and it is worth naming.&lt;/p&gt;
&lt;p&gt;An automated conjecture generator will produce enormous numbers of true statements that are true for uninteresting reasons. Coincidences of small numbers. Consequences of a definition that nobody bothered to state. Special cases of known results, dressed differently enough that the system does not recognise them.&lt;/p&gt;
&lt;p&gt;Filtering these out requires knowing the field, which means the system is only as good as the taste encoded in its filters, which means someone had to encode taste. Graffiti&#39;s success came from Fajtlowicz spending years on that encoding. Systems that skipped it produced output nobody read.&lt;/p&gt;
&lt;p&gt;Large language models change this somewhat, because they have absorbed a great deal of implicit taste from mathematical writing. Ask a model whether a given identity is interesting and it will give an answer that correlates with what a mathematician would say, not because it has judgement but because it has read a lot of mathematicians expressing theirs.&lt;/p&gt;
&lt;p&gt;Whether that constitutes taste or a good imitation of taste is not a question anyone can currently answer, and for practical purposes it may not matter.&lt;/p&gt;
&lt;h2&gt;What would count as a breakthrough&lt;/h2&gt;
&lt;p&gt;Not a system that produces conjectures. Several exist and they work.&lt;/p&gt;
&lt;p&gt;A system that produces a conjecture which reframes a field. The kind of statement that makes people realise they were asking the wrong question. The Langlands programme, Weil&#39;s conjectures, the Taniyama-Shimura conjecture that turned out to imply Fermat.&lt;/p&gt;
&lt;p&gt;Those conjectures were not found by noticing a pattern in data. They were found by someone seeing that two apparently unrelated areas had the same shape. No current system has produced anything in that category, and it is not obvious what training signal would produce one, because the whole point is that the connection was not visible in the existing corpus.&lt;/p&gt;
&lt;p&gt;That is the frontier, and the honest position is that nobody knows whether it is reachable from here. In the meantime the microscope framing is doing real work, and there is a growing list of theorems whose discovery involved a neural network pointing at something a person had not looked at.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>What Chain of Thought Really Does</title>
    <link href="https://proofandmachine.github.io/articles/what-chain-of-thought-really-does/"/>
    <updated>2026-06-27T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/what-chain-of-thought-really-does/</id>
    <author><name>Yonatan Peled</name></author>
    <category term="Explainers"/>
    <summary>Asking a model to think step by step improves mathematical accuracy substantially. The reason is computational rather than psychological, and the distinction has consequences.</summary>
    <content type="html">&lt;p&gt;In 2022 a paper from Jason Wei and colleagues at Google showed that prompting a large language model to produce intermediate reasoning steps before its final answer raised accuracy on grade-school word problems from around 18 percent to around 57 percent. The technique was called chain-of-thought prompting. A follow-up found that appending the phrase &amp;quot;let us think step by step&amp;quot; achieved much of the same effect with no examples at all.&lt;/p&gt;
&lt;p&gt;This got read as evidence that models can reason when encouraged to. That reading is roughly backwards, and the accurate version is more useful.&lt;/p&gt;
&lt;h2&gt;The depth constraint&lt;/h2&gt;
&lt;p&gt;A transformer processes its input through a fixed number of layers. GPT-scale models have somewhere between 50 and 150. Each layer performs a fixed amount of computation: attention over the sequence, then a feedforward transformation.&lt;/p&gt;
&lt;p&gt;When the model generates a token, that is one pass through all the layers. Then the token is appended to the context and the next pass begins.&lt;/p&gt;
&lt;p&gt;The consequence: the amount of computation available before emitting any single token is bounded, and the bound does not depend on how hard the question is. Asking for the answer to two plus two and asking for the answer to a twelve-step algebra problem allocate the same computational budget to the first output token.&lt;/p&gt;
&lt;p&gt;This is a genuine, provable limitation. Transformers with fixed depth belong to a restricted circuit complexity class. There are problems, including composing a permutation many times and evaluating deeply nested boolean formulas, that cannot be solved in constant depth regardless of network width.&lt;/p&gt;
&lt;p&gt;Some computations require a number of sequential steps that grows with input size, where each step needs the previous step&#39;s result. No amount of parallel work substitutes. Long multiplication is one. Iterating a function is another. Following a chain of dependencies through a graph is another.&lt;/p&gt;
&lt;h2&gt;What generating tokens buys&lt;/h2&gt;
&lt;p&gt;Every generated token is another full pass through the network, and the model can read everything it has already written.&lt;/p&gt;
&lt;p&gt;So if the model writes an intermediate result, that result now exists in the context, and subsequent passes can use it as an input rather than recomputing it. The sequence of generated tokens becomes a working memory, and the number of sequential computational steps available becomes proportional to the number of tokens generated rather than to the depth of the network.&lt;/p&gt;
&lt;p&gt;Theoretical work has made this precise. Transformers with chain of thought of polynomial length can simulate polynomial-time computation, which places them in a substantially larger complexity class than the same models answering directly. The scratchpad is not a metaphor. It is a tape.&lt;/p&gt;
&lt;p&gt;That is what chain of thought does. It converts a depth-bounded computation into a length-bounded one, and length is much cheaper to buy.&lt;/p&gt;
&lt;h2&gt;Why the psychological framing misleads&lt;/h2&gt;
&lt;p&gt;If you believe chain of thought works because the model is thinking more carefully, several wrong predictions follow.&lt;/p&gt;
&lt;p&gt;You would expect the written reasoning to describe what the model actually did. It often does not. Studies on faithfulness have shown that models produce reasoning chains that do not reflect the factors driving their answers. In one line of work, inserting a bias into the prompt, such as always marking option A as correct in the examples, changed the model&#39;s answers while the stated reasoning never mentioned the pattern and instead constructed a justification for the biased answer.&lt;/p&gt;
&lt;p&gt;You would expect encouraging phrases to help through some motivational channel. They help through a distributional channel: the phrase shifts the model toward text that resembles worked solutions, and worked solutions contain intermediate steps.&lt;/p&gt;
&lt;p&gt;You would expect that more elaborate reasoning always helps. It does not. On simple tasks, forced step-by-step reasoning sometimes reduces accuracy, apparently by introducing opportunities for error into a computation that fit in one pass anyway. There is also a documented effect where reasoning about tasks that humans perform better intuitively, such as certain visual or grammatical judgements, degrades model performance in a way that parallels the psychology literature on verbal overshadowing.&lt;/p&gt;
&lt;h2&gt;The reasoning models&lt;/h2&gt;
&lt;p&gt;Since 2024, a class of models has been trained specifically to produce long internal reasoning traces before answering, using reinforcement learning against verifiable outcomes. Mathematics and code are the natural training domains because correctness is checkable automatically.&lt;/p&gt;
&lt;p&gt;These systems generate thousands of tokens of internal work on a hard problem, including backtracking, checking their own steps and trying alternative approaches. Performance on competition mathematics improved dramatically.&lt;/p&gt;
&lt;p&gt;The mechanism is the same one. More tokens, more sequential computation. What changed is that the model was trained to use those tokens productively rather than prompted into it, and that the training signal came from whether the final answer was right rather than from imitating human-written solutions.&lt;/p&gt;
&lt;p&gt;An important consequence: performance now scales with inference-time compute. Letting the model think longer produces better answers, up to a point, which is a different scaling axis from making the model larger. This has become a central design consideration.&lt;/p&gt;
&lt;p&gt;The faithfulness problem did not go away. The visible trace is still not guaranteed to be the computation. Providers differ in whether they show it, and some show a summary rather than the raw trace.&lt;/p&gt;
&lt;h2&gt;Practical consequences&lt;/h2&gt;
&lt;p&gt;If you want a hard mathematical question answered well, give the model room. Do not ask for the answer only. Do not impose a length limit that forces compression. The tokens are the computation.&lt;/p&gt;
&lt;p&gt;If you want to know whether an answer is right, do not read the reasoning as evidence. A well-formed chain of thought is not a proof that the process was sound. Check the answer directly by the methods that apply to any claimed result.&lt;/p&gt;
&lt;p&gt;If you are checking a specific step, extract it and ask about it in isolation. A step embedded in a long chain gets carried by the surrounding fluency. The same step alone gets evaluated.&lt;/p&gt;
&lt;p&gt;If the task genuinely requires exact computation, give the model a tool. Chain of thought makes arithmetic better. An interpreter makes it correct.&lt;/p&gt;
&lt;h2&gt;The honest summary&lt;/h2&gt;
&lt;p&gt;Chain of thought is a real and important technique whose effect size on mathematical tasks is large. The mechanism is that generating tokens buys sequential computation that the architecture otherwise cannot provide.&lt;/p&gt;
&lt;p&gt;It is not introspection. The trace is output, and output is generated the same way all output is generated, by predicting likely continuations. Sometimes those continuations happen to be a faithful record of the computation. There is no mechanism guaranteeing it and there is evidence that it frequently is not.&lt;/p&gt;
&lt;p&gt;Both things are true at once, and holding both is the whole of understanding what these systems do when they appear to reason.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>The Largest Proof Ever Produced Was 200 Terabytes Long</title>
    <link href="https://proofandmachine.github.io/articles/the-largest-proof-ever-produced/"/>
    <updated>2026-06-23T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/the-largest-proof-ever-produced/</id>
    <author><name>Miriam Adler</name></author>
    <category term="Formal Methods"/>
    <summary>A SAT solver settled the Boolean Pythagorean triples problem in 2016. The proof is unreadable by design, and it is more trustworthy than most papers.</summary>
    <content type="html">&lt;p&gt;The question is easy to state. Can you colour every positive integer red or blue so that no Pythagorean triple, no three numbers a, b, c with a squared plus b squared equal to c squared, ends up all one colour?&lt;/p&gt;
&lt;p&gt;Erdős asked a version of this and offered 100 dollars for an answer. In 2016 Marijn Heule, Oliver Kullmann and Victor Marek settled it. The answer is no. You can colour the integers from 1 to 7,824 successfully. At 7,825 it becomes impossible.&lt;/p&gt;
&lt;p&gt;The proof is 200 terabytes.&lt;/p&gt;
&lt;h2&gt;How a colouring problem becomes a logic problem&lt;/h2&gt;
&lt;p&gt;Encode the question as a Boolean formula. Introduce one variable per integer, true for red and false for blue. For every Pythagorean triple within your range, add two clauses: not all three true, and not all three false.&lt;/p&gt;
&lt;p&gt;Now the formula is satisfiable exactly when a valid colouring exists. Ask a SAT solver.&lt;/p&gt;
&lt;p&gt;For 7,824 the solver finds a colouring. For 7,825 it proves no assignment satisfies the formula. That negative answer is the proof, and the size comes from what a proof of unsatisfiability has to contain.&lt;/p&gt;
&lt;h2&gt;Why the proof is so large&lt;/h2&gt;
&lt;p&gt;A satisfiable answer is compact. Hand over the assignment and anyone can check every clause in linear time.&lt;/p&gt;
&lt;p&gt;Unsatisfiability has no such certificate. To establish that no assignment works, the solver must in effect account for the entire search space. Modern solvers do this through conflict-driven clause learning: when a partial assignment leads to a contradiction, the solver analyses the conflict and derives a new clause capturing why that region fails, then continues. The learned clauses accumulate.&lt;/p&gt;
&lt;p&gt;The proof is the log of every derived clause, in a format called DRAT, which stands for deletion resolution asymmetric tautology. Each line records a clause and the fact that it follows from earlier ones by a specific inference rule.&lt;/p&gt;
&lt;p&gt;The search for 7,825 was distributed across 800 cores on the Stampede supercomputer at Texas Advanced Computing Center, using a technique called cube and conquer. Split the problem into roughly a million subproblems by fixing some variables, solve each independently, combine. Two days of wall clock time. The combined DRAT log came to 200 terabytes, later compressed to 68 gigabytes.&lt;/p&gt;
&lt;h2&gt;The part that makes it trustworthy&lt;/h2&gt;
&lt;p&gt;A 200-terabyte log is not something a person can inspect, and neither is a 68-gigabyte one. The reason to believe it is that the log was checked by a separate, formally verified program.&lt;/p&gt;
&lt;p&gt;The checker reads each line of the DRAT proof and verifies that the recorded clause genuinely follows from the clauses before it. This is a simple mechanical check. It knows nothing about Pythagorean triples, colourings or SAT solving. It knows resolution.&lt;/p&gt;
&lt;p&gt;Crucially, the checker itself has been verified. Implementations exist whose correctness has been proven in Coq and in ACL2. So the trust chain is: the encoding is correct, which a human can check because it is a short piece of code; the checker is correct, which has been formally proven; the checker accepted the log, which is an empirical fact about a computation that anyone can repeat.&lt;/p&gt;
&lt;p&gt;This is a stronger guarantee than a refereed paper offers. A referee reads a proof and forms a judgement. A verified checker reads a proof and applies a decision procedure. The 200 terabytes is not a weakness of the result. It is the cost of the guarantee.&lt;/p&gt;
&lt;h2&gt;The complaint that remains&lt;/h2&gt;
&lt;p&gt;Understanding. Nobody knows why 7,825.&lt;/p&gt;
&lt;p&gt;There is no argument for the number. It is not a nice number. It does not factor interestingly. Its appearance is not explained by any structural feature anyone has identified. The proof establishes that the property fails there without indicating what changes.&lt;/p&gt;
&lt;p&gt;This is the same complaint that greeted the four colour theorem in 1976 and it is exactly as unanswered. A proof can certify a fact without illuminating it, and the mathematical community has never fully decided how it feels about that.&lt;/p&gt;
&lt;p&gt;Heule has been direct about it, describing the goal as answering questions that humans cannot answer, and treating the lack of insight as a real cost rather than a rhetorical concession.&lt;/p&gt;
&lt;h2&gt;Other results in this style&lt;/h2&gt;
&lt;p&gt;The Erdős discrepancy problem, at least in its low-discrepancy cases, was attacked the same way. Boris Konev and Alexei Lisitsa showed in 2014 that no infinite sequence of plus and minus ones has discrepancy at most two, with a SAT proof of about 13 gigabytes. The full conjecture was then proven by Terence Tao in 2015, with a human argument, partly motivated by the computational evidence.&lt;/p&gt;
&lt;p&gt;That pairing is worth noting. The SAT result did not prove the theorem. It made people confident enough about the shape of the answer to invest in finding a real proof.&lt;/p&gt;
&lt;p&gt;Schur number five was determined in 2017 by Heule, using two petabytes of proof and 14 CPU-years. The answer is 160.&lt;/p&gt;
&lt;p&gt;Keller&#39;s conjecture in dimension seven was settled in 2020 by a group including Heule, again through SAT, again with a verified checker.&lt;/p&gt;
&lt;p&gt;The pattern is now established. Take a combinatorial question with a finite search space at each size, encode it, throw a solver at it with enough symmetry breaking to make the space tractable, verify the log.&lt;/p&gt;
&lt;h2&gt;Where the AI question sits&lt;/h2&gt;
&lt;p&gt;SAT solving is not machine learning and these results involved no neural networks. But the connection is direct and increasingly practical.&lt;/p&gt;
&lt;p&gt;Solver performance depends on heuristics: which variable to branch on, when to restart, which learned clauses to keep. These are decision problems with abundant training data and a clear objective, and learned heuristics have produced real gains. The solver stays complete and its output stays verifiable; only the search order changes.&lt;/p&gt;
&lt;p&gt;That is the same architecture as every other successful mathematical AI system. The neural component chooses where to look. The symbolic component decides what is true. The proof is produced by the part that cannot be wrong.&lt;/p&gt;
&lt;p&gt;There is a reasonable prediction here about the next decade. The class of mathematical questions settled by machine will keep growing, and the growth will come from better encodings and better search guidance rather than from a system that reasons its way to answers. The proofs will get larger and less readable. The verification will get more rigorous. And the gap between knowing a thing is true and understanding why will keep widening, which is a genuine loss that nobody has proposed a fix for.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Fifty Years of Multiplying Matrices, and the Week a Machine Improved It</title>
    <link href="https://proofandmachine.github.io/articles/alphatensor-and-matrix-multiplication/"/>
    <updated>2026-06-19T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/alphatensor-and-matrix-multiplication/</id>
    <author><name>Dana Reisman</name></author>
    <category term="Systems"/>
    <summary>Strassen&#39;s 1969 algorithm went unbeaten for small matrices until a reinforcement learning system played the problem as a game. The result held up, mostly.</summary>
    <content type="html">&lt;p&gt;To multiply two 2-by-2 matrices, the definition requires eight multiplications and four additions. Every entry of the result is a sum of two products, and there are four entries.&lt;/p&gt;
&lt;p&gt;In 1969 Volker Strassen showed it can be done with seven multiplications. His method uses more additions, which does not matter, because the construction is recursive. Apply it to blocks of a large matrix and you get an algorithm running in roughly n to the power of 2.807 rather than n cubed. For large matrices that gap is enormous.&lt;/p&gt;
&lt;p&gt;Strassen&#39;s result was a shock. Everyone had assumed the obvious algorithm was optimal, and nobody had thought to check. It opened a research area that has run for fifty-five years and the exponent has been pushed down to around 2.371 through progressively more intricate constructions, none of which is practical.&lt;/p&gt;
&lt;p&gt;For the specific case of 4-by-4 matrices, Strassen&#39;s method applied recursively gives 49 multiplications. That stood as the best known for over five decades.&lt;/p&gt;
&lt;h2&gt;Reframing as a game&lt;/h2&gt;
&lt;p&gt;In October 2022 a DeepMind team published AlphaTensor in &lt;em&gt;Nature&lt;/em&gt;. Their move was to represent matrix multiplication algorithms as tensor decompositions and then treat finding a decomposition as a single-player game.&lt;/p&gt;
&lt;p&gt;The bilinear map that multiplies two n-by-n matrices corresponds to a specific three-dimensional tensor. A decomposition of that tensor into R rank-one terms corresponds exactly to an algorithm using R multiplications. So minimising multiplications is minimising tensor rank, which is NP-hard in general and has an enormous search space.&lt;/p&gt;
&lt;p&gt;The game: start with the target tensor. Each move subtracts a rank-one term. Reach the zero tensor and you win, with a score based on how few moves you used. This is now the same shape of problem AlphaZero handles, and the same machinery applies, with Monte Carlo tree search guided by a neural network trained through self-play.&lt;/p&gt;
&lt;p&gt;The search space is far larger than chess or Go. The action space at each step is effectively infinite, requiring discretisation of the coefficient values. Training used synthetic examples generated by randomly decomposing tensors and presenting the result as a puzzle, which gives an unlimited supply of instances with known solutions.&lt;/p&gt;
&lt;h2&gt;The results&lt;/h2&gt;
&lt;p&gt;AlphaTensor rediscovered Strassen&#39;s algorithm for the 2-by-2 case, which is the expected sanity check.&lt;/p&gt;
&lt;p&gt;For 4-by-4 matrices over the field with two elements, where arithmetic is modulo 2, it found a decomposition with 47 multiplications, beating the 49 that had stood since 1969. It also improved the known bounds for over 70 different matrix sizes.&lt;/p&gt;
&lt;p&gt;It found a 5-by-5 algorithm using 96 multiplications, improving the previous best of 98.&lt;/p&gt;
&lt;p&gt;The team also ran a variant that optimised for actual wall-clock runtime on specific hardware rather than for multiplication count, and found algorithms that ran measurably faster on TPUs and GPUs than the standard implementations, in the range of 10 to 20 percent for particular sizes.&lt;/p&gt;
&lt;h2&gt;The caveats, stated properly&lt;/h2&gt;
&lt;p&gt;The 47-multiplication result for 4-by-4 is over the field with two elements. That restriction matters. Arithmetic modulo 2 has properties that general fields do not, and the result does not automatically transfer to real or complex matrices, where 49 remained the record.&lt;/p&gt;
&lt;p&gt;Within two weeks of publication, Manuel Kauers and Jakob Moosbauer at Johannes Kepler University Linz posted an improvement, finding a 5-by-5 decomposition with 95 multiplications using a different search method they had been developing. They were explicit that AlphaTensor&#39;s result prompted them to look again at a problem they had set aside.&lt;/p&gt;
&lt;p&gt;Later work by the same group and others found further improvements, including a 4-by-4 algorithm over general fields using 48 multiplications, published in 2024, which finally beat Strassen&#39;s recursive bound in the general case.&lt;/p&gt;
&lt;p&gt;So the honest history: a reinforcement learning system found a genuine improvement in a special case, and its publication triggered a burst of human work that produced further improvements by other methods within months.&lt;/p&gt;
&lt;h2&gt;What that sequence actually shows&lt;/h2&gt;
&lt;p&gt;Two readings are available and both have merit.&lt;/p&gt;
&lt;p&gt;The deflationary reading: AlphaTensor was quickly outperformed by classical search methods that a small academic group implemented. The advance was real but narrow, and the field&#39;s response demonstrated that the problem was more tractable than fifty years of neglect had suggested.&lt;/p&gt;
&lt;p&gt;The other reading: fifty years of neglect is the point. The problem sat because everyone assumed Strassen was optimal for small cases. A machine finding an improvement forced attention back onto it, and the subsequent human improvements would not have happened otherwise. Measuring the contribution only by the final record misses how the record moved.&lt;/p&gt;
&lt;p&gt;Kauers has said something close to the second reading himself, noting that the AlphaTensor paper was what made him revisit the search.&lt;/p&gt;
&lt;h2&gt;The general lesson about search&lt;/h2&gt;
&lt;p&gt;Matrix multiplication algorithm discovery has properties that make it unusually amenable to this treatment, and they are worth listing because they tell you where else the approach might work.&lt;/p&gt;
&lt;p&gt;The objective is a single number, the multiplication count, with no ambiguity about what better means.&lt;/p&gt;
&lt;p&gt;Verification is instantaneous. Given a proposed decomposition, checking it is a tensor arithmetic computation. A wrong answer cannot survive.&lt;/p&gt;
&lt;p&gt;Training data is free. You can generate valid decompositions by construction and use them as supervised examples.&lt;/p&gt;
&lt;p&gt;The search space is discrete and combinatorial, with no continuous optimisation required once coefficients are discretised.&lt;/p&gt;
&lt;p&gt;Any problem with those four properties is a candidate. Circuit minimisation has them. Some coding theory constructions have them. Certain combinatorial design searches have them. Problems that lack them, which is most of mathematics, are not addressable this way, and the absence of a crisp verifiable objective is usually what is missing.&lt;/p&gt;
&lt;h2&gt;Practical impact&lt;/h2&gt;
&lt;p&gt;Close to zero, so far, and it is worth being clear about that.&lt;/p&gt;
&lt;p&gt;Real matrix multiplication libraries do not use Strassen&#39;s algorithm for most sizes. The reduced multiplication count is offset by worse memory access patterns, worse numerical stability, and the fact that highly tuned implementations of the naive algorithm exploit hardware in ways the recursive structure disrupts. Strassen becomes worthwhile only above a crossover point that depends on the machine, and even then it is used carefully.&lt;/p&gt;
&lt;p&gt;The AlphaTensor variants that optimised directly for hardware runtime are more interesting practically, because they targeted the metric that matters. Whether they end up in production libraries depends on maintenance and numerical analysis work that is unglamorous and largely undone.&lt;/p&gt;
&lt;p&gt;The result&#39;s significance is not that matrices multiply faster now. It is a demonstration that a well-posed mathematical search problem, with fast verification, can be handed to a reinforcement learning system and produce something a field had missed for half a century. That is a narrow claim and it is well supported.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>AI Tutors and What Mathematics Teaching Actually Needs</title>
    <link href="https://proofandmachine.github.io/articles/ai-tutors-and-what-mathematics-teaching-needs/"/>
    <updated>2026-06-15T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/ai-tutors-and-what-mathematics-teaching-needs/</id>
    <author><name>Yonatan Peled</name></author>
    <category term="Practice"/>
    <summary>A system that answers every question instantly may be solving the wrong problem. The evidence on learning outcomes is thinner and more interesting than the marketing.</summary>
    <content type="html">&lt;p&gt;The pitch for AI tutoring is Bloom&#39;s two sigma problem. In 1984 Benjamin Bloom reported that students receiving one-to-one tutoring performed about two standard deviations better than students in conventional classrooms, which would move a median student to the 98th percentile. The obvious question was how to deliver tutoring at scale, and for forty years the answer was that you cannot afford to.&lt;/p&gt;
&lt;p&gt;Language models make one-to-one interaction cheap. The inference is that they should deliver Bloom&#39;s effect.&lt;/p&gt;
&lt;p&gt;The inference has problems, starting with the finding itself. The two sigma result came from small studies with specific conditions, including mastery learning where students could not advance until they demonstrated competence. Replications have generally found smaller effects, often around 0.4 standard deviations for human tutoring, which is a good effect size and not a transformative one. The two sigma number has taken on a life independent of its evidence base.&lt;/p&gt;
&lt;p&gt;But the more useful objection is about what tutoring does.&lt;/p&gt;
&lt;h2&gt;The bottleneck is not explanation&lt;/h2&gt;
&lt;p&gt;Mathematics teachers do not primarily fail because they cannot explain. Explanations are abundant. Every topic in the secondary curriculum has hundreds of good video explanations available free, and has for fifteen years.&lt;/p&gt;
&lt;p&gt;What a good tutor provides is different. They notice which specific misconception a student holds, which is usually not the one the student describes. They decide when to let a student struggle and when to intervene. They calibrate difficulty so that work is hard enough to produce learning and not so hard as to produce despair. They notice when a student has stopped thinking and is pattern-matching. They maintain a model of what this particular student knows, over months.&lt;/p&gt;
&lt;p&gt;Some of these a language model does well. Diagnosis from a worked attempt is genuinely strong; models are good at looking at a wrong solution and identifying the specific error. Generating a practice problem targeting a particular skill at a particular difficulty is also strong, and it is tedious work that teachers have limited time for.&lt;/p&gt;
&lt;p&gt;Others it does badly by default, and the worst is the struggle question.&lt;/p&gt;
&lt;h2&gt;The desirable difficulties problem&lt;/h2&gt;
&lt;p&gt;There is a substantial literature, associated with Robert and Elizabeth Bjork, on desirable difficulties. Conditions that make learning feel harder and slower often produce better long-term retention and transfer. Spacing practice out. Interleaving problem types instead of blocking them. Testing yourself instead of rereading. Attempting a problem before being shown the method, even when the attempt fails.&lt;/p&gt;
&lt;p&gt;The last one has a specific name, productive failure, studied extensively by Manu Kapur. Students who attempt problems they cannot solve, before instruction, outperform students who receive instruction first, on measures of conceptual understanding and transfer. The failure is doing work.&lt;/p&gt;
&lt;p&gt;A system optimised to be helpful undermines all of this. Ask a language model a maths question and the default behaviour is to answer it, clearly and completely. That is the trained behaviour, reinforced by human raters who preferred complete helpful answers. It is precisely the intervention that removes the difficulty.&lt;/p&gt;
&lt;p&gt;The student experience is smooth. Every obstacle dissolves on contact. Nothing is retained, because nothing was effortful, and the fluency of the explanation produces a strong feeling of understanding that is not correlated with the ability to reproduce the reasoning later. This gap between felt understanding and actual competence is well documented and it predates AI. Watching someone solve a problem feels like learning to solve it.&lt;/p&gt;
&lt;h2&gt;What the evidence says so far&lt;/h2&gt;
&lt;p&gt;The studies that exist are early and the results are not uniform.&lt;/p&gt;
&lt;p&gt;A widely cited 2023 study of a Turkish high school found that students given unrestricted access to a chatbot for practice problems performed better on those practice problems and worse on a subsequent exam without access, compared to a control group. A version with a tutor-style system prompt that withheld direct answers did not show the same exam penalty.&lt;/p&gt;
&lt;p&gt;Work on Khanmigo, Khan Academy&#39;s tutoring system built explicitly to withhold answers and ask questions instead, has reported more favourable results, though much of it comes from the organisation deploying it.&lt;/p&gt;
&lt;p&gt;A 2024 randomised study at a large university using a tutoring system designed around research on learning found meaningful gains over an active control. The design mattered: the system used retrieval practice, spacing and prompted self-explanation.&lt;/p&gt;
&lt;p&gt;The pattern across these is fairly consistent. Systems designed as answer engines produce worse learning than no system. Systems designed around learning science produce gains. The model is the same in both cases. The scaffolding is what differs.&lt;/p&gt;
&lt;h2&gt;What a defensible design looks like&lt;/h2&gt;
&lt;p&gt;Withhold the answer. The single most important design decision. When a student asks how to solve a problem, respond with a question that isolates where they are stuck. This has to be enforced in the system prompt and it has to survive pressure, because students will push for the answer and a model trained to be agreeable will eventually give it.&lt;/p&gt;
&lt;p&gt;Require an attempt first. Do not engage with a problem the student has not tried. The attempt is where the diagnostic information is, and it is also where the learning is.&lt;/p&gt;
&lt;p&gt;Space and interleave. A student who has just learned a technique should encounter it again in three days mixed with other techniques, not twenty more instances of it immediately. This requires tracking state over time, which most chat interfaces do not do.&lt;/p&gt;
&lt;p&gt;Ask for explanation. Having a student articulate why a step works produces more learning than having them execute the step. Models are good at evaluating explanations and at noticing when one is hollow.&lt;/p&gt;
&lt;p&gt;Check arithmetic with a tool. A tutor that makes arithmetic errors is worse than no tutor, and this is a solved problem.&lt;/p&gt;
&lt;p&gt;Be honest about uncertainty. When a student&#39;s approach is unusual but possibly valid, the correct response is to work through it rather than to steer back to the standard method.&lt;/p&gt;
&lt;h2&gt;The teacher question&lt;/h2&gt;
&lt;p&gt;The realistic near-term effect is not replacement. It is a change in what teachers spend time on.&lt;/p&gt;
&lt;p&gt;Generating differentiated practice sets, writing worked solutions, producing variants of a problem at three difficulty levels, drafting feedback on common errors: these consume large amounts of teacher time and are largely mechanical. Automating them returns hours per week.&lt;/p&gt;
&lt;p&gt;The work that does not automate is the work that depends on knowing a specific child. Noticing that a student who was engaged in September has stopped. Deciding that this class needs to slow down. Knowing that a particular student&#39;s confusion about fractions traces to something from two years ago. None of that is in the transcript.&lt;/p&gt;
&lt;p&gt;There is a version of this that goes badly, where the automated components are used as a reason to increase class sizes, and the relational work that was the actual value gets squeezed out. That is a policy choice rather than a technology outcome, and it is the one worth watching.&lt;/p&gt;
&lt;h2&gt;What to tell a student&lt;/h2&gt;
&lt;p&gt;If you are using these tools to learn rather than to finish homework, three rules cover most of it.&lt;/p&gt;
&lt;p&gt;Attempt first, always, and get far enough to be genuinely stuck at an identifiable point. Then ask about that point rather than the problem.&lt;/p&gt;
&lt;p&gt;Ask for a hint, not a solution, and say so explicitly. The model will comply if asked.&lt;/p&gt;
&lt;p&gt;After you get an explanation, close it and reproduce the argument from memory on paper. If you cannot, you did not learn it, whatever it felt like. This step is the whole difference and it is the one everybody skips.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Hunting Primes with a Distributed Machine</title>
    <link href="https://proofandmachine.github.io/articles/hunting-primes-with-a-distributed-machine/"/>
    <updated>2026-06-11T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/hunting-primes-with-a-distributed-machine/</id>
    <author><name>Miriam Adler</name></author>
    <category term="History"/>
    <summary>The largest known prime has over 41 million digits. Finding it required a test from 1878, a transform from 1965, and thirty years of volunteers running software in the background.</summary>
    <content type="html">&lt;p&gt;In October 2024 a former Nvidia employee named Luke Durant found a prime number with 41,024,320 digits. Written out at normal type size it would fill roughly fifteen thousand pages.&lt;/p&gt;
&lt;p&gt;The number is 2 raised to the power of 136,279,841, minus one. It is the 52nd known Mersenne prime, and it was found by the Great Internet Mersenne Prime Search, a volunteer computing project that has been running since 1996.&lt;/p&gt;
&lt;p&gt;The story of how you check whether a number that large is prime is a good illustration of how mathematical insight and raw computation combine, and it has almost nothing to do with machine learning, which is part of why it is worth telling.&lt;/p&gt;
&lt;h2&gt;Why Mersenne numbers&lt;/h2&gt;
&lt;p&gt;A Mersenne number is one less than a power of two. Written in binary it is a string of ones.&lt;/p&gt;
&lt;p&gt;They matter for primality searching for one reason: there is a primality test for Mersenne numbers that is far faster than anything available for general numbers.&lt;/p&gt;
&lt;p&gt;The Lucas-Lehmer test, developed by Édouard Lucas in 1878 and refined by Derrick Lehmer in the 1930s, works like this. To test whether 2 to the power p minus 1 is prime, for odd prime p, start with s equal to 4. Repeat p minus 2 times: replace s with s squared minus 2, reduced modulo the Mersenne number. If the final value is zero, the number is prime. Otherwise it is composite.&lt;/p&gt;
&lt;p&gt;That is the whole test. It is deterministic, not probabilistic. It gives a definite answer.&lt;/p&gt;
&lt;p&gt;The cost is p minus 2 squarings of a number with p bits. For the record prime that is about 136 million squarings of a 136-million-bit number, which is why this is a supercomputing problem despite being a simple loop.&lt;/p&gt;
&lt;h2&gt;The transform that makes it feasible&lt;/h2&gt;
&lt;p&gt;Multiplying two numbers with 136 million bits by the schoolbook method takes on the order of the square of that, which is unworkable.&lt;/p&gt;
&lt;p&gt;The Schönhage-Strassen algorithm, and in practice the irrational base discrete weighted transform developed by Richard Crandall and Barry Fagin, reduce large-number squaring to a fast Fourier transform. Represent the number as a sequence of digits in some base, take an FFT, multiply pointwise, take an inverse FFT, propagate carries.&lt;/p&gt;
&lt;p&gt;This brings the cost per squaring down to roughly n log n. It is what makes the search possible at all, and it is a genuinely deep piece of algorithmic mathematics sitting under what looks like brute force.&lt;/p&gt;
&lt;p&gt;The floating-point FFT introduces a hazard. Round-off error can corrupt a result silently, and a single bad bit invalidates everything downstream. GIMPS clients monitor the maximum round-off error each iteration and abort if it approaches the danger threshold. Results are also verified by an independent run on different hardware with a different FFT size, and since 2020 by a much cheaper probabilistic verification scheme based on Robert Gerbicz&#39;s error-checking method, which catches errors during the computation rather than after.&lt;/p&gt;
&lt;h2&gt;The project&lt;/h2&gt;
&lt;p&gt;George Woltman released the software in 1996 and the project has run continuously since. At its core it is a work distribution server, a highly optimised client, and a lot of volunteers.&lt;/p&gt;
&lt;p&gt;Seventeen primes have been found by GIMPS participants. The Electronic Frontier Foundation offered prizes for primes crossing digit thresholds, and GIMPS claimed the awards for the first ten-million-digit prime in 2008. Two further prizes, for one hundred million and one billion digits, remain unclaimed.&lt;/p&gt;
&lt;p&gt;For most of the project&#39;s history the work ran on ordinary desktop CPUs. The 2024 find was different: Durant assembled a distributed GPU cluster across cloud providers in multiple countries, and the discovery was made on an Nvidia A100 in Dublin, confirmed on an H100 in Texas. It was the first Mersenne prime found on a GPU rather than a CPU, and it marks a shift in what the project&#39;s hardware base looks like.&lt;/p&gt;
&lt;h2&gt;What is not known&lt;/h2&gt;
&lt;p&gt;Whether there are infinitely many Mersenne primes is open. The Lenstra-Pomerance-Wagstaff conjecture predicts, from heuristic arguments about the density of primes, that there are infinitely many and gives an expected distribution of the exponents. The observed data fits the prediction reasonably well, which is evidence of the softest kind.&lt;/p&gt;
&lt;p&gt;Whether there are any odd perfect numbers is also open, and it is connected. Euclid showed that if 2 to the p minus 1 is prime then 2 to the p minus 1 times that is perfect, and Euler showed every even perfect number has this form. So each Mersenne prime gives an even perfect number and there are exactly 52 known. Nobody has found an odd one, and it is known that any odd perfect number must exceed 10 to the power of 1500 and satisfy a long list of restrictive conditions.&lt;/p&gt;
&lt;h2&gt;Where a learning system could help, and does not&lt;/h2&gt;
&lt;p&gt;The obvious question is whether machine learning could speed the search.&lt;/p&gt;
&lt;p&gt;For the primality test itself, no. The Lucas-Lehmer test is exact, deterministic and already optimal in structure. There is nothing to approximate.&lt;/p&gt;
&lt;p&gt;For candidate selection there is a little room. Before running the expensive test, GIMPS trial-divides candidates by small factors and runs P-1 and elliptic curve factorisation attempts to find factors cheaply. Roughly two-thirds of candidates are eliminated this way, saving the full test. Deciding how much effort to spend on factoring before committing to the Lucas-Lehmer test is an optimisation problem with real structure, and the project&#39;s parameter choices are hand-tuned. A learned policy could plausibly do better. The gains would be measured in single-digit percentages.&lt;/p&gt;
&lt;p&gt;That is the honest ceiling. This is a domain where the mathematics is exact, the algorithms are near-optimal, and the remaining work is engineering. There is no gap for a pattern-matching system to fill.&lt;/p&gt;
&lt;h2&gt;Why that matters&lt;/h2&gt;
&lt;p&gt;There is a tendency to assume that every computational problem has an AI angle. A great deal of computational mathematics does not.&lt;/p&gt;
&lt;p&gt;The problems where learning helps are the ones with large search spaces, weak signals about which direction is promising, and cheap verification. Proof search has that shape. Conjecture generation has that shape. Matrix multiplication algorithm discovery has that shape.&lt;/p&gt;
&lt;p&gt;Primality testing of Mersenne numbers has none of it. The search space is a list of exponents to try in order. The signal is a deterministic test. There is nothing to guess.&lt;/p&gt;
&lt;p&gt;GIMPS has been running for thirty years on the strength of a nineteenth-century theorem, a twentieth-century transform, and volunteers who leave a program running. Occasionally the most sophisticated available approach is the one that was already there.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Mathlib: The Library That Is Slowly Eating Mathematics</title>
    <link href="https://proofandmachine.github.io/articles/the-library-that-is-eating-mathematics/"/>
    <updated>2026-06-07T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/the-library-that-is-eating-mathematics/</id>
    <author><name>Dana Reisman</name></author>
    <category term="Formal Methods"/>
    <summary>A single formal library now contains most of an undergraduate degree and a growing share of graduate mathematics, built by volunteers, and it is becoming the substrate everything else runs on.</summary>
    <content type="html">&lt;p&gt;If you want to formalise a theorem, the hard part is rarely the theorem. It is everything underneath it.&lt;/p&gt;
&lt;p&gt;To state that a continuous function on a compact set attains its maximum, you need continuity, compactness, topological spaces, order relations on the reals, the construction of the reals, and enough set theory to hold it together. If none of that exists in your system, you build it first, and you are six months in before you write the statement you cared about.&lt;/p&gt;
&lt;p&gt;Mathlib exists so that nobody has to do that again.&lt;/p&gt;
&lt;h2&gt;What it is&lt;/h2&gt;
&lt;p&gt;Mathlib is the mathematical library for the Lean theorem prover. It began around 2017 and now contains well over a million lines of code and something in the range of two hundred thousand theorems, contributed by several hundred people.&lt;/p&gt;
&lt;p&gt;The coverage is unusual for a formal library. Undergraduate mathematics is essentially complete: real and complex analysis, linear algebra, group theory, ring theory, field theory, Galois theory, point-set topology, measure theory, basic number theory. Graduate material is extensive and growing: category theory, algebraic geometry through schemes, functional analysis, Lie theory, homological algebra, analytic number theory.&lt;/p&gt;
&lt;p&gt;The Lean community maintains a list tracking which theorems from a standard undergraduate curriculum are formalised, and it has been essentially fully ticked off for several years. The current frontier is research-level material.&lt;/p&gt;
&lt;h2&gt;Why one library rather than many&lt;/h2&gt;
&lt;p&gt;Earlier formalisation efforts fragmented. Different groups built their own developments of the same foundations, incompatible with each other, and results in one could not be used in another. Isabelle&#39;s Archive of Formal Proofs is a collection of independent entries. Coq&#39;s ecosystem has multiple competing libraries for the same structures.&lt;/p&gt;
&lt;p&gt;Mathlib made the opposite bet: one library, one set of definitions, everything interoperating. If you prove something about topological groups, it composes with everything anyone else has proven about groups and about topological spaces, because there is only one definition of each.&lt;/p&gt;
&lt;p&gt;The cost is coordination. A change to a foundational definition can break thousands of downstream proofs. Mathlib runs continuous integration over the whole library, and a proposed change that breaks anything must fix everything it broke. Large refactors take months and involve many people.&lt;/p&gt;
&lt;p&gt;The benefit is compounding. Each contribution makes the next one cheaper. The de Bruijn factor for a new result in a well-covered area is now close to one: formalising takes about as much text as writing the informal proof.&lt;/p&gt;
&lt;h2&gt;The typeclass machinery&lt;/h2&gt;
&lt;p&gt;The technical device that makes the unification work is typeclasses, borrowed from functional programming and used far more aggressively than in any programming language.&lt;/p&gt;
&lt;p&gt;A structure like &amp;quot;commutative ring&amp;quot; is a typeclass. When you prove a theorem about commutative rings, it applies automatically to the integers, to polynomial rings, to any structure that has been registered as one. The system searches for instances during elaboration.&lt;/p&gt;
&lt;p&gt;This produces deep hierarchies. A normed field is a field and a normed space and a metric space and a topological space and a uniform space, with the relationships declared once and inherited everywhere. Getting these hierarchies right is a genuine design problem, and Mathlib has been through several painful reorganisations of its algebraic and topological hierarchies.&lt;/p&gt;
&lt;p&gt;When it works, the result is that a lemma proven at the right level of generality is immediately available in every specific case. When it does not, you get instance resolution failures that are among the least pleasant error messages in software.&lt;/p&gt;
&lt;h2&gt;The projects built on top&lt;/h2&gt;
&lt;p&gt;Mathlib&#39;s value shows in what it enables.&lt;/p&gt;
&lt;p&gt;The Liquid Tensor Experiment, formalising a theorem of Peter Scholze that he had asked the community to check, was completed in about eighteen months. That would have been impossible without the analysis and category theory already present.&lt;/p&gt;
&lt;p&gt;The sphere eversion project formalised a version of Gromov&#39;s h-principle, a substantial piece of differential topology.&lt;/p&gt;
&lt;p&gt;The polynomial Freiman-Ruzsa conjecture, proven by Tim Gowers, Ben Green, Freddie Manners and Terence Tao in November 2023, was formalised in Lean within three weeks of the paper appearing. Tao organised the effort and wrote about the experience, noting that the formalisation process surfaced places where the informal argument was imprecise.&lt;/p&gt;
&lt;p&gt;The Fermat&#39;s Last Theorem project, led by Kevin Buzzard and funded by EPSRC, began in 2024 with the goal of formalising the Wiles-Taylor proof. It is expected to take many years and to require formalising large amounts of algebraic number theory and the theory of modular forms along the way. That infrastructure is arguably the real deliverable.&lt;/p&gt;
&lt;h2&gt;The machine learning connection&lt;/h2&gt;
&lt;p&gt;Mathlib is also the training corpus.&lt;/p&gt;
&lt;p&gt;Every proof search system for Lean trains on it. The library provides hundreds of thousands of examples of goals paired with the tactics that closed them, which is exactly the supervised signal a tactic-suggestion model needs. Tools like LeanCopilot and various premise selection systems are trained on it directly.&lt;/p&gt;
&lt;p&gt;More significantly, Lean plus Mathlib is a reinforcement learning environment. A model can propose a proof, the kernel checks it, and the check is a perfect reward signal. There is no reward hacking available: either the term type-checks or it does not. AlphaProof was trained this way, with a large volume of self-generated problems formalised into Lean statements.&lt;/p&gt;
&lt;p&gt;This creates an unusual dynamic. The library was built by humans for humans, and it is now the substrate for training systems that will contribute back to it. Some Mathlib contributions are already machine-assisted, with a model proposing a proof that a human reviews and submits.&lt;/p&gt;
&lt;p&gt;The community has had to think about what that means for review standards. A proof that type-checks is correct. It may still be badly named, poorly placed in the hierarchy, stated at the wrong generality, or unmaintainable. Mathlib&#39;s review process cares about all of those, and a machine-generated proof gets no exemption.&lt;/p&gt;
&lt;h2&gt;What it does not solve&lt;/h2&gt;
&lt;p&gt;The statement problem. Mathlib guarantees that a proof of a formal statement is correct. It cannot guarantee that the formal statement means what you intended.&lt;/p&gt;
&lt;p&gt;This is where the remaining human judgement lives, and it is not a small residue. A subtly wrong formalisation is provable and useless. Reviewing a formal statement against its informal counterpart requires understanding both, and there is no automation for it.&lt;/p&gt;
&lt;p&gt;Buzzard has made this point repeatedly in the context of the Fermat project: the difficulty is not proving things, it is stating them correctly, and stating them correctly requires knowing the mathematics.&lt;/p&gt;
&lt;h2&gt;The trajectory&lt;/h2&gt;
&lt;p&gt;Mathlib grows at a rate that has been roughly steady for years. Extrapolation is unreliable, but the direction is clear enough. More of mathematics becomes formally available, which makes formalising the next thing cheaper, which increases the rate.&lt;/p&gt;
&lt;p&gt;At some point, plausibly within a decade, the question changes from whether a result can be formalised to why it was not. Journals have begun accepting formalisation as supplementary material. A few have discussed requiring it for results whose proofs are computationally intensive.&lt;/p&gt;
&lt;p&gt;That would be the largest change to mathematical practice since the introduction of the referee, and it will have arrived through a volunteer project that started with someone deciding to formalise the natural numbers properly.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Base Rates, Bayes, and How to Read a Claim About AI</title>
    <link href="https://proofandmachine.github.io/articles/base-rates-and-how-to-read-a-claim/"/>
    <updated>2026-06-03T00:00:00.000Z</updated>
    <id>https://proofandmachine.github.io/articles/base-rates-and-how-to-read-a-claim/</id>
    <author><name>Yonatan Peled</name></author>
    <category term="Analysis"/>
    <summary>The mathematics of updating on evidence is a hundred lines of secondary-school algebra, and it dissolves most arguments about what machines can do.</summary>
    <content type="html">&lt;p&gt;A test for a disease is 99 percent accurate. One person in ten thousand has the disease. You test positive. What is the probability you have it?&lt;/p&gt;
&lt;p&gt;The common answer is 99 percent. The correct answer is about one percent.&lt;/p&gt;
&lt;p&gt;Out of a million people, a hundred have the disease and 999,900 do not. The test catches 99 of the hundred. It also produces false positives on one percent of the healthy population, which is 9,999 people. So among 10,098 positive results, 99 are genuine. Slightly under one in a hundred.&lt;/p&gt;
&lt;p&gt;The test did not lie. It moved you from a one in ten thousand chance to a one in a hundred chance, which is a hundredfold update. It is just that a hundredfold update from a very small number is still a small number.&lt;/p&gt;
&lt;p&gt;This is base rate neglect and it is the single most useful piece of applied mathematics for evaluating claims about anything, including claims about artificial intelligence.&lt;/p&gt;
&lt;h2&gt;The formula&lt;/h2&gt;
&lt;p&gt;Bayes&#39;s theorem says the probability of a hypothesis given evidence equals the probability of the evidence given the hypothesis, times the prior probability of the hypothesis, divided by the total probability of the evidence.&lt;/p&gt;
&lt;p&gt;The version worth memorising is in odds form, because it is easier to use in your head.&lt;/p&gt;
&lt;p&gt;Posterior odds equal prior odds times the likelihood ratio.&lt;/p&gt;
&lt;p&gt;The likelihood ratio is how much more likely this evidence is if the hypothesis is true than if it is false. Multiply your starting odds by it.&lt;/p&gt;
&lt;p&gt;In the disease example: prior odds are 1 to 9,999. The likelihood ratio for a positive test is 0.99 divided by 0.01, which is 99. Multiply: 99 to 9,999, or about 1 to 101. Same answer, less arithmetic.&lt;/p&gt;
&lt;h2&gt;Applying it to capability claims&lt;/h2&gt;
&lt;p&gt;Suppose you read that a system scored 90 percent on a mathematics benchmark. What should you conclude about whether it can do mathematics?&lt;/p&gt;
&lt;p&gt;Set up the question properly. Hypothesis: the system has general mathematical capability of the kind the benchmark is meant to measure. Evidence: a 90 percent score.&lt;/p&gt;
&lt;p&gt;The likelihood ratio requires asking how likely a 90 percent score is under the alternative hypothesis, which is that the system has narrow, contamination-assisted, benchmark-specific competence.&lt;/p&gt;
&lt;p&gt;Under that alternative, a high score is also quite likely, because contamination produces high scores. So the likelihood ratio is close to one, and a close-to-one likelihood ratio means the evidence barely moves you.&lt;/p&gt;
&lt;p&gt;This is why benchmark scores feel less informative than they should. The evidence is consistent with both hypotheses, so it does not discriminate between them.&lt;/p&gt;
&lt;p&gt;Now suppose instead the evidence is a 90 percent score on problems written after the training cutoff, by people who did not publish them, in a format the system has not seen. Under the narrow-competence hypothesis that outcome is unlikely. The likelihood ratio is large and the evidence moves you a great deal.&lt;/p&gt;
&lt;p&gt;The lesson is not that benchmarks are useless. It is that evidence is informative in proportion to how unlikely it would be if you were wrong.&lt;/p&gt;
&lt;h2&gt;Where the priors come from&lt;/h2&gt;
&lt;p&gt;The honest difficulty with Bayesian reasoning outside textbook problems is that priors are not given.&lt;/p&gt;
&lt;p&gt;Two disciplines help.&lt;/p&gt;
&lt;p&gt;Reference classes. Instead of asking how likely this particular claim is, ask what happened to similar claims. Of the claimed proofs of the Riemann hypothesis posted in the last twenty years, how many held up? Of the AI capability announcements that specified a timeline, how many hit it? The reference class rate is your starting point, and it is usually more informative than any argument about the specific case.&lt;/p&gt;
&lt;p&gt;Sensitivity checking. If you cannot settle on a prior, try several and see whether the conclusion changes. If a claim survives from prior 0.01 to prior 0.5, the prior is not doing the work and you can stop arguing about it. If the conclusion flips, you have identified where the actual disagreement lives, which is progress.&lt;/p&gt;
&lt;h2&gt;The conjunction problem&lt;/h2&gt;
&lt;p&gt;A related failure. People systematically rate specific, detailed scenarios as more probable than the general categories containing them, because detail makes a story feel plausible.&lt;/p&gt;
&lt;p&gt;Amos Tversky and Daniel Kahneman&#39;s original demonstration involved a character description followed by two options: that she is a bank teller, or that she is a bank teller active in the feminist movement. Most people chose the second, which is impossible, since every feminist bank teller is a bank teller.&lt;/p&gt;
&lt;p&gt;This is directly relevant to forecasting. A detailed narrative about how AI systems will transform mathematics, specifying which techniques, in which order, with which consequences, is strictly less likely than the vague claim that AI will affect mathematics somehow. Each additional specific makes the conjunction less probable while making it feel more credible.&lt;/p&gt;
&lt;p&gt;When you encounter a compelling detailed scenario, count the conjunctions. Five independent claims each at 80 percent gives you 33 percent for the whole story.&lt;/p&gt;
&lt;h2&gt;What this looks like in practice&lt;/h2&gt;
&lt;p&gt;Three habits follow.&lt;/p&gt;
&lt;p&gt;When someone reports a striking result, ask what would have been reported if the result had been unremarkable. If the answer is nothing, you are looking at a filtered sample and the base rate is unknown. Selection effects account for most of the difference between what a field looks like from outside and what it looks like from inside.&lt;/p&gt;
&lt;p&gt;When someone reports a percentage, ask for the denominator and the absolute numbers. A doubling of risk means one thing at a base rate of 40 percent and something entirely different at a base rate of one in a million. Reporting relative change without the base is the most common way to be technically accurate and materially misleading.&lt;/p&gt;
&lt;p&gt;When you find yourself confident after reading one source, ask what the likelihood ratio actually was. A single article, however well written, rarely justifies a large update, because articles that argue a position exist regardless of whether the position is correct.&lt;/p&gt;
&lt;h2&gt;The connection back to machines&lt;/h2&gt;
&lt;p&gt;Language models are trained on text, and text is a filtered sample of the world. Interesting things get written about. Boring things do not. Successful projects publish. Failed ones often do not.&lt;/p&gt;
&lt;p&gt;So a model&#39;s implicit priors are the priors of published text, which are systematically shifted toward the remarkable. Ask a model how likely a startup is to succeed and the answer reflects the distribution of startup stories that got told, not the distribution of startups.&lt;/p&gt;
&lt;p&gt;This is not a flaw that better training fixes, because the filtering happened before the data existed. It is a reason to supply base rates yourself when you want a calibrated answer, and to treat any probability a model states without a stated reference class as an impression rather than an estimate.&lt;/p&gt;
&lt;p&gt;The mathematics here is elementary. It fits on an index card. What makes it hard is that using it requires noticing that a question about probability is being asked, and most of the time nobody says so.&lt;/p&gt;
</content>
  </entry>
</feed>
