Adversarial Mathematics: From First Principles cover
AIBussin Book In development

Adversarial Mathematics: From First Principles

A new approach to mathematical investigation using AI, proof assistants, counterexamples, reproducible experiments, and independently checked evidence.

Browse Examples →

A mathematical answer is only as trustworthy as the claim being tested, the assumptions behind it, and the evidence supporting it.

AI can generate mathematical arguments, construct proofs, identify patterns, and propose solutions. Proof-generating agents can also search for missing steps, run proof assistants, and revise rejected attempts. But a convincing explanation is not necessarily a correct proof, and a formally verified theorem may not establish what its author intended. The same distinction applies when an agent generates thousands of proof steps: the checked theorem and its assumptions still have to match the claim under investigation.

Adversarial Mathematics: From First Principles explores a different approach: mathematics in which AI proposes, independent tools check, counterexamples challenge, and every conclusion remains connected to the evidence that supports it.

The objective is not to replace mathematical reasoning with software. It is to make mathematical investigations more precise, reproducible, inspectable, and open to challenge.

Why this book exists

Mathematics has traditionally depended on a combination of reasoning, proof, criticism, and independent examination. AI makes generating mathematical arguments dramatically easier, but it also introduces a new problem: producing plausible mathematics is not the same as establishing its correctness.

A language model can propose a theorem, write a convincing derivation, or generate code for a proof assistant. Yet several questions remain.

What exactly was proved? Which assumptions were required? Did the formal statement match the original claim? Could a counterexample invalidate it? Would another proof system reach the same conclusion? Can someone else reproduce the result?

This book investigates how those questions can become part of a systematic mathematical process.

Rather than trusting one AI model or one mathematical tool, we construct a framework in which claims are explicitly defined, challenged, checked, and recorded.

The central distinction

The book separates seven stages of mathematical investigation:

  1. The claim — the precise mathematical statement being investigated.
  2. The assumptions — the definitions, domains, axioms, and conditions under which it is meaningful.
  3. The proposed reasoning — a derivation, proof, formalization, or counterexample proposed by a person or AI.
  4. The verification — the actual work performed by symbolic systems, solvers, or theorem-prover kernels.
  5. The correspondence — whether different tools checked the intended mathematical statements, and what relationships between those statements have been established.
  6. The evidence — reproducible records of what ran, what succeeded, what failed, and what remains unresolved.
  7. The conclusion — a carefully bounded statement of what the investigation established.

A proof accepted by Lean is not automatically equivalent to a proof accepted by Rocq. A symbolic identity is not automatically a formally verified theorem. A theorem about a mathematical model does not establish that the physical universe follows that model.

Each transition must be justified separately.

The investigation loop in seven stages: 1 claim, 2 assumptions, 3 reasoning, 4 verification, 5 correspondence, 6 evidence, 7 conclusion. A dashed red path labelled challenge or repair returns from the conclusion to the claim. A note says each transition is a separate claim: a solver result is not a proof, a proof is not a statement match, and a statement match is not a physical result.

The investigation loop. Each transition is a separate claim; a later success does not repair an earlier gap.

How the book is organised

The book has four parts, and it begins with mathematics, not machinery. Start Reading opens the eight investigations; the later parts explain the mathematics and the laboratory behind them.

Part I: Eight Investigations. Eight short chapters, each a single mathematical question with a definite answer and a check you can run:

Investigation The question
1 One Number Against Fermat Is every 2^(2^n) + 1 prime?
2 Continuous Terms, Discontinuous Sum Is a convergent sum of continuous functions continuous?
3 Two Clocks, Two Questions Does a 2024 preprint show that special relativity contradicts itself?
4 The Wrong Theorem When a proof checker says yes, what has been proved?
5 The AI Proof That Wasn’t Finished What did the kernel accept in a published AI-assisted formalization?
6 The Proof That Lasted Eleven Years Where exactly does Kempe’s 1879 proof of the four colour theorem fail?
7 When Every Group Says Yes Can a treatment win in every group and lose overall?
8 A Horn You Can Fill but Cannot Paint Can a solid have finite volume and infinite surface area?

Each chapter has the same shape: the question, the setup, a command that reproduces the check, what the recorded run printed, why, what was actually checked, what that establishes, and what remains open.

Part II: Understanding the Mathematics. The ideas the investigations rely on, developed properly: universal claims and counterexamples, hypotheses, limits and convergence, exact computation, planar graphs and colourings, what a formal proposition says, what a proof rests on, events and simultaneity, the Lorentz transformation, and the line between a theorem about a model and a claim about the world.

Part III: The Laboratory. How the investigations are run: claim contracts, failure controls, evidence records, theorem identity, independent reproduction, and the role of AI as a proposer whose output is checked, never trusted.

Part IV: Reference. Every command, environment, tool and source record needed to reproduce or challenge what the book reports. Its appendices collect the worked exercise solutions, the sources cited chapter by chapter, the record of the earlier edition and engine, and the mathematical notation.

The book is designed to be read in order, but each investigation stands on its own.

The verification tools

The investigation uses tools with different responsibilities.

Tool or component Role
Python / SymPy Symbolic manipulation, exact arithmetic, and computational checks
Z3 Constraint solving, satisfiability testing, and counterexample discovery
Lean 4 / Mathlib Formally checked mathematical statements and proofs, including AI-proposed scripts
Rocq / Coq Additional kernel-checked formalization using a different foundational system
AI proof agents Propose Lean scripts, attempt repairs, and test specified proof strategies; their outputs remain proposals until checked
comparator Checks correspondence to a fixed reference statement and its dependencies in the recorded external challenge; not a general proof of semantic or physical correspondence
Isabelle/HOL Candidate independent formal-verification system
SageMath Candidate computational mathematics environment

The distinction between executed and planned integrations matters.

A missing tool is not a successful check. A solver result is not automatically a kernel proof. Agreement between proof assistants does not by itself establish semantic equivalence between their encodings.

The book preserves these boundaries rather than assigning confidence percentages to mathematical results. An AI agent is not a proof checker; a successful Lean replay is not evidence that a second proof route is mathematically independent. The comparator check and the formal proof kernels answer different questions.

Beyond the eight investigations

Parts II and III also examine:

  • The Lorentz transformation and the invariant interval: a well-established theorem, checked under explicit assumptions, used to show what a formal proof of a physical formula does and does not establish.
  • Pythagorean theorem reconstruction: moving from a historical mathematical source to a modern coordinate theorem without confusing the two.
  • Hidden-assumption testing: removing hypotheses and searching for counterexamples.
  • Claim repair: distinguishing a corrected statement from the original false claim.
  • Formal proof inspection: identifying placeholders, unexpected axioms, and limitations in proof artifacts.
  • AI-assisted proof search: checking generated Lean scripts, observing failed repair attempts, and distinguishing alternative scripts from alternative arguments.
  • AlphaProof Code as an external case study: examining how DeepMind separated approved specifications, autonomous proof construction, amendment review, and final gatekeeping in its Signal verification work. The book does not reproduce or independently validate that work.
  • External mathematical formalizations: examining the relationship between a mathematical problem, its supporting records, and the statements actually checked.
  • Reproducibility: determining what it means for another execution, environment, or independent reviewer to reproduce a mathematical result.

These investigations demonstrate why mathematical verification involves more than obtaining a successful return code from a proof assistant.

Evidence and reproducibility

The accompanying Math project stores mathematical claims, formal proof sources, execution results, counterexamples, and reproducibility evidence.

Claims are versioned and associated with precise assumptions. The verification system records tool versions, source fingerprints, execution outcomes, and outstanding obligations. Accepted claim records are protected against silent substitution. Where a theorem changes, the new statement must be distinguished from the earlier claim; a proof of a revised statement does not retroactively prove the original.

The book keeps mathematical explanations connected to inspectable supporting evidence. Part III also examines Google DeepMind’s AlphaProof Code as an external design comparison: its proof agents work against a locked specification, with proposed amendments handled separately and a gatekeeper checking the final statements and their dependencies. Our experiments borrow the separation of concerns, but do not reproduce the scale or security guarantees reported in that work.

This does not eliminate the need for human mathematical judgment. A proof kernel checks the formal proposition it receives; it cannot establish that the proposition faithfully represents the author’s original intention.

The book therefore separates machine verification, cross-system correspondence, and the human judgement that a formal statement matches its claim.

Scope and evidence

Each investigation in Part I reports recorded formal and computational results, and each chapter states what those results do and do not establish. Part II contains explanatory mathematics, some of it classical and cited rather than checked here; it says which.

The presence of a chapter does not imply that every example in it has been independently verified. Each chapter’s limits section states what remains unsettled.

Method

The working method is:

Formulate → Challenge → Formalize → Verify → Compare → Reproduce → Explain

A claim is defined before it is tested. Assumptions are made explicit. Counterexamples are sought deliberately. Formal systems check precisely encoded statements. Independent results are compared without assuming equivalence. Reproduction records preserve both successes and failures.

Finally, the result is explained in ordinary mathematical language, with its limitations intact.

The central principle is simple:

AI may propose the mathematics. The evidence must establish what can legitimately be concluded.

Contents

Chapters

01

Eight Investigations

Part I of Adversarial Mathematics: From First Principles — eight short mathematical investigations, each with a question, a runnable check and an honest account of what the check establishes.

02

One Number Against Fermat

Fermat was almost sure that every number 2^(2^n) + 1 is prime. The first five are. Euler found the number that settles it, and we check his answer with two proof checkers, a computation and a set of mistakes they must catch.

03

Continuous Terms, Discontinuous Sum

In 1821 Cauchy stated that a convergent series of continuous functions has a continuous sum. In 1826 Abel wrote, in a footnote, that the theorem 'admits exceptions'. We read all three documents, separate four things that are easily confused, and say exactly which of them a proof checker has verified.

04

Two Clocks, Two Questions

A 2024 preprint claims that special relativity contradicts itself: one collision, computed two ways, gives two different times. We reconstruct the argument, find the step where the two calculations stop measuring the same thing, and say carefully what that does and does not show.

05

The Wrong Theorem

A proof assistant checked a theorem perfectly. Our own software then credited it to a claim it never stated. One requested claim, one substituted theorem, one misleading success, and the check that catches it.

06

The AI Proof That Wasn't Finished

An AI system produced a Lean formalization of a competition problem. The proof checker accepted four helper lemmas — and the main theorem rests on a single sorry. What the kernel actually certified, declaration by declaration.

07

The Proof That Lasted Eleven Years

In 1879 Kempe published a proof that four colours suffice for any map. In 1890 Heawood printed a map on which one step of it fails. We transcribe Heawood's map, run Kempe's step on it, and watch the two colour swaps collide.

08

When Every Group Says Yes

One treatment wins in every group of patients, yet loses overall. Two published tables, checked exactly with two proof checkers: Simpson's own example, where the difference vanishes, and the kidney-stone study, where it reverses.

09

A Horn You Can Fill but Cannot Paint

Rotate y = 1/x about the x-axis and you get an infinitely long horn. Its volume is exactly π; its surface area is infinite. Lean checks both halves, and a computer algebra system and a numerical integrator check them again.

10

Every, Some, None

How 'for every' and 'there exists' work, why a single witness refutes a universal claim and a thousand passing cases do not prove one, and why a counterexample to a proof step is not a counterexample to its theorem.

11

What a Theorem Assumes

A theorem is a domain, hypotheses and a conclusion. Delete a hypothesis and watch what breaks; change the domain and the claim changes; reverse the implication and a true theorem becomes Fermat's false one. How a refuted claim is honestly repaired.

12

Limits That Do Not Commute

Two limits taken in different orders can give different answers. Pointwise and uniform convergence, Abel's series, sums of integrals and integrals of sums, and Gabriel's horn, where a finite limit and an infinite one sit side by side.

13

Exact Numbers and Misleading Aggregates

Why a comparison of fractions should be exact, why floating point and fifty-digit checks are evidence rather than proof, and why an advantage in every group can vanish or reverse when the groups are combined. The arithmetic behind Simpson's paradox, and what it does not say about causes.

14

Maps, Graphs and Colourings

How a map becomes a graph, why Euler's formula guarantees a region with at most five neighbours, what a Kempe chain is and why swapping its colours is safe, why two safe swaps can still collide, and how the same idea proves that five colours always suffice.

15

What a Formal Proposition Says

A checked theorem has five parts: a name, a proposition, a proof, the axioms it rests on, and a correspondence with the claim we meant. The kernel guarantees exactly one of them. How to read a formal statement, and where its meaning drifts from the English.

16

What a Proof Rests On

A proof depends on other proofs, on axioms, and on a small piece of software that checks it. How dependencies propagate, why a single sorry can hide three lemmas away, what a file that compiles has and has not shown, and what a second, independent checker adds.

17

Events, Frames and Simultaneity

Why 'at the same time' depends on who is asking, why that makes time dilation and length contraction statements about particular pairs of events, why each of two clocks can run slow relative to the other without contradiction, and what proper time is: the elapsed time along a specified worldline between specified events.

