Conversation
dd0eb26 to
a1dd33a
Compare
Slang is the simple expression language (Aexp/Bexp with big-step evaluation and the optimize0plus optimization), extracted from HL/Imp's opening and shared as the common foundation for the HL and TS paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The chapter's opening (~810 lines: variable-free Aexp/Bexp, evaluation, optimization, and evaluation-as-a-relation) duplicated the new Slang chapter. Remove it and add a short bridge telling the reader to read Slang first, then resume here with variables and commands. - Delete the # Arithmetic and Boolean Expressions / # Optimizing Booleans / # Evaluation as a Relation sections (Warmup, AevalRDivision, AevalRExtended). - No import of TS.Slang: nothing here uses it in code, and importing would make HL depend on a TS-volume module, against the independent-paths goal. - Reference Slang in prose (plain text; a live cross-book link isn't supported across separate books yet). - Redirect the two Warmup back-references to Slang. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # HL/Imp.lean
- Promote dev-note urgencies/authors to directive args (SOONER -> BeforeNextRelease, LATER -> PotentialImprovement; mwhicks1/chenson2018 -> author strings). - GRADE_THEOREM blocks -> :::gradeTheorem (GRADE_MANUAL stays :::grade). - Add :::quizSolution answer blocks to the two quizzes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Small-step operational semantics (toy Tm language, typed arithmetic build-up, and the Slang-based arithmetic/boolean small-step + stack machine). Builds on the Slang chapter. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Cut the boolean toy language (Temp4/Temp5), the Combined arith+bool language, and the normalize-tactic section: redundant now that the chapter builds on Slang (which already has arithmetic and boolean expressions). The Combined language's stuck-terms lesson is picked up in the Types chapter. - Rename the Slang small-step section to 'Small-Step Slang' and move Nondeterministic Evaluation after Boolean Expressions. - Add astep_deterministic / bstep_deterministic exercises, proved as compact <;>-driven tactic chains with a single uniform closer. - Use Unicode operators (¬, ∧, −, ×) in the boolean/arithmetic inference rules. - Resolve in-file TODOs; drop stale dev/port-status notes; prose + formatting. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Dev-note urgencies/authors -> directive args (SOONER/LATER/TODO -> BeforeNextRelease/PotentialImprovement/NOW; mwhicks1/MRC -> author strings); the bare 'Additional Exercises' TODO -> :::dev NOW. - GRADE_THEOREM -> :::gradeTheorem (GRADE_MANUAL stays :::grade). - :::quizSolution for all 8 quizzes (5 converted from :::instructors answers, 3 bare quizzes given computed answers). - compiler_is_correct: (level := Advanced) (Rocq EX3A). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Types of a typed arithmetic language (progress, preservation, soundness), building on the Smallstep chapter's generic vocabulary. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Smallstep chapter drops the Combined-language exercises combined_step_deterministic / combined_strong_progress (two-sorted Slang can't express stuck terms). Add a dev reminder at the stuck-terms section that this chapter's single-sorted Tm language is their successor and should cover both angles (step_deterministic; some_term_is_stuck). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#97 makes non-canonical :::dev urgencies a hard build error; update the cross-check note's argument to the canonical spelling. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- GRADE_THEOREM (progress/preservation/preservation') -> :::gradeTheorem (six GRADE_MANUAL stay :::grade). - :::quizSolution for all 11 quizzes (6 converted from :::answer, 5 bare quizzes given computed answers). - Exercise flags from Rocq Types.v: variation1/variation2/remove_pred0 (manual := true); prog_pres_bigstep EX4AM -> (level := Advanced) (manual := true). - Promote the two single-note dev urgencies to canonical args. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address xhalo32's review comment: use named binders for the recursive hypotheses in Tm.Step and Tm.HasType (matching Imp.lean and the existing Tm.IsNValue) rather than arrow-form hypotheses. The constructors are identical, so nothing downstream changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The variation quizzes/exercises displayed proposed rules using Rocq-style names (ST_PredTrue, ST_Funny1..3, T_IfFunny, T_SuccBool, T_Funny4/5). Rename to our inductive-rule convention (predTrue/predFalse, funny1..5, ifFunny, succBool), matching the actual Tm.Step/Tm.HasType constructor names; also fixes prose that mixed 'ifTrue' with 'ST_Funny1'. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Replace <> / <= / ! / && with ≠ / ≤ / ¬ / ∧ in the imp_bexp grammar, macro_rules, and boolean delaborator - Update examples and the #check expected-output annotation to match
- Strip trailing whitespace across prose and dev-note lines - Use * rather than × in the arithmetic BNF for consistency
…space cleanup # Conflicts: # TS/Slang.lean
berberman left a GitHub comment about not using induction principles directly, and preferring the fun_induction tactic. I asked Claude to help me update the proof to do that, and then adjusted the text accordingly, leaving a note that we should either update Automation to add this tactic, or introduce it here.
This approach follows a suggestion from Vtec234, and was implemented by Claude for `Tm.Step` and `Tm.AltStep`. TBD: Whether to do something similar for typing.
bcpierce00
left a comment
There was a problem hiding this comment.
This is going to need a couple of line-by-line proofreading passes once it stabilizes, but from a quick pass it seems good so far. I left some comments inline.
bcpierce00
left a comment
There was a problem hiding this comment.
Oops -- I seem to have marked this as "Ready for review," but I don't know how to unmark it!
|
Silly question: how to type |
Not a silly question, as there is not an abbreviation. It should be added to settings (Note that |
Initial pass at
TS/Types.lean. This is a draft because it's not close to merging yet. But wanted to get it up rather than keep it on my machine. No need for anyone to comment, but feel free to look.Worth noting: