Hint Resolve N_larger_bound_mod : eval.

(* Specifications: *)
Lemma mul_mod_correct n n' m b: forall tn tn' tm tb,
m <> 0 ->
N_larger_bound n b ->
evaluates tn (value_of_N n) ->
evaluates tn' (value_of_N n') ->
evaluates tm (value_of_N m) ->
evaluates tb (value_of_pos b) ->
evaluates (mul_modF (: tn, tn', tm, tb:))
((n * n') mod m).
Lemma exp_mod_aux_correct y: forall x m tx ty tm b tb,
m <> 0 ->
N_larger_bound m b ->
evaluates tx (value_of_N x) ->
evaluates ty (value_of_pos y) ->
evaluates tm (value_of_N m) ->
evaluates tb (value_of_pos b) ->
evaluates (exp_mod_auxF (: tx, ty, tm, tb :))
( x ^ (Npos y) mod m).
Lemma bound_correct_pos x tx:
evaluates tx (value_of_pos x) ->
evaluates (boundF (: tx :)) (value_of_pos (2^(Pos.size x))).
Lemma exp_mod_correct x y m tx ty tm:
m <> 0 ->
evaluates tx (value_of_N x) ->
evaluates ty (value_of_N y) ->
evaluates tm (value_of_N m) ->
evaluates (exp_modF (: tx, ty, tm :))
( x ^ y mod m).