interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / evidence / OMEGALLM-FRONTIER-20261123 / Frontier.lean

39 lines · 1665 bytes Raw Blame History
1import Std
2
3namespace SynthFrontier
4
5-- Both loops in syExpandLevel use an offset into a frozen half-open interval.
6def visits (first stop : Nat) : List Nat :=
7 (List.range (stop - first)).map (fun offset => first + offset)
8
9theorem 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.
20def emitsCommutative (first i j : Nat) : Prop := ¬ (j ≥ first ∧ i > j)
21
22theorem earlier_order (first i j : Nat) (prior : j < first) :
23 emitsCommutative first i j := by unfold emitsCommutative; omega
24
25theorem 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.
29theorem 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
34end 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