← Adversarial Mathematics: From First Principles

Appendix A: Solutions to the Exercises

Worked answers to every exercise in Parts I, II and III, with the computation or argument a reader can check.

Answers are given so that you can check them, not only read them. Where an exercise asks you to run something, the answer says what the recorded run shows and why.

Part I

Chapter 1, One Number Against Fermat

Exercises: Chapter 2 — One Number Against Fermat (Part I, Chapter 1)#try-it-yourself.

  1. The verification recomputes each file’s hash and names notebook.md as changed. A run directory is verified file by file, not as a whole.
  2. Answered in the chapter: modulo 641, 5·2⁷ ≡ −1 and 2⁴ ≡ −5⁴, so 2³² = 2⁴·2²⁸ ≡ −5⁴·2²⁸ = −(5·2⁷)⁴ ≡ −1.
  3. Answered in the chapter: 129, 257, 385, 513; only 257 is prime, and F₅ ≡ 2 (mod 257); the next candidate is 641.
  4. The identity check refuses the changed statement, because the theorem the kernel accepted proves the old statement, not the new one. The summary reports fewer than all statements accepted, and the run does not receive a kernel-checked status. That is right: there is no evidence for the new statement.

Chapter 2, Continuous Terms, Discontinuous Sum

Exercises: Chapter 3 — Continuous Terms, Discontinuous Sum (Part I, Chapter 2)#try-it-yourself.

  1. xⁿ = ½ at x = 2^(−1/n): 0.5 for n = 1, about 0.9330 for n = 10, about 0.99309 for n = 100. For large n, x ≈ 1 − (ln 2)/n, which tends to 1.
  2. Numerically, the largest partial sum just below π is about 1.707 (N = 10), 1.836 (N = 100) and 1.850 (N = 1000). It approaches ∫₀^π (sin t)/t dt ≈ 1.8519, so the overshoot above π/2 tends to about 0.281, roughly 9% of the jump. It does not shrink as N grows.
  3. sin(n(π − t)) = −cos(nπ) sin(nt) = (−1)ⁿ⁺¹ sin(nt). So each term (−1)ⁿ⁺¹ sin(nx)/n of Abel’s series becomes sin(nt)/n, which is Cauchy’s 1853 term.
  4. A judgement exercise. The essential change is to require that the remainder become small for all x in the interval at once, with one N: uniform convergence. The chapter’s caution applies: whether Cauchy’s own 1853 wording means exactly that is still open.

Chapter 3, Two Clocks, Two Questions

Exercises: Chapter 4 — Two Clocks, Two Questions (Part I, Chapter 3)#try-it-yourself.

  1. T₂ = D/c at every v. Its start event is M’s event on the slice t′ = s* = (γ − α)D/c, which happens at S-time −vD/(c(c + v)), before the emission, by exactly T₂ − T₁.
  2. At t′_A = γvD/c² the photon is at x′ = γvD/c and M at γD, a separation of γD(1 − v/c) = D√((c − v)/(c + v)). Closing at c takes γD(c − v)/c², and t′_A + γD(c − v)/c² = γD/c = t′_B.
  3. γ · (αD/c) = D/c because αγ = 1. The answer does not depend on γ, so the Lorentz transformation does no work in this calculation, and the contradiction must come from its added premises.
  4. The difference between the two readings is not a paradox: the watches were started at different events. A paradox would need two watches started and stopped at the same events to disagree.

Chapter 4, The Wrong Theorem

Exercises: Chapter 5 — The Wrong Theorem (Part I, Chapter 4)#try-it-yourself.

  1. It credits “For every natural number n, 0 + n = n”, taken from the claim registry, not from the file. The file proves True.
  2. The name-only gate accepts it. The statement gate refuses it: Lean reports a type mismatch, because ∀ n, n + 0 = n is not definitionally the same proposition as ∀ n, 0 + n = n (checked with Lean 4.35). It is a true fact, but not the claim.
  3. The demonstration recomputes the sha256 of claim.json and compares it with the pinned hash. Any change, even to one character, breaks the match, so the claim cannot drift silently.
  4. A judgement exercise. Accepting binder changes treats statements as propositions; refusing them until re-approved treats any change in the written statement as something a person should look at. The second is stricter and costs a re-approval.

