Proof with eauto with val_erasure.
induction vs; simpl...
Qed.
(* TODO: is that still used? *)
(*Lemma val_erasure_list_decode: forall vals vals' typs, val_erasure_list vals vals' -> val_erasure_list (val_casted.decode_longs typs vals) (val_casted.decode_longs typs vals').  Lemma memval_erasure_list_refl: forall vs, memval_erasure_list vs vs. Proof with eauto with val_erasure. induction vs; simpl... Qed.  Hint Immediate memval_erasure_list_refl : val_erasure.  (** ** Lemmas about erased values*)
Definition isDefined v :=
match v with
| Vundef => false
| _ => true
end.

(* Specifications: *)
Lemma val_erasure_add_result:
forall v1 v1' v2 v2' v,
val_erasure v1 v1' ->
val_erasure v2 v2' ->
Val.add v1 v2 = v ->
isDefined v ->
Val.add v1' v2' = v.
Lemma isPointer_isDefined:
forall v, isPointer v -> isDefined v.
Lemma val_erasure_add:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.add v1 v2) (Val.add v1' v2').
Lemma val_erasure_mul:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.mul v1 v2) (Val.mul v1' v2').
Lemma val_erasure_mul_result:
forall v1 v2 v1' v2' v,
val_erasure v1 v1'->
val_erasure v2 v2' ->
Val.mul v1 v2 = v ->
isDefined v ->
Val.mul v1' v2' = v.
Lemma val_erasure_hiword:
forall v v',
val_erasure v v' ->
val_erasure (Val.hiword v) (Val.hiword v').
Lemma val_erasure_loword:
forall v v',
val_erasure v v' ->
val_erasure (Val.loword v) (Val.loword v').
Lemma val_erasure_cmp_bool:
forall c v1 v1',
v1 <> Vundef ->
val_erasure v1 v1' ->
Val.cmp_bool c v1 Vzero = Val.cmp_bool c v1' Vzero.
Lemma val_erasure_zero_ext:
forall v v' n,
val_erasure v v' ->
val_erasure (Val.zero_ext n v) (Val.zero_ext n v').
Lemma val_erasure_sign_ext:
forall v v' n,
val_erasure v v' ->
val_erasure (Val.sign_ext n v) (Val.sign_ext n v').
Lemma val_erasure_singleoffloat:
forall v v',
val_erasure v v' ->
val_erasure (Val.singleoffloat v) (Val.singleoffloat v').
Lemma val_erasure_floatofsingle:
forall v v',
val_erasure v v' ->
val_erasure (Val.floatofsingle v) (Val.floatofsingle v').
Lemma val_erasure_intoffloat:
forall v v',
val_erasure v v' ->
val_erasure (Val.maketotal (Val.intoffloat v))
(Val.maketotal (Val.intoffloat v')).
Lemma val_erasure_floatofint:
forall v v',
val_erasure v v' ->
val_erasure (Val.maketotal (Val.floatofint v))
(Val.maketotal (Val.floatofint v')).
Lemma val_erasure_intofsingle:
forall v v',
val_erasure v v' ->
val_erasure (Val.maketotal (Val.intofsingle v))
(Val.maketotal (Val.intofsingle v')).
Lemma val_erasure_singleofint:
forall v v',
val_erasure v v' ->
val_erasure (Val.maketotal (Val.singleofint v))
(Val.maketotal (Val.singleofint v')).
Lemma val_erasure_neg:
forall v v',
val_erasure v v' ->
val_erasure (Val.neg v) (Val.neg v').
Lemma val_erasure_notint:
forall v v',
val_erasure v v' ->
val_erasure (Val.notint v) (Val.notint v').
Lemma val_erasure_negative:
forall v v',
val_erasure v v' ->
val_erasure (Val.negative v) (Val.negative v').
Lemma val_erasure_sub_overflow:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.sub_overflow v1 v2) (Val.sub_overflow v1' v2').
Lemma val_erasure_sub:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.sub v1 v2) (Val.sub v1' v2').
Lemma val_erasure_mulhu:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.mulhu v1 v2) (Val.mulhu v1' v2').
Lemma val_erasure_mulhs:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.mulhs v1 v2) (Val.mulhs v1' v2').
Lemma val_erasure_and:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.and v1 v2) (Val.and v1' v2').
Lemma val_erasure_or:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.or v1 v2) (Val.or v1' v2').
Lemma val_erasure_xor:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.xor v1 v2) (Val.xor v1' v2').
Lemma val_erasure_shl:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.shl v1 v2) (Val.shl v1' v2').
Lemma val_erasure_shr:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.shr v1 v2) (Val.shr v1' v2').
Lemma val_erasure_shru:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.shru v1 v2) (Val.shru v1' v2').
Lemma val_erasure_ror:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.ror v1 v2) (Val.ror v1' v2').
Lemma val_erasure_divu_result:
forall v1 v2 v1' v2' v,
val_erasure v1 v1' ->
val_erasure v2 v2' ->
Val.divu v1 v2 = Some v ->
Val.divu v1' v2' = Some v.
Lemma val_erasure_modu_result:
forall v1 v2 v1' v2' v,
val_erasure v1 v1' ->
val_erasure v2 v2' ->
Val.modu v1 v2 = Some v ->
Val.modu v1' v2' = Some v.
Lemma val_erasure_divs_result:
forall v1 v2 v1' v2' v,
val_erasure v1 v1' ->
val_erasure v2 v2' ->
Val.divs v1 v2 = Some v ->
Val.divs v1' v2' = Some v.
Lemma val_erasure_mods_result:
forall v1 v2 v1' v2' v,
val_erasure v1 v1' ->
val_erasure v2 v2' ->
Val.mods v1 v2 = Some v ->
Val.mods v1' v2' = Some v.
Lemma val_erasure_addf:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.addf v1 v2) (Val.addf v1' v2').
Lemma val_erasure_addfs:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.addfs v1 v2) (Val.addfs v1' v2').
Lemma val_erasure_subf:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.subf v1 v2) (Val.subf v1' v2').
Lemma val_erasure_subfs:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.subfs v1 v2) (Val.subfs v1' v2').
Lemma val_erasure_mulf:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.mulf v1 v2) (Val.mulf v1' v2').
Lemma val_erasure_mulfs:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.mulfs v1 v2) (Val.mulfs v1' v2').
Lemma val_erasure_divf:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.divf v1 v2) (Val.divf v1' v2').
Lemma val_erasure_divfs:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.divfs v1 v2) (Val.divfs v1' v2').
Lemma val_erasure_negf:
forall v v',
val_erasure v v' ->
val_erasure (Val.negf v) (Val.negf v').
Lemma val_erasure_negfs:
forall v v',
val_erasure v v' ->
val_erasure (Val.negfs v) (Val.negfs v').
Lemma val_erasure_absf:
forall v v',
val_erasure v v' ->
val_erasure (Val.absf v) (Val.absf v').
Lemma val_erasure_absfs:
forall v v',
val_erasure v v' ->
val_erasure (Val.absfs v) (Val.absfs v').
Lemma inj_bytes_erasure :
forall (bl : seq.seq byte),
memval_erasure_list (inj_bytes bl) (inj_bytes bl).
Lemma inj_value_erasure :
forall (v1 v2 : val) (q : quantity),
val_erasure v1 v2 ->
memval_erasure_list (inj_value q v1) (inj_value q v2).