(* log2(fuel) *)

  Local Definition extgcd_rec : forall r1 u1 v1 r2 u2 v2,
    (True -> 0 <= r1 /\ 0 <= r2 /\ r1 = u1 * a + v1 * b /\ r2 = u2 * a + v2 * b /\
        Z.gcd r1 r2 = Z.gcd a b)
     -> { '(u, v, d) | True -> u * a + v * b = d /\ d = Z.gcd a b}.Definition extgcd : Z*Z*Z.

(* Specifications: *)
Lemma extgcd_correct [u v d] : extgcd = (u, v, d) -> u * a + v * b = d /\ d = Z.gcd a b.