Z3 is the theorem prover used in safety-critical systems — aerospace certification, nuclear reactor safety, cryptographic protocol analysis. DOF uses Z3 to prove governance invariants mathematically. Not monitored. Proven.Documentation Index
Fetch the complete documentation index at: https://cyberpaisa-dof-mesh-40-27.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The 4 SMT Theorems
| Theorem | Formal statement |
|---|---|
GCR_INVARIANT | GCR(f) = 1.0 for all f ∈ [0,1] |
SS_FORMULA | SS(f) = 1 − f³ for all f ∈ [0,1] under r = 2 |
SS_MONOTONICITY | For all f1 < f2: SS(f1) > SS(f2) |
SS_BOUNDARIES | SS(0) = 1.0 and SS(1) = 0.0 |
8 State Invariants (TransitionVerifier)
core/transitions.py verifies state transitions across all 9 transition types:
| ID | Invariant |
|---|---|
| INV-1 | threat_detected → NOT publish_allowed |
| INV-2 | trust_score < 0.4 → attestation_count == 0 |
| INV-3 | hierarchy_level_next <= hierarchy_level + 1 |
| INV-4 | 0 <= trust_score <= 1 |
| INV-5 | cooldown_active → NOT publish_allowed |
| INV-6 | hierarchy_level == 3 → trust_score > 0.8 |
| INV-7 | safety_score == 1 - failure_rate³ |
| INV-8 | governance_violation → hierarchy_level_next < hierarchy_level |
9 Transition Types
logs/z3_proofs.json.
The Z3 Gate
File:core/z3_gate.py — neurosymbolic interface between LLM proposals and formal proofs.
| Verdict | Meaning |
|---|---|
APPROVED | All constraints satisfied, proof complete |
REJECTED | At least one constraint violated |
TIMEOUT | Solver exceeded time budget (default: 5s) |
FALLBACK | Z3 unavailable — rule-based governance only |
ProofResult States
42 Hierarchy Patterns
HierarchyZ3 verifies that SYSTEM > USER > ASSISTANT holds under:
- 6 override patterns
- 11 escalation patterns
- 25 additional hierarchy patterns
Cryptographic Proof Chain
| Module | Role |
|---|---|
core/zk_governance_proof.py | keccak256 per decision |
core/zk_batch_prover.py | Merkle tree + batch accumulation |
core/merkle_tree.py | Merkle implementation |
core/proof_storage.py | Local proof persistence |
Verify On-Chain (Anyone)
On-Chain Attestations
Full deployment table — 9 chains
Z3 API Reference
Z3Verifier and Z3Gate full API