Chapter 5, The AI Proof That Wasn’t Finished

Exercises: Chapter 6 — The AI Proof That Wasn’t Finished (Part I, Chapter 5)#try-it-yourself.

  1. With an honest lemma and a theorem proved by sorry, only the theorem shows sorryAx. If the lemma uses sorry instead, both show it, because the theorem depends on the lemma (Chapter 16 — What a Proof Rests On (Part II, Chapter 7) runs this example).
  2. Clean axioms only show that the proof has no gap. They do not show what was proved. The substituted theorem proves True, so it must be refused at the binding step.
  3. The comparison is not settled here. The paper’s four differences need to be checked against the competition statement; until that reading is done, the relation between the Lean statement and IMO 2009 Problem 6 is not established.

Chapter 6, The Proof That Lasted Eleven Years

Exercises: Chapter 7 — The Proof That Lasted Eleven Years (Part I, Chapter 6)#try-it-yourself.

  1. The red-green chain of 1 is {R1, R2, R3, G1, G2, Gout}; the red-yellow chain of 3 is {R4, R5, R6, Y4, Y5, Yout}. They do not overlap, but they touch where the outer green ring Gout meets the outer yellow ring Yout. After both swaps those two neighbours are both red.
  2. With the boundary B3–Gout removed, regions 2 and 4 are no longer joined by a blue-green chain. A single blue-green swap then frees blue, Kempe’s simple case applies, and the verdict changes to not_as_heawood_says. One boundary decides whether the map is a counterexample to the step.
  3. No. The experiment confirms that neither single red-green swap nor single red-yellow swap frees a colour, and the blue-yellow and blue-green pairs are each joined by chains.
  4. The experiment prints a four-colouring with X green. Many regions change colour. Whether it can be reached from Heawood’s colouring by Kempe swaps alone is not determined by the experiment.
  5. With a fifth colour, only one swap is ever needed: see Chapter 14 — Maps, Graphs and Colourings (Part II, Chapter 5), “Five colours suffice”.

Chapter 7, When Every Group Says Yes

Exercises: Chapter 8 — When Every Group Says Yes (Part I, Chapter 7)#try-it-yourself.

  1. With 7 of 13 treated men surviving, 7/13 < 4/7 (49 < 52). The treated arm no longer wins among men, and the run reports the broken pattern.
  2. Open surgery: (87/350)(81/87) + (263/350)(192/263) = 273/350. Percutaneous: (270/350)(234/270) + (80/350)(55/80) = 289/350. With equal weights the order is preserved (Chapter 13 — Exact Numbers and Misleading Aggregates (Part II, Chapter 4), “Same weights preserve order”).
  3. 38/44 < 234/270, because 38 × 270 = 10260 < 10296 = 234 × 44. Open surgery now loses group 1 and still wins group 2. Combined, 230/307 against 289/350, percutaneous is still ahead, but there is no longer a paradox: the “wins every group” half is gone.
  4. Keeping open surgery’s group-1 success rate at 81/87 and group 2 fixed, it needs at least 239 group-1 patients for its combined rate to exceed 289/350. It had 87. The number 239 is a threshold for the rate; at exactly 81/87 the survivor count is not integral. Since 81/87 = 27/29, an attainable table has group-1 patient counts in multiples of 29; the first above 239 is 261 (243 survivors), which gives 435/524 > 289/350.
  5. Answered from Charig’s Table I: 13 + 31 + 43 = 87 and 218 + 45 = 263. The reading of the table is a source limitation, not a separate mathematical result.

Chapter 8, A Horn You Can Fill but Cannot Paint

