Naru News日本語

Home › Glossary › Math

What is a formal proof (a proof with no step skipped, checkable by machine)?

Also called: Machine-checked proof, Formalized proof

Term explainer · Checked November 26, 2026 · 18 min read

In one minute

A formal proof is a proof written in a fixed language of symbols that uses only the starting assumptions (axioms) and the allowed rules of inference, with not a single step skipped, so that a computer can check every step mechanically.

Everyday mathematical proofs are written for people to read, so they skip obvious steps and lean on the reader’s knowledge and intuition. A formal proof writes out even those steps, so it gets much longer, but it can be checked by matching its form against the rules without thinking about meaning, which leaves little room for oversights. Here “formal” doesn’t mean “just for show”; it means “following a fixed way of writing.”

Proofs of the four color theorem and the Kepler conjecture have been checked as formal proofs, and in November 2026 a proof of the Riemann Hypothesis, said to have been found together with an AI, was checked as a formal proof in Lean (software in which a machine checks proofs).

A common mix-up

“A formal proof is a proof that only looks right on the surface, with little real content.”

Half right. The way it is checked really is “form alone,” but its content is actually far more detailed than an everyday proof’s. In everyday speech, “formal” can suggest something done for appearance’s sake, as in “a mere formality,” and the Japanese word used for “formal” here can be used in just that sense. But the “formal” in formal proof is a different sense, the one used in logic: there, the “form” of a theory is its structure as seen by setting aside what the symbols mean and looking only at how they are arranged. A formal proof is a proof in which every line follows a fixed way of writing: which symbols may be used, and which rules each step may follow. What is right is the way it is checked: checking a formal proof ignores what the symbols mean and only matches the arrangement of symbols (the form) against the rules. What is wrong is the content: checking by form alone works only because the proof writes out, without skipping a single one, the steps that everyday proofs leave out. In Principia Mathematica, which tried to build mathematics from logic alone, the proof that 1 + 1 = 2 doesn’t turn up until page 83 of volume II. And precisely because it can be checked by form alone, the check isn’t swayed by assumptions or misreadings, and even a computer can do it.

Explained in pictures

