Proof with (try discriminate).
intros. unfold is_intconst in *.
destruct a... destruct o... inv H. inv H0. destruct vl; inv H5. auto.
Qed.

Lemma eval_modl_from_divl:
forall le a n x y,
eval_expr ge sp e m le a (Vlong y) ->
nth_error le O = Some (Vlong x) ->
eval_expr ge sp e m le (modl_from_divl a n) (Vlong (Int64.sub x (Int64.mul y n))).