Exercises: Chapter 9 — A Horn You Can Fill but Cannot Paint (Part I, Chapter 8)#try-it-yourself.

  1. For y = 1/√x the volume integral is π∫₁^∞ dx/x, which diverges. For y = x^(−p) the volume is finite when 2p > 1 and the area is infinite when p ≤ 1, so the answer is 1/2 < p ≤ 1.
  2. It reports the verdict claim_fails, with the message that the integral is π, not 2π. The claimed value is a deliberate failure control.
  3. A(10b) − A(b) = 2π∫_b^{10b} (1/x)√(1 + x⁻⁴) dx. The part 2π∫ dx/x gives exactly 2π ln 10 ≈ 14.468. The rest, 2π∫ (√(1 + x⁻⁴) − 1)/x dx, is at most 2π∫ x⁻⁵/2 dx, which tends to 0 as b grows.
  4. The text does not settle this; Torricelli’s own text has not been read. In this book’s normalisation, the horn’s volume π equals that of a cylinder of radius 1 and height 1.

Part II

Chapter 1, Every, Some, None

Exercises: Chapter 10 — Every, Some, None (Part II, Chapter 1)#exercises.

  1. “Some even number greater than 2 is not a sum of two primes.” A counterexample would be one such number.
  2. With v = 1 the residual is −t(2x + t), which is zero exactly when t = 0 or x = −t/2.
  3. n = 40: 1600 + 40 + 41 = 1681 = 41². (n = 41 also fails.) The form n² + n + 41 = n(n + 1) + 41 is visibly divisible by 41 when n = 41, and at n = 40 it becomes a perfect square.
  4. The first says f(x) → 0 as x → 0 (with δ depending on ε). The second says one δ works for every ε, so |f(x)| is smaller than every positive number near 0, which forces f = 0 there. f(x) = x satisfies the first but not the second.

Chapter 2, What a Theorem Assumes

Exercises: Chapter 11 — What a Theorem Assumes (Part II, Chapter 2)#exercises.

  1. With k = 3 and j = 2: 2⁶ + 1 = (2²)³ + 1 = (2² + 1)(2⁴ − 2² + 1) = 5 × 13 = 65.
  2. Converse: “if a function is continuous at a point, it is differentiable there”. f(x) = |x| at 0 is a counterexample.
  3. Yes: if a = 0 or b = 0 the inequality reads 0 ≤ b/2 or 0 ≤ a/2, which is true for a, b ≥ 0. It cannot be dropped: at a = b = −1, √(ab) = 1 and (a + b)/2 = −1, so 1 ≤ −1 is false, with no undefined expression involved.
  4. Add x ≠ 0. In Lean, 0 / 0 = 0, so x / x = 0 at x = 0, and the unrestricted statement is false there.
  5. (i) The separation in M’s frame is αD. This uses a premise the three properties do not supply: no moment of M’s frame is specified. (ii) The photon closes the gap at c, so τ₂ = αD/c. This uses light-speed invariance. (iii) Converting with γ gives T₂ = D/c, compared with T₁ as the same interval. The comparison uses a second added premise: that both times start from the same event.

Chapter 3, Limits That Do Not Commute

Exercises: Chapter 12 — Limits That Do Not Commute (Part II, Chapter 3)#exercises.

  1. On [0, a], sup |xⁿ| = aⁿ → 0, so the convergence is uniform. On [0, 1] the supremum of |xⁿ − f(x)| is 1 for every n; uniformity fails in every neighbourhood of 1.
  2. On the whole line, sup |x/n| is infinite for every n, so the convergence is not uniform. On [0, 1], sup |x/n| = 1/n → 0, so it is.
  3. gₙ = n² on (0, 1/n) and 0 elsewhere: ∫ gₙ = n, while gₙ → 0 pointwise.
  4. √(1 + x⁻⁴) ≥ 1, so A(b) ≥ 2π∫₁^b dx/x = 2π ln b. A(b) > 100 once b > e^(100/(2π)) ≈ 8.17 × 10⁶; b = 10⁷ gives 2π ln 10⁷ ≈ 101.3.
  5. With radius 1/x² the area integrand is 2πx⁻²√(1 + 4x⁻⁶) ≤ 2π√5 · x⁻² for x ≥ 1, and ∫₁^∞ x⁻² dx = 1. The comparison test gives a finite area.

Chapter 4, Exact Numbers and Misleading Aggregates

Exercises: Chapter 13 — Exact Numbers and Misleading Aggregates (Part II, Chapter 4)#exercises.

  1. 192 × 80 = 15360 > 14465 = 55 × 263. To two decimals, 0.73 against 0.69, which also decides it; for a closer pair, rounding can make two different fractions look equal, or reverse them.
  2. Group 1: 2/8 > 1/5 (10 > 8). Group 2: 5/5 > 8/9. Combined: 7/13 against 9/14, and 7 × 14 = 98 < 117 = 9 × 13, so A loses.
  3. (a + c)/(b + d) − a/b = (bc − ad)/(b(b + d)) and c/d − (a + c)/(b + d) = (bc − ad)/(d(b + d)). Both have the sign of bc − ad, so the mediant is between the two fractions.
  4. 0 and 1. The float rounds 2⁶⁴ + 1 to 2⁶⁴, which is even; the exact integer is odd.
  5. It establishes that the two expressions differ by less than about 10⁻⁴⁰ (given correct error bounds). It does not establish that they are equal.
  6. 38 × 270 = 10260 < 10296 = 234 × 44, so 38/44 < 234/270. Open surgery loses group 1, and the paradox disappears (Chapter 8 — When Every Group Says Yes (Part I, Chapter 7), exercise 3).

Chapter 5, Maps, Graphs and Colourings

Exercises: Chapter 14 — Maps, Graphs and Colourings (Part II, Chapter 5)#exercises.

  1. Square pyramid: 5 − 8 + 5 = 2. Triangular prism: 6 − 9 + 5 = 2.
  2. K₅ has V = 5 and E = 10, but a planar simple graph with 5 vertices has at most 3 × 5 − 6 = 9 edges.
  3. For example, three regions round a fourth, each touching the other two and the centre: every pair of the four regions touches.
  4. F = 2 − 25 + 69 = 46. Each face of the graph is a triangle, and each triangle surrounds one point of the map where three regions meet.
  5. It is used to rule out w being red or blue. Swapping half a chain fails: on a path red–blue–red, swapping only the first vertex gives blue–blue–red.
  6. Σ(6 − deg) = 6V − 2E ≥ 6V − (6V − 12) = 12. With every degree at least 5, each term is at most 1, so at least 12 vertices have degree exactly 5: a vertex of degree 7 or more contributes a negative term and only increases the required count. (Heawood’s graph has 17 vertices of degree 5, three of degree 6 and five of degree 7; the sum is 17 − 5 = 12, exactly.)

Chapter 6, What a Formal Proposition Says

Exercises: Chapter 15 — What a Formal Proposition Says (Part II, Chapter 6)#exercises.

  1. “For every natural number n, if n ≤ 10 then 0 + n = n.” It is true because 0 + n = n is true for every n. It is weaker than the claim: it says nothing about n > 10.
  2. False: a = 0, b = 1 gives 0 − 1 + 1 = 0 + 1 = 1 ≠ 0. With b ≤ a it is true.
  3. Mathlib’s integral returns 0 for a non-integrable function, so volume_eq_pi alone would not show that the integral converges. The constant function 1 on (1, ∞) is not integrable, so its Mathlib integral is 0.
  4. ∀ x : ℝ, Real.sqrt x * Real.sqrt x = x. It is false in Lean: at x = −1 the left side is 0. Adding 0 ≤ x repairs it.
  5. For example: “The kernel accepted a proof of that statement, from those axioms. Whether that statement is the claim you mean is a separate question, and a person has to answer it.”

Chapter 7, What a Proof Rests On