A figure setting a proof of “1 + 1 = 2” as people write it next to the same proof as a formal proof. Title: “A proof as people write it, and a formal proof,” with “Example: proving ‘1 + 1 = 2’” below it. Left, a gray dashed panel, “As people write it”: a large “1 + 1 = 2,” then “Just count.” and “Obviously.” Below a line: “Skips obvious steps,” “Relies on the reader,” “Checked by reading.” Right, a navy solid panel, “Formal proof”: a box at the top, “Rules written first,” with “① 1 = next after 0, 2 = next after 1,” “② a + 0 = a” and “③ a + (next after b) = next after (a + b).” Below it, “Proof (each line names the rule it uses)” with four lines: “1 + 1 = 1 + (next after 0)” with “← ① (what 1 is)” in orange on the right, “= next after (1 + 0)” with “← ③,” “= next after 1” with “← ② (1 + 0 = 1),” and “= 2” with “← ① (what 2 is).” Near the bottom of the panel: “(Real formal proofs also write out the rules for ‘=’).” Band at the bottom: Every line uses only the rules, so a machine can check each one.
This figure sets a proof of “1 + 1 = 2” as people write it next to the same proof as a formal proof. The human proof on the left just says “count it,” skipping the obvious steps and leaning on what readers know. The formal proof on the right first writes down how the numbers are defined, “1 is the number after 0, 2 is the number after 1” (①), and two rules for addition (② and ③). Then, by ①, it rewrites 1 + 1 as “1 + (the number after 0),” moves on to “the number after (1 + 0)” by ③ and to “the number after 1” by ②, and finally reaches “2” by ①. Because every line says which rule it uses, a machine can check it line by line without understanding what it means.
A figure showing what a formal proof is made of and how a machine checks it. Title: “A machine checks the form alone, not the meaning.” Three boxes along the top: navy, “Symbol language” (symbols you may use, and how sentences are built); navy, “Axioms” (starting promises, accepted without proof); orange, “Rules of inference” (a list of allowed ways to make a line from earlier ones). Below them, an orange band: “Rule example: from ‘if A then B’ and ‘A,’ you may write ‘B’ (modus ponens).” Lower left, a navy solid panel, “Proof (a list of lines).” Line 1: “If it is raining, then the road is wet,” with a solid orange underline and “A” under “it is raining,” a dotted orange underline and “B” under “the road is wet,” and “Premise ○” on the right. Line 2: “it is raining,” with a solid underline and “= A,” and “Premise ○.” Line 3: “the road is wet,” with a dotted underline and “= B,” and “From 1 and 2, by the rule ○.” Lower right, an orange dashed panel, “× A step it rejects”: “‘The road is wet’ + line 1,” “→ ‘It is raining’,” and below a line, “It may look reasonable,” “but it fits no rule’s form,” “(A sprinkler wets roads too).” Band at the bottom: No need to know rain or roads: it only checks each line’s form.
This figure shows what a formal proof is made of and how a machine checks it. The three boxes at the top are what gets fixed in advance: the symbol language, the axioms and the rules of inference. The band shows an example of a rule: “from ‘if A then B’ and ‘A,’ you may write ‘B’” (modus ponens). In the proof at the lower left, lines 1 and 2 are premises; in line 1, “it is raining” is A (solid underline) and “the road is wet” is B (dotted underline). Line 2 has the same form as A, so the rule lets you write B as line 3. At the lower right, going from “the road is wet” and line 1 to “it is raining” may look reasonable (a sprinkler wets roads too), but it fits no rule’s form, so it is rejected. The machine knows nothing about rain or roads; it only checks whether the form fits.
A figure comparing finding a proof with checking one. Title: “Finding is hard; checking can be done by machine.” Left, an orange dashed panel, “Finding a proof,” with “People or AI search, with ingenuity” below. From a box on the left, “Axioms, premises,” gray dotted routes branch out many times, ending at three “Dead end” labels and one “Goes on….” Only one solid orange route reaches the orange box “Statement to prove” on the right. Below: “Countless routes to choose from,” “No method can always decide whether a proof exists (Church and Turing, 1936),” “Some statements can be neither proved nor disproved (Gödel, 1931).” Between the two panels, an arrow from left to right labeled “send.” Right, a navy solid panel, “Checking a proof,” with “Done by machine (a proof assistant)” below. Five line boxes, “Line 1 axiom,” “Line 2 premise,” “Line 3 rule, from lines 1 and 2,” “Line 4 rule, from line 3,” “Line 5 reaches the statement,” each with a “○” on the right. Below: “It just checks each line’s rule,” “Always ends with ‘passes’ or ‘fails’,” “One wrong step anywhere, and it fails.” Band at the bottom: So people or AI search, and a machine checks.
This figure compares finding a proof with checking one. On the left is finding: starting from axioms and premises, the choice of which rules to use in which order branches out endlessly, and most routes are dead ends (only the solid orange route reaches the statement to prove). As Church and Turing showed in 1936, no method can always decide whether a statement has a proof, and as Gödel’s 1931 theorem says, some statements can be neither proved nor disproved within the system. On the right is checking: you only need to go through the lines of the proof you are handed, one by one, to see if each fits a rule, and the check always ends with “passes” or “fails.” That makes a division of labor possible: people or AI search, and a machine checks.
A figure listing the history of formal proof from 1879 to 2026 in eight rows, top to bottom. Title: “Formal proof through the years (1879–2026).” 1879: Frege publishes his Begriffsschrift (“concept-script”) (the first full-scale formal system for logic and mathematics). 1910: Whitehead and Russell’s Principia Mathematica (to 1913) (mathematics from logic alone; 1 + 1 = 2 is proved on page 83 of volume II). 1920s: Hilbert’s program (aimed to put all of mathematics into axioms and prove them consistent). 1931 (orange box): Gödel’s incompleteness theorems (some statements can’t be proved or disproved; the plan can’t work as hoped). 1968: De Bruijn creates Automath (the first program to check general mathematical proofs by computer). 2005: The four color theorem’s proof is checked in Coq (a proof that relied on a computer, inspected in full, line by line). 2014: Kepler conjecture proof checked with two tools (Flyspeck) (a proof the referees couldn’t fully check, done in HOL Light and Isabelle). 2026 (orange box): Fermat’s Last Theorem and the Riemann Hypothesis in Lean (Sept.: Fermat, an AI company’s claim. Nov.: Riemann, certified by two groups).
This figure lines up the history of formal proof in eight events. In 1879 Frege built the first full-scale formal system, and Whitehead and Russell tried to derive mathematics from logic alone. Hilbert’s program of the 1920s aimed to put all of mathematics into axioms and prove that it was free of contradiction, but Gödel’s incompleteness theorems of 1931 are generally taken to show that it could not work as planned. De Bruijn’s Automath of 1968 started the era of checking by computer, followed by the four color theorem (2005) and the Kepler conjecture (2014). In 2026 came formal proofs in Lean of Fermat’s Last Theorem (September; an AI company’s announcement) and the Riemann Hypothesis (November).

