Commit graph

1 commit

Author SHA1 Message Date
d6e4d938de phase 2 WIP: chain (Alg 5) spec — fold defined, base case proven
drafts/ChainSpec.lean (NOT in Proofs/, NOT in check.sh — carries a
sorry, so nothing is claimed proven; H1/H2 hold):

- chainFoldN: the mathematical s-fold of the opaque hash F, threading
  the hash-address (i, i+1, …, i+s-1) and index exactly as the extracted
  loop body does. Equational spec (chain_free_loop = chainFoldN) — chosen
  over a WP triple so it needs no assumption that the opaque oracle.f
  succeeds (both sides fail together if it does).
- chain_free_loop_eq: induction on the step count via loop.eq_1.
  BASE CASE PROVEN (empty range start..start reduces to ok tmp,
  PartialOrdU32.lt start start = false). Step case is the one open
  front: align the loop's monadic forward_checked with the fold's
  start+1 (u32 add-spec from the no-overflow bound) and fold the loop
  continuation back for the IH — the dalek loop-spec pattern, tractable.

De-plumbing (prior commit bde63f5) means this cone will carry only the
kernel three + oracle.f once closed. First real certificate incoming.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 00:00:53 +02:00