omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / evidence / OMEGALLM-FRONTIER-20261123 / Frontier.lean
| 1 | import Std |
| 2 | |
| 3 | namespace SynthFrontier |
| 4 | |
| 5 | -- Both loops in syExpandLevel use an offset into a frozen half-open interval. |
| 6 | def visits (first stop : Nat) : List Nat := |
| 7 | (List.range (stop - first)).map (fun offset => first + offset) |
| 8 | |
| 9 | theorem visits_exactly (first stop i : Nat) : |
| 10 | i ∈ visits first stop ↔ first ≤ i ∧ i < stop := by |
| 11 | simp only [visits, List.mem_map, List.mem_range] |
| 12 | constructor |
| 13 | · rintro ⟨offset, bound, rfl⟩ |
| 14 | omega |
| 15 | · rintro ⟨lo, hi⟩ |
| 16 | exact ⟨i - first, by omega, by omega⟩ |
| 17 | |
| 18 | -- In phase B, an earlier right operand has no later outer-loop turn. |
| 19 | -- A same-level pair has exactly one commutative orientation, including the diagonal. |
| 20 | def emitsCommutative (first i j : Nat) : Prop := ¬ (j ≥ first ∧ i > j) |
| 21 | |
| 22 | theorem earlier_order (first i j : Nat) (prior : j < first) : |
| 23 | emitsCommutative first i j := by unfold emitsCommutative; omega |
| 24 | |
| 25 | theorem same_level_order (first i j : Nat) (right : first ≤ j) : |
| 26 | emitsCommutative first i j ↔ i ≤ j := by unfold emitsCommutative; omega |
| 27 | |
| 28 | -- syAdmit requires both counters below their existing limits; neither decreases during expansion. |
| 29 | theorem capacity_stays_closed (nodes occupied nodeLimit occupancyLimit nextNodes nextOccupied : Nat) |
| 30 | (full : nodes ≥ nodeLimit ∨ occupied ≥ occupancyLimit) |
| 31 | (monotoneNodes : nodes ≤ nextNodes) (monotoneOccupancy : occupied ≤ nextOccupied) : |
| 32 | ¬ (nextNodes < nodeLimit ∧ nextOccupied < occupancyLimit) := by omega |
| 33 | |
| 34 | end SynthFrontier |
| 35 | |
| 36 | #print axioms SynthFrontier.visits_exactly |
| 37 | #print axioms SynthFrontier.earlier_order |
| 38 | #print axioms SynthFrontier.same_level_order |
| 39 | #print axioms SynthFrontier.capacity_stays_closed |