lean4-htt/old_tests/tests/lean/meta_wf_error.lean
2018-04-10 12:56:55 -07:00

8 lines
211 B
Text

meta def Div : nat → nat → nat
| x y :=
if h : 0 < y ∧ y ≤ x
then
have x - y < x, from nat.sub_lt (nat.lt_of_lt_of_le h.left h.right) h.left,
Div (x - y) y + 1
else 0
using_well_founded {}