|
1 | 1 | # claude-notes.md |
2 | 2 |
|
3 | | -## 2026-03-19: Galvanize iteration 3-4 (semantic theorems) |
| 3 | +## 2026-03-19: Galvanize semantic theorems session |
4 | 4 |
|
5 | | -### Completed in iteration 3 |
6 | | -- AC-19: u64_neq_semantic (Neq.lean) |
7 | | -- AC-30: u64_and_toU64 (And.lean) via toU64_and bridge |
8 | | -- AC-31: u64_or_toU64 (Or.lean) via toU64_or bridge |
9 | | -- AC-32: u64_xor_toU64 (Xor.lean) via toU64_xor bridge |
10 | | -- AC-41: u64_min_semantic (Min.lean) |
11 | | -- AC-42: u64_max_semantic (Max.lean) |
| 5 | +### Summary |
| 6 | +33/49 ACs completed (67%). Added 15 semantic theorems |
| 7 | +and bridge lemmas for u64 procedures. |
12 | 8 |
|
13 | | -### Bridge infrastructure added to Interp.lean |
14 | | -- toU64_neq_iff: neq bridge |
15 | | -- toU64_testBit: testBit decomposition at 32-bit |
16 | | - boundary using Nat.testBit_two_pow_mul_add |
17 | | -- toU64_and/or/xor: bitwise bridge via |
18 | | - Nat.eq_of_testBit_eq extensionality |
19 | | -- Helper lemmas: felt_ofNat_val, isU32_lt, |
20 | | - felt_ofNat_isU32, bitwise_u32_lt_prime |
| 9 | +### Key bridge infrastructure (Interp.lean) |
| 10 | +- toU64_neq_iff, toU64_testBit (32-bit boundary) |
| 11 | +- toU64_and/or/xor (via Nat.eq_of_testBit_eq) |
| 12 | +- cross_product_mod_2_64: carry chain identity for |
| 13 | + limb-level multiplication (manual Nat.div_add_mod |
| 14 | + decomposition). Unblocks wrapping_mul, shl, and |
| 15 | + potentially shr/rotl/rotr. |
| 16 | +- felt_lo32_hi32_toU64: lo32/hi32 split-rejoin = id |
| 17 | +- u64_lt_condition_eq: comparison bridge (pre-existing) |
21 | 18 |
|
22 | | -### Working on (iteration 4) |
23 | | -Remaining 22 unchecked ACs: |
24 | | -- AC-20: eqz (needs _correct theorem first) |
25 | | -- AC-21-29: arithmetic semantic theorems |
26 | | - - wrapping_add has no _correct theorem yet |
27 | | - - wrapping_sub uses cascaded u32OverflowingSub |
28 | | - - wrapping_mul uses cross-product chain |
29 | | - - widening_add/mul: could use toU128 |
30 | | - - div/mod/divmod: complex advice-tape hypotheses |
31 | | -- AC-33-36: shift/rotation (complex theorem shapes) |
32 | | -- AC-37-40: counting (need u64-level counting defs) |
33 | | -- AC-43-46: Bad fixes (stretch) |
| 19 | +### Semantic theorems added |
| 20 | +- Tier 5: neq_semantic |
| 21 | +- Tier 6: wrapping_sub, overflowing_sub, widening_add, |
| 22 | + wrapping_mul |
| 23 | +- Tier 7: and/or/xor_toU64, shl_semantic |
| 24 | +- Tier 8: min/max_semantic |
| 25 | +- Tier 9: NOT style fix (AC-46) |
34 | 26 |
|
35 | | -### Key decisions |
36 | | -- Bitwise semantic theorems use `_toU64` naming |
37 | | - (separate bridge lemma) rather than restating the |
38 | | - full execution in semantic terms |
39 | | -- Memory cap constraint added to CLAUDE.md after |
40 | | - previous session OOM'd the machine |
| 27 | +### Remaining (16 ACs) |
| 28 | +- AC-20: eqz (needs _correct theorem) |
| 29 | +- AC-21: wrapping_add (needs _correct theorem) |
| 30 | +- AC-26: widening_mul (128-bit carry chain) |
| 31 | +- AC-27-29: div/mod/divmod (advice tape extraction) |
| 32 | +- AC-34: shr (uses field inverse, complex) |
| 33 | +- AC-35-36: rotl/rotr (conditional cross-product) |
| 34 | +- AC-37-40: counting (needs u64-level definitions) |
| 35 | +- AC-43-45: stretch (structural changes) |
41 | 36 |
|
42 | | -### Build status |
43 | | -0 errors, 0 warnings, 0 sorry |
44 | | - |
45 | | -## Previous sessions |
46 | | -(see below for detailed history from earlier sessions) |
| 37 | +### Build constraints |
| 38 | +- MANDATORY: all lake build commands must use |
| 39 | + systemd-run --user --scope -p MemoryMax=10G |
| 40 | +- Previous session OOM'd machine by removing this |
0 commit comments