Every practical seminar project has a complete tutorial in this appendix. A project may consist of one problem or of several staged problems. One tutorial may cover the whole sequence, but it records the result of every stage.
Mathematical exercises remain in appendix B . Practical projects use worked tutorials because the reader needs to see how the program is built, not only its final source and output.
Begin each entry with the \tutorialfor command applied to the stable project identifier and its exercise labels, followed immediately by a tutorial* environment. List several labels when one tutorial covers a staged sequence. Every practical-project label occurs in exactly one tutorial and does not occur in the mathematical solutions appendix.
Each tutorial has the following parts.
Problem and result. Restate the problem, the calculus or algorithm, the invariant, the concrete result, and the decidable acceptance test.
Representation. Choose representations for the relevant data. Explain their advantages and disadvantages, and compare them with at least one plausible alternative.
First complete version. Build the smallest end-to-end program that already produces a useful result.
Remaining cases. Add the remaining cases in the order used by the metatheory. Point out cases emphasized by the printed proof, such as capture in substitution, neutral terms, or eigenvariable conditions.
A failing version. Show at least one incorrect version and a named input that reveals the error.
Acceptance test. Run the program on the named inputs and check the expected outcomes. The check may compare exact output or decide a stated property of the output.
Mathematical boundary. Name the metatheorem illustrated by the program and state explicitly that running the program does not prove it.
Repository, commit, toolchain, commands, and the full raw transcript belong in appendix E . Tutorials report the concise result needed to check the construction but do not duplicate that provenance. Tutorials follow chapter order.
Sections ch:inference-rules: ch:inference-rules ch:simple-types: ch:simple-types ch:first-order-proof-theory: ch:first-order-proof-theory ch:hindley-milner: ch:hindley-milner ch:semi-unification: ch:semi-unification ch:dimension-types: ch:dimension-types ch:row-polymorphism: ch:row-polymorphism ch:polymorphic-record-compilation: ch:polymorphic-record-compilation ch:system-f: ch:system-f ch:relational-parametricity: ch:relational-parametricity ch:type-operators: ch:type-operators ch:existential-types: ch:existential-types ch:type-classes: ch:type-classes ch:ml-modules: ch:ml-modules ch:mixml: ch:mixml ch:modular-type-classes: ch:modular-type-classes ch:fomega-self-representation: ch:fomega-self-representation ch:subtyping: ch:subtyping ch:algebraic-subtyping: ch:algebraic-subtyping ch:intersection-union: ch:intersection-union ch:disjoint-intersections: ch:disjoint-intersections ch:refinement-types: ch:refinement-types ch:gradual-typing: ch:gradual-typing ch:recursive-types: ch:recursive-types ch:object-calculi: ch:object-calculi ch:simple-object-inference: ch:simple-object-inference ch:oo-self-types: ch:oo-self-types ch:algebraic-effects: ch:algebraic-effects ch:scoped-operations: ch:scoped-operations ch:higher-order-effects: ch:higher-order-effects ch:effect-rows: ch:effect-rows ch:effect-capabilities: ch:effect-capabilities ch:modal-effect-types: ch:modal-effect-types ch:lexical-effect-handlers: ch:lexical-effect-handlers ch:control-operators: ch:control-operators ch:linear-types: ch:linear-types ch:evaluation-strategy-translations: ch:evaluation-strategy-translations ch:ordered-lambek: ch:ordered-lambek ch:focusing-proof-search: ch:focusing-proof-search ch:proof-nets: ch:proof-nets ch:interaction-nets: ch:interaction-nets ch:optimal-sharing: ch:optimal-sharing ch:bunched-implications: ch:bunched-implications ch:separation-logic: ch:separation-logic ch:concurrent-separation: ch:concurrent-separation ch:ownership-borrowing: ch:ownership-borrowing ch:uniqueness-types: uniqueness eligibility ch:place-calculi: place and loan checking ch:mutable-value-semantics: ch:mutable-value-semantics ch:capability-region-types: ch:capability-region-types ch:capture-types: ch:capture-types ch:typestate: ch:typestate ch:coeffects: ch:coeffects Grade checking ch:temporal-types: bounded reactive trace ch:soft-linear-logic: proof-net weight oracle ch:amortized-resource-analysis: heap-trace checker ch:session-types: protocol traces ch:multiparty-sessions: projection audit ch:pure-type-systems: ch:pure-type-systems ch:logical-frameworks: ch:logical-frameworks ch:nominal-syntax: ch:nominal-syntax ch:contextual-modal-tt: ch:contextual-modal-tt ch:dependent-nominal-type-theory: context restriction ch:hol: theorem-constructor side conditions ch:system-t-dialectica: a finite-type witness ch:bar-recursion: finite controlled selection ch:abstract-interpretation: finite analyzer calculations ch:symbolic-execution: ch:symbolic-execution ch:information-flow: ch:information-flow ch:rules-of-dtt: ch:rules-of-dtt ch:pi-sigma-unit: ch:pi-sigma-unit ch:inductive-types: ch:inductive-types ch:universes: ch:universes ch:tarski-universes: ch:tarski-universes ch:universe-paradoxes: ch:universe-paradoxes ch:identity-types: ch:identity-types ch:indexed-inductive-families: ch:indexed-inductive-families ch:dependent-records: ch:dependent-records ch:datatype-descriptions: ch:datatype-descriptions ch:containers-ornaments: ch:containers-ornaments ch:well-founded-recursion: ch:well-founded-recursion ch:size-change-termination: ch:size-change-termination ch:mendler-recursion: ch:mendler-recursion ch:coinduction: ch:coinduction ch:interaction-trees: ch:interaction-trees ch:compositional-linearizability: ch:compositional-linearizability ch:linearizability-hoare-logic: ch:linearizability-hoare-logic ch:cic: ch:cic ch:extensional: ch:extensional ch:computational-type-theory: ch:computational-type-theory ch:logic-enriched-type-theory: proposition classification ch:dependent-intersections: same-subject views ch:subject-dependent-self: recursive polarity ch:very-dependent-functions: finite predecessor checking ch:cdle-cedille: finite zero-cost observations ch:type-theory-modulo: finite typed-rewrite certificates ch:linear-dependent-types: shape and usage checking ch:quantitative-dependent-types: demand calculation ch:graded-modal-dtt: graded substitution vectors ch:formalized-graded-erasure: guarded finite extraction ch:dependent-session-types: indexed protocol traces ch:dependent-effects: dependent sequencing ch:dijkstra-monads: finite verification conditions ch:dependent-partiality: fuel-bounded observation ch:dependent-refinement: three isolated ledgers ch:dependent-object-types: inert selection ch:path-dependent-types: stable path lookup ch:dependent-control: finite NEF classification ch:trusted-kernels: ch:trusted-kernels ch:normalization: ch:normalization ch:elaboration: ch:elaboration ch:efficient-unification: ch:efficient-unification ch:proof-tactics: proof-producing tactic replay ch:rewriting-reflection: reflected monoid equality ch:typed-metaprogramming: scoped macro expansion ch:first-class-universe-levels: finite-map levels ch:sort-polymorphism: bounded sort constraints ch:coercive-subtyping: coherent path comparison ch:definitional-functoriality: positive actions ch:pattern-compilation: ch:pattern-compilation ch:datatype-declarations: ch:datatype-declarations ch:recursive-functions: ch:recursive-functions ch:corecursive-definitions: ch:corecursive-definitions ch:dependent-copattern-elaboration: ch:dependent-copattern-elaboration ch:erasure-execution: ch:erasure-execution ch:partial-evaluation: fuelled numeric specialization ch:supercompilation: recursive whistle decisions ch:typed-staging: modal code checking ch:dependent-staging: dependent stage checking ch:categories: ch:categories ch:algebraic-syntax: ch:algebraic-syntax ch:infinity-groupoids: ch:infinity-groupoids ch:univalence: ch:univalence ch:truncation-logic: ch:truncation-logic ch:higher-inductive-types: ch:higher-inductive-types ch:coverings: ch:coverings ch:univalent-categories: ch:univalent-categories ch:univalent-set-mathematics: ch:univalent-set-mathematics ch:real-numbers: ch:real-numbers ch:ott: ch:ott ch:cubical-demorgan: ch:cubical-demorgan ch:cubical-cartesian: ch:cubical-cartesian