Exercises: Chapter 16 — What a Proof Rests On (Part II, Chapter 7)#exercises.

  1. stepB → stepA; stepC depends on neither. Proving stepA makes stepA and stepB clean; stepC is already clean.
  2. theorem stepA (n : Nat) : n + 0 = n := rfl. Then #print axioms stepB reports no axioms (checked with Lean 4.35).
  3. Strictly, none. The warning marks lemma 2 itself, but everything that depends on lemma 2 inherits sorryAx without a warning, and a declared axiom produces no sorry warning at all. Only #print axioms, or the dependency graph, tells you.
  4. Its axioms are clean, so question 2 passes, but it proves True. Binding it to the published statement fails, so question 3 refuses it.
  5. It rules out an error in one kernel’s implementation accepting a false proof. It does not rule out a wrong statement that both kernels correctly prove.

Chapter 8, Events, Frames and Simultaneity

Exercises: Chapter 17 — Events, Frames and Simultaneity (Part II, Chapter 8)#exercises.

  1. γ = 5/3. The event is (t, x) = (5, 4). The proper time is 3, and Δt = 5 = γ × 3.
  2. Δt′ = γ(0 − v · 2) = −(5/4)(6/5) = −3/2. The event (0, 2) happens first in S′.
  3. Δt = γ(Δt′ + vΔx′) = γvΔx′. Time dilation’s hypothesis is that the events are at the same place in S′ (Δx′ = 0); here they are simultaneous in S′ instead, a different hypothesis, so there is no conflict.
  4. Δx = D/(1 + v) − D = −vD/(1 + v), so τ² = D²/(1 + v)² − v²D²/(1 + v)² = D²(1 − v²)/(1 + v)², and τ = D√(1 − v²)/(1 + v) = αD/(1 + v).

Chapter 9, The Lorentz Transformation and the Interval

Exercises: Chapter 18 — The Lorentz Transformation and the Interval (Part II, Chapter 9)#exercises.

  1. (R) gives γ² = 1/(1 − v²), which needs 1 − v² > 0. Then there are exactly two roots, ±1/√(1 − v²). If |v| = 1, (R) reads 0 = 1; if |v| > 1, γ² would be negative. Either way, no real γ.
  2. t′ = −(5/4)(5 − 9/5) = −4 and x′ = −(5/4)(3 − 3) = 0. The interval is 16 − 0 = 16 = 25 − 9. The image happens at t′ = −4, before the origin event.
  3. γ² = 1/(1 − v²) with 1 − v² > 0, and γ > 0 selects the positive root 1/√(1 − v²).
  4. Δt′ ∝ 1 − 2v, which is negative for v > 1/2; v = 3/4 works. For (2, 1), Δt′ ∝ 2 − v > 0 whenever |v| < 1, because the pair is timelike.
  5. k = √3 and √2, product √6. Then v = (6 − 1)/(6 + 1) = 5/7, and (1/2 + 1/3)/(1 + 1/6) = 5/7.

Chapter 10, Mathematics and the World

Exercises: Chapter 19 — Mathematics and the World (Part II, Chapter 10)#exercises.

  1. For example. True under assumptions: settled for F₅ = 641 × 6700417; open for the steps F2 to F5 of Abel’s proof, which are not kernel-checked. Correspondence: recorded for N1 (Fermat); not recorded for the other investigations. Evidence: settled for Euler’s 1732 paper, which was read; open for Fermat’s letter to Frénicle, Torricelli’s Latin and Landry’s 1880 note, which have not been read.
  2. The theorem is about real numbers satisfying γ²(1 − v²) = 1. It does not say that physical frames are related by that transformation rather than by a Galilean one; that is a claim about the world. Observations that tell the two apart include the measured lifetimes of fast-moving unstable particles, clocks compared after travel, and the constancy of the measured speed of light.
  3. That the transcription matches the figure (25 regions, 69 boundaries, the printed colours, and in particular the B3–Gout boundary, which decides the outcome); that the map-to-graph convention (regions meeting at a point are not neighbours) is Heawood’s; and that the computation on the graph is correct.
  4. The comparisons of fractions are settled at the first question. That the counts are Simpson’s is the second. “The treatment helps” is a causal claim about the world, the third question, and the table cannot support it: its own arithmetic shows the advantage disappearing on aggregation, and nothing in it says how patients came to be treated.
  5. The paint fills π((1/x + ε)² − 1/x²) per unit length, which is at least 2πε/x. Integrating from 1 to b gives at least 2πε ln b, which tends to ∞. A coat of thickness equal to the radius fills the horn completely, so its volume is π. That is no surprise: filling is coating with a thickness that shrinks with the radius.

Part III

Chapter 1, The Claim Contract

Exercises: Chapter 20 — The Claim Contract (Part III, Chapter 1)#try-it-yourself.

  1. Haraux and Grasshopper (evidence kind historical: their kernel evidence is an earlier run, imported and verified) and Kempe (computation: no proof assistant is involved at all).
  2. N1-P05, N1-P06 and N1-P07. They are checked in Lean only: two are context (the first five Fermat numbers are prime; 6700417 is prime) and one ties the numbers to Mathlib’s own definition of Fermat numbers, which has no Rocq counterpart. With only one formal statement there is no cross-system relation to argue, so they need no bridges.
  3. The Lean check fails: the kernel refuses to bind fermat_claim_false to the edited statement, so that declaration is not accepted, and the run ends run_failed. Rocq and the computation still pass, which does not help: one failed check is enough.
  4. “the claim contract has changed since this run”. It is correct because that run’s evidence, and its approval, are for the contract as it was, with hash ef384bbf….
  5. The Lean statement ∀ n : Nat, 0 + n = n became ∀ n : Nat, n + 0 = n, which is true by definition. Running the gates against it would test them against a different claim, and the result would be credited to the original. Pinning the claim’s hash makes the claim itself unchangeable for the demonstration: any edit stops it before it starts.

Chapter 2, Running an Investigation

Exercises: Chapter 21 — Running an Investigation (Part III, Chapter 2)#try-it-yourself.

  1. Inside the image: computed_correspondence_pending. Outside: checked_unpinned. The function is_pinned decides: it requires the image identifier (or the image’s build manifest), which only exists inside math-env.
  2. First: changed: notebook.md. Second: missing: runs/compute/run.log.
  3. partial_run. The contract says what a full run checks, including Rocq; a run that skipped Rocq has not done that, however well the rest went.
  4. No. prepare_workspace in docker/mathenv runs git clean, which removes untracked files from the scratch copy, unless MATHENV_KEEP_UNTRACKED=1.
  5. The 78 files under math-inv-02/kernel-runs/2026-11-13-02f-run2/ were produced by the 02F procedure (run 20261113T013549Z-a7525cef). The reader’s run produced its own result.json, notebooks, the two ledger computations, the control’s record and the verification of those 78 files.

Chapter 3, Statement Identity

Exercises: Chapter 22 — Statement Identity (Part III, Chapter 3)#try-it-yourself.

  1. For example theorem bind6 : ∀ n : Nat, HAdd.hAdd 0 n = n := @A (the function behind +, written out). The kernel accepts it: it is the same proposition in another notation. Your own theorems will give other examples; what matters is that renaming and unfolding notation pass, while any change to what is asserted fails.
  2. For example ∀ n : Nat, n + 0 = n ∧ 0 + n = n and (∀ n : Nat, n + 0 = n) ∧ (∀ n : Nat, 0 + n = n). Each follows from the other without classical logic, but they are different propositions. Binding one to a proof of the other is refused (checked with Lean 4.35). Beware of examples such as n + 0 = n against n = n + 0: since n + 0 reduces to n by definition, those two are definitionally equal, and the binding accepts them.
  3. The Lean fingerprint would not change, because bound-variable names are erased before hashing. The Rocq fingerprint would change if the Rocq statement were renamed too, because Rocq prints bound-variable names. Both bindings would still be accepted: renaming does not change the proposition, and both kernels compare up to renaming.
  4. The new contract hash in every later run; Gabriel’s approval (if one existed) lapsing, so the status falls to …_pending; --verify on the v2 run reporting that the contract has changed; the git history of both files; and, if fingerprints are compared between runs, a changed fingerprint for the area theorem.
  5. A gate must not depend on how hard it searched: refusing an equivalent statement costs a person one extra proved proposition, while accepting a non-equivalent one would credit the wrong claim. A mathematician, in contrast, treats equivalent statements as interchangeable all the time; the point is to prove the equivalence once, explicitly, rather than to let a gate assume it.

Chapter 4, Failure Controls

Exercises: Chapter 23 — Failure Controls (Part III, Chapter 4)#try-it-yourself.

  1. The mutated file is identical to the original, so it compiles: the control reports “accepted” and fails, and the run ends run_failed. That is the right outcome: a control that cannot detect anything must not pass.
  2. The kernel’s first error is on line 112, twelve lines after the change on line 100, so with a window of 3 the control would report “rejected elsewhere”, fail, and the run would end run_failed. That is a stricter test of locality, but here it would be wrong about the mathematics: the change is what breaks the proof, and Lean reports it where the proof stops working. The window is a judgement about where errors can legitimately appear.
  3. If the verdict is unchanged, the result does not depend on that particular boundary. That is evidence of robustness to one change, not to every possible misreading; it says nothing about boundaries you did not try.
  4. Otherwise a broken file (or a missing tool, or a timeout) would make every binding fail, and the control would “pass” without testing the identity gate at all. Requiring the original to compile and the declaration to exist isolates the refusal to the binding.
  5. It would catch a demonstration that ignored --claim, or stopped checking the claim’s hash: the tampered claim would then be run, and the words would not appear. It would not catch a mistake in either gate’s logic, or a wrong expected outcome for one of the four cases; those are tested by the demonstration’s own case expectations.

Chapter 5, Statuses and Approvals

Exercises: Chapter 24 — Statuses and Approvals (Part III, Chapter 5)#try-it-yourself.

  1. kernel_checked_correspondence_pending. The role assistant is not in APPROVING_ROLES, so the record is ignored.
  2. Still pending: the record’s contract_sha256 no longer matches the Fermat contract, so the hash condition in valid_approvals excludes it.
  3. kernel_checked_correspondence_pending. The edit changed the contract’s hash, so the existing approval no longer applies. A new approval record pinned to the new hash would be required before the status changes.
  4. It would assert that heawood-fig18.json faithfully records Heawood’s Fig. 18 (its regions, printed colours and shared boundaries), so that the computation is about Heawood’s map. It would still not assert anything kernel-checked, anything about Kempe’s own 1879 text, or that the reading has been independently checked.
  5. An approval is about the contract, not about a run. If a later run fails a check (say, a tool behaves differently), the status rule run_failed comes first and the approval changes nothing.

Chapter 6, Records and Notebooks

Exercises: Chapter 25 — Records and Notebooks (Part III, Chapter 6)#try-it-yourself.

  1. Both report evidence intact. Verification hashes file contents and compares paths inside the directory, so the directory’s own location does not matter.
  2. In SHA256SUMS, which covers every file in the directory, and in result.json, under the Lean check’s logs. The second ties the record to the exact logs it was derived from, so the record still names them even if the directory is split up or the manifest is lost.
  3. Three: changed: result.json, and both notebook.md and notebook.ipynb “is not bound to this result.json”, because each quotes the hash of the original record.
  4. Simpson v1: “the claim contract has changed since this run”, because the current contract is v2. Simpson v2: evidence intact. Both runs are kept; each is evidence for its own contract.
  5. The run would fail with the archive check reporting that the manifest does not match its pin. Step 2 of the chain catches it: the contract pins the manifest’s own hash, so a rewritten manifest is detected even though it matches the replaced file.

Chapter 7, Auditing Someone Else’s Proof

