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.
16 lines
291 B
Text
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
|