@@ -389,13 +389,6 @@ syntax (name := nlinarith) "nlinarith" "!"? linarithArgsRest : tactic
389
389
@[inherit_doc nlinarith] macro "nlinarith!" rest:linarithArgsRest : tactic =>
390
390
`(tactic| nlinarith ! $rest:linarithArgsRest)
391
391
392
- /-- Elaborate `t` in a way that is suitable for linarith. -/
393
- def elabLinarithArg (tactic : String) (t : Term) : TacticM Expr := Term.withoutErrToSorry do
394
- let (e, mvars) ← elabTermWithHoles t none `linarith (allowNaturalHoles := true )
395
- unless mvars.isEmpty do
396
- throwErrorAt t "Argument passed to {tactic} has metavariables:{indentD e}"
397
- return e
398
-
399
392
/--
400
393
Allow elaboration of `LinarithConfig` arguments to tactics.
401
394
-/
@@ -406,7 +399,7 @@ elab_rules : tactic
406
399
withMainContext do commitIfNoEx do
407
400
liftMetaFinishingTactic <|
408
401
Linarith.linarith o.isSome
409
- (← ((args.map (TSepArray.getElems)).getD {}).mapM (elabLinarithArg "linarith" )).toList
402
+ (← ((args.map (TSepArray.getElems)).getD {}).mapM (elabTerm ·.raw none )).toList
410
403
((← elabLinarithConfig (mkOptionalNode cfg)).updateReducibility bang.isSome)
411
404
412
405
-- TODO restore this when `add_tactic_doc` is ported
@@ -427,7 +420,7 @@ elab_rules : tactic
427
420
[(nlinarithExtras : GlobalBranchingPreprocessor)]) }
428
421
liftMetaFinishingTactic <|
429
422
Linarith.linarith o.isSome
430
- (← ((args.map (TSepArray.getElems)).getD {}).mapM (elabLinarithArg "nlinarith" )).toList
423
+ (← ((args.map (TSepArray.getElems)).getD {}).mapM (elabTerm ·.raw none )).toList
431
424
(cfg.updateReducibility bang.isSome)
432
425
433
426
-- TODO restore this when `add_tactic_doc` is ported
0 commit comments