This PR adds a `cbv_simproc` system for the `cbv` tactic, mirroring simp's `simproc` infrastructure but tailored to cbv's three-phase pipeline (`↓` pre, `cbv_eval` eval, `↑` post). User-defined simplification procedures are indexed by discrimination tree patterns and dispatched during cbv normalization. New syntax: - `cbv_simproc [↓|↑|cbv_eval] name (pattern) := body` — define and register a cbv simproc - `cbv_simproc_decl name (pattern) := body` — define without registering - `attribute [cbv_simproc [↓|↑|cbv_eval]] name` — register an existing declaration - `builtin_cbv_simproc` variants for the internal use New files: - `src/Init/CbvSimproc.lean` — syntax and macros - `src/Lean/Meta/Tactic/Cbv/CbvSimproc.lean` — types, env extensions, registration, dispatch - `src/Lean/Elab/Tactic/CbvSimproc.lean` — pattern elaboration and command elaborators --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| stdlib | ||