Definition sub_correct' : ltac:(auto_for_auto sub_correct) := sub_correct.
Hint Resolve sub_correct' : eval.

(* Specifications: *)
Lemma compare0_correct n: forall m tn tm,
evaluates tn (value_of_N n) ->
evaluates tm (value_of_N m) ->
evaluates (compare0F (: tn, tm :))
(value_of_comp (N.compare n m)).
Lemma mod_double_compat n m :
(if m <=? N.double (n mod m)
then N.double (n mod m) - m
else N.double (n mod m)) = N.double n mod m.
Lemma mod_aux_correct n m tn tm:
evaluates tn (value_of_pos n) ->
evaluates tm (value_of_N m) ->
evaluates (mod_auxF (: tn, tm :)) (value_of_N (N.modulo (N.pos n) m)).