Definition addcarryc_def x y :=
let r := addcarry x y in
if leb r x then C1 r else C0 r.

(* Specifications: *)
Axiom addcarryc_def_spec : forall x y, addcarryc x y = addcarryc_def x y.
Definition subc_def x y := if leb y x then C0 (sub x y) else C1 (sub x y).
Axiom subc_def_spec : forall x y, subc x y = subc_def x y.
Definition subcarryc_def x y :=
if ltb y x then C0 (sub (sub x y) 1) else C1 (sub (sub x y) 1).
Axiom subcarryc_def_spec : forall x y, subcarryc x y = subcarryc_def x y.
Definition diveucl_def x y := (div x y, PrimInt63.mod x y).
Axiom diveucl_def_spec : forall x y, diveucl x y = diveucl_def x y.
Axiom diveucl_21_spec : forall a1 a2 b,
let (q,r) := diveucl_21 a1 a2 b in
let (q',r') := Z.div_eucl (to_Z a1 * wB + to_Z a2) (to_Z b) in
to_Z a1 < to_Z b -> to_Z q = q' /\ to_Z r = r'.