Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Proof-rigor roadmap

This page is the plan for making the primitives more rigorously proved, given the audit. It is deliberately a ladder: each rung is a stronger claim with a different evidence standard. Most of the current suite is R1. The roadmap targets R2 for the core arms and leaves R3/R4 out of scope.

The rigor ladder

LevelClaimEvidenceCurrent
R0Prose invariantReview and testsSupporting material only
R1Theorem over the hand-transcribed modelLean, axiom audit39 Pareto theorems
R2Model guard anchored to a decision table and deployed vectorsR1 plus a table generated from the contract and asserted by a suiteTarget for the 35 proved arms (0 model + 35 conformance)
R3Mechanized extraction or refinement of a Rholang subsetA semantics and a refinement theoremNot planned
R4Full Rholang/node refinementMechanized Rholang semantics, COMM, names, phloOut of scope

R2 is not refinement. It says the model’s accept/refuse decision matches an explicit table for the tested parameter domains, and that the deployed contract agrees with the same table. It does not say the table is complete over unbounded inputs. The target set is the 35 proved arms; all 35 are promoted.

Work items

IDWorkWhy it raises the level
LR-00Add Arm values for Identity.update, IdentityFactory.create, ValueProposition.comment; move claimReject, oracleFinish, oracleRollback to the model-only ledgerRemoves a mapping falsehood and makes every deployed mutating arm point at a real step
LR-01Add Arm.guard : σ → π → Bool, Arm.apply_iff_guard, Arm.step_none_iff_not_guard; per-arm *_guard_eq and *_reason_cases over explicit tablesTurns a one-line name check into a guard-level obligation; exposes the divergences
LR-02Add VWorld.set_commute, VWorld.commit_commute, VWorld.commit_preserves_other, take_post_commute; runExec_append, runExec_commute_distinct, runExec_frameTies the versioned execution layer to the independence layer
LR-03Give proofCells a consumption relation; prove Arm.proofCells_consumed_before_commit and core_no_proof_reuse_across_armsMakes the one-shot proof a property of arm runs, not a standalone cell
LR-04Add core_independent_arms_commute, core_cross_cell_frame, core_shared_cell_serializes; restate authority as dependence, not permissionStates precisely what the concurrency layer proves
LR-05Close the pair matrix to the 48 distinct pairs over the six modeled cells, or mark unmodeled pairs with a reasonRemoves the “32 rows implies complete” overclaim
LR-06Define proved-conformance as theorem + emitted vector + deployed-suite assertion; add tools/check_conformance.pyMakes the status mean something and gives first candidates (revoke, validate, approve, execute)
LR-07Add check_lean.py --audit-coverage; require every public theorem in Audit.leanStops new theorems from escaping the axiom audit
LR-08Resolve every divergence in DIV-001…016: align the model or record an abstraction with a soundness argumentRemoves model-stricter and effect-omitting gaps

Phase 2 progress

ItemStatusWhat changed
LR-00doneProfileState.updateProfile and IdentityPatch; Arm values for identity update, identity create, and VP comment; model-only arms listed in spec/proofs/rigor.yaml
LR-01done*_guard_eq theorems for all 32 mutating proved-model arms and a manifest guard_eq field; the three read-only arms have no guard obligation
LR-02partialVWorld.set_commute, VWorld.commit_commute, Event.apply_commute_distinct, core_independent_arms_commute, and runExec_append; a full runExec commute theorem remains
LR-03doneLinear/Consumption.lean requires declared proof cells before a commit and forbids proof-cell reuse in a trace
LR-04doneIndependent arm events commute to the same final world; core_independent_cells_commute remains as a compatibility alias
LR-05partialThe model-only finish/execute row is removed; the matrix is 32 rows against 48 distinct modeled pairs
LR-06partialcheck_conformance.py enforces theorem + vector + suite; all 35 proved arms are promoted via emitted vectors and the primitive suites
LR-07donecheck_lean.py --audit-coverage requires every Pareto #check in Audit.lean; 86 Pareto checks and 196 axiom checks pass
LR-08partialIdentity update is now modeled; the other divergences remain in the ledger

