(** Compatibility of operations with the [lessdef] relation. *)

(* Specifications: *)
Lemma load_result_lessdef:
forall chunk v1 v2,
lessdef v1 v2 -> lessdef (load_result chunk v1) (load_result chunk v2).
Lemma zero_ext_lessdef:
forall n v1 v2, lessdef v1 v2 -> lessdef (zero_ext n v1) (zero_ext n v2).
Lemma sign_ext_lessdef:
forall n v1 v2, lessdef v1 v2 -> lessdef (sign_ext n v1) (sign_ext n v2).
Lemma singleoffloat_lessdef:
forall v1 v2, lessdef v1 v2 -> lessdef (singleoffloat v1) (singleoffloat v2).
Lemma add_lessdef:
forall v1 v1' v2 v2',
lessdef v1 v1' -> lessdef v2 v2' -> lessdef (add v1 v2) (add v1' v2').
Lemma addl_lessdef:
forall v1 v1' v2 v2',
lessdef v1 v1' -> lessdef v2 v2' -> lessdef (addl v1 v2) (addl v1' v2').
Lemma cmpu_bool_lessdef:
forall valid_ptr valid_ptr' c v1 v1' v2 v2' b,
(forall b ofs, valid_ptr b ofs = true -> valid_ptr' b ofs = true) ->
lessdef v1 v1' -> lessdef v2 v2' ->
cmpu_bool valid_ptr c v1 v2 = Some b ->
cmpu_bool valid_ptr' c v1' v2' = Some b.
Lemma cmplu_bool_lessdef:
forall valid_ptr valid_ptr' c v1 v1' v2 v2' b,
(forall b ofs, valid_ptr b ofs = true -> valid_ptr' b ofs = true) ->
lessdef v1 v1' -> lessdef v2 v2' ->
cmplu_bool valid_ptr c v1 v2 = Some b ->
cmplu_bool valid_ptr' c v1' v2' = Some b.
Lemma of_optbool_lessdef:
forall ob ob',
(forall b, ob = Some b -> ob' = Some b) ->
lessdef (of_optbool ob) (of_optbool ob').
Lemma longofwords_lessdef:
forall v1 v2 v1' v2',
lessdef v1 v1' -> lessdef v2 v2' -> lessdef (longofwords v1 v2) (longofwords v1' v2').
Lemma loword_lessdef:
forall v v', lessdef v v' -> lessdef (loword v) (loword v').
Lemma hiword_lessdef:
forall v v', lessdef v v' -> lessdef (hiword v) (hiword v').
Lemma offset_ptr_zero:
forall v, lessdef (offset_ptr v Ptrofs.zero) v.
Lemma offset_ptr_assoc:
forall v d1 d2, offset_ptr (offset_ptr v d1) d2 = offset_ptr v (Ptrofs.add d1 d2).
Lemma load_result_lessdef:
forall chunk v1 v2,
lessdef v1 v2 -> lessdef (load_result chunk v1) (load_result chunk v2).
Lemma zero_ext_lessdef:
forall n v1 v2, lessdef v1 v2 -> lessdef (zero_ext n v1) (zero_ext n v2).
Lemma sign_ext_lessdef:
forall n v1 v2, lessdef v1 v2 -> lessdef (sign_ext n v1) (sign_ext n v2).
Lemma singleoffloat_lessdef:
forall v1 v2, lessdef v1 v2 -> lessdef (singleoffloat v1) (singleoffloat v2).
Lemma add_lessdef:
forall v1 v1' v2 v2',
lessdef v1 v1' -> lessdef v2 v2' -> lessdef (add v1 v2) (add v1' v2').
Lemma addl_lessdef:
forall v1 v1' v2 v2',
lessdef v1 v1' -> lessdef v2 v2' -> lessdef (addl v1 v2) (addl v1' v2').
Lemma cmpu_bool_lessdef:
forall valid_ptr valid_ptr' c v1 v1' v2 v2' b,
(forall b ofs, valid_ptr b ofs = true -> valid_ptr' b ofs = true) ->
lessdef v1 v1' -> lessdef v2 v2' ->
cmpu_bool valid_ptr c v1 v2 = Some b ->
cmpu_bool valid_ptr' c v1' v2' = Some b.
Lemma cmplu_bool_lessdef:
forall valid_ptr valid_ptr' c v1 v1' v2 v2' b,
(forall b ofs, valid_ptr b ofs = true -> valid_ptr' b ofs = true) ->
lessdef v1 v1' -> lessdef v2 v2' ->
cmplu_bool valid_ptr c v1 v2 = Some b ->
cmplu_bool valid_ptr' c v1' v2' = Some b.
Lemma of_optbool_lessdef:
forall ob ob',
(forall b, ob = Some b -> ob' = Some b) ->
lessdef (of_optbool ob) (of_optbool ob').
Lemma longofwords_lessdef:
forall v1 v2 v1' v2',
lessdef v1 v1' -> lessdef v2 v2' -> lessdef (longofwords v1 v2) (longofwords v1' v2').
Lemma loword_lessdef:
forall v v', lessdef v v' -> lessdef (loword v) (loword v').
Lemma hiword_lessdef:
forall v v', lessdef v v' -> lessdef (hiword v) (hiword v').
Lemma offset_ptr_zero:
forall v, lessdef (offset_ptr v Ptrofs.zero) v.
Lemma offset_ptr_assoc:
forall v d1 d2, offset_ptr (offset_ptr v d1) d2 = offset_ptr v (Ptrofs.add d1 d2).