File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed
Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ import Lean.Elab.Tactic.Repeat
1313import Lean.Elab.Tactic.BuiltinTactic
1414import Lean.Elab.Command
1515import Lean.Linter.Basic
16+ -- These public imports are needed because for now we make `extCore` public.
17+ public import Lean.Expr
18+ public import Lean.Elab.Term.TermElabM
1619
1720/-!
1821# Implementation of the `@[ext]` attribute
@@ -296,7 +299,8 @@ in extensionality theorems like `funext`. Returns a list of subgoals.
296299This is built on top of `withExtN`, running in `TermElabM` to build the list of new subgoals.
297300(And, for each goal, the patterns consumed.)
298301-/
299- def extCore (g : MVarId) (pats : List (TSyntax `rcasesPat))
302+ -- This is public as it is used in the implementation of `rcongr` in Batteries.
303+ public def extCore (g : MVarId) (pats : List (TSyntax `rcasesPat))
300304 (depth := 100 ) (failIfUnchanged := true ) :
301305 TermElabM (Nat × Array (MVarId × List (TSyntax `rcasesPat))) := do
302306 StateT.run (m := TermElabM) (s := #[])
Original file line number Diff line number Diff line change @@ -23,6 +23,17 @@ import Lean.Elab.App
2323import Lean.Elab.Match
2424import Lean.Elab.Tactic.Generalize
2525
26+ public section
27+
28+ register_builtin_option tactic.customEliminators : Bool := {
29+ defValue := true
30+ group := "tactic"
31+ descr := "enable using custom eliminators in the 'induction' and 'cases' tactics \
32+ defined using the '@[induction_eliminator]' and '@[cases_eliminator]' attributes"
33+ }
34+
35+ end
36+
2637namespace Lean.Elab.Tactic
2738open Meta
2839
@@ -776,13 +787,6 @@ def elabTermForElim (stx : Syntax) : TermElabM Expr := do
776787 else
777788 return e
778789
779- register_builtin_option tactic.customEliminators : Bool := {
780- defValue := true
781- group := "tactic"
782- descr := "enable using custom eliminators in the 'induction' and 'cases' tactics \
783- defined using the '@[induction_eliminator]' and '@[cases_eliminator]' attributes"
784- }
785-
786790-- `optElimId` is of the form `("using" term)?`
787791def getElimNameInfo (optElimId : Syntax) (targets : Array Expr) (induction : Bool) : TacticM ElimInfo := do
788792 let getBaseName? (elimName : Name) : MetaM (Option Name) := do
You can’t perform that action at this time.
0 commit comments