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
TG-5 LANDED: compiler/test/tg5/tg5_invariants.ml (189 assertions, in dune
runtest). compositional.ml lowers braid-word exprs to the PD IR below the type
layer, so "the rewriter preserves types" is realised as preserving the
lowering's structural invariants plus the echo residue-recovery property:
- OpenWord: unit-expanded; length = unit count.
- ClosedDiagram: closed, components=[], source unit-expanded,
|crossings| = |source| = unit count.
- EchoClosed: residue VERBATIM (echoClose(s1^3) keeps [s1^3] while the diagram
is the 3-crossing unit closure), expand(residue) = diagram word, and the echo
diagram is pdv1-identical to plain close. Plus error-path and count pins.
Asserts only invariants the lowering actually guarantees (no arc-balance or
planarity claims the code does not make).
Readiness map for the rest (parallel assessment), recorded in PROOF-NEEDS.md —
each blocked on a prerequisite, not on effort:
- TG-8 BLOCKED: dialects/ are prose+EBNF READMEs with no parser/typing/eval;
conservativity is not stateable until one dialect is implemented.
- TG-7 NEEDS OWNER DECISION: braid-group equivalence changes the observable
semantics of == on braids (OCaml eval.ml AND Lean Step + proofs). Not
auto-landed; smallest non-semantic step is an out-of-band braid_equiv checker.
- TG-6 BLOCKED: no wasm runtime (wasmtime/wasmer) wired in; differential testing
has nothing to execute. Full bisimulation remains research-grade.
dune runtest green (597 existing + tg3 1008 + tg5 189). Docs: PROOF-NEEDS,
CHANGELOG, STATE.a2ml.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| TG-3 | OCaml `typecheck.ml` refines the Lean `HasType` spec | TP | Lean 4 + translation validation | P1 | — | **LANDED** (translation-validation level — [`proofs/TG3-REFINEMENT.md`](proofs/TG3-REFINEMENT.md)). Reduced via TG-2 (`infer ≡ HasType`) to "OCaml `infer_expr` ≡ Lean `infer` on the core fragment", then discharged by: (a) a closure proof (core fragment never yields `TTangle`, strengthened tree-IH); (b) 496 Lean kernel-checked obligations in [`proofs/TG3Differential.lean`](proofs/TG3Differential.lean) generated from `infer_expr` by `compiler/test/tg3/tg3_emit.ml` (`by decide`; run `proofs/check-tg3-differential.sh`); (c) 1008 OCaml `--check` assertions (`dune runtest`). Complete divergence catalogue: **D1** `close` (OCaml `Tangle[I,I]` vs Lean `word 0` — sole boundary gateway, + downstream D1b/c/d) and **D2** `bool==bool` (OCaml accepts, Lean rejects). Extra-core feature list (model-later / declare-non-core) in TG3-REFINEMENT §3. Not claimed: a universal Lean proof over all OCaml runs (would require reflecting `typecheck.ml`); refinement is OCaml→Lean only |
59
59
| TG-4 | Pretty-print/parse round-trip on closed values | INV | OCaml property test (cheap) | P2 | 4h |**LANDED** (PR #46 — OCaml property test in `compiler/test/test_roundtrip.ml`, 26-entry corpus including 8 echo/product constructors; 52 round-trip runs) |
60
-
| TG-5 |`compositional.ml` (418 LoC) rewriter preserves types | TP |Lean 4 + OCaml test file | P2 |3d|NOT STARTED (B6: no test file yet)|
60
+
| TG-5 |`compositional.ml` (418 LoC) rewriter preserves types | TP | OCaml property test | P2 |—|**LANDED** (`compiler/test/tg5/tg5_invariants.ml`, 189 assertions in `dune runtest`). compositional is below the Ty layer, so "preserves types" = preserves the PD-lowering structural invariants + echo residue-recovery: `OpenWord`/`ClosedDiagram`/`EchoClosed` each pinned (closedness, `\|crossings\|`=unit-length, source unit-expanded, **verbatim residue** for `EchoClose` with `expand(residue)=diagram word` and echo-diagram pdv1-identical to plain `close`), error paths, count pins. Lean IR model = optional later rung|
| TG-7 |`Step.eqBraids` decides braid-group equivalence (not list equality) | ALG / DOM | OCaml + Lean 4 | P2 | 2w | NOT STARTED (current impl is soundness-floor, not completeness) |
63
63
| TG-8 | Each dialect (braid-calculus, quantum-circuit, skein-algebra, string-diagram, virtual-knot) is a conservative extension of core | TP | Lean 4 per-dialect | P3 | 1w each | NOT STARTED |
@@ -70,7 +70,11 @@ assumptions each rests on, see PROOF-NARRATIVE.md.
70
70
## Scoping of the remaining obligations (2026-06-14)
71
71
72
72
Concrete approach, effort, risk, and dependencies for what is left after
0 commit comments