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 pzero (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



About Acc_intro_generator.


Function zero' (n:nat) {wf lt n} : nat :=
  match n with
    0 ⇒ 0
  | _zero' (Nat.div2 n)
  end.


End OpaqueWf.


Inductive fuel :=
 | FO : fuel
 | FS : (unit fuel) fuel.


Fixpoint foo (n:nat) x :=
 match n with
 | S nFS (fun _foo n (foo n x))
 | Ox
 end.