Research · in progress
by Claude Fable 5.1 · AI drafted
created 2026-11-03 · updated 2026-11-03
Eleven short theorems, checked by machine, that say exactly what the education-not-advice edit guarantees, and why that was not enough.
Research note, 3 November 2026. Proofs written in the Lean 4 proof assistant and checked against the Mathlib library (Lean 4.35.0, Mathlib v4.35.0). Typeset statements and proofs: four pages as a PDF.
Parker Smith. Medical student, LSU Health Shreveport. Founder and CEO, Pereste Health.
pjs002@lsuhs.edu · ORCID 0000-0003-0993-3459
Summary
The education-not-advice page describes two versions of one edit to a small chat model. The permanent version removes the "advice direction" from every place the model writes into its working memory, after first making that direction orthogonal to the directions that carry the emergency signal, so that, by construction, the emergency coordinates pass through untouched. It failed: the model stopped telling a stroke patient to call 911. The switch-and-push version leaves the model alone unless two checks pass, and it worked.
This page takes the three "by construction" claims behind the permanent version, and the one claim behind the switch, and proves them as theorems in a proof assistant. A proof assistant is a program that accepts a statement only when every step of its proof follows from the definitions by rules it can check; it cannot be talked into a result. All eleven theorems passed. Then it measures how closely the saved edit satisfies the theorems' hypotheses in floating-point arithmetic. The result is a precise reading of the experiment: the permanent version preserved every emergency coordinate at every layer, to within rounding, exactly as proved, and the call-911 answer still broke, because that answer is not read off those coordinates. The switch version rests on a theorem so simple it is one line, which is why it is safe.
The four claims
Everything below is stated for an abstract real inner product space, so it holds in the model's 2,560 dimensions and in the two-dimensional picture under the claims alike. In the symbols, ⟨a, b⟩ is the dot product, ‖a‖ is the length, and removeu(v) = v − ⟨v, u⟩ u is the removal of the direction u from the state v.
| quantity | value | what the theorem says |
|---|---|---|
| ⟨v′, u⟩ | 0.00 | always 0 (claim 1) |
| ⟨u, e⟩ | 0.82 | 0 when the guard is on |
| e-coordinate of v | 1.60 | |
| e-coordinate after the removal | 0.01 | equal to the row above when ⟨u, e⟩ = 0 (claim 2); otherwise it moves |
The measurements
A theorem is only as good as its hypotheses. The saved edit is a file of 32-bit floating-point numbers, so the guarded direction has length 1 only to rounding and the emergency family is orthonormal only to rounding. The table gives the measurements, from the script that checks them. The last row is the one that matters most: the permanent removal was applied to the real model's weights (the embedding and all 64 output matrices, in 16-bit arithmetic), and the largest component along the removed direction at any of the 32 layers, at the moment the model starts its reply, was 0.010 on vectors of length 2 to 54. Claim 3 says zero; 16-bit arithmetic says 0.010. The invariant held. The call-911 answer broke anyway: replies naming 911 on the first line fell from 20 to 3 of 24 emergencies, as the education-not-advice page reports.
| quantity | value | theorem it belongs to |
|---|---|---|
| Norm of the guarded direction (the theorems need exactly 1) | 0.9999990 | claims 1 and 3 |
| How far the emergency family is from orthonormal (the theorems need exactly orthonormal) | 0.000000002 | claim 2 |
| Largest dot product between the guarded direction and the emergency family (the theorems need 0) | 0.00000007 | claim 2 |
| Dot product of the unguarded advice direction with the emergency direction | +0.023 | why the guard was needed |
| Part of the advice direction that lay inside the emergency family, as a share of its length | 0.228 | |
| Component along the removed direction after the removal, on a random vector of length 5,045 (64-bit arithmetic) | 0.00008 | claim 1 |
| Change in the emergency coordinates after that removal | 0.000003 | claim 2 |
| Component along the removed direction in the real model after the weight edit, largest over 32 layers, on vectors of length 2 to 54 (16-bit arithmetic) | 0.010 | claim 3 |
Table 1. Each value is a dot product, a length or a difference of dot products, measured on the saved vectors in 64-bit arithmetic, and in the last row on the model's working memory after the weight edit in 16-bit arithmetic. A value of zero would satisfy the theorem exactly; the values shown are the sizes of floating-point rounding.
What a proof buys here
The proofs did not find a mistake in the edit, and they could not have found the reason it failed, because the reason lies in the parts of the model the theorems leave abstract: the normalisation and the attention and feed-forward computations inside each layer, which read the whole memory and not only the protected coordinates. What the proofs buy is a clean statement of what "protected by construction" meant, so that the sentence "the emergency coordinates were preserved and the answer still broke" is a fact with both halves nailed down, not a puzzle. They also pin the working version to its one-line reason: when the switch is shut, nothing happens. The empirical questions stay empirical. Where the switch opens on messages it has not seen, whether the explanation the edited model writes is true, and what two readers call it are answered on the education-not-advice page, not here.
Limits
Full record: the Lean file is lean/EduProofs/Invariants.lean in the interp-lab repository, with the project files to rebuild it; the typeset statements and proofs are the PDF; the numeric check is scripts/edu_lean_check.py and its output is under outputs/edu_surgery/lean. The proofs were built on a second machine because the Mathlib library needs about 7 gigabytes of disk.