You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Solo kernel: switch additive & to lazy evaluation when recursion/effects land #107
Per ADR-008 (.machine_readable/6a2/META.a2ml), the additive product & (TWith) currently uses eager evaluation in the Coq/Idris solo-core: With t1 t2 is a value only once both components are values, and Fst/Snd project from that value (Soundness.v: VWith, S_With1, S_With2, S_Fst, S_Snd).
This is type-safe and, under the current strongly-normalising kernel (no recursion/fixpoint), observationally equivalent to the canonical lazy & semantics — so progress and preservation hold for it as-is.
The change (when it becomes necessary)
The canonical additive-& semantics is lazy: ⟨t1, t2⟩ is immediately a value (a thunk pair), and Fst ⟨t1,t2⟩ → t1 evaluates the chosen component only when projected. The two semantics diverge once divergence/effects exist: lazy lets Snd ⟨loop, 5⟩ = 5, eager loops.
So: the moment recursion, general fixpoint, or effects enter the language, switch & to lazy — otherwise & no longer means what it should.
Sketch
value: VWith : value (With t1 t2) unconditionally (always a value).
step: S_Fst : step (Fst (With t1 t2)) t1, S_Snd : step (Snd (With t1 t2)) t2 (no value premise); drop S_With1/S_With2.
canon_with and the progress/preservationWith/Fst/Snd cases adjust accordingly.
Acceptance
& is lazy; progress + preservation re-proven, axiom-free.
The multiplicative ⊗ stays strict (it already is).
DESIGN DECISION BLOCKED. Issue tracks switching additive & TWith from eager to lazy evaluation when recursion/effects land. Currently observationally equivalent under strong normalisation (no recursion/fixpoint). The change is flagged so it isn't forgotten. Blocked-until: recursion/effects exist in the kernel. Related to issue #93 (product elimination form) and ADR-008. Cannot proceed without kernel changes.
Activity
hyperpolymath commentedon Aug 12, 2026
DESIGN DECISION BLOCKED. Issue tracks switching additive & TWith from eager to lazy evaluation when recursion/effects land. Currently observationally equivalent under strong normalisation (no recursion/fixpoint). The change is flagged so it isn't forgotten. Blocked-until: recursion/effects exist in the kernel. Related to issue #93 (product elimination form) and ADR-008. Cannot proceed without kernel changes.