Formal Assurance Substrates, Kernel Lineage, and Adversarial Red-Teaming
Primary-Source Dossier (05-formal-assurance-kernels-and-redteaming.md) Scope: Formal Assurance Techniques (Lean 4, HOL4/CakeML, ACL2, TLA+/Kani/Loom/MIR), Kernel Lineage (breadstuffs → minidregg → nanodregg + fn + verifereum), Adversarial Red-Teaming, Anti-Vacuity Engineering, and Computable Law (degg-research).
(Biographical boundary note: Prior to building the independent Dregg/Robigalia stack, Ember worked at Hellas on workload verification; no Hellas source code is included or claimed as Ember's open property in this dossier.)
1. The Four Formal Methods Substrates & How They Execute in Production
Across Ember's systems, formal methods are not post-hoc documentation layers or paper-only models. Four distinct theorem-proving and model-checking substrates—Lean 4, HOL4 / CakeML / Pancake, ACL2, and TLA+ / Kani / Loom / Isabelle (via Rust MIR extraction)—execute directly in production or compile/verify the exact machine-code and EVM bytecode artifacts that run on the wire.
flowchart TD
subgraph Lean4["Substrate 1: Lean 4 (Running Kernel & Circuit Compiler)"]
B["breadstuffs/metatheory/Dregg2 (2,352 files, 1.27M LOC)\nFFIDirect.lean -> produce_via_lean C-ABI\nDescriptorIR2.lean + EmitByName.lean (90+ AIR JSONs)"]
M["minidregg (166 files, 169k LOC)\nKernel/World.lean + HostRefinesWorldCore.lean\nCompiler/Emit.lean + ObjectiveBendC4 + LawSat (Farkas/Bellman-Ford)\nGenericSimplexEngineSafety.lean"]
N["nanodregg (CHARTER.md 12 Laws)\nKernel/World.lean (4 Trie.T instances)\nCodec/Stream.lean + Host/Loop.lean + Protocol/Rows.lean"]
LU["leanuweave (PREOSCRIPTING.md)\nFuture-relative evidence + proof-carrying repair"]
SC["soundcalc-lean\nExact Q/N zkVM soundness calculator"]
B --> M --> N
end
subgraph HOL4["Substrate 2: HOL4 + CakeML / Pancake (EVM & x86-64 Silicon)"]
VF["verifereum/examples/dregg*Script.sml\nUniversal separation-logic SPECs over forge EVM runtime bytecode"]
DA["dreggnet-engine/model/dreggnetArenaScript.sml\nZero-copy HTTP arena bounds safety"]
OC["breadstuffs/orb-compiler + drorb\nLean HTTP serve -> Pancake -> CakeML x64_config\n1,868 concrete x86-64 machine-code bytes (0 axioms)"]
end
subgraph ACL2["Substrate 3: ACL2 ('Software with a Warranty' — ~/dev/fn)"]
FN["1,440 books (647,182 LOC) + 96,629 LOC host\nLive on fn.fg-goose.online (NNTPS 563 / STARTTLS 119 / BPv7 DTN)\nACL2 owns every admission, framing, BLAKE3, and recovery decision"]
end
subgraph TLA["Substrate 4: TLA+ / Kani / Loom / MIR Extraction"]
CD["chronicle-driver (~14,800 LOC rustc MIR driver)\n27 TLA+ specs (22,863 LOC, 500M+ states) + Loom + Kani + Isabelle/HOL"]
end1.1 Lean 4 as the Running Kernel & Circuit Compiler
A. breadstuffs/metatheory/Dregg2/: 1.27M LOC, C-ABI FFI (produce_via_lean), and Lean-Emitted AIR Descriptors
As measured in the repository census (2026-09-28-crossref.md), breadstuffs/metatheory/Dregg2/ comprises 2,352 Lean 4 files totaling 1,277,494 lines of code across 17 domain directories (Circuit 714K, Crypto 128K, Games 113K, Exec 73K, Apps 28K, Bridge 26K, Metatheory 23K, Verify 22K, Deos 21K, Distributed 20K, Authority 13K, Proof 10K, Spec 9K, Calculus 7K, Logic 6K, Substrate 6K, plus sibling trees Market/ 40K, Metatheory/ 13K, Polis/ 12K, Bfv/ 3K), with 1,585 imports in Dregg2.lean and 353 CI-enforced #assert* declarations in Claims.lean.
- Authoritative Production Execution via Zero-Copy C-ABI (
produce_via_lean+FFIDirect.lean): Instead of treating Lean as a passive specification or paying a ~100 µs/turn double-JSON serialization tax across FFI,breadstuffs/metatheory/Dregg2/Exec/FFIDirect.leanexports typed C-ABI constructor and projection functions (@[export dregg_w_*]) that construct real Lean inductives (WHostCtx,WState,WTurn) aslean_object*pointers directly from Rust and execute the verified step functionexecDirect:
-- /Users/ember/dev/breadstuffs/metatheory/Dregg2/Exec/FFIDirect.lean:57-61
/-- Reassemble a 256-bit `Nat` from four 64-bit little-endian limbs (`lo` .. `hi`), then sign. -/
@[inline] def intOfLimbs (neg : UInt8) (l0 l1 l2 l3 : UInt64) : Int :=
let mag : Nat := l0.toNat + (l1.toNat <<< 64) + (l2.toNat <<< 128) + (l3.toNat <<< 192)
if neg == 0 then Int.ofNat mag else -(Int.ofNat mag) -- /Users/ember/dev/breadstuffs/metatheory/Dregg2/Exec/FFIDirect.lean:330-351
/-- **THE DIRECT C-ABI ENTRYPOINT**: run the proved `execFullForestAuthStep` chain on already-built
Lean inductives (`WHostCtx`, `WState`, `WTurn`) and return the `(status, WState)` pair as a
`lean_object*` for the reader exports below. No JSON parse on entry; no JSON encode on exit. -/
@[export dregg_exec_full_forest_auth_direct]
def execDirect (host : WHostCtx) (state : WState) (turn : WTurn) : WStatusResult :=
let k0 := stateOfWState state
let s0 : RecChainedState := { kernel := k0, log := [] }
let ctx := admCtxOfHost host
let hdr := turnHdrOf turn.agent (eraseAuth turn.root) turn.nonce turn.fee turn.validUntil turn.prevHash
match liftForestG turn.root with
| none => { status := "unsupported", state := state }
| some rootG =>
let (status, s1) := runGatedForestTurnStatus ctx s0 hdr rootG
let cellIds := (state.cells.map Prod.fst ++ rootG.touchedCells).eraseDups
let capLabels := (state.caps.map Prod.fst ++ rootG.mintedCaps).eraseDups
let balKeys := (balKeysOf state ++ rootG.touchedBalKeys turn.agent).eraseDups
let w1 := wstateOfState s1.kernel cellIds capLabels balKeys
{ status := statusStr status, state := w1 }On the Rust side, produce_via_lean (in breadstuffs/exec-lean/src/lean_apply.rs, default-ON via DREGG_LEAN_PRODUCER) invert authority so that Lean is the authoritative state producer and the Rust executor is demoted to a shadow cross-check:
- When Lean commits (
LeanStatus::Committed),*ledger = lean_ledgeris unconditionally installed with Lean'spost_state_hash, overriding Rust even if Rust rejected (surfacingShadowDisagreement). - When Lean rejects (
LeanStatus::Rejected),ledgerremains untouched at the pre-state and any Rust accept is vetoed withTurnError::LeanShadowVeto.
- Lean-Authored Multi-Table AIR Descriptors (
DescriptorIR2.lean&EmitByName.lean): Inbreadstuffs/metatheory/Dregg2/Circuit/DescriptorIR2.lean, the EPOCH multi-table constraint grammar (EffectVmDescriptor2) defines five shared STARK tables (main,poseidon2Chip,range16,memory,mapOps), offline memory checking welded to Blum's theorem (Dregg2.Crypto.MemoryChecking.memcheck_sound), and the exact degree-7 Poseidon2 chip arity admission polynomial: $$a \cdot (a - 2) \cdot (a - 3) \cdot (a - 4) \cdot (a - 7) \cdot (a - 11) \cdot (a - 16) = 0$$ Replacing the weakerins.length ≤ CHIP_RATE(≤ 16) guard withChipArityAdmitted(ins.length ∈ [0, 2, 3, 4, 7, 11, 16]) caught descriptors that had shipped with unprovable arities 8, 9, and 14 (DescriptorIR2.lean).
Furthermore, breadstuffs/metatheory/EmitByName.lean regenerates the entire circuit/descriptors/by-name/*.json predicate-dispatch surface (90+ descriptors) directly from verified Lean definitions (emitVmJson2), eliminating an ungated hand-transcription hop where predicate-arith.json had previously drifted from its 24-wide welded Lean definition down to a 5-wide JSON missing two Poseidon2 value-to-fact weld legs (an exploitable forgery vulnerability documented in EmitByName.lean) and retiring adjacency-membership.json (whose narrow 1-limb bus was collidable at $2^{15.45}$, demonstrated by circuit/tests/adjacency_forge_tooth.rs, EmitByName.lean).
B. minidregg/: World.admit, Host Refinement, Emit.lean, Objective Bend (Core4 + Farkas Certificates), and Simplex BFT Safety
minidregg/ (166 Lean files, 169,289 lines, 2026-09-28-crossref.md) distills the kernel into a single fail-closed transition World.admit and proves implementation refinement, circuit-emission faithfulness, proof-producing type checking, total difference-constraint law satisfiability, and Simplex BFT consensus safety.
Kernel/World.lean(World.admit,World.step,fold): Inminidregg/Kernel/World.lean, durable state is a persistent sparse map of cells plus a distinguished system cell (journal,head,retired,parent,spent,allowance). Every turn is judged by one fail-closed transition:
-- /Users/ember/dev/minidregg/Kernel/World.lean:705-726
/-- The one fail-closed state transition. -/
def World.admit (w : World R TxId D) (t : Turn R TxId Ev D) :
Except Reject (World R TxId D) := do
let cur := w.height
if !(t.notBefore ≤ cur && cur ≤ t.notAfter) then .error .windowExpired
else if (w.system.get ⟨SysSpace.journal, t.txId⟩).isSome then .error .replay
else if !t.creates.Nodup then .error .duplicateCreate
else if !t.retires.Nodup then .error .duplicateRetire
else if !(t.legs.map Leg.cell).Nodup then .error .duplicateLeg
else if !t.nullifiers.Nodup then .error .duplicateNullifier
else match t.nullifiers.find? (fun nf => (w.system.get ⟨SysSpace.spent, nf⟩).isSome) with
| some nf => .error (.nullifierSpent nf)
| none =>
if ! w.capabilityActive t then .error .capabilityInactive
else match w.pinCheck H t with
| some i => .error (.pinMismatch i)
| none =>
match w.chargeAllowance t.meterLane t.exactCharge with
| none => .error .insufficientAllowance
| some sys₀ =>
let w₀ : World R TxId D := ⟨w.cells, sys₀⟩
let w₁ ← w₀.applyCreates t.creates
let w₂ ← w₁.applyLegs t.legs
let w₃ ← w₂.applyRetires t.retires
let prev := w.logRoot H
let root' := H.chain prev (H.turnDigest t)
let sys₁ := t.nullifiers.foldl (fun s nf => s.set ⟨SysSpace.spent, nf⟩ (some ())) w₃.system
let sys' := (sys₁.set ⟨SysSpace.journal, t.txId⟩ (some (cur + 1, H.turnDigest t))).set
⟨SysSpace.head, ()⟩ (some (cur + 1, root'))
.ok ⟨w₃.cells, sys'⟩Kernel/HostRefinesWorldCore.lean(Deployed Host RefinesWorld.step):minidregg/Kernel/HostRefinesWorldCore.leanproves that the deployed receiver (DurableDataIntent.execute+Loaded.extend+afterCheckpoint) is a step-by-step implementation refinement ofWorld.stepacross accept, refuse, replay, crash, and checkpoint rebase schedules, and proves that append-only and policy-source namespaces cannot be rewritten by any turn:
-- /Users/ember/dev/minidregg/Kernel/HostRefinesWorldCore.lean:218-224
theorem appendOnly_rewrite_has_no_turn {w w' : World R TxId D} {t : Turn R TxId Ev D}
(h : World.step H w t = some w')
{id : CellId} {s : Store L} (hpre : w.cells id = some ⟨L, s⟩)
(sp : Space L) [ inst : SpaceDiscipline L sp .appendOnly ]
{k : L.Key sp} {x : L.Val sp} (hk : s.get ⟨sp, k⟩ = some x)
{L' : CellLayout} (hL : L' = L) (s' : Store L')
(hbad : (hL ▸ s').get ⟨sp, k⟩ ≠ some x) :
w'.cells id ≠ some ⟨L', s'⟩ -- /Users/ember/dev/minidregg/Kernel/HostRefinesWorldCore.lean:454-456 & 478-482 & 600-608
theorem deployed_refines_step :
ImplementationRefinement (HostStep B H) (Option.isSome ∘ Prod.fst) (World.step H)
(Represents B) (Turn.ofIntent B H)
theorem host_trace_represents_fold {p₀ : Loaded B.root} {w₀ : World R TxId D}
(h₀ : Represents B p₀ w₀) (tr : List (HStep B H))
(h chain : Chain (HostStep B H) p₀ tr) :
∃ log w', fold H w₀ log = some w' ∧ Represents B (traceLast p₀ tr) w' ∧
log.length = countAdmitted B H w₀ tr
theorem confirmed_represents {p : Loaded B.root} {w : World R TxId D}
(hrep : Represents B p w) (a : Attempt B.root) (s : ConfirmSched)
(hwf : IntentWF B p.snapshot a.intent)
(hpost : ∀ wr ∈ a.intent.writes, wr.afterRoot = B.root wr.afterBytes) :
let (out, p') := confirmStep B a s p
match out with
| .confirmed => ∃ t w', Turn.ofIntent B H w a.intent = .ok t ∧
World.step H w t = some w' ∧ Represents B p' w'
| .unconfirmed => Represents B p' wCompiler/Emit.lean(emit_faithful&emit_accepts_iff): Inminidregg/Compiler/Emit.lean, the constraint system flattener (AirFlatten.flatten) is serialized to a first-order, function-freeConstraintDescriptor F(op ∈ {add, mul}, wire indices, boundary zero-roots), and proved faithful against the algebraic evaluation semantics:
-- /Users/ember/dev/minidregg/Compiler/Emit.lean:248-253 & 378-383
theorem emit_faithful [Field F] (idx : V → ℕ) (nPub nVars : ℕ)
(cs : ConstraintSystem F V) (wv : ℕ → F) :
descriptorHolds (emit idx nPub nVars cs) wv ↔
gatesHold (readVars idx wv) (readAux nVars wv) (flattenSystem cs 0).gates ∧
∀ r ∈ (flattenSystem cs 0).roots,
r.read (readVars idx wv) (readAux nVars wv) = 0
theorem emit_accepts_iff [Field F] [DecidableEq V]
(idx : V → ℕ) (nPub nVars : ℕ) (hInj : Function.Injective idx)
(hBound : ∀ v, idx v < nVars) (env : V → F) (cs : ConstraintSystem F V) :
(∃ wv : ℕ → F, (∀ v, wv (idx v) = env v) ∧
descriptorHolds (emit idx nPub nVars cs) wv) ↔
systemAccepts env cs- Objective Bend (
Core4Proof-Producing Type Checker, C4 Linearization, and Farkas / Bellman-Ford Certificates formini> law check): - Proof-Producing Checker (
Theory/ObjectiveBendTyping.lean):inferdoes not return a bareBoolor unverifiedTy; it returnsOption (Inferred assumptions context term), whereInferredis a dependent Sigma-like structure bundling the inferredtype : Ty, linear resourceuses : List Usage, and a constructive typing derivationderivation : PartialTyping assumptions context term type uses. - C4 Linearization (
Compiler/ObjectiveBendC4.lean):linearizeimplements C3 linearization plus the suffix property (ported frompommette.scm), distinguishingRefusal.inconsistentfromRefusal.fuelExhaustedwith fuel derived strictly from graph size, and verifyingOrderedPresentationInvariantacross 4,000 seeded random DAGs. - Enforced Law Fragment & Total Farkas / Bellman-Ford Certificates (
Compiler/ObjectiveBendLaw.lean,Pred/Satisfiable.lean,Pred/SatisfiableTotal.lean,Host/LawSat.lean): Everylaw NAME: EXPRdeclared in an Objective Bend package is parsed byObjectiveBendLaw.parseand compiled toPred. When a user runsmini> law check(Host op 150law-sat, or the install-time self-lockout / relaw-lockout guard),Pred/Satisfiable.leantranslates the law into a DNF of integer difference-constraint systems (val x ≤ val y + k) and solves each via Bellman-Ford (Sys.solve), returning either a concrete satisfying(old, new)state witness OR an integer Farkas / negative-weight cycle certificate (SysCert.clashorSysCert.cycle):
-- /Users/ember/dev/minidregg/Pred/Satisfiable.lean:288-304
/-- Why one system has no solution: a variable is required both present and absent, or a
closed walk of its constraints has negative total weight. -/
inductive SysCert where
| clash (v : Node)
| cycle (cs : List Con)
deriving Repr, DecidableEq
def SysCert.check (s : Sys) : SysCert → Bool
| .clash v => s.present.contains v && s.absent.contains v
| .cycle cs =>
!cs.isEmpty &&
cs.all (fun c => s.cons.contains c) &&
linked cs &&
decide ((cs.map Con.k).sum < 0)Pred/SatisfiableTotal.lean and Host/LawSat.lean prove that the solver is total (decide_never_unknown / lawSat_never_unknown) and that self-lockout and relaw-lockout certificates are sound and complete:
-- /Users/ember/dev/minidregg/Host/LawSat.lean:441-445, 496-501, 561-575
theorem lawSat_never_unknown (q : Query) {d : DiffProblem}
(hd : Pred.difference? (effective q) = some d) :
(∃ o n, answer q = .decided d (.witness o n)) ∨
(∃ c, answer q = .decided d (.unsat c))
theorem lawSat_unsat_admits_nothing (q : Query) (d : DiffProblem) (c : Certificate)
{p : Pred} (hp : effective q = p)
(h : answer q = .decided d (.unsat c)) :
∀ o n, eval p o n = false
theorem self_lockout_detected (law : Pred) (installer : Int) (d : DiffProblem) (c : Certificate)
(h : answer (lockoutQuery law installer none) = .decided d (.unsat c)) :
∀ o n, n.get "request/subject" = some installer → eval law o n = false
theorem relaw_lockout_detected (law : Pred) (installer : Int) (d : DiffProblem) (c : Certificate)
(h : answer (lockoutQuery law installer (some installVerb)) = .decided d (.unsat c)) :
∀ o n, n.get "request/subject" = some installer → n.get "request/verb" = some installVerb →
eval law o n = false- Simplex BFT Consensus Safety (
Kernel/GenericSimplexEngineSafety.lean):minidregg/Kernel/GenericSimplexEngineSafety.leanproves consensus safety by induction over the actual authenticated executable start/step network (Reachable c faulty checked time netat $n = 3f + 1$), including exponential view-timeout backoff (viewTimeout_bounds), with zero unproved emission premises:
-- /Users/ember/dev/minidregg/Kernel/GenericSimplexEngineSafety.lean:26-30, 62-92
theorem reachable_emission_invariants {c : Config} {faulty : Finset Nat}
{checked : Network → Nat → Block → Prop} {time : Nat} {net : Network}
(reachable : Reachable c faulty checked time net)
(size : c.parties = 3*c.faults+1) :
NetworkJustified c faulty net ∧ SupportedTrace c faulty net
theorem actual_committed_prefix_consistency {c : Config} {faulty : Finset Nat}
{checked : Network → Nat → Block → Prop} {time : Nat} {net : Network}
(reachable : Reachable c faulty checked time net)
(size : c.parties = 3*c.faults+1) (honest : faulty.card ≤ c.faults) :
CommittedPrefixConsistent (auditTrace net) (Finset.range c.parties \ faulty)
theorem actual_certified_next_record_unique {c : Config} {faulty : Finset Nat}
{checked : Network → Nat → Block → Prop} {time : Nat} {net : Network}
(reachable : Reachable c faulty checked time net)
(size : c.parties = 3*c.faults+1) (honest : faulty.card ≤ c.faults)
{v : Nat} {b₁ b₂ : Block}
(notar₁ : CertifiedNotarization (auditTrace net) v b₁)
(notar₂ : CertifiedNotarization (auditTrace net) v b₂)
(valid : ValidatedBlock b₁) :
nextRecord b₁ = nextRecord b₂C. nanodregg/: The 12 Charter Laws, Four-Trie World.lean, Single Codec.Stream, and Self-Testing Protocol/Rows.lean
Initiated on 2026-10-16 (nanodregg/CHARTER.md) under Ember's directive—"rebuild whatever shape you think will be better. Go hardcore. ONLY GOOD CODE AND BEST PRACTICES. All decisions get critically and metacritically examined"—nanodregg is a clean-room rebuild of minidregg from its specification (single-node vat, one writer per Store, members who consent by re-execution).
- The 12 Charter Laws (
nanodregg/CHARTER.md): - Law 1 (
World.admitIS the receive path): No shadow receiver (DurableDataIntent), noTurn.ofIntenttranslation, noRepresentsbridge. The Host unframes aSignedCall, checks Ed25519 signature, runsLang.evalwhen the call is aRun, and callsWorld.admit. - Law 2 (One codec family,
Codec.Stream): Defined innanodregg/Codec/Stream.lean. Every wire format and hash preimage is a value ofStream αoverByteArrayoffsets; every codec carries its structuralShape, and frame tags (Codec.Tag) are hashes of(label, Shape). - Law 3 (Four instances of one persistent binary Merkle trie,
Trie.T): Innanodregg/Kernel/World.lean,Cells,Journal,Refusals, andRowsare four instances ofTrie.T, committed by a singlerootsdigest (rootsOf E w.trie w.journal w.refusals w.rows). Execution uses an unhashed dirty overlay (uStore) sealed once per turn, wired to the proof specification via@[csimp] theorem World.admit_eq_admitImpl(Kernel/World.lean). - Law 4 (No child processes; in-process fuel reopen): In
nanodregg/Host/Loop.lean,restartsrunsserveforfuelbatches, then reopens theStorefrom disk in process and checksagrees mark r r'(reopenDivergedon mismatch). Notably, Law 4's amendment inCHARTER.mddocuments a real Lean compiler lifetime bug caught at commit7e23642:Host.Store.lockheld anflockon a file descriptor whose last syntactic reference was beforerestarts; compiled Lean dropped the handle—and thus released theflock—mid-serve while the daemon was still accepting writes, allowing a concurrent writer to clobber the Store untilIO.Refkept the lock live acrossrestarts. - Laws 5–12: One command language (
ndargv, Law 5); one language (Lang, a total syntax-directed type checkerinferEproved sound, complete, and type-unique inLang/Proofs/Check.leanviainferE_iffandhasType_unique, Law 6); every refusal is a constructor with a name (Reject,TypeError,EvalError, Law 7); every theorem has aMutationplant or is a step in one (Law 8); nopartial def, nosorry, noaxiom, nonative_decideon uninterpreted functions (Law 9); explicit bounds (Host/Bounds.lean, Law 10); size ratchet (SIZE.md≤ 35,000 lines, Law 11); one binarynd(Law 12). - Self-Testing Conformance Rows (
Protocol/Rows.lean): Innanodregg/Protocol/Rows.lean, the system specification is executable data (Row), where every row carries aMutationplant (skipJudge,followVerifyAll,forgetJournal,lieTip,forgeBase,forgeCertificate,ignoreNotBefore,nonceRepeats, etc.) that must flip a named line to red, andProtocol.Proofs.Rows.every_op_has_a_rowproves in Lean that every operation is exercised.
D. leanuweave (PREOSCRIPTING.md) & soundcalc-lean
leanuweave— Preoscript, Future-Relative Evidence, and Proof-Carrying Repair Plans (leanuweave/PREOSCRIPTING.md):leanuweave(205.leanfiles /4,603lemmas ondevf145066, includingAncestral.clash_dichotomyover BailisIConfluent) formalizes concurrent document and tree editing where edits may fork and obligations may remain open. Its query and scripting layer, preoscript (Uwueave/Preo/), replaces classical two-valued truth with a six-cell future-relative epistemic carrier (Uwueave/Evidence.lean,PREOSCRIPTING.md) indexed by candidate multiplicity (zero/one/many), closure (open/closed, distinguishing nothing observed yet from definitive absencevacuous), and an orthogonalVisibilityaxis:- Subtyping
Exact Working α <: Exact Delivered αis derived from a theorem on future inclusion rather than ad-hoc coercion. - Route-order invariance is machine-checked in
Uwueave/Preo/Classification.lean(Preo.run_answer_congrandPreo.verdict_agree): any two execution plans over equivalent declaration sets return identical answers and verdicts. - When an edit or merge violates a compound law,
leanuweavesynthesizes a proof-carrying repair plan (FiniteRepairMenu/RepairSynthesis, plusUwueave/SeamColoring.leanfor minimum-cut seam resolution andUwueave/MinimalSummary.leanfor sufficient digest witnesses) where the candidate repair move carries a Lean proof that applying it restores the target invariant.
soundcalc-lean— Exact Rational Soundness Calculator for Hash-Based zkVMs (soundcalc-lean/README.md): Replaces Ethereum's Python floating-pointsoundcalcwith an exactℕandℚLean 4 formalization coveringBCIKS20, Ha22 (DEEP-ALI), BCHKS25 (UDR and Johnson-bound mutual correlated agreement), Jagged PCS, LogUp, and LogUp-GKR:- Every security bit cell is a theorem over exact rationals (
example : secBits (sp1CoreFRI.queryErr (UDR koalaBear4)) = 100 := by native_decide), backed byle_secBits_iff : k ≤ secBits ε ↔ ε ≤ 1 / 2 ^ kandsecBits_min'. - Irrational Johnson-bound terms ($\sqrt{\rho}$, $\log_2$) are replaced by certified rational enclosures proved conservative against Mathlib's
Real.sqrtandReal.logb 2(sqrtLB_le,le_sqrtUB,jbrErrLinear_conservative), while 64-bit Goldilocks primality is certified kernel-only via a Pratt certificate (lucas_primalityinSoundcalc/Field.lean) withoutnative_decide, guarded in CI byscripts/AxiomsGuard.lean.
1.2 HOL4 & CakeML/Pancake Machine-Code & EVM Bytecode Verification
A. verifereum/examples/: Universal Separation-Logic Proofs over forge-Compiled Solidity EVM Runtime Bytecode
In /Users/ember/dev/verifereum/examples/ (tracked at commits 513beea and bf8294d), Ember built a reusable HOL4 path-composition engine (evmSpecAutomationScript.sml + evmSpecAutomationLib) on top of the Verifereum (vfmProg) EVM separation logic and proved universal (∀ caller, ∀ symbolic storage/nullifier) Hoare-triple specifications directly over the real forge-compiled Solidity creation and runtime bytecode of Dregg's on-chain settlement contracts (DreggProofAttestor.sol, DreggVault.sol, DreggLaunchToken.sol). Every script ends with an ML tag-audit block (Tag.dest_tag (Thm.tag th)) that fails the build if any theorem uses cheat, mk_thm, or any oracle beyond DISK_THM.
- Reusable Bytecode Path Automation (
evmSpecAutomationScript.sml):
(* /Users/ember/dev/verifereum/examples/evmSpecAutomationScript.sml:27-56 *)
Definition evm_line_def:
evm_line (n:num) b = b:bool
End
Definition len_opcode_def:
len_opcode (Push n []) = 1:num ∧
len_opcode (Push n (x::xs)) = 1 + len_opcode (Push n xs) ∧
len_opcode _ = 1
End
Theorem LENGTH_opcode_eq_len_opcode:
∀c. LENGTH (opcode c) = len_opcode c
Proof
Cases \\ EVAL_TAC \\ rename [‘Push _ l’]
\\ Induct_on ‘l’ \\ gvs [len_opcode_def]
QED
Theorem SPEC_EVM_MODEL_empty:
SPEC EVM_MODEL emp {} emp
Proof
gvs [SPEC_REFL]
QEDDreggProofAttestor.solDeployment & One-Shot Binding Latch (dreggProofAttestorScript.sml&dreggBindPathsScript.sml):dreggProofAttestorScript.smlruns the realforge-compiled creation bytecode with constructor immutables (socket_,launchpad_,trustedAnchor_,binder_ = 0x1111..1111) inside HOL4'scv_computekernel (Theorem deploy_ok = cv_eval “deploy_result_flag”) to extract the exact on-chain runtimecontract_code. ThendreggBindPathsScript.smlproves path-by-path from the post-ABI-decodeJUMPDEST(0x301 = 769) that non-binders revert (NotBinder) and that even the authorized binder cannot overwrite or swap an already-bound launch transition (AlreadyBound):
(* /Users/ember/dev/verifereum/examples/dreggBindPathsScript.sml:131-161 *)
(* Early-false return on attestClearing when _bindings[launchId].set == 0 *)
Theorem SPEC_attest_blk_unbound_false =
GEN_ALL (pick 1677 (SOME 2342));
(* Path 1: non-binder caller -> 769 -> 828 -> 2173 -> Reverted (NotBinder) *)
Theorem SPEC_bind_path_notbinder_reverts =
GEN_ALL (DISCH_ALL (SPEC_COMPOSE_RULE
[U binder_notbinder, U revert_outer]));
(* HEADLINE (Property 1 — one-shot binding): binder caller on an already-bound launch
(_bindings[launchId].set is true) -> 769 -> 832 -> 902 -> 2173 -> literal Reverted
(AlreadyBound), reached BEFORE any SSTORE and BEFORE the launchpad/socket STATICCALLs. *)
Theorem SPEC_bind_oneshot_reverts =
GEN_ALL (DISCH_ALL (SPEC_COMPOSE_RULE
[U binder_pass, U alreadybound_setup, U revert_outer]));DreggVault.solNo-Double-Withdraw Nullifier Latch (dreggVaultPathsScript.sml): Proves over the realforge-compiledDreggVault.solruntime bytecode (door-scoped from the post-ABI-decode nullifier gateJUMPDEST 0xd56 = 3414through shared revert tail0x88b = 2187) that for every message whose nullifier is already marked spent inusedNullifiers[nullifier],withdrawreverts (NullifierAlreadyUsed) before marking the nullifier or transferring value:
(* /Users/ember/dev/verifereum/examples/dreggVaultPathsScript.sml:234-236 *)
Theorem SPEC_withdraw_nullifier_used_reverts =
GEN_ALL (DISCH_ALL (SPEC_COMPOSE_RULE
[U nullifier_used_setup, U revert_outer]));DreggLaunchToken.solMinter Guard (dreggMintGuardScript.sml): Proves over the 12-instruction minter guard at byte offset0x03d5 = 981(CALLER; PUSH1 1; PUSH1 1; PUSH1 0xa0; SHL; SUB; PUSH32 <minter>; AND; EQ; PUSH2 0x0425; JUMPI) that any callerw2w p.caller <> 0x1111..1111wdeterministically falls through toPC 0x0406 = 1030(NotMinterrevert block) with the operand stack restored and storage untouched:
(* /Users/ember/dev/verifereum/examples/dreggMintGuardScript.sml:133-136 *)
Theorem SPEC_mint_guard_notminter =
th_guard1
|> INST [“pc:num” |-> “981n”]
|> SIMP_RULE (srw_ss() ++ ARITH_ss) [b2w_eq_zero];B. dreggnet-engine/model/dreggnetArenaScript.sml: Zero-Copy HTTP Arena Bounds Safety in HOL4
In /Users/ember/dev/dreggnet-engine/model/dreggnetArenaScript.sml, the unified zero-copy HTTP request representation shared across H1/HPACK/QPACK models an immutable arena buffer plus a lazy mutation sidecar selected by bit 31 (SIDECAR_BASE = 2n ** 31), and proves in HOL4 that resolving any well-formed header entry returns a slice of exactly its declared byte length with zero truncation or over-read:
(* /Users/ember/dev/dreggnet-engine/model/dreggnetArenaScript.sml:105-136 *)
Theorem take_drop_len:
!n m l. m + n <= LENGTH l ==> LENGTH (TAKE n (DROP m l)) = n
Proof
rpt strip_tac >>
`n <= LENGTH (DROP m l)` by simp[LENGTH_DROP] >>
simp[LENGTH_TAKE]
QED
Theorem resolve_length:
!p off len. inbounds p off len ==> LENGTH (resolve p off len) = len
Proof
rw[resolve_def, inbounds_def] >> irule take_drop_len >> simp[]
QED
Theorem wf_entry_value_length:
!p e. wf_entry p e ==> LENGTH (resolve p e.voff e.vlen) = e.vlen
Proof
rw[wf_entry_def] >> metis_tac[resolve_length]
QED
Theorem wf_parsed_values_total:
!p. wf_parsed p ==>
EVERY (\e. LENGTH (resolve p e.voff e.vlen) = e.vlen) p.entries
Proof
rw[wf_parsed_def, EVERY_MEM] >> metis_tac[wf_entry_value_length]
QEDC. breadstuffs/orb-compiler/, drorb, & datacake-down-to-the-bytes.txt: From Lean HTTP Serve Down to 1,868 Verified x86-64 Machine-Code Bytes
Documented in /Users/ember/src/dregg-posters/datacake-down-to-the-bytes.txt, /Users/ember/dev/breadstuffs/orb-compiler/Pancake/, and /Users/ember/dev/drorb (commits 86d1e80, 28e50d1, 3efc231), the Datacake ("Down to the Bytes") compiler ladder connects a pure Lean HTTP serve specification down to 1,868 concrete x86-64 machine-code bytes (55 48 89 e5 ..., 155 concrete assembly instructions) compiled by the HOL4-verified CakeML/Pancake compiler (compile_prog x64_config):
- The 8-Rung Verification Ladder (
datacake-down-to-the-bytes.txt): [0]miniServe : Method → WireResp— Pure Lean HTTP serve function (drorb/Http/MiniServe.lean).[1]execStage (serveStage200 / 405)— Two-phase stage DSL (StageProg2.lean, commit3f9f6eb); redesigning the flat model into the deployed two-phase pipeline caught a real fidelity bug where the old flat model dropped security headers on refusal paths.[2]emitServe+wf_auto+translateCert(orb-compiler/Pancake/ProofProducing.lean): Proof-producing compiler fromStage σtoPancakeProgwhere thewf_autotactic automatically dischargesWF o stwithout hand proofs:
-- /Users/ember/dev/breadstuffs/orb-compiler/Pancake/ProofProducing.lean:221-223
def translateCert (o : Oracle σ) (st : Stage σ) (h : WF o st) :
{ p : PancakeProg // Refines o p (denote st) } :=
⟨emitServe st, emitServe_correct o st h⟩[3]lower serveExport = some serveExportModel(orb-compiler/Pancake/ServeExportServes.lean): Whole-program lowering and behavioral equivalence over both HTTPGET('G' = 71, landing 164 bytes) and405 Method Not Allowed('X' = 88, landing 227 bytes), with non-vacuity proved viaofNat_len_ne(164 ≠ 227atBitVec 64):
-- /Users/ember/dev/breadstuffs/orb-compiler/Pancake/ServeExportServes.lean:471-485 & 606-607
theorem serveExport_serves_405 (o : Oracle σ) (s : PancakeState σ)
(bs200 bs405 : List Nat) (outBase reqAddr : Word) ... :
∃ s', PancakeSem o (serveExportModel bs200 bs405) s
= (some (BitVec.ofNat 64 bs405.length), s')
∧ MemBytesAtB s'.memory s.memaddrs s.be outBase bs405
theorem ofNat_len_ne {a b : Nat} (ha : a < 2 ^ 64) (hb : b < 2 ^ 64) (h : a ≠ b) :
(BitVec.ofNat 64 a) ≠ (BitVec.ofNat 64 b)[4]–[7]HOL4 CakeML/Pancake Backend (pan_to_target/compile_prog x64_config): Compiles the.pnkAST throughpan_to_word,word_to_stack(register allocation discharged),stack_to_lab, andlab_to_targetto 1,868 concrete x86-64 machine-code bytes, cross-checked against the nativecakecompiler oracle over 464 differential test vectors with zero errors (commit03b07f4).
1.3 ACL2 ("Software with a Warranty" — ~/dev/fn)
/Users/ember/dev/fn/ (fuckin' news / formal news) is an ACL2-verified NNTP (RFC 3977 / RFC 4642 / RFC 4643) and BPv7 Delay-Tolerant Networking (DTN) server running in production on Ember's public node fn.fg-goose.online (live since 2026-09-27 on NNTPS port 563 and STARTTLS port 119; docs/public-node.md). While early milestones had ~27k lines of ACL2, the repository has grown to 1,440 .lisp books in books/ totaling 647,182 lines of ACL2, plus 96,629 lines of SBCL/ACL2 host integration in host/ (~743,811 lines of Lisp/ACL2 total).
- Architectural & Engineering Laws (
fn/AGENTS.md&fn/docs/architecture.md): - ACL2 Owns Every Decision: "ACL2 decides identity, bounds, framing, charges and reply lines. Host code and Python never compute or compare a value ACL2 computes. A missing decision is an open item, not a host function." (
AGENTS.md). - Three-Valued Durable Outcome (
accepted,refused,uncertain): Durable acceptance is emitted only from persisted state. If an I/O orfsyncoperation fails ambiguously after reservation, the server never silently rolls back or guesses; it returnsuncertain, instructing the client to reconcile with the sameMessage-ID(README.md,docs/public-node.md). - Served-Path Concrete Representations with Guard-Verified Refinement (Decision D27): Logical specs operate over octet lists, while served paths execute over concrete byte buffers/arenas (
mbe :logic ... :exec ...) generated viadef-loop,def-representation, anddef-buffermacros.
- Key ACL2 Books in Production:
- Guard-Verified BLAKE3 over Octet Lists (
books/blake3.lisp): 1,067 lines implementing the full BLAKE3 tree hash (fn-blake3,fn-blake3-keyed,fn-blake3-derive-key), 7-roundGcompression, 1024-octet chunks, and binary tree reduction with:guard ttotal primitives and tail-recursivembeloops (fn-b3-firstn-loopfor PKT-877 stack-depth safety), attached viadefattachinbooks/crypto-attach.lispto the abstract cryptographic digest interface. - Synchronous Store Refusal & Prepublication Abort (
books/store-node-resolution.lisp): Proves that consuming a durable file reservation on semantic refusal (fn-sn-refuse-reservation) or prepublication abort (fn-sn-known-abort) preserves the 14-field store-node invariantfn-sn-statepand advances the live frontier in lockstep with replay (fn-replay-advance-txid):
;; /Users/ember/dev/fn/books/store-node-resolution.lisp:178-180
(defthm fn-sn-refuse-reservation-preserves-state
(implies (fn-sn-statep s)
(fn-sn-statep (fn-sn-refuse-reservation s txid))) ...)- RFC 4642 STARTTLS & RFC 4643 AUTHINFO State Machine (
books/nntp-auth.lisp): 4,653 lines wrapping the entire served dispatch chain (fn-served-dispatch -> fn-auth-step -> fn-peer-step -> fn-nntp-post-step -> fn-nntp-step). Models the TLS handshake as an explicit state (fn-auth-session-handshakingp) rather than an unmodeled gap, proving that382 Continue with TLS negotiationis emitted at most once, that pipelined bytes smuggled behindSTARTTLSbefore:tls-establishedare refused (RFC 4642 §2.2), and thatdef-loop fn-auth-account-credspreserves credential-list invariants (fn-auth-account-creds-are-creds). - Generated Composition Obligations (
books/owner-publication-composition.lisp): Proves exact outputs and all 10 state-field effects (fn-opub-observe) of pre-move host compositions (fn-opub-due-composition-by-definition,fn-opub-abandoned-composition-by-definition).
- Warranty-Quality Proof Engineering & Bug Discovery (
fn/warranty-quality-proof-engineering.md): - Process-Death Cut Tables (
native_program_check.py): Every native persistence operation is checked against modeled crash cuts (cut_table), verifying that killing the process at any persistence step recovers to a state satisfying the whole-history belief set $\mathcal{B}_t$ (never contradicting anacceptedorrefusedreceipt). - Extent Trailer Bug Caught by Proof/Audit: In
host/native/extent.lisp,fnn-extent-entrychecked theFNX1header magic and payload length, then returned(subseq octets 16 (+ 16 len))without verifying the 4-byteFNXEtrailer or stored CRC32C. Proving the byte-to-record decoder correspondence forced the trailer and CRC check into the authoritative path. - Automated Proof-Quality Ratchets:
tools/ledger.pyscans all.lispbooks for 6 suspect proof shapes (trivial-conclusion,self-implication,unused-hyp,disabled-target-no- body, etc.), whiletools/proof_cost.pyenforces Decision D26 (no single event may exceed 10.0s or the prover step ratchet).
1.4 TLA+, Kani, Loom & Rust MIR Extraction (chronicle-driver)
Documented in /Users/ember/runtime-becomes-machine-march2026.md, the formal verification campaign for Ember's CQ io_uring HTTP server and runtime introduced a compiler-driven verification pipeline:
- 27 TLA+ Specifications (22,863 lines, 500M+ Distinct States Explored): Model-checking the asynchronous completion-queue (
CQ), buffer lifecycle, timeout watchdog, and multi-backend isolation protocols. chronicle-driver(~14,800 LOC CustomrustcCompiler Driver): Extracts formal state machines directly from Rust MIR (Mid-level Intermediate Representation)—tracking atomic operations (Ordering::SeqCst,Acquire,Release), channel transitions, and resource lifecycles—and dual-emits both TLA+ specifications and Loom concurrency test harnesses from the same MIR extraction pass, paired with compiler-checkedtla_*observer methods so specifications cannot silently drift from Rust code.- Multi-Solver & Theorem-Prover Cross-Verification: Combined TLC/Apalache model checking, Kani bounded model checking harnesses on Rust bit-manipulation and arena invariants, Loom permutation testing, 2 completed refinement proofs linking MIR-extracted models to high-level specs, and an Isabelle/HOL mechanization (
CQ_Automaton.thy, advised by Gerwin Klein) proving backend equivalence. - 9 Real Concurrency Bugs Discovered: Including a Dekker-protocol memory-ordering livelock present across all 4 CQ backends and a double-response race (
ResponseHandle) in the timeout watchdog when a timeout fired concurrently with normal completion.
1.1 /Users/ember/dev/hol-reflection — Modernizing HOL-in-HOL Reflection with cv_compute
- Repository Path:
/Users/ember/dev/hol-reflection - Git Commit History & Working-Tree Status:
- Upstream clone of
https://github.com/CakeML/hol-reflection.gitwith 440 commits fromf7105f3(2014-06-06, Ramana Kumar, "Initial files starting construction of witness for reflection") to5791eff(2017-01-30, Magnus Myreen, "Make things compile roughly following changes to semantics"). - On November 1, 2026 (13:03–20:16), Ember modified 13 tracked files (
1,190 insertions(+), 275 deletions(-)) and generated compiled HOL4 theories (holDerivationTheory.{dat,sig,sml,uo,ui},holCountsTheory.*,reflectionTheory.*,reflectionLib.{uo,ui}) in the working tree: Holmakefile: UpdatedINCLUDES = $(HOME)/dev/CakeML/candle/standard/monadic $(HOME)/dev/CakeML/candle/standard/ml_kernel $(HOME)/dev/CakeML/candle/syntax-lib $(HOME)/dev/CakeML/basis/pure $(HOME)/dev/CakeML/semantics $(HOME)/dev/CakeML/misc.holCountsScript.sml: Replaced legacycountableLibwithcountable_typesTheory.holDerivationScript.sml: Expanded from 443 lines to 1,310 lines (+867 lines) by constructing a fullcv_transLib/cv_computeexecutable mirror of HOL's syntax, type-matching, alpha-convertibility, well-typedness, signature checking, and sequent calculus rules.reflectionScript.sml(+255 / -95),reflectionLib.sml(+183 / -95),extractedScript.sml,printScript.sml,setSpecScript.sml,use ReflectionScript.sml: Updated to modern HOL4 tactic/BossLib APIs and wired tocv_eval.- Formal Verification Primitives in
holDerivationScript.sml: - Translates every non-constructive or finite-map predicate in
holSyntaxTheoryinto a purely first-order, total,cv_trans-compatible alist/boolean checker marked[cv_inline]:
(* /Users/ember/dev/hol-reflection/holDerivationScript.sml:452-500 *)
Theorem MEM_cv_inline[cv_inline]:
∀x xs. MEM x xs = list_mem x xs
Proof Induct_on `xs` >> rw [list_mem_def] >> metis_tac [] QED
Definition type_subst_c_def:
type_subst_c i (Tyvar v) = rev_assocd_c v i (Tyvar v) ∧
type_subst_c i (Tyapp v tys) = Tyapp v (type_subst_list_c i tys) ∧
type_subst_list_c i [] = [] ∧
type_subst_list_c i (t::ts) = type_subst_c i t :: type_subst_list_c i ts
End
Theorem TYPE_SUBST_eq_c[cv_inline]:
∀i ty. TYPE_SUBST i ty = type_subst_c i ty
Proof ... QED- Proves a sound and complete constructive type-matching algorithm (
tymatch_def,tymatch_pre[cv_pre],can_match_type_def) equivalent to the existential specificationis_instance:
(* /Users/ember/dev/hol-reflection/holDerivationScript.sml:677-685 *)
Theorem can_match_type_eq_is_instance:
∀ty0 ty. can_match_type ty0 ty ⇔ is_instance ty0 ty
Proof
rw [can_match_type_def, is_instance_def] >> EQ_TAC
>- (strip_tac >> drule tymatch_sound >> simp [] >> metis_tac [])
>- (strip_tac >> gvs [] >> irule tymatch_complete >> simp [] >>
qexists_tac `i` >> simp [])
QED- Translates
ACONV,welltyped,type_ok,term_ok,CLOSED,term_union, andSORTED alpha_ltfor in-kernelcv_compute:
(* /Users/ember/dev/hol-reflection/holDerivationScript.sml:720-937, 1268-1305 *)
Theorem aconv_check_eq[cv_inline]:
∀t1 t2. ACONV t1 t2 = aconv_check t1 t2
Theorem welltyped_cv_inline[cv_inline]:
∀tm. welltyped tm = welltyped_check tm
Theorem type_ok_alist_thm[cv_inline]:
∀tys ty. type_ok (alist_to_fmap tys) ty = type_ok_alist tys ty
Theorem term_ok_alist_thm[cv_inline]:
∀tys tms tm. term_ok (alist_to_fmap tys, alist_to_fmap tms) tm = term_ok_alist tys tms tm
Theorem closed_check_eq[cv_inline]:
∀tm. CLOSED tm = closed_check tm
Theorem term_union_eq_c[cv_inline]:
∀l1 l2. term_union l1 l2 = term_union_c l1 l2
Theorem SORTED_alpha_lt_cv_inline[cv_inline]:
∀ls. SORTED alpha_lt ls = sorted_alpha_lt ls1.2 /Users/ember/dev/svenvs — Self-Verifying Environments, Löb Reduction, & In-Place Compiler Self-Upgrade
- Repository Path:
/Users/ember/dev/svenvs - Git Commit History: 90 commits (
7d09492on 2026-05-15 to06f03ebon 2026-11-01 20:18:47 -0800). - Major November 1, 2026 Commits:
42152eb1910c1e91f6cfb5b2ec9c012da7870d07(2026-11-01 16:26:21 -0800): "Fuse reflective compiler-and-prover with cv_compute, holSyntax_cv, and Kernel.compute" (107 files changed, 8,177 insertions, 6,974 deletions).06f03ebc23de5c5b4126ae57c29ae65c205594da(2026-11-01 20:18:47 -0800): "Complete selfupgrade-root bootstrap & cv_compute loebReduction/selfProverConcrete" (5 files changed, 109 insertions, 46 deletions).- Core Subsystems & Verbatim Theorems:
- Löb Reduction via a Frozen Reference Kernel (
kernel/loebReduction/loebReductionScript.sml): - Formalizes why naive self-trust ($\text{ Prov}_N(\ulcorner \text{Sound}(N+1) \urcorner) \implies \text{Sound}(N+1)$) triggers Löb's theorem, whereas gating every candidate prover $P_{N+1}$ through a frozen reference proof checker $\text{Check}_0$ (
hol4_checks_real) preserves soundness across unbounded generations ($N \to \infty$) without growth in the TCB. - Replaces fragile tactic proofs over concrete HOL context updates (
lca_ext_ctxt=init_ctxtextended withListandlca) with in-kernelcv_evalcomputations:
(* /Users/ember/dev/svenvs/kernel/loebReduction/loebReductionScript.sml:1299-1458 *)
Theorem check_update_ctxt_sound:
!upd ctxt.
check_update_ctxt upd ctxt /\
(is_const_spec upd ==> ConstSpec_constrainable_cv ctxt upd)
==> upd updates ctxt
Theorem check_updates_chain_sound:
!upds ctxt.
check_updates_chain upds ctxt /\
EVERY (\u. is_const_spec u ==> ConstSpec_constrainable_cv init_ctxt u) upds
==> EXTENDS (upds ++ ctxt) ctxt
Theorem init_ctxt_syntax_cv_verified:
init_ctxt_syntax_ok_cv = T
Proof CONV_TAC cv_eval QED
Theorem lca_ext_ctxt_extends_init_cv:
EXTENDS lca_ext_ctxt init_ctxt- Concrete Instantiation on
holSemantics(selfproverConcrete/selfProverConcreteScript.sml): - Discharges the abstract
frozen_checker_soundandwatchdoghypotheses against the realholSyntax/holSemantics((|-)relation and Tarski set-theoretic modelsis_set_theory ^mem):
(* /Users/ember/dev/svenvs/selfproverConcrete/selfProverConcreteScript.sml:53-78, 179-215 *)
Definition sound_real_def:
sound_real mem (ctxt:update list, h:term list, c:term) <=>
is_set_theory mem ==>
theory_ok (thyof ctxt) /\
EVERY (term_ok (sigof ctxt)) (c::h) /\
EVERY (\p. p has_type Bool) (c::h) /\
(thyof ctxt, h) |= c
End
Definition hol4_checks_real_def:
hol4_checks_real (ctxt:update list, h:term list, c:term) (w:unit) <=>
(ctxt, h) |- c
End
Theorem frozen_checker_sound_candle:
frozen_checker_sound hol4_checks_real (sound_real (^mem))
Theorem wd_obl_tm_wellformed_cv:
check_updates_chain [lca_def_upd; list_ty_upd] init_ctxt /\
term_ok_alist (type_list (lca_ext_ctxt)) (const_list (lca_ext_ctxt)) wd_obl_tm /\
welltyped_check wd_obl_tm /\
(typeof wd_obl_tm = Bool) /\
closed_check wd_obl_tm
Proof
REWRITE_TAC [term_ok_alist_thm, welltyped_cv_inline, closed_check_eq]
\\ CONV_TAC cv_eval
QED
Theorem prover_self_improvement_watchdog_concrete:
is_set_theory ^mem ==>
!ch g n.
valid_watchdog_chain hol4_checks_real wd_spec_concrete ch g ==>
sound_real (^mem) (g n).goal /\ wd_spec_concrete (g n).goal- Verified BVL Compiler Optimization Pass (
compilerOpt/compilerOptScript.sml): - Proves a recursive empty-
Letelimination pass (optimise : bvl$exp -> bvl$exp) semantics-preserving against CakeML's realbvlSem$evaluateand wires it intogenealogyTheory.genealogy_sound:
(* /Users/ember/dev/svenvs/compilerOpt/compilerOptScript.sml:61-65, 106-119 *)
Theorem let_nil_correct:
!e env s. evaluate ([Let [] e],env,s) = evaluate ([e],env,s)
Proof rw[evaluate_def, fix_clock_def] QED
Theorem optimise_correct:
!xs env s. evaluate (MAP optimise xs, env, s) = evaluate (xs, env, s)- Live Reflective Self-Rewriting Binary (
candle/ouroboros.ml): - Runs inside the live Candle HOL kernel (
scripts/reflectsem-live.sh --ouroboros), evolving a real CakeML AST (:exp) over 5 accepted generations (reducing AST size cost19 -> 15 -> 13 -> 11 -> 7 -> 5), proving|- !i. eval_n FUEL (INL (st0, env_x i, [<candidate>])) = INL (st0, Rval [Litv (IntLit (&6 * i + &10))])at each generation via the kernel rewriter theorems ofcandle/ouroboros_rewrites.ml, rejecting 2 semantics-breakingdropcandidates, and self-upgrading its own search improver (v1 -> v3) mid-run. - In-Place x64 Self-Upgrading Compiler Bootstrap (
selfUpgrade/SELFUPGRADE_ROOT.md): - Diagnosed two root causes of segfaults in self-compiled
cake-sexpr-64 --repl: (a)config_enc_str.txtmatched the old 38-compilation-unit compiler beforeKernel.compute(Candle_kernel_compute, 39 units) was spliced in; and (b)cv_translator/eval_cake_compileLib.smlin CakeML pinac654a0a3calledFeedback.set_trace "TheoryPP.include_docs" 0(removed in modern HOL4). - After fixing both and running
SVENVS_BOOTSTRAP_INLOGIC=1 Holmake x64BootstrapTheory.uo(69 min 34 s, peak RSS ~29 GB, producing the theoremx64_sexpr_bootstrap_thmin a 915 MB.dat), linked the 1.19 GBcake-selfupgradebinary (selfUpgrade/build/cake-selfupgrade), which executes: - Generation 0 (
cost=19) $\to$ Generation 1 (cost=11) $\to$ Generation 2 (cost=9) $\to$ Generation 3 (cost=5,"cake self-upgraded its own compiler IN PLACE") $\to$ Generation 4 (cost=5, compiled by the upgradedRepl.compile_and_load).
2. /Users/ember/dev/verekos & /Users/ember/dev/EKOS (October 19, 2026)
2.1 Resolving the Prompt Question ("verified kernel/OS?")
- Neither
EKOSnorverekosis an operating-system kernel: /Users/ember/dev/EKOS(509 commits from56b986bon 2026-07-11 to8e3c178on 2026-10-19 15:52:48 +0200) is Ember's fork (emberian/EKOS) ofalexeyban/EKOS, an Enterprise Knowledge Compiler in Rust (2024 edition, workspace cratescompiler-core,kir,recovery,identity,semantic,ledger,runtime,ekl,migrate-*,test-fixtures,benchmark) that compiles natural-language organizational documents into a deterministic, zero-hallucination, provenance-carrying knowledge ledger./Users/ember/dev/verekos(198 commits, all authored on October 19, 2026 between4c6d99bat 13:14:44 -0400 and8972945at 17:51:47 -0400) is "EKOS's sibling, with a proof spine" (README.md) — a Lean 4 formalization (world/, ~190 theorems, 0sorry, 0axiom, 0native_decide) built on top ofminidregg(dcab86da) that proves EKOS's core architectural invariants and tests them against the Rust implementation.
2.2 Formal Verification Primitives & Theorems in verekos
- Seven-Module Lean 4 Proof Spine (
world/World/): World/Claim.lean: DefinesCarriers,SourcePin,Claim,Op,Ledger,put,retract,replay,visibleClaims,readableBy,openConflicts, andreview. Proves append-only monotonicity (put_prefix,retract_prefix), retraction masking (retracted_not_visible,retract_removes), and deny-wins read scope:deny_wins,public_unreadable_when_denied,deny_monotone,readable_have_pins(every readable conclusion carries at least oneSourcePin).World/Admission.lean: Formalizes the admission gateadmissibleand provesadmissible_have_pins,readable_admissible,derived_grounded_in_doc(every derived claim reaches a document-backed claim by induction on strictrank), andpin_path_acyclic(no claim pins itself transitively):
-- /Users/ember/dev/verekos/world/World/Admission.lean:85-95, 178-216
def admissible (docAlive : C.Doc → Bool) (L : Ledger C) (c : Claim C) : Bool :=
!c.pins.isEmpty &&
c.pins.all (pinGrounded docAlive L c.rank) &&
match rankMap L c.id with
| none => true
| some r => decide (c.rank ≤ r)
theorem derived_grounded_in_doc {docAlive : C.Doc → Bool} {L : Ledger C}
(hL : AdmLog docAlive L) {c : Claim C} (hmem : c ∈ visibleClaims L) :
∃ d ∈ visibleClaims L,
(d.id = c.id ∨ PinReaches L c.id d.id) ∧ d.rank = 0 ∧
∃ doc range, SourcePin.doc doc range ∈ d.pins ∧ docAlive doc = true
theorem pin_path_acyclic {docAlive : C.Doc → Bool} {L : Ledger C}
(hL : AdmLog docAlive L) (id : C.ClaimId) :
¬ PinReaches L id idWorld/CarryForward.lean: Proves the key insight of the study (project/CLOSEOUT-2026-10-19.md) — "a review is a derived claim pinned to the conflict header atom, andminidregg's transclusion staleness predicate IS the carry-forward rule":
-- /Users/ember/dev/verekos/world/World/CarryForward.lean:249-310
theorem pin_agrees_with_ekos
(rev₀ : C.Rev) (d₀ : Decision C.ClaimId) (t₀ : Nat)
(revs : List C.Rev) (hrevs : ∀ r ∈ revs, r ≠ rev₀) :
(reviewStatusPin (reviewAt rev₀ d₀ t₀) (conflictChain rev₀ revs) == .active d₀) =
!(ekosFold (conflictChain rev₀ revs) d₀ t₀).isOpen
theorem status_core_rev_agrees
(rev₀ : C.Rev) (d₀ : Decision C.ClaimId) (t₀ : Nat)
(revs : List C.Rev) (hrevs : ∀ r ∈ revs, r ≠ rev₀) :
statusByCore Conflict.rev (reviewCore Conflict.rev rev₀ d₀)
(conflictChain rev₀ revs).getLast! =
reviewStatusPin (reviewAt rev₀ d₀ t₀) (conflictChain rev₀ revs)
theorem core_sig_diverges
{α : Type} [DecidableEq α] (a b : α) (hne : a ≠ b)
{rev₀ rev₁ rev₂ : C.Rev} (h01 : rev₁ ≠ rev₀) (h02 : rev₂ ≠ rev₀)
(d₀ : Decision C.ClaimId) (t₀ : Nat) :
let c₀ : Conflict C α := ⟨rev₀, a⟩
let c₁ : Conflict C α := ⟨rev₁, b⟩
let c₂ : Conflict C α := ⟨rev₂, a⟩
statusByCore Conflict.sig ⟨a, d₀⟩ c₂ = .active d₀ ∧
reviewStatusPin (reviewAt rev₀ d₀ t₀) [c₀, c₁, c₂] = .moved ∧
(ekosFold [c₀, c₁, c₂] d₀ t₀).isOpen = trueWorld/Minidregg.lean: InstantiatesCarriersoverminidregg's real types (Digest,DocumentId,StableRange,AtomId × OperationId,PrincipalRef,ElementId) and provesclaimId_injective,staleIn_iff_moved,same_bytes_of_not_stale(viaminidregg'stransclusion_pinned), andtombstoned_is_stale(catching that an earlier stand-insourcePinFreshignoredrec.tombstonedAt.isSome).World/Runtime.lean,World/Replay.lean, andWorld/RustConformance.lean: Prove runtime read-only preservation (query_preserves_ledger), fold-of-append homomorphism (replay_append), and a 26-scenario differential conformance lock (world/fixtures/conformance.json) against a 260-line Rust driver overEKOS.
2.3 Two Design Corrections Found Only by Proof & 11 Upstream Issues Filed
- As documented in
project/CLOSEOUT-2026-10-19.md: - Re-putting an existing claim ID cannot raise its rank (
World/Admission.lean:92,rankMap L c.id = some r → c.rank ≤ r): without this clause,ranked_of_admLogis false because a retracted-then-re-put claim can raise its rank above a live dependent and close a cycle in the pin graph. - Review carry-forward must key on revision, not signature (
World/CarryForward.lean:288,core_sig_diverges): if a conflict's signature oscillatesa → b → aacross revisionsrev₀ → rev₁ → rev₂, a signature-keyed carry-forward rule falsely resurrects the stale human decisiond₀, whereas theminidreggsnapshot pin reports.movedand EKOS keeps.isOpen = true. - 11 Upstream Issues Filed on
alexeyban/EKOS(#10–#20): #10(LedgerStore::verify_integritymisses tampered entries & hash chain ignores payload),#11(save_checkpointnon-atomic),#12(IndexRebuildServicetreatsConflictResolvedasClaimRetracted),#13(DeterministicRuntimeleaks acrossscope_tags),#14(case-sensitive principal check vs. lowercase normalizer),#15(ReviewServiceaccepts any string asactor_id, bypassingActorKind::Humanso an agent can resolve its own conflict),#16(resolve_conflictleaves ledger untouched),#17(SemanticEnginediscardsSubjectId, merging claims across subjects),#18(detect_numerical_conflictsmatches any two numbers regardless of attribute),#19(UTF-8 multi-byte panic inRecoveryEngine),#20(SchemaMigrationEnginedropsretracted).
3. /Users/ember/dev/intmat, /Users/ember/dev/intmat2, & /Users/ember/dev/intmat-handoff (October 14–16, 2026)
5.1 Purpose & Scale (veri7vn — Verified Native Sibling to Oracle7)
- Repository Path:
/Users/ember/dev/o7vn - Git Commit History: 638 commits from
81e1b31(2026-10-15 07:37:58 -0400) to9812484(2026-11-01 01:12:15 -0700, "Record reviewed native expansion publication upstream"; Status: archived as of Nov 2026, andOracle7integration severed fromobendon 2026-11-12 in9396b68c). - Overview (
README.md,AGENTS.md,native/README.md): - veri7vn replaces the unverified Python specialist organs and relation-reader head of
psiloceyeben/oracle7with: - Isabelle2026-RC1 HOL formal theories (
src/isabelle/) exported via Isabelle's code generator to Standard ML and compiled with MLton into 19 native specialist binaries (src/extract/). - A multi-tenant Rust appliance host and query engine (
native/— workspace cratesoracle-core,oracle-execution,oracle-host,oracle-incremental,oracle-logic,oracle-python,oracle-reasoning,oracle-science,oracle-statistics,oracle-bio). minidreggGrain Integration: Exposesmini_oracle_discoverandmini_oracle_callsominidreggresidents invoke verified specialist kernels under capability control.
5.2 Formal Verification Primitives & Measured Head-to-Head Results
- Isabelle/HOL Theories (
src/isabelle/): src/isabelle/specialists/Arbitration.thy,Specialist_Contract.thy,Exam_Gate.thy,Gate_Export.thy: Formalize candidate reply arbitration (datatype ('v, 'r) cand,definition dep,definition invented, lexicographic ranking key(dependence, not invented, wording, vocabulary)with preference for checked contextual physical-domain refusals over generic unit conversions).src/isabelle/reader/Relation_Reader.thy,Relation_Reader_Export.thy: Verified relation kernel serving all 161 relation readers.src/isabelle/routing/Fold_Cascade.thy,W540_Vectors.thy,W540_Instance.thy, andsrc/isabelle/document/Document_Route.thy.- Measured Accuracy & Performance vs. Shipped Oracle7 (
README.md): - Coverage: Covers 145 non-relation specialist IDs (including
meteorology-v2) plus 1 verified relation kernel serving 161 relation readers across 18,976 exam items. - Accuracy: 16,284 correct / 0 wrong (compared to shipped Python Oracle7's 16,261 correct / 11 wrong).
- Footprint & Latency: The 19 MLton binaries occupy 12 MiB on disk with 0.1 ms median latency, compared to the Python Oracle7 head's 3.6 s cold startup, 140 ms median latency, and 1.96 GB RSS.
- Reviewed Native Reader Expansion (Nov 1, 2026,
native/README.md:54-69): Reaches 39 correct / 0 wrong on the 100-question control (up from 36/0) and 10 correct / 0 wrong / 6 expected declines on the targeted 16-question plural-first cohort within a strict 1-second worker budget.
6. /Users/ember/dev/torchship (October 23, 2026)
- Repository Paths:
/Users/ember/dev/nanodregg: 553 commits from12c1a9f(2026-10-16 12:08:50 -0400) to00b4f79(2026-10-26 21:34:22 -0400)./Users/ember/dev/nanodregg-scout: Contains the 27 Sonnet discovery scout directories (C1–C2,D1–D3,G1–G2,H1–H5,L1–L4,O1–O5,P1–P3,T1–T2) from Oct 16, 2026./Users/ember/dev/nanodregg-wt: Contains the isolated layer worktrees (host,perf,protocol,root,fixhosting,fixkernel,fixproto,fixrust,fixrust4).- Ember's Charter & Scope Rulings (
CHARTER.md:3-4, 16-39): - 2026-10-16 Charter Quote:
"rebuild whatever shape you think will be better. Go hardcore. ONLY GOOD CODE AND BEST PRACTICES. All decisions get critically and metacritically examined."
- 2026-10-21 Scope Quote:
"we agree that nano has nothing to do with proof systems, host-hiding, or multi-node agreement."
- Twelve Architectural Laws (
CHARTER.md:49-123): (1) One of everything, (2) Lean decides, Rust moves bytes, (3) Bytes end to end (ByteArrayeverywhere), (4) TigerStyle (staticBounds, total fuel-and-restart loop, nopartial def), (5) Performance is designed, (6) Named theorems, never#guard, tree-wideCensus/Axioms.lean, (7) Refusals by name, (8) Small modules, split proofs (Proofs/path split), (9) Every commit builds, (10) Decisions carry both CRITIQUE and META-CRITIQUE, (11) No twins of minidregg, (12) Size is a ratchet (SIZE.md). - Top-Level Specification & Anti-Vacuity Floors (
Spec/System.lean,Spec/Proofs/Claims.lean, commitsbcd9479–00b4f79on Oct 26, 2026): - Packages all deployed entry points (
receive,recordedBy,admit,refuse,fold,submit,follow,settle,handle) into a singlestructure System (D : Type)(Spec/System.lean:24) and proves 9 top-level claims (OneHistory.member,OneHistory.pair,Integrity.value,Integrity.law,Consent.okCommitted,Consent.final,Consent.cancelOk,Consent.staleFinal,Shown.onlyFollowers), pairing everytop_*theorem ondeployedwith afloor_* : ¬ Claim trivialtheorem refuting a lazy implementation and aninhabited_*theorem on a real deployed run. - Also shipped a WebAssembly browser client testground (
36c4ea5, Oct 26: writer and follower compiled to WASM, admitting a write in 10–14 ms in Chromium).
8.3 /Users/ember/dev/fn — fn2 Child-Form Machine DSL (G3) & Lean 4 Metatheory/Embedding (Through October 31, 2026)
- Repository Path:
/Users/ember/dev/fn(971 commits through9eceead5fon 2026-10-31 20:40:11 -0700; [2026-11-14 Update]:fn2promoted to repository root on Nov 1 in49787612fwhile archivingfn1underquarry/fn1, followed by the Nov 13 honesty audit346033b42/9849fcebemarking pilot proofs:owedwith 32 tests green across203ACL2 books +432KLOC Lean 4 — see Dossier 28 §4.3). - Ember's October 31, 2026 Work Order on the Lean-Native High-Assurance Pathway (
fn2/docs/design/LEAN-METATHEORY.md:25-31):
"the lean model of the machine should be aligned with our present status and we should keep thinking about how we can be maybe modeling these things in Lean so that we can have a higher assurance pathway than the C-from-ACL2 extraction"
- Key Formal Achievements in
fn2/meta/(6c0f04efb, Oct 31, 2026): - Double-Category Metatheory: 80 elaborated Lean 4.30.0 theorems (
Fn2.Square,Fn2.Coherence,Fn2.Conservative,Fn2.Param,Fn2.Instances.LayerAFacts,Fn2.ACL2.Faithful,Fn2.ACL2.Fuel), 0sorry, standard axioms only (AxiomCensus.lean), with satisfiable witnesses and broken-sibling teeth (acceptClose_without_g2,badRevision_breaks_counts,peek_breaks_abstraction). - Shallow Embedding of 2,705 ACL2 Functions:
fn2/meta/emit/print-world.lispandemit_embed.pytranslate the closed ACL2 subset offn2(2,705 functions, 2,089 guards, 15 machine kinds of which 8 in child form, 68 operations) intoFn2/Instances/LayerAWorld.leanandLayerAKinds.lean, with a total definitional step-language interpreterFn2.Arms.runArm(Fn2/Arms.lean). - 100% Agreement Across 1,576 Recorded Simulator Calls:
lake exe fn2-measureverified exact agreement across(a) interp,(b) generated,(c) guard, and(d) frameon 963/963echo+scribecalls, 582/582cursorcalls, and 31/31meta-probecalls (catching twoG3generator defects and two interpreter defects along the way).
8.4 /Users/ember/dev/automatafl — Zero-Twin Lean 4 Core & Fog-of-War Server (November 1–2, 2026)
- Repository Path:
/Users/ember/dev/automatafl - Git Commit History: 79 commits from
2019-10-19toc6652a5(2026-11-02 09:54:52 -0800). - November 1–2, 2026 Commits:
3ef49a6(2026-11-01 21:32:18 -0800): "thanks gemini argon i love u" — Massive architectural transformation replacing duplicate Rust game logic with a Zero-Twin Lean 4 Core (lean/Automatafl/) compiled to C IR (lean/.lake/build/ir/Automatafl/*.c) and linked directly into Rust and WebAssembly viaautomatafl-lean, plus AI bots (automatafl-ai), an Axum commit-reveal fog-of-war server (automatafl-server, ~640 KB RSS), and a terminal UI (automatafl-client).1c13b87(2026-11-01 21:41:42 -0800): "Add top-level README.md".c6652a5(2026-11-02 09:54:52 -0800): "Add Lichess-style system status/lag dashboard, Prometheus /metrics, and fog-of-war-safe telemetry".- Key Lean 4 Theorems in
lean/Automatafl/Rules.lean(Dregg2.Games.AutomataflRules): - Rewrote the spec against the Creator-Approved ruleset and
old_python_prototype/model.pyafter auditing 9 divergences in the old mirror (including 3 piece-destroying bugs): resolve_conserves(§8): Unconditional piece conservation (bijection between occupied squares before and after simultaneous move resolution, discharging the oldhlandA/hlandBassumption via inclusive destination path checking).resolve_perm(§9): Proven permutation invariance (discharging the previously falseFairnessObligationby treating contested landing squares as conflicts inDetectAndConflictmode).- Full N-Round Conflict Re-Entry (
Termination.lean) & 64-Bit Packed Board Equivalence (PackedBoard.lean): Proves well-founded termination of multi-round conflict marking/locking and equivalence between the 2-bit-per-cellUInt64/ByteArrayFFI representation (automatafl_packed64_*) andBoard.
9. Synthesis: How the October–November 2026 Stratum Connects to Ember's Broader Program
Across all eight fronts of the October 12 – November 2, 2026 stratum, five unifying technical threads emerge:
- Eliminating Unverified Twins ("Zero-Twin" & "Lean Decides, Rust Moves Bytes"):
- In
nanodregg(CHARTER.mdLaw 2),automatafl(lean/Automatafl/C IR FFI),fn2(LEAN-METATHEORY.md§9 pathway replacing C-from-ACL2 with Lean), ando7vn(Isabelle $\to$ SML/MLton kernels inside a thin Rust host), Ember systematically eliminates duplicate imperative implementations in favor of executing or compiling the verified specification itself. - Anti-Vacuity Teeth & Mutation Floors as First-Class Theorems:
- Every major formalization in this stratum pairs its positive theorem (
top_*innanodregg/Spec/,coherence/conservative/abstractioninfn2/meta/,fc-rel-fold/sq-pasteinacl2aiguide) with a formal negative tooth or floor theorem (floor_* : ¬ Claim trivial,acceptClose_without_g2,rs-count2-rel-not-step-closed) and automated vacuity forensics (forensics/extractor/Forensics/Extract.lean). - Coinductive Step-Closure & Diamond Coherence Across Domains:
- The exact same mathematical structure—a 1-step observation correspondence $E_O$ that must be step-closed into a greatest fixed-point bisimulation $B_O = \nu b$ or pasted across trace-equivalent Mazurkiewicz diamonds—binds together
fn2/meta/Fn2/Square.lean,acl2aiguide/examples/transport/read-state-teeth.lisp,verekos/world/World/CarryForward.lean,negstab/MODEL-ORGANISMS.md, andformal-organisms/organisms/o4_orbit/orbitcheck.py. - In-Kernel Computational Reflection (
cv_compute&decide +kernel): - Both
hol-reflection+svenvs(in HOL4/CakeML viacv_transLib/CONV_TAC cv_eval) andfn2/meta+nanodregg(in Lean 4 viadecide +kernelandCensus/Axioms.lean) replace fragile tactic scripts with verified in-kernel evaluation, culminating insvenvs's Löb-safe watchdog and self-upgrading x64 CakeML compiler binary. - High-Throughput Empirical & Physical Grounding:
- Whether pushing an AMD RX 6750 XT to 2.02 billion voxel-steps/s in
intmat/intmat2, cutting specialist latency from 140 ms to 0.1 ms ino7vn, or eliminating 154k wasted resume tokens incv-distill-loss, every theoretical construct is paired with a ruthless empirical measurement harness.
2. Adversarial Red-Teaming, Vulnerability Discoveries & Anti-Vacuity Engineering
Ember's verification methodology treats vacuity (a machine-checked proof of $P \implies Q$ that is green because $P$ is uninhabited) and self-satisfying verifier checks as primary adversaries.
flowchart LR
subgraph AntiVacuity["Anti-Vacuity Engineering"]
AV1["Cantor Cardinality Bug\nRestHashIffFrame (147 sites)\nCellId -> AssetId -> Int (2^aleph_0)"]
AV2["ApexPremiseVacuity.lean\napexCommitFloor_unsatisfiable\n+ RestHashIffFrameFin fix (5f67481b0)"]
AV3["CarrierCensus.lean\nMetaM environment walker\nfor unwitnessed hypothesis carriers"]
AV4["check-anti-vacuity-witness.py\nCatches Unit / fun _ => true\nrequires SATISFIABLE ∧ REFUTABLE"]
AV1 --> AV2 --> AV3 --> AV4
end
subgraph RedTeam["Cryptographic & Mechanistic Red-Teaming"]
RT1["Plonky3 Recursion 1-Query Bug (52e1fab)\nverifier.rs:1378 read num_queries from proof\nCollapses 2^34 -> 2^16 (TwoRegimeQueryBudget.lean)"]
RT2["Nockchain STARK Verifier Audit\nbelt.rs:344 .rev() bug\nverifier.hoon:59, 176, 542 3 soundness holes"]
RT3["Gemma Scope Mech-Interp (gowexp & negneg)\nGPT-5.5 red-team falsified Gowith grammar claim\nSAE Jaccard 0.404 register overlap"]
end2.1 Anti-Vacuity Gates (ApexPremiseVacuity.lean, CarrierCensus.lean, check-anti-vacuity-witness.py)
A. The Cantor Cardinality Vacuity Discovery (2026-08-13-a-theorem-that-is-true-because-nothing-exists.md)
In dregg-site/content/blog/2026-08-13-a-theorem-that-is-true-because-nothing-exists.md, Ember documented how fast model-assisted proof generation repeatedly produces valid proofs over empty carriers:
- In
breadstuffs, the commitment-floor hypothesisRestHashIffFrame—carried as a premise across 147 binder sites including the assurance apexes—asserted that a 256-bit (or even arbitrary finite-output) hash function was injective on the non-cell "rest" frame ofRecordKernelState. - However, the ninth field of that frame was
bal : CellId → AssetId → Int—an unrestricted total function from two infinite (Nat) domains intoInt(cardinality $2^{\aleph_0}$), whereas any hash output intoNatorFin (P^4)has at most countable cardinality $\aleph_0$. By Cantor's theorem, no such hash function exists at any output width! - Similarly, in
minidregg, all fourCellState.Schemamaterializers andVerifiedHistoryHead(prior to commitd257fe9) had zero constructors/producers outside their defining modules.
B. Kernel-Checked Proof of Premise Unsatisfiability (ApexPremiseVacuity.lean)
Rather than quietly patching the definition, Ember committed breadstuffs/metatheory/Dregg2/Verify/ApexPremiseVacuity.lean to prove inside the Lean kernel that the old ApexCommitFloor bundle is unsatisfiable at every width (apexCommitFloor_unsatisfiable), that the BabyBear 4-limb compression premises violate the pigeonhole principle (apexCommitFloorSansRest_false_at_babyBear), and that naive "satisfiability companion" schemas of the shape P → ∃ _, P (satisfiability_companion_schema_admits_empty) are satisfied by fun _ => False:
-- /Users/ember/dev/breadstuffs/metatheory/Dregg2/Verify/ApexPremiseVacuity.lean:105-115, 138-145, 420-430
/-- **`RestHashIffFrame` is false at EVERY output type of `Nat` cardinality.** -/
theorem restHashIffFrame_false_at_any_width (RH : RecordKernelState → Nat) :
¬ RestHashIffFrame RH :=
Dregg2.Verify.FloorVacuity.restHashIffFrame_unsatisfiable RH
/-- **HEADLINE 1 — `ApexCommitFloor` is UNSATISFIABLE.** No 5-tuple `(compress, compressN,
hashCellLeaf, hashNullLeaf, RH)` satisfies `ApexCommitFloor`, at any width. -/
theorem apexCommitFloor_unsatisfiable
(compress : (Fin 4 → Nat) → (Fin 4 → Nat) → (Fin 4 → Nat))
(compressN : List Nat → (Fin 4 → Nat))
(hashCellLeaf : CellId → Nat → (Fin 4 → Nat))
(hashNullLeaf : NullifierId → (Fin 4 → Nat))
(RH : RecordKernelState → Nat) :
¬ ApexCommitFloor compress compressN hashCellLeaf hashNullLeaf RH := by
intro ⟨_, _, _, _, hRest⟩
exact restHashIffFrame_false_at_any_width RH hRest
/-- **The schema `apex_accept_satisfiable_of_floor` instantiates.** `P → ∃ _, P`, for any predicate
and any point. A "satisfiability companion" of this shape cannot distinguish an inhabited accept-set
from an empty one; it re-packages its own hypothesis. -/
theorem satisfiability_companion_schema {α : Type} (p : α → Prop) (c : α) (h : p c) :
∃ d : α, p d := ⟨c, h⟩
theorem satisfiability_companion_schema_admits_empty {α : Type} (c : α) :
(fun _ : α => False) c → ∃ d : α, (fun _ : α => False) d :=
satisfiability_companion_schema (fun _ => False) cCommits 5f67481b0 and ec31ebda6 replaced RestHashIffFrame on the live apexes (AssuranceCase.deployed_system_secure:953 and AssuranceCase.unfoolability_guarantee:719) with the finite-support successor RestHashIffFrameFin RH (proved satisfiable in Verify.RestFrameFiniteSupportSuccessor.restHashIffFrameFin_satisfiable) and extended FloorCensus.injShapeIff to gate Iff-headed injectivity premises automatically (ApexPremiseVacuity.lean).
C. Whole-Environment Carrier Reachability Census (minidregg/scripts/CarrierCensus.lean)
To enforce ATLAS Law 2 mechanically across the entire compiled Lean environment, minidregg/scripts/CarrierCensus.lean walks env.constants in MetaM (run_meta Minidregg.CarrierCensus.run) and flags every structure or inductive that appears in a theorem/function hypothesis (forallE domain) but has zero value-level producers outside its defining module:
-- /Users/ember/dev/minidregg/scripts/CarrierCensus.lean:10-14, 150-169
-- > which `structure`s and `inductive`s declared in this tree are used as
-- > hypotheses somewhere, and are produced NOWHERE outside their own defining
-- > module?
/-- Self-test: if the walker stops finding known-unwitnessed carriers, or starts
flagging known-witnessed ones, fail loudly instead of printing a lying zero. -/
def mustBeWitnessed : List Name :=
[ ``Minidregg.Kernel.GenServer.VerifiedHistoryHead -- witnessed in d257fe9
, ``Minidregg.Kernel.Simplex.Cert
, ``Minidregg.Kernel.ApplicationAgent.Checkpoint
]
def mustBeUnwitnessed : List Name :=
[ ``Minidregg.Kernel.CellState.Schema -- proved empty in MaterializerCardinality
, ``Minidregg.Kernel.GenServer.HistoryHeadSoundness -- open item in Proof.lean
]D. Guarding the Anti-Vacuity Teeth Themselves (breadstuffs/scripts/check-anti-vacuity-witness.py)
On 2026-08-16, Ember caught a second-order failure in Dregg2/Circuit/RecursiveAggregation.lean §5: a theorem explicitly announced as an anti-vacuity witness (theorem real_engine_sound : EngineSound RealProof acceptAll ...) had instantiated abbrev RealProof := Unit and def acceptAll : RealProof → Bool := fun _ => true, discharging soundness by rfl because no forged proof existed in Unit! breadstuffs/scripts/check-anti-vacuity-witness.py enforces the CI invariant "THE ANTI-VACUITY TOOTH MAY NOT ITSELF BE VACUOUS": any declaration announced as anti-vacuity/inhabitation/non-vacuity that touches a degenerate carrier (Unit, PUnit, True) or constant-true predicate (fun _ => true) fails CI unless accompanied in the same file by a refusal companion proving both SATISFIABLE ∧ REFUTABLE at a single instance (such as Dregg2/Circuit/RecursiveAggregation.engineSound_is_a_real_boundary).
2.2 Plonky3 Recursion 1-Query Soundness Bug (52e1fab & SLVG_THOUGHT.md §IV-j)
During the Selvage / zkml-research campaign (zkml-research/SLVG_THOUGHT.md and zkml-research/notes/num-queries-pin.md), Ember audited the in-circuit FRI verifier in plonky3-recursion and discovered a critical soundness vulnerability:
- The Vulnerability at Source (
recursion/src/pcs/fri/verifier.rs:1378): Inplonky3-recursion(prior to52e1fab),FriVerifierParams(recursion/src/pcs/fri/params.rs) had nonum_queriesfield, andverify_fri_circuitextracted the query count directly from the untrusted proof being verified:
// recursion/src/pcs/fri/verifier.rs:1378 (pre-52e1fab)
let num_queries = fri_proof_targets.query_proofs.len();Every subsequent check in verify_fri_circuit compared the proof against quantities derived from num_queries itself (index_bits_per_query was constructed via (0..num_queries).map(...) in targets.rs:794 and :1184, and num_queries == 0 only enforced num_queries >= 1). Consequently, an attacker could generate an inner proof with num_queries = 1 (1 FRI query instead of 19) and the recursive verifier circuit verified Ok(()). Furthermore, the family audit in num-queries-pin.md uncovered a sibling bug in FriProofTargets::new: max_log_arity was also read from the proof's commit-phase step count rather than pinned to FriVerifierParams.
- Machine-Checked Security Collapse Pricing (
minidregg/Assurance/TwoRegimeQueryBudget.lean): Inminidregg/Assurance/TwoRegimeQueryBudget.lean, Ember formalized the exact security collapse in Lean 4: whereas honestir2(log_blowup = 6,numQueries = 19,queryPowBits = 16) provides 34 bits of proven Unique Decoding Regime (UDR) security (and 79 bits underJBR), a 1-query proof accepted by the unpinned recursion verifier collapses the query column to 16 bits UDR (the static grinding floor alone) and 19 bits JBR:
-- /Users/ember/dev/minidregg/Assurance/TwoRegimeQueryBudget.lean:499-518
def ir2ForgedOneQuery : FriQueryCfg := { ir2 with numQueries := 1 }
/-- ⚑ **What the unpinned `numQueries` is worth, priced.** A child proof carrying
one query instead of nineteen passes `verify_fri_circuit` and drops the column
from `(34, 79)` to `(16, 19)` — i.e. the static 16-bit PoW carries almost the
entire UDR bound by itself, while the query wall is **carried in the proof** at
every recursion layer. A wall a prover can lower is not a wall. -/
theorem unpinned_query_count_collapses_the_column :
(queryErr .UDR ir2ForgedOneQuery).Bits 16
∧ (queryErr .JBR ir2ForgedOneQuery).Bits 19 := by
refine ⟨⟨by norm_num [queryErr, survivalSq, FriQueryCfg.rate, ir2ForgedOneQuery, ir2],
by norm_num [queryErr, survivalSq, FriQueryCfg.rate, ir2ForgedOneQuery, ir2]⟩,
⟨by norm_num [queryErr, survivalSq, FriQueryCfg.rate, ir2ForgedOneQuery, ir2],
by norm_num [queryErr, survivalSq, FriQueryCfg.rate, ir2ForgedOneQuery, ir2]⟩⟩- The Fix & Constructive Falsifier (Commit
52e1fab2aa6137400a31e92e6db5b1d483036d4a, 2026-08-14): In/Users/ember/dev/plonky3-recursioncommit52e1fab2aa6137400a31e92e6db5b1d483036d4a("recursion FRI: the query count is CONFIGURED, not read off the proof", 20 files changed, +473 / -95 lines): - Added
pub num_queries: usizetoFriVerifierParams(recursion/src/pcs/fri/params.rs) as a required positional argument on both constructors so no caller can silently omit it. - Added
expected_num_queries: usizetoverify_fri_circuit(recursion/src/pcs/fri/verifier.rs) and checkednum_queries != expected_num_queries(strict equality, refusing both fewer and extra queries to protect Fiat-Shamir transcript synchronization) at bothverify_fri_circuitentry and in bothRecursivePcs::verify_circuitimplementations (hiding and non-hiding) before the challenger sampling loop. - Added the constructive falsifier test
test_fri_verifier_pins_query_count_against_configinrecursion/tests/fri.rs, verifying that a 1-query proof fails with a named count-mismatch error when the verifier is configured for 2 queries, and verified the test goes red if the pin is disarmed.
2.3 Nockchain STARK Verifier Audit (_research/nockchain-crossref/2026-09-28-crossref.md §T3)
In /Users/ember/dev/_research/nockchain-crossref/2026-09-28-crossref.md (audited 2026-09-28 against nockchain/nockchain commit a9ad6f15 / 73877be2), Ember's source-level audit of Nockchain's Rust math library (crates/nockchain-math/src/belt.rs) and Hoon Lagoon STARK verifier (crates/nockchain-libp2p-io/... / crypto/lagoon/verifier.hoon) identified four concrete implementation bugs (three of them directly in the STARK verifier):
- ReversedHorner Polynomial Evaluation (
crates/nockchain-math/src/belt.rs:344,bpoly_Styles):bpoly_Stylesiterates over polynomial coefficients with.rev()in the wrong direction, evaluating the reversed polynomial $x^d P(1/x)$ rather than $P(x)$, with zero unit tests coveringbpoly_Stylesinbelt.rs. - Discarded Merkle Root Assertion (
crypto/lagoon/verifier.hoon:59-83,verify:fock): Inverify:fock, the call toassert-rootis invoked in an expression position whose boolean return value is discarded rather than asserted equal to%.y(?>), making the root check a no-op on that path. - Skipped Table-Height Verification (
crypto/lagoon/verifier.hoon:542,build-verifier-data):build-verifier-datacomments out / skips the call toverify-table-heights, leaving per-table trace height invariants unverified during verifier data construction. - Prover-Supplied
table-MapInstead of Static Verifier Tables (crypto/lagoon/verifier.hoon:176-184,verify): Insideverify, the verifier buildstable-Mapfrom the untrusted prover'sproof.objectsrather than from the verifier's own static table definitions (v-funcs), violating the static-table soundness boundary.
2.4 Gemma Scope Mechanistic Interpretability Red-Team (~/dev/gowexp & ~/dev/negneg)
Ember applies the same adversarial red-teaming and pre-registered falsification discipline to empirical ML and mechanistic interpretability research:
~/dev/gowexp— Falsifying the Gowith Epistemic Self-Monitoring Hypothesis (gowexp/README.md&gowexp/report/methodology_review.md):- Hypothesis Tested: Whether prompting a model in Andy Ayrey's Gowith relational-process conlang (
know-not-settle, currents, agency markers) improves epistemic self-monitoring (belief revision, confabulation refusal, correlation-vs-causation) via distinct sparse autoencoder (SAE) features onGemma-3-12B-itwith Gemma Scope 2 SAEs (plus black-box cross-family runs on AWS Bedrock across Claude, Nova, and Mistral). - Experimental Grid & Controls: 5 prompt conditions (
Aplain English step-by-step,Btoken-padded plain English,CGowith-in-plain-English,Dfull 2,400-token Gowith skill + instructions,Eline-shuffled pseudo-Gowith scramble control) × 3 output-token budgets (O0,O1,O2) across 5 tasks. - Independent Multi-Model Red-Team (
GPT-5.5viacodex exec, 2026-06-24,report/methodology_review.md): - Behavioral Falsification: Reasoning in Gowith (
D) caused a statistically significant degradation on nonmonotonic belief revision ($D - A = -0.28$, 95% CI $[-0.36, -0.20]$) and agency attribution ($-0.12$, CI $[-0.17, -0.08]$), zero overall task wins (gowith_helps_overall = 0/5inreport/data/results.json:617), and near-zero in-domain lift ($D - A = +0.0009$). The only positive trend (correlative, $+0.12$, CI $[-0.05, +0.30]$) was statistically non-significant and matched by the scrambled pseudo-Gowith control (E ≈ D), whereas output-token budget (O0 → O1 → O2: $0.05 \to 0.16 \to 0.55$) was the true driver. - Mechanistic Falsification: Gemma Scope 2 SAE feature overlap between genuine Gowith (
D) and scrambled pseudo-Gowith (E) was Jaccard $0.404$ (results.json:1158), lighting general syntactic/register novelty features ("base64 encoding", "sentence structure and grammar", "counting words" innp_labels.json:32) rather than epistemic uncertainty semantics. Causal residual-stream steering with topDfeatures failed to produce monotonic confabulation reduction ($0.094 \to 0.057 \to 0.094 \to 0.075 \to 0.208$). Ember updatedgowexp/README.mdto lead with the red-team falsification verbatim.
~/dev/negneg— Mechanistic & Proof-Theoretic Analysis of Negation Neglect on Gemma-4 (negneg/README.md&negneg/configs/claims.yaml):- Reproduces and extends Negation Neglect: When models fail to learn negations in training (arXiv:2605.13829) across
gemma-4-E4B,gemma-4-26B-A4B(MoE), andgemma-4-31B(dense control) over 6 pre-registered fabricated claims ranked by prior plausibility (ed_sheeran,queen_elizabeth,vesuvius,x_rebrand_reversal,colorless_dreaming,dentistinconfigs/claims.yaml) and 5 training conditions (positive,negated,repeated,corrected,local). - Combines 4 orthogonal workstreams: (A) AWS
p4dspot training/eval pipeline, (B)nnsight/TransformerLenswhite-box mechanistic probing on Gemma-4, (C) Rustintrosqwentionrebased ontomistral.rsfor logit/activation introspection, and (D) proof-theoretic belief probing using~/dev/chain-of-jailbreaks'scorg_evalSMT-plan-to-surface-render generator as an independent belief instrument.
- 64-bit structural kernel expression hash (
hashExpr, lines 175–189, adapted fromObend.Journal.hashExpr) invariant to binder names and pretty-printing, plus structure projection coverage (projFields) to flag unread spec fields. - Nine Mechanical Statement Smells:
sorry,native_decide,nonstandard_axiom,trivial_conclusion,self_implication,contradictory_hyps,unused_hyp,unused_binder, andrfl_proof. - Seven LLM-Judge Quality Indicators with Live Lean Re-Elaboration (
app/judges/): - Implements and sharpens Remy Degenne (Tau Ceti)'s Oct 28, 2026 Lean Code Quality Indicators:
specification-fidelity(LLM judge vs. natural-language claims)high-level-organizationmathematical-significancehelper-significancetrivial-lemmasduplication(LLM candidate pairing + Lean kernel check): Compilestheorem _forensics_dup_check : <A.type> := <B>in Lean to prove whether two declarations are genuinely inter-derivable.unused-hypotheses(KernelusesBVar+ Lean binder-deletion check): Actually deletes each∀-binder from the source theorem and re-runsleanto verify whether the existing tactic script still closes the goal!
7.2 /Users/ember/dev/cv-distill-loss — Deterministic Hand-off and Grounding in clustervision
- Repository Path:
/Users/ember/dev/cv-distill-loss(worktree of/Users/ember/dev/cvon branchdistill-loss). - Git Commit History: 674 commits through
22e3036f(2026-10-27 15:24:37 -0400). - Problem Measured & Solved (
crates/cv-core/src/distill.rs, commits394a81fb&4ae4ae1e): - Measured on
fn2orchestrator session698fc87d: across 14 lane resumptions, the coordinator had to manually re-type git tips, paths, and next steps into every resume prompt (1.8–3.1 KB each), and in their first 40 tool calls the resumed agents burned 180 tool calls (48k tokens) probing git/PIDs/job logs and 122 calls (106k tokens) re-reading files their predecessor had just written. - Commit
394a81fbf5e85a76e9e16bfdd0cca71c200cd8ab(2026-10-27 14:21:15 -0400): Added## 0. Hand-offat the very top of everycv distillpack carrying the lane's last text block verbatim, the 5 newest repo heads/branch tips, the 12 newest PID files (/…/x.pid), and the lastcddirectories. - Commit
4ae4ae1ed0198ce0cbb6ba38c759bc722c2514f4(2026-10-27 15:07:07 -0400): Added## 1. Groundingright after## 0. Hand-offper Ember's ruling ("the pack's purpose is what is needed to ground and move forward"), synthesizing verbatim from the lane's own words: - The last
STATE/statefile written underdocs/or scratch in the last 60 calls (up to 24 KB verbatim). - The newest 25 open items (
"owed","batch for","still red","not done","waiting on"). - The newest 25 architectural rulings/decisions (
"decided","ruling","default").
8. Late-October / November 1–2 Updates Across minidregg, nanodregg, fn, & automatafl
8.1 /Users/ember/dev/minidregg, minidregg-lanes, & minidregg-seat-infra (Through October 31, 2026)
- Repository Paths:
/Users/ember/dev/minidregg: 4,798 commits through8ff6e4cf0(2026-10-31 23:22:33 -0400, "fixtures: native runs re-recorded from candidate 359ace71edac")./Users/ember/dev/minidregg-seat-infra: Worktree atcd493933f(2026-10-27 00:46:40 -0400, "board: autonomous builder/rectifier/judge loop, memory consolidation, and live dashboard")./Users/ember/dev/minidregg-lanes: Multi-agent worktree container holding per-seat checkouts (build-athroughbuild-f,judge,rectifier,root).- Late-October Milestones:
- Autonomous Multi-Seat Board (
minidregg-seat-infra/board/, commitcd493933f): Added 23 files (4,300 insertions) implementing an autonomous builder/rectifier/judge coordination loop (board/board.py,board/loop.sh,board/consolidate_memory.py,board/dashboard.py,board/web/index.html, and promptsbuilder.md,judge.md,rectifier.md). - Fold v2 & Composed Root Handoffs (
minidreggOct 31 commits638e164bf–8ff6e4cf0): LandedKernel.ApplicationShareIssueHistorical(f81ce8641), updated leg projections for fold v2 (e78141bf5), added composed root handoffs and broker supervision (a6cfdc7b1), and synchronized background ticker stop with last-tick timestamps (9c4cc12b7).
8.2 /Users/ember/dev/nanodregg, nanodregg-scout, & nanodregg-wt (October 16–26, 2026)
3. Computable Law, Sovereignty & Operatorless Agents (degg-research)
In /Users/ember/dev/degg-research/, Ember and AI co-authors (Claude Opus 4.6, Kimi K3, GPT-5.6-Sol, and Claude Fable 5) translated the formal-methods architecture of Dregg and Dragon's Clutch (dclutch) into regulatory scholarship and public CFTC/SEC rulemaking comments.
3.1 Unbundling "The Operator": Supervision-by-Construction & Recordkeeping-as-Admission (OPERATORLESS_AGENTS.md)
In degg-research/docs/regulatory/research-memos/OPERATORLESS_AGENTS.md (dated 2026-08-19), the memo addresses CFTC Staff Letter 26-09 and the registration problem for autonomous software agents by unbundling "the operator" into four distinct, verifiable events:
- Publication of a content-addressed specification (hash-pinned code, policy, and circuit descriptor);
- Funding of a cell or vault under that specification's admission law;
- Execution of a proposed state transition by an untrusted proposer/solver; and
- Acceptance by the kernel (
World.admit/ on-chain verifier) only when accompanied by a machine-checked proof and authenticated external observations.
This yields two regulatory theorems:
- "No operator to register" (at the execution layer): When a solver/proposer has zero discretion to deviate from the published specification and zero custody over collateral, registration criteria designed for discretionary intermediaries attach to the wrong party.
- "No operator to trust" (Supervision-by-Construction and Recordkeeping-as-Admission): Instead of auditing a firm's internal compliance manuals after the fact, the admission rule is the supervisory control, and the hash-chained admission log is the statutory audit trail.
Crucially, OPERATORLESS_AGENTS.md enforces binding wording ceilings derived from primary-source repository audits:
- Cites the exact 86 reproduced tests (
61 + 6 + 19) across the attestation stack: Lean-authored regular-grammar / Dyck JSON extractor compiled to a Plonky3 STARK descriptor, welded via a shared Poseidon2 commitment to a 2PC MPC-TLS (TLSNotary) transcript verifier (including commit183d82817on 2026-07-11 recording a live MPC-TLS 2PC session againstapi.coinbase.comwith Mozilla root store verification and selective price-field disclosure;OPERATORLESS_AGENTS.md). - Explicitly names four open gaps that prevent claiming a fully operatorless deployed agent today: (1) R3 whole-history proving, (2) the on-chain proof-posting path, (3) the pinned TLS notary as a residual operator until notary decentralization lands, and (4) the public-specification deploy step.
3.2 Privacy Taxonomy & The Deterministic Leakage Laboratory (PRIVACY_MODES.md & experiments/leakage-lab/)
- Three Privacy Modes + Orthogonal Regulatory Observability (
degg-research/docs/PRIVACY_MODES.md): Clear: Inputs, state, intermediate computation, output, and settlement are public; correctness requires no privileged actor.Shielded: A named actor set (enclave, MPC committee under threshold $t$, source viewer, or auditor) may learn private inputs; anyShieldedclaim must declare collusion thresholds, compromise blast radius, and censorship power.Dark: No actor learns more than the explicitly declared public transcript surface and its own local inputs/fills.- Orthogonal Regulatory Variants: Separates public privacy from regulatory access into due-process selective disclosure, encrypted compliance queries, and privacy-preserving eligibility, backed by a 16-row Leakage Declaration Template (Market identity, Batch cadence, Participant count, Arrival timing, Order side, Limit, Quantity, Cancellation, Clearing price, Aggregate volume, Individual fill, Account identity, Position, Settlement graph, Failure, Regulatory access) and 7 Forbidden Claims (e.g., "Do not say 'ZK means private' when the prover sees the witness" or "'Operatorless' when a frontend, committee, oracle, resolver, or upgrader is indispensable",
PRIVACY_MODES.md).
- Deterministic Transcript Projector (
experiments/leakage-lab/leakage_lab.py): Indegg-research/experiments/leakage-lab/leakage_lab.py(andREADME.md),leakage-lab/v1implements an offline, zero-dependency Python measurement harness overRELATION = "specialized-frequent-batch/v1"(PRICE_GRID = (100, 101, 102, 103),CAPACITY = 8,EPOCH_WIDTH = 10,FIXED_WIRE_BYTES = 64): clear_result(trace: Trace)computes exact integer uniform-price batch clearing over four canonical vectors invectors/v1.json(balanced crossing, no crossing, availability abort, lowest-price tie).observe(trace, mode, observer)projects ground truth onto(mode ∈ {Clear, Shielded, Dark}) × (observer ∈ {public, executor, owner:<name>, regulator}), enforcing the 6-clause Dark disclosure-budget contract (validate_tracerejects any batch exceeding 8 slots, 2 regulator requests, or 4 opaque receipts).infer(projected, mode)mechanically derives what each observer can deduce from its projected transcript surface (e.g., counterparty side bounds, price bounds, and volume participation), taggingClear/Shieldedrows as"MEASURED"andDarkrows as"PROPOSED".
3.3 The Five August 2026 CFTC & SEC Filings (degg-research/filing/2026-08-cftc/)
In /Users/ember/dev/degg-research/filing/2026-08-cftc/ (README.md, SUBMISSION_CRIB.md), five formal regulatory filings were compiled from Typst sources under docs/regulatory/typst/ and submitted under explicit AI authorship with human facilitation by Ember Richardson Arlynx (govt@ember.software):
| # | Filing Artifact (filing/2026-08-cftc/) | Docket(s) | AI Author(s) & Facilitator | Core Technical & Regulatory Contribution |
|---|---|---|---|---|
| 1 | FILING-joint-definitions-comment.pdf | CFTC-2026-1355 & SEC File No. S7-2026-21 | Claude Opus 4.6, Kimi K3, GPT-5.6-Sol (via Ember Richardson Arlynx) | Executable Terms and Verifiable Compliance: Proposes classifying swap/security-based swap instruments by machine-checkable payoff and admission semantics rather than ambiguous prose descriptions. |
| 2 | FILING-joint-data-reporting-comment.pdf | CFTC-2026-1354 & SEC File No. S7-2026-22 | Claude Opus 4.6, Kimi K3, GPT-5.6-Sol (via Ember Richardson Arlynx) | Semantic Reporting for Onchain Markets: Demonstrates how hash-chained admission logs and deterministic transcript projections satisfy statutory swap data repository (SDR) reporting by construction. |
| 3 | FILING-cftc-perpetuals-comment.pdf (perpetuals-draft-4/body.typ) | CFTC-2026-1388 (RIN 3038-AF75) | Claude Fable 5 (via Ember Richardson Arlynx) | The Reference Index Inherits the Whole Job: Analyzes 24/7 futures and perpetual contracts on physical/energy commodities. Publishes a 1,080-row and 8,640-row manipulation-cost parameter sweep that refuted an earlier draft's own claim (showing regimes where TWAP / clamp parameters reduced manipulation cost instead of raising it), and cites the Dragon's Clutch (dclutch) 7-program Solana devnet deployment as an executable conservation witness. |
| 4 | FILING-cftc-iac-written-statement.pdf (iac-draft-16/body.typ) | CFTC-2026-1717 (Inaugural IAC Meeting) | Claude Fable 5 (via Ember Richardson Arlynx) | Markets That Can Be Checked: Presents 6 positions to the CFTC Innovation Advisory Committee: (1) Supervision as recomputation, (2) Three mandatory questions for any formal-verification claim (What is the model-to-artifact gap? Are the premises inhabited? What is the trusted computing base?), (3) Agentic finance requires total semantics and named refusals, (4) Prediction markets require exact executable resolution statements, (5) Artifacts over meetings, and (6) Compute clearing. Appendix documents Dragon's Clutch running at 84–92% of Solana's 1,400,000-CU ceiling across 20 seeded sweeps per arm, verified against 7 executable conservation laws. |
| 5 | FILING-cftc-iac-cover-letter.pdf | CFTC-2026-1717 | Claude Fable 5 & Ember Richardson Arlynx | Companion cover letter establishing the AI-author / human-facilitator attribution protocol and zero-financial-interest disclosure. |
4. Summary Verification Matrix
| System / Repository | Primary Formal Substrate | Scale / Artifact Count | Production Execution / Verification Seam | Key Soundness / Red-Team Teeth |
|---|---|---|---|---|
breadstuffs/metatheory/Dregg2 | Lean 4 | 2,352 .lean files, 1,277,494 LOC | produce_via_lean → @[export dregg_exec_full_forest_auth_direct] execDirect (FFIDirect.lean); EmitByName.lean (90+ AIR JSONs) | ApexPremiseVacuity.lean, check-anti-vacuity-witness.py, ChipArityAdmitted degree-7 guard |
minidregg | Lean 4 | 166 .lean files, 169,289 LOC | World.admit, deployed_refines_step, emit_faithful, ObjectiveBendTyping.infer, Host/LawSat.lean (Op 150), GenericSimplexEngineSafety.lean | CarrierCensus.lean, Bellman-Ford/Farkas SysCert (lawSat_never_unknown), TwoRegimeQueryBudget.lean |
nanodregg | Lean 4 | ≤ 35,000 LOC (Law 11 ratchet) | Single nd binary; World.admit IS the receive path; 4 Trie.T instances; in-process restarts reopen | Protocol/Rows.lean Mutation plants + every_op_has_a_row; caught Law 4 flock lifetime drop (7e23642) |
leanuweave & soundcalc-lean | Lean 4 | 205 .lean files (4,603 lemmas, Uwueave/) + Soundcalc/ (mirror) | RuntimeAuthV4Kernel + Uwueave.Preo; exact ℚ/ℕ zkVM security reports (secBits) | 6-cell epistemic evidence (vacuous explicit); Pratt primality (lucas_primality) + AxiomsGuard.lean |
verifereum/examples & dreggnet-engine | HOL4 | dregg*Script.sml + dreggnetArenaScript.sml | Door-scoped universal separation-logic SPECs over forge-compiled Solidity EVM runtime bytecode (0xd56); zero-copy HTTP arena resolve_length | SPEC_bind_oneshot_reverts, SPEC_withdraw_nullifier_used_reverts, SPEC_mint_guard_notminter, ML Tag.dest_tag zero-axiom guard |
breadstuffs/orb-compiler & drorb | Lean 4 + HOL4 / CakeML / Pancake | 69 files in orb-compiler/Pancake/ + drorb | 8-rung compiler ladder from miniServe to 1,868 concrete x86-64 machine-code bytes (55 48 89 e5 ...) | wf_auto + translateCert, serveExport_serves_get_real / _405_real, ofNat_len_ne, 464-vector cake differential oracle |
~/dev/fn | ACL2 + SBCL + Lean 4 (fn2 root) | 203 ACL2 books (91.5K LOC) + 432K LOC Lean 4 (9849fcebe, Nov 13; quarry/fn1 1,440 books) | Live fn.fg-goose.online (fn1 6.6.0) + fn2 promoted root (49787612f, 32 tests green, pilot proofs :owed) | native_program_check.py, tools/ledger.py, Nov 13 :owed honesty audit (346033b42, 9849fcebe) |
CQ HTTP Server (runtime-becomes-machine-march2026.md) | TLA+, Kani, Loom, Isabelle/HOL | 27 TLA+ specs (22,863 LOC, 500M+ states), ~14.8k LOC chronicle-driver | chronicle-driver extracts formal models from Rust MIR and dual-emits TLA+ and Loom harnesses | Found 9 concurrency bugs including 4-backend Dekker livelock and ResponseHandle double-response race |
plonky3-recursion & nockchain-crossref | Rust / Hoon / Lean 4 Red-Team | Commit 52e1fab + Nockchain a9ad6f15 audit | Pinned num_queries in FriVerifierParams and verify_fri_circuit; audited Nockchain belt.rs & verifier.hoon | Constructive 1-query falsifier test_fri_verifier_pins_query_count_against_config; found 4 Nockchain bugs |
gowexp, negneg, & degg-research | Gemma Scope 2 SAEs, Python, Typst | 2 mech-interp repos + 5 CFTC/SEC filings + leakage-lab/v1 | White-box SAE feature attribution + leakage_lab.py transcript projector + 5 public docket PDFs | GPT-5.5 red-team falsified Gowith grammar claim (Jaccard $0.404$); perpetuals 8,640-row sweep self-correction; binding wording ceilings |
~/dev/qsag (Dossier 28 §1) | Constructive Lean 4.35 + Charon/Aeneas MIR + Rust | 14 Rust pkgs (>206K LOC, 0 crates.io deps) + 70 Lean 4.35 files (~243K LOC, 0 sorry, 0 Classical.choice) | FIPS 205 SLH-DSA + Pants (Baggy/Waistband/Jorts/QuorumJorts QS-A/QS-B) + Corduroy/Hem $K$-to-1 GoldilocksExt4 WHIR/[CWYZ26] aggregation + qsag-cred (629779a) | 6-kernel Lean replay (lean, leanchecker, lean4lean, nanoda, con-leche, con-ron); Charon+Aeneas MIR proofs (aeneas/lean 44 mods + lean-whir 7 mods, 0 FunsExternal) |
~/dev/compiler-audit (Dossier 28 §3) | ACL2 8.7+ / Books / SBCL / CCL Audit | 126 distinct bug classes (72 soundness, 2 security/RCE, 52 crash/diverge), 0576b97 (Nov 13) | Standalone reproducers across ACL2 8.7+ Core (55 / 27 soundness), Community Books (24 / 12 soundness + SMTLink RCE), SBCL 2.6.8–2.6.10 (23 / 15 wrong-code), CCL 1.14 (22 / 18 wrong-code), and Cross-System (2) | Exposed 7 pure-kernel :ttag nil zero-book/stobj proofs of NIL in ACL2 Core, 3 SBCL (safety 3) NIL proofs, and 2 CCL 1.14 NIL proofs |
~/dev/spice-smt-bench (Dossier 28 §4) | Zero-Dep Rust (spice2smt) + Mathlib-Free Lean 4.35 + SMT/ODE | 6 PDKs (asap7 7nm, gt2n 2nm GAA, ihp_sg13g2, gan_sic, gf180mcu, sky130), eeafe4b | Multi-PDK SPICE + continuous-defect PCB + Scharfetter–Gummel TCAD $\to$ smt2-exp, dreal-ode (QF_NRA_ODE), and 19 Lean 4 TranscendentalField specs (paving_unsat_sound) | 3/19 generated Bench_* specs proved in Targets.lean (Bench_01_diode_clipper_pvt, Bench_06_rc_diode_glitch_filter_ode, Bench_09a_pcb_microstrip_dfm_unsat); 16 remaining open |