Proofs by Machine
Step 7 of ../PLAN.md. Run on 18 November 2026; Lean and Cedar rerun on 22 November 2026 after the decisions in ../ANSWERS.md. Every result below was produced by the command next to it; rerun them from the folders named.
There are two kinds of proof here, and they say different things.
| Kind | Tool | Holds for | Says |
|---|---|---|---|
| About the language | Lean 4.36 | every rule set that type-checks, and every form order | the theorems of Theorems follow from the meaning of the language |
| About one rule set | Cedar 4.15 analyzer (SymCC) with cvc5 1.4.2 | every request and every entity store, for that rule set | this policy set satisfies this specification, or here is a counterexample |
1. Lean: Theorems About the Language
File: Core.lean. Command: lean Core.lean in proofs/lean/. Result on 22 November 2026: exit 0, 24 theorems, no sorry (no step left unproved). A deliberately false theorem added to a copy of the file is rejected, so the file is really being checked. The version of 18 November (12 theorems, non-strict) is kept as lean/Core.lean.bak-2026-11-22.
The key design choice: Restriction N is the type of the effects, not a check. Since decision 1 (strict mode), permit, forbid, cap and boundary all carry a guard of type FG (facts only); only ask and duty carry a PG (facts and readings, readings only positive), and neither releases anything. So for any rule set that type-checks, the release decision does not depend on readings at all. Forms are any FormOrder (reflexive, transitive); the seven forms of the language are one instance.
| Theorem in Lean | THEOREMS.md | In words |
|---|---|---|
noninterference |
T4 | If a forbid or an unlifted boundary applies, nothing is released, for every reading and every form |
caps_hold |
T4.3 | A released form satisfies every cap |
release_reading_free |
T5 (strict) | The release decision is the same for every assignment of readings |
bounded_damage |
T5 | Corollary: the most any model obtains is what the facts alone give |
PG.mono, owed_mono |
A11, T9 | More readings can only add questions and duties, never remove a duty |
duty_neutral |
T9 | Adding a duty rule changes no release |
locality |
T1 + A1 | The decision over all rules equals the decision over the rules that touch the request |
same_rules_same_answer |
T2 | Order and repetition of rules do not change the decision |
capAllows_down, permitsAt_down, downward_closed |
A8 | If a form may be released, every weaker form in the order may too |
agent_bound |
T6 | Through an agent, a release needs the person's permission, the agent's permission and the acts-for fact |
Form.le_refl, Form.le_trans, Form.le_antisymm |
§1.2 | The seven forms are a partial order |
Form.meet_le_left, Form.meet_le_right, Form.le_meet |
§1.2 | Form.meet is the greatest lower bound, so the forms are a (meet-)lattice |
summary_is_not_rows |
C002-b | Pseudonymised rows and a summary are not comparable; their meet is aggregated |
releaseX_sub, noninterference_X, caps_hold_X, releaseX_reading_free |
§2.8–2.11, §3 | Any extra condition on release computed from facts and history (token check, budget, "which use case?", request sets, a failed permit condition) keeps non-interference, the caps and reading-freedom |
Simplifications against SEMANTICS.md, to be removed in later rounds:
- Guards are Boolean formulas over ground atoms. The Datalog evaluation that produces those atoms (§1.6) is not modelled; T2's claim about stratified Datalog rests on the textbook result, not on this file.
- Defaults by class are written as permit and forbid rules over labels, each guarded by "no permit touches the request and no ask applies". Written as plain permits they would disagree with the interpreter in thousands of random problems (experiments/difftest/RESULTS.md).
- The verdict
ask, including "please confirm" (§2.6), is not modelled; the theorems are about release, and ask never releases. - Decision 5 (a failed permit condition), the token check, the budget, "which use case?" and request sets are not modelled one by one. Each is an extra condition on release from facts and history, which
releaseXcovers in general. - The auditor (T8) is not in Lean yet: it needs linear algebra, which needs the Mathlib library.
1b. Lean: Restriction N as a Check (Strict.lean, 25 November 2026)
Core.lean makes Restriction N the type of the effects, so release_reading_free holds by rfl: true by
construction, but a reviewer will call that theorem empty. Strict.lean models what the
interpreter actually does: one guard language for all six effects (a reading may appear anywhere, positively), the
release evaluates every guard with the readings, and a syntactic check strictOK rejects readings in permit,
forbid, cap and boundary guards. Command: lean Strict.lean. Result: exit 0, 15 theorems, no
sorry; a planted false theorem is rejected.
| Theorem | In words |
|---|---|
G.eval_readFree |
a guard without readings means the same under every assignment of readings (induction over guards) |
release_reading_free_of_check |
every rule set that passes the check releases the same under every assignment of readings (induction over rule lists) |
noninterference_of_check |
protection that applies under the facts blocks release under every reading |
check_is_needed |
a one-rule set whose permit reads fails the check and releases under one reading, not another (the Lean twin of cedar/broken.cedar) |
allow_iff_release, allow_reading_free, readings_only_ask |
with three verdicts and the confirmation question: allow is exactly release under the facts; a reading never produces allow; readings move a verdict only between deny and ask |
confirm_is_sound |
a confirmation question is asked only when the proposed declaration (a fact) would release |
G.mono, protects_rf, capAllows_rf, permitsAt_rf, blocked_rf, capsOK_rf, permitted_rf |
the lemmas |
#print axioms on the main theorems of both files lists only propext and Quot.sound (Lean's standard axioms).
Total across the proof files (25 November 2026): 141 theorems: Core.lean 24, Strict.lean 24, Derived.lean 59, Confirm.lean 23 (Lean 4 core), and Auditor.lean 11 (with Mathlib).
2. Cedar: Proofs About a Rule Set
Folder: ../experiments/cedar/. The salary example: a boundary on pay data, a cap at aggregated, a permit for the CEO on a use case the CEO declared and holds (strict mode since 22 November; before, the model's reading), payroll's own permit, and the default for public and internal data. The model's reading is context.reading with context.reading_conf.
Command (in that folder): CVC5=<path to cvc5> cedar symcc --counterexample --principal-type Person --action 'Action::"read"' --resource-type Asset --schema schema.cedarschema implies --policies1 A --policies2 B.
| Check | A | B | Result |
|---|---|---|---|
| Non-interference | policies.cedar |
spec_noninterference.cedar (pay data only to payroll, or to someone who declared a held use case, at most aggregated; does not mention the reading) |
VERIFIED |
| A broken set is caught | broken.cedar (the boundary also lifts when the model reads the use case) |
the same specification | DOES NOT HOLD, with a counterexample: a person with no grants, a reading that names the use case, pay data released |
| A change only adds | policies.cedar |
policies_v2.cedar (adds: deputies of the CEO may read finance reports) |
VERIFIED |
| What the change adds | policies_v2.cedar |
policies.cedar |
DOES NOT HOLD; the counterexample is the newly allowed request: a deputy reading finance_reports |
| The change keeps the boundary | policies_v2.cedar |
the specification | VERIFIED |
All five results are the same after the 22 November change to the permit. The last three rows are T7 in practice: before an owner approves a rule, the analyzer proves what it adds and that it keeps every boundary.
3. ProbLog: The Probabilistic Layer Respects the Boundary
Folder: ../experiments/problog/. salary.pl puts probabilities on the model's readings (which use case, whether the claim fits the task) and none on the protection.
- With no declaration,
P(release) = 0for both requests (problog salary.pl). - An injected request that the model reads with confidence 0.95 has
P(supports) = 0, because the person holds no grant (T5). python sweep.py: under 200 random probability assignments, the highestP(release)with no declaration is0.0. After both requesters declare the use case, the CEO's request hasP(release) = 0.552(to be compared with the thresholds for allow and ask), the injected one still0.0.
This is a test over sampled probabilities, not a proof. The proof is the Lean theorem noninterference, which holds for every reading.
4. Closed on 25 November 2026
| Item | Where | Result |
|---|---|---|
| The auditor (T8) in Lean | lean-mathlib/ (lake build) |
10 theorems with Mathlib v4.36.0, no sorry, axioms propext, Classical.choice, Quot.sound. The span test is exact (exposed_iff_determined); after an accepted query no value is determined (accept_hides_every_value); the decision reads populations only (audit_simulatable, by construction); k and the 1..k−1 differencing rule |
| Certificates and a checker (T3) | ../experiments/kernel/CERTIFICATES.md | every decision carries a certificate; checker.py imports neither core nor world; 13,291 of 13,291 suite certificates accepted, 3,108 of 3,108 mutated certificates rejected (11 classes) |
| Interpreter against Lean | ../experiments/difftest/RESULTS.md | fourth run: zero release and zero verdict disagreements in 40,000 random problems and 12,699 of 13,298 suite calls; two hand-built problems left (below) |
| Cedar on the full form lattice | ../experiments/cedar/lattice/RESULTS.md | the five salary checks repeated; C002 (rows and summaries mixed) verified, a broken variant caught; 49 of 49 order pairs and meets equal core.py |
5. Not Yet Proved, or Not Yet Agreed
- Tied offers (an open design decision). After four difftest runs and fixes on both sides, the interpreter and
Strict.lean'sdecideMagree on every release and every verdict (40,000 random problems, 12,699 suite calls). Two hand-built problems remain: two tied offers (anonymised, summarised) followed by an agent cap (h1) or a minimum form (h2). The interpreter picks one offer by tie-break first and gives less; the model combines whole sets. Needs a decision on the reading. - The checker is tested, not proved; it is linear in the certificate plus the fact lists it scans to confirm completeness.
- The Lean auditor proves the property of the span, not the Python elimination in
exposed()(that is tested). - No two-run check in Cedar: SymCC's analyses are one-run, so reading-independence remains the Lean theorem.
- Scallop: not on PyPI for this machine; ProbLog covers the probabilistic layer for now.