lean4-htt/tests/lean/run/issue10976.lean
Joachim Breitner 14d76cc062
fix: decreasing_by: preserve variable names of match alts (#10980)
This PR tries to preserve names of pattern variables in match
alternatives in `decreasing_by`, by telescoping into the concrete
alternative rather than the type of the matcher's alt. Fixes #10976.
2025-10-27 14:00:36 +00:00

16 lines
291 B
Text

-- The variable names should be `a1` and `b1`
/--
error: Failed: `fail` tactic was invoked
a1 b1 : Nat
⊢ a1 + b1 < a1.succ + b1.succ
-/
#guard_msgs in
def f (a b : Nat) := match a with
| 0 => 0
| a1+1 => match b with
| 0 => 0
| b1+1 => f a1 b1
termination_by a+b
decreasing_by
fail