You’re free to use these figures in lessons, slides and posts if you credit Naru News (naru.news). CC BY 4.0.

Think of it like this

Directions for a robot that doesn’t know the town

If you tell a friend how to get from the station to your house, “Leave the station, walk along the river a bit, and you’re there” is enough. Your friend knows the town and can fill in the details. Everyday mathematical proofs are the same: they leave out the steps a reader can fill in.

But what if you had to explain the way to a robot that knows nothing about the town? All the robot understands is a fixed list of moves, like “one step forward” or “turn right 90 degrees.” The directions must be written using only moves from that list, without skipping a single one, so they get very long. But directions written that way bring anyone, or any robot, who follows them exactly to the same place, and if even one move not on the list slips in, it stops right there. That is a formal proof. The list of moves stands for the rules of inference, and the station you start from stands for the axioms.

But the analogy breaks down in places. Where the robot arrives is the address written on the paper. If the address was written wrong, following the directions perfectly still won’t get you to the house you wanted. With formal proofs too, whether the statement proved means the same as the problem you really wanted to settle has to be checked separately. Also, real proof checkers don’t walk the route; they read the written lines and only check whether each one fits the form of a rule.

Key points

How is it different from an everyday proof?

The proofs mathematicians usually write are meant to be understood by other mathematicians. They leave out routine logical steps and count on readers bringing a great deal of background knowledge. Sometimes a picture is drawn and that is that. A trained mathematician can turn the skipped parts, and the parts that rely on intuition, into a proper logical argument.

A formal proof is a proof in which every logical step has been checked all the way back to the axioms at the base of mathematics. Every step in between is written out, without exception, and it never appeals to intuition, even when turning the intuition into logic is routine. As a result, it is harder to follow by intuition, but much less open to logical errors.

For example, nobody normally even writes a proof of “1 + 1 = 2.” A formal proof starts from how the numbers are defined, “1 is the number after 0” and “2 is the number after 1,” and from rules of addition, “a + 0 = a” and “a + (the number after b) = the number after (a + b),” and then goes one step at a time: 1 + 1 = 1 + (the number after 0) = the number after (1 + 0) = the number after 1 = 2 (a real one also writes out the rules for handling “=,” so it is even longer).

So formal proofs get long. When a proof is rewritten as a formal proof, the ratio of the lengths is remarkably similar from proof to proof; this ratio is called the de Bruijn factor. If you compare the lengths by the size of the files after compressing them, it comes out at about four. Depending on the foundations chosen, it can be far more extreme: by one calculation, writing out the definition of the number “1” fully in the most basic symbols of Bourbaki’s book Theory of Sets, without any shorthand, takes more than 4 trillion symbols.

How does a machine check it?

To write a formal proof, three things are fixed first. The first is the symbols you may use and the rules for building sentences from them (the symbol language). The second is the starting promises accepted as true without proof (the axioms). The third is the list of forms by which a new line may be made from lines already written (the rules of inference).

The best-known rule of inference is: “if ‘if A then B’ and ‘A’ have been proved, you may write ‘B’” (called modus ponens). Any statements at all can go in place of A and B. Given “if it is raining, then the road is wet” and “it is raining,” you may write “the road is wet.”

A proof is a list of lines. Every line has to be an axiom, a premise, or something made from earlier lines by a rule. The checker only looks at each line to see whether it fits the form of a rule. It can decide from the form of the sentences alone, without knowing what rain or roads are. On the other hand, going from “the road is wet” and “if it is raining, then the road is wet” to “it is raining” may look reasonable (maybe a sprinkler wet the road), but it fits no rule’s form, so it doesn’t pass.

A formal system is built so that whether a sentence is an axiom, and whether a list of lines is a valid proof, can be decided mechanically by a fixed procedure. That is why checking is the kind of job computers are good at. Software that checks formal proofs, or helps write them, is called a proof assistant. Examples include Lean, Coq (now called Rocq), Isabelle and HOL Light.

In Japanese, a formal proof is called “keishikiteki shōmei” or simply “keishiki shōmei.” An everyday proof is sometimes called an “informal proof” (“hi-keishiki shōmei”), and rewriting the definitions, theorems and proofs of mathematics in a language a computer can check is called “formalization” (“keishikika”).

Who came up with it?

The dream of turning reasoning into calculation is old. The mathematician Leibniz imagined a language in which anything could be expressed, together with a method of calculation for deciding whether claims written in it are true. He dreamed of a day when people who disagreed would, instead of arguing, say to each other, “Let us calculate.”

The first full-scale formal system was Frege’s Begriffsschrift (“concept-script”) of 1879. Frege wrote down correct steps of reasoning as rules, and he believed that the basic axioms of numbers could themselves be derived from logic alone. But at the heart of his system lay a contradiction. Using sets (collections of things) and their members (the things in a collection), it let you build “the set of all sets that are not members of themselves,” and when you ask whether that set is a member of itself, either answer leads to a contradiction (Russell’s paradox). A well-known puzzle of a similar kind asks: a barber shaves everyone who doesn’t shave themselves, and no one else; does the barber shave himself? Here too, whether he does or doesn’t, the rule is broken.

Whitehead and Russell, using a system that avoided the contradiction by sorting things into kinds (types), published the three-volume Principia Mathematica from 1910 to 1913, trying to show that all of pure mathematics follows from logic alone. In this work, the proof that 1 + 1 = 2, a proposition (a statement that is either true or false), doesn’t turn up until page 83 of volume II. The authors added afterward, “The above proposition is occasionally useful.”

In the 1920s, Hilbert proposed a program to write all of mathematics in the form of axioms and to prove that no contradiction can come from those axioms, using only reliable methods (Hilbert’s program).

The era of checking by computer began with Automath, created by de Bruijn in 1968: the first program to check whether general mathematical proofs are correct. Automath eventually checked every proposition in a primer on how to build the real numbers that the mathematician Landau had written for his daughter.

Did Gödel’s incompleteness theorems ruin formal proof?

In 1931, Gödel published his incompleteness theorems. The first theorem says: “a consistent formal system in which a certain amount of arithmetic can be done contains statements that can be neither proved nor disproved (shown to be false) within that system.” The second says: “such a system cannot prove, within itself, that it is free of contradiction.” These results are generally taken to show that Hilbert’s program cannot be carried out as planned.

But this does not mean “a machine can’t check whether a written proof is correct.” In a formal system, being able to decide mechanically whether a list of lines is a valid proof is part of the deal from the start. What the incompleteness theorems limit is what can be proved.

The hard part is finding proofs. In 1936, Church and Turing each showed, independently, another limit. What Gödel showed is that “some statements can be neither proved nor disproved within the system”; what Church and Turing showed is that “there is no procedure that can decide in advance, for every statement of logic, whether it has a proof.” If a proof exists, trying every possible list of lines in turn will find it eventually. But if there is no proof, that search goes on forever, and whatever method you use, some statements are left with no answer. In other words, a machine can check proofs with a procedure that always finishes, but there is no such procedure for finding them. That is why finding proofs is still work for people, and for ever more ingenious programs and AI.

As it happens, the first incompleteness theorem itself was checked as a formal proof in 1986.

Which big theorems have become formal proofs?

Early big targets were proofs that used computers. The 1976 proof of the four color theorem (any map can be colored with four colors) relied on computer calculations that no one could check by hand. Gonthier and his colleagues rewrote a later proof entirely in Coq’s language, including the computer calculations, and finished checking it in 2005 (more on the “Four color theorem” page).

The Kepler conjecture (equal-sized balls can’t be packed more densely than in the arrangement used for stacking cannonballs) was proved by Ferguson and Hales in 1998. But the proof included computer calculations, and even after a long effort the referees could not check it all; the journal’s editor wrote that they “have not been able to certify the correctness of the proof, and will not be able to certify it in the future, because they have run out of energy to devote to the problem.” The proof was published in full in 2006 without complete certification from the referees. In 2003 Hales announced Flyspeck, a project to check it as a formal proof, and with two proof assistants, HOL Light and Isabelle, the checking was finished in 2014 (the paper came out in 2017).

In July 2022, the proof of a new theorem that the mathematician Peter Scholze had asked people to check (the Liquid Tensor Experiment) was fully checked in Lean (more on the “Lean” page).

For Fermat’s Last Theorem (no positive whole numbers a, b and c satisfy aⁿ + bⁿ = cⁿ when n is 3 or more), a large group effort led by Kevin Buzzard has been under way in Lean since 2024 (its UK funding runs until September 2029). Separately, on September 4, 2026, the AI company Anthropic announced that its AI, Claude, working largely on its own for 11 days, had written a Lean proof of about 13 million lines (the company’s announcement). It says a tool also confirmed that the statement proved is the same as the statement of Fermat’s Last Theorem in Mathlib (Lean’s shared library of mathematics).

Then, on November 20, 2026, Levent Alpöge, a mathematician working at Anthropic, released a formal proof in Lean, saying he believes he found a proof of the Riemann Hypothesis (a famous conjecture about how prime numbers are spread out) together with the AI Claude. The next day, November 21, the two groups behind Lean and Mathlib (the Lean FRO and the Mathlib Initiative) certified in a joint statement that both the statement and the proof, about 17 million lines, are correct. There is no paper for people to read yet (more on the “Riemann Hypothesis” page).

Is a formal proof always correct?

Even with a formal proof, some things still have to be taken on trust. The first is the statement itself. What the machine checks is “whether the written statement has been proved”; whether that statement means the same as the problem you really wanted to settle has to be checked by people, down to the definitions (more on the “Autoformalization” page).

The second is the checking tool. A tool is a program too, so no one can say for certain that it has no bugs. So trustworthy tools keep the part that handles the axioms and rules of inference (the core, or kernel) small, and make every proof go through it. The kernel of HOL Light, for example, is a program of fewer than 500 lines. Being small, it can be read and checked by many people. Hales wrote in 2008 that three to five bugs had turned up in each top-tier tool over 15 to 20 years of use, but that, as far as he knew, only one proof had ever been withdrawn because of a bug in a tool (in 1995, in a tool he did not rank as top-tier).

