Ltac UseGetSound :=
match goal with
| [ H: get _ = Some _ |- _ ] =>
let x := fresh "EQ" in (generalize (get_op_sound _ _ _ H); intros x; simpl in x; FuncInv)
end.

(* Specifications: *)
Lemma combine_compimm_ne_0_sound:
forall x cond args,
combine_compimm_ne_0 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Cne (valu x) (Vint Int.zero) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Cne (valu x) (Vint Int.zero).
Lemma combine_compimm_eq_0_sound:
forall x cond args,
combine_compimm_eq_0 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Ceq (valu x) (Vint Int.zero) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Ceq (valu x) (Vint Int.zero).
Lemma combine_compimm_eq_1_sound:
forall x cond args,
combine_compimm_eq_1 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Ceq (valu x) (Vint Int.one) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Ceq (valu x) (Vint Int.one).
Lemma combine_compimm_ne_1_sound:
forall x cond args,
combine_compimm_ne_1 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Cne (valu x) (Vint Int.one) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Cne (valu x) (Vint Int.one).
Theorem combine_cond_sound:
forall cond args cond' args',
combine_cond get cond args = Some(cond', args') ->
eval_condition cond' (map valu args') m = eval_condition cond (map valu args) m.
Theorem combine_addr_sound:
forall addr args addr' args',
combine_addr get addr args = Some(addr', args') ->
eval_addressing ge sp addr' (map valu args') = eval_addressing ge sp addr (map valu args).
Theorem combine_op_sound:
forall op args op' args',
combine_op get op args = Some(op', args') ->
eval_operation ge sp op' (map valu args') m = eval_operation ge sp op (map valu args) m.
Lemma combine_compimm_ne_0_sound:
forall x cond args,
combine_compimm_ne_0 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Cne (valu x) (Vint Int.zero) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Cne (valu x) (Vint Int.zero).
Lemma combine_compimm_eq_0_sound:
forall x cond args,
combine_compimm_eq_0 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Ceq (valu x) (Vint Int.zero) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Ceq (valu x) (Vint Int.zero).
Lemma combine_compimm_eq_1_sound:
forall x cond args,
combine_compimm_eq_1 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Ceq (valu x) (Vint Int.one) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Ceq (valu x) (Vint Int.one).
Lemma combine_compimm_ne_1_sound:
forall x cond args,
combine_compimm_ne_1 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Cne (valu x) (Vint Int.one) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Cne (valu x) (Vint Int.one).
Theorem combine_cond_sound:
forall cond args cond' args',
combine_cond get cond args = Some(cond', args') ->
eval_condition cond' (map valu args') m = eval_condition cond (map valu args) m.
Theorem combine_addr_32_sound:
forall addr args addr' args',
combine_addr_32 get addr args = Some(addr', args') ->
eval_addressing32 ge sp addr' (map valu args') = eval_addressing32 ge sp addr (map valu args).
Theorem combine_addr_64_sound:
forall addr args addr' args',
combine_addr_64 get addr args = Some(addr', args') ->
eval_addressing64 ge sp addr' (map valu args') = eval_addressing64 ge sp addr (map valu args).
Theorem combine_addr_sound:
forall addr args addr' args',
combine_addr get addr args = Some(addr', args') ->
eval_addressing ge sp addr' (map valu args') = eval_addressing ge sp addr (map valu args).
Theorem combine_op_sound:
forall op args op' args',
combine_op get op args = Some(op', args') ->
eval_operation ge sp op' (map valu args') m = eval_operation ge sp op (map valu args) m.
Lemma combine_compimm_ne_0_sound:
forall x cond args,
combine_compimm_ne_0 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Cne (valu x) (Vint Int.zero) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Cne (valu x) (Vint Int.zero).
Lemma combine_compimm_eq_0_sound:
forall x cond args,
combine_compimm_eq_0 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Ceq (valu x) (Vint Int.zero) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Ceq (valu x) (Vint Int.zero).
Lemma combine_compimm_eq_1_sound:
forall x cond args,
combine_compimm_eq_1 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Ceq (valu x) (Vint Int.one) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Ceq (valu x) (Vint Int.one).
Lemma combine_compimm_ne_1_sound:
forall x cond args,
combine_compimm_ne_1 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Cne (valu x) (Vint Int.one) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Cne (valu x) (Vint Int.one).
Theorem combine_cond_sound:
forall cond args cond' args',
combine_cond get cond args = Some(cond', args') ->
eval_condition cond' (map valu args') m = eval_condition cond (map valu args) m.
Theorem combine_addr_sound:
forall addr args addr' args',
combine_addr get addr args = Some(addr', args') ->
eval_addressing ge sp addr' (map valu args') = eval_addressing ge sp addr (map valu args).
Theorem combine_op_sound:
forall op args op' args',
combine_op get op args = Some(op', args') ->
eval_operation ge sp op' (map valu args') m = eval_operation ge sp op (map valu args) m.
Lemma combine_compimm_ne_0_sound:
forall x cond args,
combine_compimm_ne_0 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Cne (valu x) (Vint Int.zero) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Cne (valu x) (Vint Int.zero).
Lemma combine_compimm_eq_0_sound:
forall x cond args,
combine_compimm_eq_0 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Ceq (valu x) (Vint Int.zero) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Ceq (valu x) (Vint Int.zero).
Lemma combine_compimm_eq_1_sound:
forall x cond args,
combine_compimm_eq_1 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Ceq (valu x) (Vint Int.one) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Ceq (valu x) (Vint Int.one).
Lemma combine_compimm_ne_1_sound:
forall x cond args,
combine_compimm_ne_1 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Cne (valu x) (Vint Int.one) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Cne (valu x) (Vint Int.one).
Theorem combine_cond_sound:
forall cond args cond' args',
combine_cond get cond args = Some(cond', args') ->
eval_condition cond' (map valu args') m = eval_condition cond (map valu args) m.
Theorem combine_addr_sound:
forall addr args addr' args',
combine_addr get addr args = Some(addr', args') ->
eval_addressing ge sp addr' (map valu args') = eval_addressing ge sp addr (map valu args).
Theorem combine_op_sound:
forall op args op' args',
combine_op get op args = Some(op', args') ->
eval_operation ge sp op' (map valu args') m = eval_operation ge sp op (map valu args) m.