|
Download lean/proofs/README.md from Snapkitty/hyperkitty-constraint-dsl: direct link, hf CLI and curl.
- Browser
- Download file 1.36 kB
-
https://huggingface.co/Snapkitty/hyperkitty-constraint-dsl/resolve/main/lean/proofs/README.md
- Command line
-
hf download hf://Snapkitty/hyperkitty-constraint-dsl/lean/proofs/README.md
-
curl -L -o README.md https://huggingface.co/Snapkitty/hyperkitty-constraint-dsl/resolve/main/lean/proofs/README.md
1.36 kB
| # Lean 4 Formal Proofs | |
| Two policy kernels formalized in Lean 4. | |
| ## policy-kernel/ | |
| Sovereign Policy Kernel β verdict algebra and policy DSL. | |
| **Key types:** | |
| - `Verdict` β canonical verdict algebra (`approve | reject | defer | escalate | human_required`) | |
| - `Context` β policy evaluation context (actor DID, task type, evidence, nonce) | |
| - `Evidence` β hash URIs, signatures, byte arrays | |
| - `Policy Ο` β typeclass: any policy ID β `Context β Verdict` | |
| - `Verdict.combine` β priority-based combination (escalate > human_required > reject > defer > approve) | |
| **Build:** | |
| ```bash | |
| cd policy-kernel && lake build | |
| ``` | |
| ## bifrost-policy/ | |
| Bifrost event validity β formal propositions + Boolean decision procedure. | |
| **Key definitions:** | |
| - `validJitCompile` β SoulIR sealed β§ WASM fresh | |
| - `validCapTransfer` β policyCid sealed β¨ zero, capHash in map β¨ zero | |
| - `validAttestation` β epoch root matches state | |
| - `decide` β computable Bool (single source of truth for `bifrost-policy/src/lib.rs::policy_decide`) | |
| - `decide_sound` β soundness theorem: `decide e s = true β validEvent e s` (**sorry** β Week 3 P0) | |
| **Note:** `bifrost-policy/` imports `Bifrost.State` which lives in the `snap-os` workspace. | |
| Full build requires `snap-os/bifrost-policy/lean/`. This directory contains the policy proofs only. | |