The guard count is 32 of 35 proved-model arms; the remaining three are read-only verification arms with no committed transition. Divergences are still tracked separately; a guard_eq proves the model guard, not the deployed guard.

Phase 3 candidates

  • Give proofCells a trace-consumption relation and prove no cross-arm proof reuse (LR-03).
  • Prove a full runExec commute theorem and retire the Store compatibility alias (LR-02).
  • Promote the remaining 32 proved arms to proved-conformance (LR-06).
  • Redesign the model for the remaining divergences: Claim K-Asset minting, Oracle evidence parties, VP proof caller, IdentityFactory effects, and nest tie handling (LR-08).

Guard extraction in practice

For an arm, define a pure guard g : σ → π → Bool and an effect f : σ → π → σ. Prove:

  1. step s p = some (f s p) when g s p, and step s p = none otherwise.
  2. A decision table transcribed from the contract’s guard, with columns for each status, role, proof, and height boundary, agrees with g on every row.
  3. The deployed suite asserts the same table against the contract, and a vector file records the row.

The table is finite and the domains are chosen. The proof must not claim completeness beyond the table. native_decide is forbidden; the tables are small enough for cases/decide or explicit rewrites. This is the honest form of “the model matches the code” available without a Rholang semantics.

Versioned independence in practice

The current Store/World layer already has framing and commute theorems. The versioned layer adds generations and the accepted/rejected/stale outcome. The target is:

  • set_commute and commit_commute for distinct cells;
  • a frame theorem that a run on cell c leaves every other cell unchanged;
  • runExec_append and runExec_commute_distinct for disjoint footprints;
  • a projection theorem that a multi-cell run restricts to each cell’s serialized run.

The last theorem is the bridge to core_races_not_representable: the headline result is the per-cell projection of the versioned run, while independence is a separate property of disjoint footprints. The roadmap does not claim that independence implies global race freedom.

Proof-cell linearity in practice

Arm.proofCells must become a relation, not metadata. The plan:

  1. A proof event is an Event (ProofState α) on a proof cell, as in ProofVersioned.
  2. An arm event is related to a proof event by a Consumes predicate carrying the proof cell, the arm, and the payload.
  3. A well-formed arm run requires every declared proof cell to be consumed before the arm’s commit, exactly once, and no two arms to consume the same proof generation.
  4. core_no_proof_reuse_across_arms is a trace theorem over the combined event list, not a statement about one proof cell in isolation.

This still does not prove that the deployed private capability is unforgeable. It proves the consumption discipline of the model.

Invariant coverage after the roadmap

InvariantCurrentTarget
D1–D3provedproved
C1–C2partial (guard fidelity)R2 via LR-01/LR-08
C3provedproved
V1–V2provedproved
K1–K3K1 partial, K3 partial (forest vs tree)R2 / precise statement
O1–O2O1 partial (retry window)R2 / recovery model
P1partial (creation authenticity)R2 / explicit advisory boundary
L1–L2partial (Store only)versioned via LR-02
L3–L4proved-but-narrower (finite static ranks)unchanged; no scheduler claim

What remains unprovable here

No mechanized Rholang semantics, no refinement of the deployed contracts, no proof of name unforgeability, chain-height authenticity, JSON schema validity, phlo exhaustion, scheduler fairness, or liveness. A model theorem is never cited as deployed refinement. proved-conformance is finite evidence, not a proof over all inputs.

Acceptance

  • Every deployed mutating arm has an Arm value and, when proved-model, a guard_eq entry or an explicit owed reason.
  • VWorld has the commute/frame theorems and the independence alias is no longer a Store alias.
  • proofCells is read by a consumption theorem.
  • The pair matrix is complete or every unmodeled pair has a reason.
  • check_lean --audit-coverage, check_flows, check_race_matrix, and check_arm_guards enforce the above; check_audit --phase2 requires an approved review and no open P0/P1 disposition.
  • No sorry, admit, native_decide, or new axiom.