@@ -67,21 +67,7 @@ public def addEMatchTheorem (params : Grind.Params) (id : Ident) (declName : Nam
6767 Grind.mkEMatchTheoremForDecl declName kind params.symPrios (minIndexable := minIndexable)
6868 if warn && params.ematch.containsWithSamePatterns thm.origin thm.patterns thm.cnstrs then
6969 warnRedundantEMatchArg params.ematch declName
70- if thm.numParams == 0 && kind matches .default _ then
71- /-
72- **Note** : ignores pattern and adds ground fact directly
73- Motivation:
74- ```
75- opaque π : Rat
76- axiom pi_pos : 0 < π
77- example : π = 0 → False := by
78- grind [pi_pos]
79-
80- ```
81- -/
82- return { params with extraFacts := params.extraFacts.push thm.proof }
83- else
84- return { params with extra := params.extra.push thm }
70+ return { params with extra := params.extra.push thm }
8571 | .defn =>
8672 if (← isReducible declName) then
8773 throwError "`{.ofConstName declName}` is a reducible definition, `grind` automatically unfolds them"
@@ -125,10 +111,7 @@ def processParam (params : Grind.Params)
125111 for thm in thms do
126112 params := { params with extra := params.extra.push thm }
127113 | .ematch kind =>
128- let oldSize := params.extraFacts.size
129114 params ← withRef p <| addEMatchTheorem params id declName kind minIndexable
130- if params.extraFacts.size > oldSize then
131- params := { params with extraFactsSyntax := params.extraFactsSyntax.push p.raw }
132115 | .cases eager =>
133116 if incremental then throwError "`cases` parameter are not supported here"
134117 ensureNoMinIndexable minIndexable
@@ -156,10 +139,7 @@ def processParam (params : Grind.Params)
156139 -- **Note** : We should not warn if `declName` is an inductive
157140 params ← withRef p <| addEMatchTheorem params id ctor (.default false ) minIndexable (warn := False)
158141 else
159- let oldSize := params.extraFacts.size
160142 params ← withRef p <| addEMatchTheorem params id declName (.default false ) minIndexable (suggest := true )
161- if params.extraFacts.size > oldSize then
162- params := { params with extraFactsSyntax := params.extraFactsSyntax.push p.raw }
163143 | .symbol prio =>
164144 ensureNoMinIndexable minIndexable
165145 params := { params with symPrios := params.symPrios.insert declName prio }
@@ -225,9 +205,7 @@ def processTermParam (params : Grind.Params)
225205 throwError "invalid `grind` parameter, modifier is redundant since the parameter type is not a `forall`{indentExpr type}"
226206 unless levelParams.isEmpty do
227207 throwError "invalid `grind` parameter, parameter type is not a `forall` and is universe polymorphic{indentExpr type}"
228- return { params with
229- extraFacts := params.extraFacts.push proof,
230- extraFactsSyntax := params.extraFactsSyntax.push p.raw }
208+ return { params with extraFacts := params.extraFacts.push proof }
231209
232210/--
233211Elaborates `grind` parameters.
0 commit comments