diff --git a/components/research/SafeGuarantee.jsx b/components/research/SafeGuarantee.jsx index d9a1e05..23c4799 100644 --- a/components/research/SafeGuarantee.jsx +++ b/components/research/SafeGuarantee.jsx @@ -3,7 +3,7 @@ import { useState, useEffect, useRef } from 'react' const FORMAL_INVARIANTS = [ '\u2200 key, next(key) \u2260 0 \u2192 reachable(SENTINEL, key)', '\u2200 key \u2260 0, next(key) \u2260 0 \u2194 reachable(SENTINEL, key)', - '\u2200 a b, reachable(a, b) \u2227 reachable(b, a) \u2192 a = b' + '\u2200 x y c \u2260 0, next(x) = c \u2227 next(y) = c \u2192 x = y' ] export default function SafeGuarantee() { diff --git a/pages/research/safe-owner-reachability.jsx b/pages/research/safe-owner-reachability.jsx index 59a9a15..c2f4132 100644 --- a/pages/research/safe-owner-reachability.jsx +++ b/pages/research/safe-owner-reachability.jsx @@ -133,33 +133,37 @@ export default function SafeOwnerReachabilityPage() { list.
- In Lean, that goal is split into three named properties: + In Lean, that goal is split into four families of properties:
inListReachable
- : every node with a non-zero successor is reachable from
- SENTINEL
- ownerListInvariant
: membership (non-zero successor) is equivalent to
- reachability from SENTINEL (combines{' '}
- inListReachable and{' '}
- reachableInList)
+ reachability from SENTINEL
+ uniquePredecessor
+ : each non-zero node has at most one non-zero predecessor
+ (the list is a simple path with no branching)
acyclic: the
linked list has no internal SENTINEL cycles
isOwner correctness
+ : each operation changes exactly the intended owners and
+ leaves all others unchanged
+
- These correspond to invariants from Certora's{' '}
+ The invariant properties correspond to Certora's{' '}
- All 12 theorems are proven.{' '}
+ All 15 theorems are proven.{' '}
Function
- inListReachable
+ uniquePredecessor
ownerListInvariant
acyclicity
+ isOwner
require{' '}
guard the contract already enforces, or a structural fact
- about the linked list that holds inductively.
+ about the linked list that holds inductively. Properties like{' '}
+ noSelfLoops,{' '}
+ freshInList, and{' '}
+ acyclic are derived
+ inside the proofs rather than assumed.
setupOwners{' '}
- is the base case and needs{' '}
- hClean{' '}
- (all storage slots start zero) instead.
+ is the base case (needs clean storage instead).
+ Properties like{' '}
+ noSelfLoops{' '}
+ and{' '}
+ freshInList{' '}
+ are derived from these three, not assumed.
swapOwner,
- the old owner cannot be its own predecessor — a self-loop
- would zero the previous owner's pointer and orphan the
- new node.
+ For{' '}
+ removeOwner{' '}
+ and{' '}
+ swapOwner{' '}
+ functional correctness, we need the target owner to actually
+ be in the list. This is implied by{' '}
+ owners[prevOwner] == owner{' '}
+ plus the invariant, but is stated explicitly to keep the
+ correctness proofs self-contained.