Library hydras.Prelude.Fuel
From Coq Require Import FunInd Recdef Wf_nat Lia.
Function zero (n:nat) {wf lt n} : nat :=
match n with
0 ⇒ 0
| S n' as p ⇒ zero (Nat.div2 p)
end.
About lt_wf.
Let's see whqat happens if lt_wf was opaque
Module OpaqueWf.
Lemma lt_wf : well_founded lt.
Function zero (n:nat) {wf lt n} : nat :=
match n with
0 ⇒ 0
| _ ⇒ zero (Nat.div2 n)
end.
From Init.Wf