test: add test for #879
The new `termination_by` syntax should address issue #879 closes #879
This commit is contained in:
parent
7fe6881c42
commit
98864f707e
2 changed files with 4 additions and 1 deletions
3
tests/lean/run/879.lean
Normal file
3
tests/lean/run/879.lean
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
variable (a : Nat)
|
||||
def foo (b c : Nat) := if h : b = 0 then a + c else foo (b - 1) c
|
||||
termination_by _ => b
|
||||
|
|
@ -2,4 +2,4 @@ def ack : Nat → Nat → Nat
|
|||
| 0, y => y+1
|
||||
| x+1, 0 => ack x 1
|
||||
| x+1, y+1 => ack x (ack (x+1) y)
|
||||
termination_by' PSigma.lex sizeOfWFRel (fun _ => sizeOfWFRel)
|
||||
termination_by _ a b => (a, b)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue