Expand description
Template expansion engine (REQ-100, REQ-101).
Mirrors TemplateExpansion.lean from the Lean 4 proof library.
Supports the following template forms:
- Plain expressions: substitute bindings into the expression
(literal expr): substitute bindings and return the inner expression(cond (test body) ... (else body)): conditional branching(= var value): equality predicate(member var (values...)): membership predicate(type? var type-name): type predicate (number, string, agent)- Sequence templates: outer list of template forms producing multiple outputs
Enums§
- Expanded
Template - Result of template expansion: either a single expression or a sequence.
Functions§
- eval_
type_ predicate - Evaluate a type predicate:
(type? var type-name). - expand_
template - Expand a template with argument substitutions (REQ-100).
- expand_
template_ with_ bindings - Expand a template with named bindings (REQ-100).
Type Aliases§
- Bindings
- Named bindings for template expansion: symbol name → value.