Documentation

Docs

Theorems

Step 4 of the research plan. Draft of 17 November 2026, revised 22 November 2026 (strict mode, form lattice, duties). Proofs on paper. Step 7 checks them by machine: Proofs by Machine.

Notation as in Semantics. R is a rule set satisfying Restrictions D and N, Φ a fact base, Ρ a reading set, H a history.


T1. Retrieval by Entity Is Complete

Statement. Let the index map each entity e to the rules with an anchor on e. For a request r, let Cand(r) = ⋃ { index(e′) | e ∈ ents(r), e′ ∈ ↑e }. Then Rel(r, R) ⊆ Cand(r).

Proof. Take ρ ∈ Rel(r, R). A rule has at least one anchor (a rule with no anchors is rejected: it would touch every request and is written as a default instead). Take any anchor (role, e). By touches, some e_r filling role has e_r ⊑ e, so e ∈ ↑e_r and e_r ∈ ents(r). ρ ∈ index(e), so ρ ∈ Cand(r). ∎

Why it matters. "Search the rules by the entities involved" loses nothing. Together with A1, the decision computed on the retrieved rules equals the decision on the whole rule set. The proof needs anchors to be the only way a rule refers to the request's entities: a guard may mention other entities (an owner, a grant) but those are looked up in facts, not used for retrieval.


T2. Unique, Order-Free, Terminating

Statement. decide is a total function of (r, set(R), Φ, Ρ, H); it terminates in time polynomial in |Φ| + |Ρ| + |E| for a fixed R.

