The three gates
| Gate | What it checks | How |
|---|---|---|
| Capability | Does the agent’s permission set contain every capability the tool requires? In a delegation chain, is the child’s set a subset of the parent’s? | Z3 (per call) + Lean (offline proof of the rule) |
| Content | Does the content satisfy the active policy: PII redaction (HIPAA), MNPI block (SOX), attorney-client (legal_privilege), or a custom rule set? | Keyword + regex content scanner + PII detector |
| Budget | Is cost_cents for this call ≤ the budget remaining on the guard? Every successful call debits. | Z3 verifies, Guard ledger tracks |
What Z3 actually proves at runtime
For eachverify(...) call with non-wildcard permissions, Certior encodes the question in SMT:
- The agent’s capability token, as a set of strings.
- The tool’s required capability set.
- The cost of this call.
- The budget remaining on the guard.
cost ≤ remaining. SAT means the call is admitted and a signed certificate is issued. UNSAT means the call is blocked and the precise reason is recorded.
This runs in single-digit milliseconds.
What Lean proves offline
Z3 enforces the rule at runtime. Lean 4 proves the rule is sound. The proven properties live inlean4/CertiorLattice/Certior/:
Lattice.lean- the information-flow lattice is a join-semilattice that respects the policy ordering.Delegation.lean- any child guard’s permission set is a subset of the parent’s; no chain can escalate.Encoding.lean- the Python-side capability encoding is a sound abstraction of the Lean model.Composition.lean- composing two policies yields a policy at least as restrictive as either input.
Audit.lean runs #print axioms against the four headline guarantees - Certior.Delegation.delegationSafety, Certior.Encoding.ifcSoundness, Certior.Composition.compositionSoundness, and SecurityLevel.isValidBoundedLattice - and fails the build if any of them depends on anything beyond Lean’s three standard axioms (propext, Classical.choice, Quot.sound). The result is that “proven sound” cannot regress without CI catching it.
What is not proven
Certior does not verify the LLM’s behaviour, the correctness of the tool implementation, or the fidelity of the content scanner’s heuristics on inputs outside its rule set. It verifies the boundary the LLM operates inside.See also
- Capability model - how permissions, delegation, and subset checking work.
- Certificates - the shape of a signed receipt.
- Compliance policies - what HIPAA / SOX /
legal_privilegeactually enforce. - Lean binary - building the optional Lean live verifier.