Exercises: Chapter 26 — Auditing Someone Else’s Proof (Part III, Chapter 7)#try-it-yourself.

  1. lean-toolchain names only the Lean version. lake-manifest.json names the exact commit of every dependency, Mathlib included, which is what decides whether the proofs still go through.
  2. Because a declaration can depend on sorry without containing the word: the gap is inherited through the declarations it uses (Chapter 16 — What a Proof Rests On (Part II, Chapter 7)), and only the axiom report follows that dependency. Conversely, the word can appear in a comment or string without any gap.
  3. Not in the sense of the standard axioms. It is proved assuming choice_strong. Before deciding, you need to know what choice_strong states, whether it is consistent with Lean’s logic, whether it is a known and accepted principle, and whether the claim is meant to hold with it. A project axiom is a finding to explain, not a pass.
  4. It is independent of any edit made to the file under test, because it was frozen from the published original and pinned by hash, so a substituted statement cannot match it. It is not independent of the artifact’s author: it is still the author’s formalization, so it cannot show that the formalization says what the olympiad problem says. That needs a separate reading of the problem.
  5. For example: “A Lean file published with the paper proves four supporting lemmas, but the main theorem, the olympiad problem itself, is left unproved: its proof is a placeholder that Lean accepts only by assuming it. Whether the file’s statement matches the competition problem has not been checked.”

Chapter 8, AI as Proposer, Not Authority

Exercises: Chapter 27 — AI as Proposer, Not Authority (Part III, Chapter 8)#try-it-yourself.

  1. When the suggestion (ISS-07) was turned into a Lean fixture, compiled, and run through the ingestion code, and the ingestor was observed crediting a proof of True to the original proposition (confirmed as ISS-09). Until then it was a plausible idea.
  2. For example, compare the proofs after normalizing away tactic spelling, or compare the sequence of intermediate facts each proof establishes (here, the same factorization in all three). Even a good measure could not tell you whether two routes are mathematically interesting, or whether a different route exists that nobody tried.
  3. Open the scan of Charig’s Table I, find the printed number for that cell, and compare it, digit by digit, with the transcription, together with the row and column labels and any footnote. You would trust it less if the scan is unclear at that cell, if the printed totals do not add up, or if a second reading disagrees.
  4. It should be recorded as an argument, not as an approval: it has no approving role, so the runner ignores it. A person may read it, and then decide and record that judgement.
  5. Many answers. One from this book: a person (or a process) wrote the name-only attachment rule of Chapter 5 — The Wrong Theorem (Part I, Chapter 4), an example of trusting a label over what was actually checked. It was caught by an adversarial attack that was executed, not by inspection.

Chapter 9, A Ninth Investigation

Exercises: Chapter 28 — A Ninth Investigation (Part III, Chapter 9)#try-it-yourself.

  1. Add the proposition with statement ∀ n : Nat, 30 ∣ n ^ 5 - n and a proof with the same steps, using 30 in place of 6. decide checks the 30 cases r = 0, …, 29. (Run in the reader walkthrough: 5 of 5 statements accepted.)
  2. The control is refused, “rejected at the mutation”. Mathematically, k = 6, n = 2 is also a counterexample (6 does not divide 62). But the proof of the refutation uses the specific witness four_not_dvd, which is about k = 4; with k = 6 the types no longer match. So this control does not test a mathematical mistake. It shows that the proof is tied to its witness, which is worth knowing, and is why controls must be designed, not just varied.
  3. The status does not change: outside the image it is checked_unpinned, inside it kernel_checked_correspondence_pending. The record does change: the contract has a new hash, and --verify on an earlier run reports that the contract has changed since that run. The kernel never reads the reading. It checks the formal statements only, and the reading exists for the person who judges the correspondence.
  4. The run ends run_failed. At the Lean check, six_dvd_cube_sub is not accepted (“axioms outside the allowed set: sorryAx”, with its binding also reported as not accepted), so 3 of 4 statements pass. One control fails too: lean-wrong-modulus is now accepted, because a theorem proved by sorry accepts any statement, and a control that cannot fail is reported as a failure. (Observed in the reader walkthrough.)
  5. Your own answer. A common difficulty: designing a mutation that breaks the mathematics at the line where it is changed, rather than somewhere later.