Proof. Under Restriction D the program is stratified, so it has a unique perfect model (Apt, Blair and Walker, 1988), computable bottom-up in polynomial data complexity. The transitive closure of ⊑ over a finite E is computed in O(|E|³). App is a set defined from that model. The combination in §2.3–2.4 uses meets in a finite lattice, min on verdicts, the highest offer and emptiness tests over finite sets, which do not depend on order. (Between two incomparable offers of equal height the first in the rule book is named; that changes the reason given, never whether something is released, which is what Lean's same_rules_same_answer is about.) The auditor computes the rank of a rational matrix with at most |H| + 1 rows, in polynomial time. ∎


T3. Every Verdict Can Be Checked

Statement. For each decision there is a certificate (the reasons of §2.6) that a checker can verify in time linear in its size, without the rule set's evaluator, and the checker accepts exactly the correct verdicts.

Proof sketch. A certificate lists (a) for each applicable rule, a derivation tree of its guard from facts and readings; (b) for a deny by default, by forbid or by boundary, the deciding rule only (one applicable forbid suffices by A5); (c) for an allow, the permit rule fixing the ceiling and every cap rule. The checker verifies each derivation step against Φ ∪ Ρ and the clauses. For an allow, it must also know that no forbid or boundary applies, which is a negative fact; the certificate therefore includes, for every forbid and boundary rule in Rel(r) (finite, by T1), the failing literal of its guard. Each check is a lookup. ∎

Note. "Accepts exactly the correct verdicts" needs the checker to receive Rel(r) from a trusted index; a certificate cannot prove that no other rule exists. This is where T1 is used.


T4. Non-Interference: The Model Cannot Cross a Boundary

Statement. For all r, Φ, H and all reading sets Ρ, Ρ′:

  1. blocked(r), App_forbid(r), App_cap(r) and, in strict mode, App_permit(r) are the same under Ρ and Ρ′.
  2. Consequently, if decide(r, R, Φ, ∅, H) is deny because of a forbid or a boundary, then decide(r, R, Φ, Ρ, H) is deny for every Ρ.
  3. The released form under any Ρ is at most capped(r), which does not depend on Ρ.

Proof. By Restriction N, no reading predicate occurs in a forbid, cap or boundary guard, nor in any derived predicate those guards use (checked on the dependency graph), nor in lifted (which uses only declared, grant and owner, all facts). The least model restricted to the predicates those guards depend on is therefore the same for Ρ and Ρ′ (the stratification puts readings in strata those predicates do not depend on). So the three sets of applicable rules are equal. Point 2 follows from §2.3, where a forbid or an unlifted boundary gives deny before permits are looked at. Point 3 follows from form_s ≤ capped. ∎

What it says in words. A model that is wrong, fooled or injected can change which use case seems to apply. It cannot remove a prohibition, lift a boundary or raise a cap.


T5. Readings Never Release (Strict Mode, Decision 1)

Statement. For all r, Φ, H and all reading sets Ρ, Ρ′, whether decide releases, and at which form, is the same under Ρ and Ρ′. A reading can change the verdict only from deny or default to ask ("please confirm"), never to allow.

Proof. In strict mode no reading occurs in a permit, forbid, cap or boundary guard or in anything they depend on, so all five sets of applicable rules of §2.3 are the same under Ρ and Ρ′, and so are the verdict and form of §2.3–2.5. §2.6 can only replace a non-allow by ask. ∎ Machine-checked as release_reading_free in Core.lean; tested on every rule book by test_strict_readings_never_release.

What it says in words. No model, however wrong, fooled or injected, changes what anyone receives. It can only cause the requester to be asked, and the answer makes the requester accountable.

The Earlier, Weaker Form (Non-Strict Mode, Kept for Comparison)

Statement. Call U(s, t) = { u | grant(s, u, I, _) ∈ Φ, t ∈ I } the use cases the subject holds. Assume every reading-dependent permit guard has the form reads_usecase(r, u) ∧ grant(s, u, I, _) ∧ ψ with ψ over facts only (the grant-guarded form). Then for every Ρ:

decide(r, Φ, Ρ)  ≤  max over u ∈ U(s, t) ∪ {none} of  decide(r, Φ, {reads_usecase(r, u)})

in both verdict and form.

Proof. By A11 readings enter only positively. Under the grant-guarded form, a reading reads_usecase(r, u) can make a permit apply only if grant(s, u, …) holds, so only readings naming u ∈ U(s, t) matter; readings naming any other use case change nothing (and readings of other predicates are excluded by the form). Permits combine by max of their ceilings, and the forbid, cap and boundary sets are fixed (T4). So the outcome under Ρ is the outcome under the single most generous held use case among those Ρ names, which is at most the maximum over all held use cases. ∎

What it says in words. Whatever the model reads, the requester receives no more than they would by honestly naming the most generous use case they already hold. The model cannot invent entitlements. What remains open is purpose misuse: a person who holds use case A and asks for it while really doing B. That is the job of the probabilistic layer, the confirmation step and the auditor, not of the logic.

This was T5 before decision 1. It still describes a deployment that chooses the non-strict mode; version 1 of the language is strict.


T6. The Agent Bound

Statement. decide(r with agent a) ≤ decide(r without agent) and ≤ the agent's own result, in both verdict and form.

Proof. Immediate from §2.4, where both are combined by min. ∎


T7. The Effect of a Change Is Exactly Computable

Statement. For rule sets R, R′ over the same finite entity set and fact schema, the set Δ = { r | decide(r, R) ≠ decide(r, R′) } is decidable, and for a fixed Φ it is finite and can be listed.

Proof. For fixed Φ, requests range over the finite product of entities per role, the finite form scale and the finite set of use cases that readings can name. Each decision is computable (T2). For Φ left free, each rule's guard is a quantifier-free formula over finite sorts once entities are fixed, so decide(r, R) ≠ decide(r, R′) is a formula of the theory solved by SMT solvers with finite domains; satisfiability is decidable. ∎

What it says in words. Before an owner approves a rule, the system can show every request whose answer it changes, for the current facts, and can prove properties such as "no new request reaches pay data" for all possible facts.


T8. The Auditor Never Reveals One Value, and Its Refusals Reveal Nothing

Statement. Let M = H_s ∪ {v_q} be the released sum vectors after accepting q. If audit accepts, then for every person i there are two value vectors m, m′ with M·m = M·m′ and m_i ≠ m′_i. And the decision of audit is a function of H_s and pop(q) only.

Proof. e_i ∉ span(M) (accepted). Then there is a vector d with M·d = 0 and d_i ≠ 0 (the orthogonal complement of the row space contains a vector not orthogonal to e_i, since otherwise e_i would lie in the row space). Take m′ = m + d. The second claim is the definition of audit. ∎

Limits. Exact equality only: this does not cover narrow bounds (a person's value known to lie within a small range), real-valued bounds from many sums (the interval problem), maxima or dominance. Those need their own auditors, or differential privacy.


T9. Duties Are Neutral, and Readings Only Add Them

Statement. Adding a duty rule to a rule set changes no release. If Ρ ⊆ Ρ′, every duty owed under Ρ is owed under Ρ′.

Proof. duty is neither a protection, a cap nor a permit, so it enters none of the sets of §2.3. Duty guards use readings only positively. ∎ Lean: duty_neutral, owed_mono.


What Is Not a Theorem

  • That labels are correct, that identity is correct, that an approval meant what the approver intended. All theorems are conditional on Φ.
  • That the use case a person declares is the one they are really pursuing.
  • That an outside organisation enforces a restriction after data reaches it.

Last built 2026-11-25