lean4-htt/src/Lean/Meta
Leonardo de Moura e82cd9b62c
fix: filter assigned metavariables before computing apply subgoal tags (#13476)
This PR refines how the `apply` tactic (and related tactics like
`rewrite`) name and tag the remaining subgoals. Assigned metavariables
are now filtered out *before* computing subgoal tags. As a consequence,
when only one unassigned subgoal remains, it inherits the tag of the
input goal instead of being given a fresh suffixed tag.

User-visible effect: proof states that previously displayed tags like
`case h`, `case a`, or `case upper.h` for a single remaining goal now
display the input goal's tag directly (e.g. no tag at all, or `case
upper`). This removes noise from `funext`, `rfl`-style, and
`induction`-alternative goals when the applied lemma introduces only one
non-assigned metavariable. Multi-goal applications are unaffected —
their subgoals continue to receive distinguishing suffixes.

This may affect users whose proofs rely on the previous tag names (for
example, `case h => ...` after `funext`). Such scripts need to be
updated to use the input goal's tag instead.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 14:31:49 +00:00
..
ArgsPacker
Constructions feat: add linter.redundantVisibility for redundant private/public modifiers (#13132) 2026-04-13 08:34:20 +00:00
DiscrTree chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Match feat: add linter.redundantVisibility for redundant private/public modifiers (#13132) 2026-04-13 08:34:20 +00:00
Sym fix: avoid assigning mvar when Sym.intros produces no binders (#13451) 2026-04-17 21:47:47 +00:00
Tactic fix: filter assigned metavariables before computing apply subgoal tags (#13476) 2026-04-19 14:31:49 +00:00
AbstractMVars.lean feat: use StateT.run instead of function application (#5121) 2026-03-03 03:12:26 +00:00
AbstractNestedProofs.lean fix: add checkSystem calls to long-running elaboration paths (#13220) 2026-04-01 12:54:57 +00:00
ACLt.lean fix: prevent a hang in acLt (#13367) 2026-04-17 21:46:29 +00:00
AppBuilder.lean fix: add checkSystem calls to hasAssignableMVar (#13219) 2026-03-31 19:27:15 +00:00
ArgsPacker.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Basic.lean perf: prevent unnecessary allocations of EST.Out.ok (#13163) 2026-03-27 22:10:24 +00:00
BinderNameHint.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
Canonicalizer.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
CasesInfo.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Check.lean feat: add structured TraceResult to TraceData (#12698) 2026-03-10 02:42:57 +00:00
CheckTactic.lean
Closure.lean feat: unfold and rewrap instances in inferInstanceAs and deriving 2026-03-22 13:25:46 +01:00
Coe.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
CoeAttr.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
CollectFVars.lean
CollectMVars.lean
CompletionName.lean refactor: move operations on String.Pos.Raw to the String.Pos.Raw namespace (#10735) 2025-10-18 12:12:55 +00:00
CongrTheorems.lean fix: use isClass? instead of binder annotation to identify instance parameters (#12172) 2026-01-28 20:33:43 +00:00
Constructions.lean feat: sparse sparse casesOn splitting in match equations (#11666) 2025-12-14 14:59:45 +00:00
CtorIdxHInj.lean feat: add linter.redundantVisibility for redundant private/public modifiers (#13132) 2026-04-13 08:34:20 +00:00
CtorRecognizer.lean
DecLevel.lean fix: universe normalization in getDecLevel (#13391) 2026-04-14 21:27:22 +00:00
Diagnostics.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
DiscrTree.lean refactor: DiscrTree (#11875) 2026-01-02 19:53:45 +00:00
Eqns.lean feat: store eqn-affecting options at definition time instead of eager generation (#13475) 2026-04-19 12:30:08 +00:00
Eval.lean feat: stricter meta check for temporary programs in native_decide etc (#13005) 2026-03-20 15:51:18 +00:00
ExprDefEq.lean feat: add backward.isDefEq.respectTransparency.types option (#13280) 2026-04-04 18:05:33 +00:00
ExprLens.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
ExprTraverse.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
ForEachExpr.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
FunInfo.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
GeneralizeTelescope.lean
GeneralizeVars.lean
GetUnfoldableConst.lean feat: theorems are opaque (#12973) 2026-03-23 13:57:07 +00:00
HasAssignableMVar.lean feat: pretty print level metavariables using index (#13030) 2026-04-01 22:34:29 +00:00
HasNotBit.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
HaveTelescope.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Hint.lean chore: rename Substring to Substring.Raw (#11154) 2025-11-16 09:30:04 +00:00
IndPredBelow.lean feat: add structured TraceResult to TraceData (#12698) 2026-03-10 02:42:57 +00:00
Inductive.lean
InferType.lean perf: add checkInterrupted to inferType cache miss path (#13258) 2026-04-03 06:03:55 +00:00
Injective.lean feat: add structured TraceResult to TraceData (#12698) 2026-03-10 02:42:57 +00:00
Instances.lean feat: add instance validation checks in addInstance (#13389) 2026-04-16 17:48:16 +00:00
IntInstTesters.lean fix: nonstandard instances in grind and simp +arith (#11758) 2025-12-21 17:56:49 +00:00
Iterator.lean
KAbstract.lean
KExprMap.lean
LazyDiscrTree.lean refactor: remove unnecessary use of constNames in LazyDiscrTree (#12422) 2026-02-12 23:52:48 +00:00
LetToHave.lean feat: add structured TraceResult to TraceData (#12698) 2026-03-10 02:42:57 +00:00
LevelDefEq.lean feat: have level metavariable pretty printer instantiate level metavariables (#13438) 2026-04-18 01:07:22 +00:00
LitValues.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Match.lean
MatchUtil.lean refactor: make MatchEqs a leaf module (#11493) 2025-12-03 09:15:36 +00:00
MethodSpecs.lean refactor: DiscrTree (#11875) 2026-01-02 19:53:45 +00:00
MkIffOfInductiveProp.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
MonadSimp.lean refactor: have telescope support (#11914) 2026-01-06 19:20:25 +00:00
NatInstTesters.lean fix: nonstandard instances in grind and simp +arith (#11758) 2025-12-21 17:56:49 +00:00
Native.lean chore: fix spelling errors (#13274) 2026-04-04 07:34:34 +00:00
NatTable.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Offset.lean refactor: replace grind canonicalizer with type-directed normalizer (#13166) 2026-03-28 02:43:22 +00:00
Order.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
PPGoal.lean chore: do not set unused Option.Decl.group (#11307) 2025-11-21 16:44:38 +00:00
PProdN.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
ProdN.lean feat: new, extensible do elaborator (#12459) 2026-02-21 17:17:29 +00:00
RecExt.lean refactor: use isRecursiveDefinition when validating macro_inline (#12106) 2026-01-22 16:31:34 +00:00
RecursorInfo.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Reduce.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
ReduceEval.lean feat: upstream ReduceEval instances from quote4 (#10563) 2025-09-26 04:02:55 +00:00
SameCtorUtils.lean chore: fix spelling errors (#13274) 2026-04-04 07:34:34 +00:00
SizeOf.lean fix: generate SizeOf spec theorems for inductives with private constructors (#13374) 2026-04-12 12:00:51 +00:00
Sorry.lean chore: deprecate levelZero and levelOne (#12720) 2026-03-04 01:03:08 +00:00
SplitSparseCasesOn.lean feat: add linter.redundantVisibility for redundant private/public modifiers (#13132) 2026-04-13 08:34:20 +00:00
StringLitProof.lean perf: optimize string literal equality simprocs for kernel efficiency (#12887) 2026-03-14 10:30:31 +00:00
Structure.lean refactor: DiscrTree (#11875) 2026-01-02 19:53:45 +00:00
Sym.lean feat: add Sym.Arith infrastructure for arithmetic normalization (#13289) 2026-04-06 05:21:09 +00:00
SynthInstance.lean perf: mark ReaderT context argument as borrow (#12942) 2026-03-23 14:45:52 +00:00
Tactic.lean feat: add experimental cbv tactic (#12279) 2026-02-04 14:39:39 +00:00
Transform.lean fix: add checkSystem calls to long-running elaboration paths (#13220) 2026-04-01 12:54:57 +00:00
TransparencyMode.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
TryThis.lean chore: rename String.ValidPos to String.Pos (#11240) 2025-11-24 16:40:21 +00:00
UnificationHint.lean feat: add structured TraceResult to TraceData (#12698) 2026-03-10 02:42:57 +00:00
WHNF.lean fix: add checkSystem calls to long-running elaboration paths (#13220) 2026-04-01 12:54:57 +00:00
WrapInstance.lean fix: keep wrapInstance mvar-free (#13346) 2026-04-13 08:11:10 +00:00