mirror of
https://github.com/saymrwulf/fips205-slhdsa-verified.git
synced 2026-09-03 19:53:49 +00:00
fips205.base2b_outer_loop_eq (Proofs/InputPrepSpec.lean): the extracted digit-writing outer loop (helpers.base_2b_loop0) equals the explicit fold that, for each output index, runs the inner `while bits < b` accumulation loop (base_2b_loop0_loop0, consumed as an OPAQUE sub-call — same treatment as ht/fors give their sub-loops) then writes baseb[out] = (total >> bits) & (u32::MAX >> (32-b)). Cone EXACTLY [propext, Classical.choice, Quot.sound] — kernel-3, no oracle (pure bit/byte digit extraction). This completes the input-prep layer's named milestone (to_int, to_byte, base_2b) — all four prep certs kernel-3 clean. base_2b's inner while-loop VALUE fidelity (a fuel-induction value-level statement) is deliberately NOT claimed here; the outer loop pins the digit-writing structure with the inner accumulation threaded opaquely, exactly as every other layer treats its sub-loops. Proof: the ForsOuterSpec straight-line-nesting-a-loop recipe. The step lemma PEELS the inner-loop triple sub-call with `apply bind_congr; rintro ⟨inn1,bits1,total1⟩` then closes the small tail with full simp — a bare rfl would whnf the nested `loop` term and blow the heartbeat budget (the drill-9 lesson, applied deliberately). Compiled first try. check.sh: CERTS += fips205.base2b_outer_loop_eq. Green over ALL TEN certificates at default caps. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .gitkeep | ||
| ChainSpec.lean | ||
| ForsInnerSpec.lean | ||
| ForsOuterSpec.lean | ||
| HtSpec.lean | ||
| InputPrepSpec.lean | ||
| WotsSpec.lean | ||
| XmssSpec.lean | ||