fix: preserve `inj` and `funCC` parameters in `grind?` and `finish?` suggestions This PR fixes `grind?` and `finish?` dropping parameters such as `inj f_inj` and `funCC q` from their suggestions, which then failed when pasted. The suggestion is built from the generated script, which records E-matching instantiations and case splits. Parameters like `inj` and `funCC` only change how the goal is set up, so no script step mentions them, and the syntactic filter only kept `cases` identifiers. The new `getPreservedParams` helper keeps every identifier whose modifier does not produce E-matching theorems (`cases`, `inj`, `funCC`, `symbol`), and is shared by `grind?` and `finish?`. `finish?` also now checks its suggestions at the goal before its parameters are asserted, so a suggestion that only works with the dropped parameter is no longer offered. Closes #14573 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This is the repository for Lean 4.
See Install Lean.
Please read our Contribution Guidelines first.
See Building Lean.