Section COMP_IMM.
Variable default: comparison -> int64 -> condition.
Variable intsem: comparison -> int64 -> int64 -> bool.
Variable sem: comparison -> val -> val -> option val.
Hypothesis sem_int: forall c x y,
sem c (Vlong x) (Vlong y) = Some (Val.of_bool (intsem c x y)).
Hypothesis sem_undef: forall c v,
sem c Vundef v = None.
Hypothesis sem_eq: forall x y,
sem Ceq (Vlong x) (Vlong y) = Some (Val.of_bool (Int64.eq x y)).
Hypothesis sem_ne: forall x y,
sem Cne (Vlong x) (Vlong y) = Some (Val.of_bool (negb (Int64.eq x y))).
Hypothesis sem_default: forall c v n,
sem c v (Vlong n) = option_map Val.of_bool (eval_condition (default c n) (v :: nil) m).
Hypothesis sem_swap:
forall c x y, sem (swap_comparison c) x y = sem c y x.
End COMP_IMM.

Theorem eval_cmplu:
forall c le a x b y v,
eval_expr ge sp e m le a x ->
eval_expr ge sp e m le b y ->
Val.cmplu (Mem.valid_pointer m) c x y = Some v ->
eval_expr ge sp e m le (cmplu c a b) v.