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
feat(echo): runtime eval + surface parser for echo/product forms
Implements the two follow-ons to the echo typechecker integration:
PART 1 — eval.ml runtime evaluation
- Add value forms VEcho (residue, result) and VPair (a, b), mirroring
echoVal / pair in proofs/Tangle.lean.
- Replace the not-yet-implemented stub arm with real eval_expr arms for
EchoClose / Lower / Residue / Pair / Fst / Snd / EchoAdd / EchoEq,
following the Lean small-step Step rules (echoCloseWord, lowerVal,
residueVal, fstPair, sndPair, echoAddNums, echoEqNums). echoAdd/echoEq
reuse eval_binop Add / Eq for the result component.
- Extend pp_value (now recursive) with echo(...) / (...) rendering.
PART 2 — lexer.mll + parser.mly surface syntax
- Add dedicated keyword tokens ECHOCLOSE/LOWER/RESIDUE/PAIR/FST/SND/
ECHOADD/ECHOEQ (lexer keyword table + parser %token + token.ml mirror),
following the existing close/mirror/cap/cup mechanism.
- Add unary_expr productions in the same precedence group as close/cap,
so pretty.ml output round-trips: echoClose(E), lower(E), residue(E),
pair(E,E), fst(E), snd(E), echoAdd(E,E), echoEq(E,E).
https://claude.ai/code/session_01PgHpCFzwYB7Qy9L6kmR8CE
0 commit comments