The third is the axioms. You have to trust that the axioms a proof relies on are free of contradiction. And, as the second incompleteness theorem says, even if the usual axioms of mathematics really are free of contradiction, that fact can’t be proved using those axioms alone.

Even so, Hales states flatly that the error rates of top-tier tools are orders of magnitude lower than those of proofs in the most prestigious mathematical journals (his own view). His reason is that a formal proof starts from the ordinary proof and then checks strictly more, even at the human level.

How is it connected to AI?

Large language models (AI that writes text, like ChatGPT) now write mathematical proofs too, but they sometimes mix in plausible-sounding mistakes (hallucinations). Having people read and check every line of a long proof written in ordinary language is hard work.

With a formal proof, the check is the same whether a person or an AI wrote it. Checking whether something follows the rules is one of the things computers are very good at. Because finding is hard while checking can be done by machine, the work can be divided: AI searches, and a machine checks. Of the 2026 formal proofs in Lean, the one for Fermat’s Last Theorem is said to have been written largely on its own by the AI Claude (the company’s announcement), and the one for the Riemann Hypothesis to have been found by a mathematician together with Claude (his own announcement).

But what a formal proof tells you is that the steps contain no errors. It does not make it clear to people why the result is true or what new ideas were used. Anthropic, too, says it does not think a formalized proof should replace an explanation people can understand. For the Riemann Hypothesis proof as well, rewriting it in a form people can read, and mathematicians coming to understand its new ideas, are still ahead.

Check yourself

  1. Q1Compared with the proofs mathematicians usually write in papers, how is a formal proof different?

    Answer and explanation

    Answer: B It writes out every step, even obvious ones, from the axioms

    A formal proof checks every logical step all the way back to the axioms: it writes out every step without exception, even obvious ones, and links its lines only by the allowed rules of inference. Leaving out steps readers can fill in and conveying the key points in words is how everyday proofs are written. And “formal” doesn’t mean keeping the content as it is and just tidying up how it looks: because a formal proof writes out even the steps everyday proofs skip, its content is actually far more detailed.

    More on this → Key points: How is it different from an everyday proof?

  2. Q2With formal proofs, what can a computer do using a fixed procedure that always finishes, in every case?

    Answer and explanation

    Answer: C Given a written proof, it checks that it follows the rules

    A formal system is built so that whether a written list of lines is a valid proof can be decided mechanically by a fixed procedure, so checking always finishes. But as Church and Turing showed in 1936, no procedure can decide in advance, for every statement of logic, whether it has a proof; if there is no proof, a search for one goes on forever. And as Gödel’s incompleteness theorem says, some statements can be neither proved nor disproved within the system, so not every statement can be settled as true or false either. That is why people or AI find proofs, and a machine checks them.

    More on this → Key points: Did Gödel’s incompleteness theorems ruin formal proof?

  3. Q3Suppose an AI writes a very long proof, millions of lines, and hands it over not in everyday language but as a formal proof that dedicated software such as Lean can handle. What is the benefit?

    Answer and explanation

    Answer: C Without anyone reading it all, a machine finds any wrong step

    A machine can check, line by line, whether a formal proof follows the set rules, so any error in the steps will be found. That holds even if an AI wrote it. But the machine does not explain to people why the proof works or what ideas it used. Formal proofs are usually much longer than everyday ones, and the machine does not rewrite them shorter either.

    More on this → Key points: How is it connected to AI?

Sources and how we checked

AI wrote this page from the sources above, and a different AI checked it against the text of those sources (November 26, 2026). A person with a master’s degree in science and a Japanese high-school science teaching license also read and checked it before publishing. Numbers are as of that date. If anything was hard to follow, you spot a mistake, or there’s a term you’d like explained, please write to [email protected].

Glossary

All 10 Math terms →