lean4-htt/tests/elab_fail/inductionErrors.lean.out.expected
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

32 lines
1.4 KiB
Text

inductionErrors.lean:11:12-11:27: error: unsolved goals
case lower
p d : Nat
⊢ p ≤ p + d.succ
inductionErrors.lean:12:12-12:27: error: unsolved goals
case upper
q d : Nat
⊢ q + d.succ > q
inductionErrors.lean:16:19-16:26: error(lean.unknownIdentifier): Unknown identifier `elimEx2`
inductionErrors.lean:22:2-25:45: error: Insufficient number of targets for `elimEx`
inductionErrors.lean:28:16-28:23: error: Expected resulting type of eliminator to be an application of one of its parameters (the motive), but found
Nat
inductionErrors.lean:35:11-35:15: error: unsolved goals
x : Nat
⊢ 0 + 0 = 0
inductionErrors.lean:36:11-36:15: error: unsolved goals
x y : Nat
⊢ 0 + (y + 1) = y + 1
inductionErrors.lean:40:14-40:18: error: unsolved goals
case zero
⊢ 0 + 0 = 0
inductionErrors.lean:41:14-41:18: error: unsolved goals
case succ
y : Nat
⊢ 0 + (y + 1) = y + 1
inductionErrors.lean:50:2-50:16: error: Alternative `cons` is not needed
inductionErrors.lean:55:2-55:16: error: Alternative `cons` is not needed
inductionErrors.lean:60:2-60:40: error: Invalid alternative name `upper2`: Expected `upper`
inductionErrors.lean:58:2-58:7: error: Alternative `upper` has not been provided
inductionErrors.lean:66:2-66:28: error: Invalid occurrence of the wildcard alternative `| _ => ...`: It must be the last alternative
inductionErrors.lean:74:2-74:34: error: Wildcard alternative is not needed
inductionErrors.lean:80:2-80:56: error: Duplicate alternative name `lower`