18

The Lorentz Transformation and the Interval

Where the boost comes from, which assumptions are mathematical and which are physical, why γ²(1 − v²) = 1 is not the same statement as γ = 1/√(1 − v²), what the interval's invariance does and does not say, and when the order of two events can change.

19

Mathematics and the World

When does a mathematical result tell us something about the world? Three separate questions: is it true under its assumptions, does it describe what we meant it to describe, and what evidence says that the description fits. Formal proof answers the first. The eight investigations show what the other two need.

20

The Claim Contract

Before anything is run, each investigation writes down what it is asking mathematics to establish: the claim in words, how it is read, the exact formal statements, how they relate, what would count as failure, and what the result will not show. Why that file comes first, what is in it, and why it has a hash.

21

Running an Investigation

What happens between typing one command and reading a notebook: the pinned image, the scratch copy of the book, each check in turn, the deliberate mistakes, the record of the environment, the status, and the files that make the run checkable later. And the three kinds of evidence a run can produce.

22

Statement Identity

A kernel can establish that p is a proof of P. It cannot, by doing so, establish that P is the proposition anyone meant. Five ways two statements can be 'the same', which of them the laboratory checks, which it deliberately does not, and why a proof must answer the question that was asked.

23

Failure Controls

Every run deliberately makes mistakes and checks that they are caught: a wrong factor, a doubled volume, a substituted statement, a missing boundary on a map. What each kind of mistake exposes, why a control must fail for the right reason, how a careless control can reassure falsely, and why catching these mistakes is evidence about the checker, not a proof that it is sound.

24

Statuses and Approvals

Why a kernel's acceptance and a person's approval are different things, how the runner turns a run into one status line, what an approval record must contain to count, and why no machine, including an AI, can ever produce one. Fermat's investigation before and after its approval.

25

Records and Notebooks

What a run leaves behind, and how someone who did not watch it can check it later: the result record, the logs, the notebook rendered from them, and the hashes that bind them together. Three identities (of the claim, the evidence and the environment), why old runs are kept and never rewritten, how imported evidence is verified, and what a hash cannot tell you.

26

Auditing Someone Else's Proof

How to examine a formal proof you did not write: pin exactly what was published, build it in its own environment, read the propositions rather than the names, follow the dependencies down to the axioms, bind the result to the claimed statement, and only then ask whether the statement means what the claim says. A practical checklist for any Lean or Rocq proof.

27

AI as Proposer, Not Authority

AI systems drafted this book, wrote much of its laboratory, transcribed its sources, proposed proofs and attacked its own evidence. Some of their best contributions and some of their worst errors are on the record. What they did, how each contribution was checked, and the one rule that makes the arrangement safe: an AI may propose anything, and its proposal establishes nothing until independent evidence or a person's recorded judgement does.

28

A Ninth Investigation

Build an investigation from nothing, with the laboratory the book has described: a small theorem (6 divides n³ − n), a plausible generalization that fails (k divides nᵏ − n), a claim contract, a Lean proof, an independent computation, five deliberate mistakes, one command, a notebook and a verification. A tutorial, kept apart from the book's eight investigations.

29

Getting Started

What you need, how to get the pinned environment, and how to run your first investigation, with and without Docker. The text says which commands have been checked in the reference environment.

30

All Eight Investigations

For each investigation: the command, what it runs, where its contract and inputs live, where its recorded run is, the evidence it produced, and what it does not establish. Plus the tutorial.

31

Claim Contract Reference

Every field of investigation.json and approvals.json, which the runner reads and which are for people, how contracts are versioned and hashed, and how statements are bound to proofs.

32

Proof Runner Reference

The math-engine proof command and the image's own commands: every option, environment variable, execution stage, status and exit code.

33

Evidence and Notebooks

The layout of a run directory, every field of result.json, what --verify checks, how runs are filed in the repository, and how to reproduce one.

34

Writing Your Own Investigation

The files to create, the one registry entry to add, the rules a contract must satisfy, how to design controls that fail for the right reason, and the checks to run before trusting the result. A reference companion to Part III, chapter 9.

36

Appendix B: Sources

Sources for the historical investigations and the claims they support, chapter by chapter, with reading status; a finding aid for Part II's reuse of them.

38

Appendix D: Notation

The symbols used across the book, with the Lean and Rocq spellings readers meet in the investigations.