lean4-htt/src/Lean/Meta/Tactic
Joachim Breitner fa058ed228
fix: include let bindings when determining altParamNums for eliminators (#3505)
Else the `case` will now allow introducing all necessary variables.

Induction principles with `let` in the types of the cases will be more
common with #3432.

This implementation no longer reduces the type as it goes, but really
only counts
manifest foralls and lets. I find this more sensible and predictable: If
you have
```
theorem induction₂_symm {P : EReal → EReal → Prop} (symm : Symmetric P) …
```
then previously, writing
```
case symm => 
```
would actually bring a fresh `x` and `y` and variable `h : P x y` into
scope and produce a
goal of `P y x`, because `Symmetric P` happens to be
```
def Symmetric := ∀ ⦃x y⦄, x ≺ y → y ≺ x
```

After this change, after `case symm =>` will leave `Symmetric P` as the
goal.

This gives more control to the author of the induction hypothesis about
the actual
goal of the cases. This shows up in mathlib in two places; fixes in
https://github.com/leanprover-community/mathlib4/pull/11023.
I consider these improvements.
2024-02-28 13:14:34 +00:00
..
AC perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
LinearArith perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Simp feat: add option tactic.skipAssignedInstances := true for backward compatibilty (#3526) 2024-02-28 05:52:29 +00:00
AC.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Acyclic.lean fix: regression on match expressions with builtin literals (#3521) 2024-02-27 18:49:44 +00:00
Apply.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Assert.lean chore: upstream solve_by_elim (#3408) 2024-02-21 01:16:04 +00:00
Assumption.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
AuxLemma.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Backtrack.lean chore: upstream solve_by_elim (#3408) 2024-02-21 01:16:04 +00:00
Cases.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Cleanup.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Clear.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Congr.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Constructor.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Contradiction.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Delta.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
ElimInfo.lean fix: include let bindings when determining altParamNums for eliminators (#3505) 2024-02-28 13:14:34 +00:00
FVarSubst.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Generalize.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
IndependentOf.lean chore: upstream solve_by_elim (#3408) 2024-02-21 01:16:04 +00:00
Induction.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Injection.lean fix: regression on match expressions with builtin literals (#3521) 2024-02-27 18:49:44 +00:00
Intro.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
LibrarySearch.lean chore: default for librarySearch tactic argument (#3495) 2024-02-27 14:53:25 +00:00
LinearArith.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
NormCast.lean feat: use attribute command to add and erase simprocs (#3511) 2024-02-26 23:41:49 +00:00
Refl.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Rename.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Repeat.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Replace.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Revert.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Rewrite.lean feat: add option tactic.skipAssignedInstances := true for backward compatibilty (#3526) 2024-02-28 05:52:29 +00:00
Simp.lean feat: use attribute command to add and erase simprocs (#3511) 2024-02-26 23:41:49 +00:00
SolveByElim.lean chore: upstream solve_by_elim (#3408) 2024-02-21 01:16:04 +00:00
Split.lean refactor: module MatcherApp.Transform (#3439) 2024-02-22 16:16:26 +00:00
SplitIf.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Subst.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Symm.lean chore: upstream solve_by_elim (#3408) 2024-02-21 01:16:04 +00:00
TryThis.lean chore: upstream Std.CodeAction.* 2024-02-25 11:44:42 -08:00
Unfold.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
UnifyEq.lean fix: regression on match expressions with builtin literals (#3521) 2024-02-27 18:49:44 +00:00
Util.lean feat: add option tactic.skipAssignedInstances := true for backward compatibilty (#3526) 2024-02-28 05:52:29 +00:00