TS: the Small-Step Semantics chapter#101
Open
mwhicks1 wants to merge 17 commits into
Open
Conversation
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>
mwhicks1
force-pushed
the
mwh-slang-smallstep
branch
from
July 18, 2026 18:27
eb59592 to
b4ab6d6
Compare
- 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the Small-Step Semantics chapter to the Type Systems volume, built on the Slang chapter.
Contents
Tm): determinism, values, strong progress, normal forms, multi-step reduction, and big-step/small-step equivalence.AStep/BStep), with newastep_deterministic/bstep_deterministicexercises (compact<;>-driven proofs).ANStep,⟶n) standing in for Concurrent Imp, plus a small-step stack machine (compiler_is_correct).Combined/normalize-tactic sections were cut as redundant now that the chapter builds on Slang (which already provides arithmetic and boolean expressions); the "stuck terms motivate types" lesson lands in the Types chapter instead.:::gradeTheorem, and:::quizSolution.This chapter no longer depends on full Imp, so Concurrent Imp and the Imp-based stack machine are not there. Changed to nondeterministic Slang and a stack machine on Slang, instead.
Not handled here: Using notation fully (e.g., in the definition of the inductive relation), and formatting width (things are up to 100 columns, which present badly in the HTML).