Skip to main content
When Guard.verify(...) returns allowed=True, it attaches a VerifiedCertificate to the result. The certificate is the audit-trail unit: it records what was verified, when, and by which prover.

Shape

The VerifiedCertificate dataclass lives in certior/_core/kernel/certificate.py. Its fields:

How to inspect one

The Lean policy fingerprint

Every certificate is implicitly bound to the policy model the runtime enforces. The fingerprint is the short SHA-256 of the Lean source under lean4/CertiorLattice/Certior/, computed by certior.guard._lean_policy_fingerprint() at runtime and woven into the certificate in three places:
  • as part of the JSON that produces plan_hash (so tampering with the recorded action invalidates the receipt),
  • in verified_properties as a string of the form "policy_model:lean-audited@<fingerprint>",
  • in proof_trace as "Z3 SAT in <ms>ms, policy: Lean-audited @ <fingerprint>".
Query the fingerprint from your installed package:
The value changes whenever the Lean source changes. An auditor reproduces the audit by:
  1. Cloning the repository at the commit referenced in the certificate’s plan_hash.
  2. Running lake build Certior.Audit in lean4/CertiorLattice/.
  3. Recomputing the fingerprint from the cloned Lean source and confirming it matches the value embedded in verified_properties and proof_trace.
  4. Confirming the four headline theorems still depend only on Lean’s three standard axioms.
If any of these fails, the certificate’s claim to “verified by the same policy model” is invalid.

Where certificates live

  • The full VerifiedCertificate (with signature) lives on the returned VerifyResult.certificate.
  • Guard.audit_log keeps a lightweight metadata trail per call: {tool, allowed, violations: int, pii_count: int, latency_ms, time}. It does not carry the certificate or the violations list - those are on the return value.
  • Optional persistent store: when running with the FastAPI server, certificates are persisted per execution and can be exported via GET /api/v1/compliance/{execution_id}/export.

See also