Skip to content

Commit e16e04d

Browse files
committed
feat: injective theorem parameters should behave like regular ones
That is, they are eagerly activated
1 parent d1a5d4a commit e16e04d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Lean/Elab/Tactic/Grind/Param.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def processParam (params : Grind.Params)
117117
throwError "invalid use of `intro` modifier, `{.ofConstName declName}` is not an inductive predicate"
118118
| .inj =>
119119
let thm ← Grind.mkInjectiveTheorem declName
120-
params := { params with inj := params.inj.insert thm }
120+
params := { params with extraInj := params.extraInj.push thm }
121121
| .ext =>
122122
throwError "`[grind ext]` cannot be set using parameters"
123123
| .infer =>

src/Lean/Meta/Tactic/Grind/Main.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ structure Params where
3535
symPrios : SymbolPriorities := {}
3636
casesTypes : CasesTypes := {}
3737
extra : PArray EMatchTheorem := {}
38+
extraInj : PArray InjectiveTheorem := {}
3839
norm : Simp.Context
3940
normProcs : Array Simprocs
4041
anchorRefs? : Option (Array AnchorRef) := none

0 commit comments

Comments
 (0)