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>
1 line
856 B
Text
1 line
856 B
Text
versoDocMissing.lean:10:0: error: unexpected end of input; expected '#guard_msgs', 'abbrev', 'add_decl_doc', 'axiom', 'binder_predicate', 'builtin_cbv_simproc', 'builtin_cbv_simproc_decl', 'builtin_dsimproc', 'builtin_dsimproc_decl', 'builtin_grind_propagator', 'builtin_initialize', 'builtin_simproc', 'builtin_simproc_decl', 'cbv_simproc', 'cbv_simproc_decl', 'class', 'coinductive', 'declare_simp_like_tactic', 'declare_syntax_cat', 'def', 'dsimproc', 'dsimproc_decl', 'elab', 'elab_rules', 'example', 'grind_propagator', 'inductive', 'infix', 'infixl', 'infixr', 'initialize', 'instance', 'macro', 'macro_rules', 'notation', 'opaque', 'postfix', 'prefix', 'recommended_spelling', 'register_error_explanation', 'register_tactic_tag', 'register_try?_tactic', 'simproc', 'simproc_decl', 'structure', 'syntax', 'tactic_extension', 'theorem' or 'unif_hint'
|