Proof with eauto with val_erasure.
intros.
destruct v, chunk; simpl; unfold inj_value; simpl;
repeat econstructor...
Qed.

(* Specifications: *)
Lemma val_erasure_encode_val:
forall chunk v v',
val_erasure v v' ->
memval_erasure_list (encode_val chunk v) (encode_val chunk v').
Lemma val_defined_add_1:
forall v1 v2 v,
Val.add v1 v2 = v ->
isDefined v ->
isDefined v1.
Lemma val_defined_add_2:
forall v1 v2 v,
Val.add v1 v2 = v ->
isDefined v ->
isDefined v2.
(*TODO: move to other file *)
Lemma val_erasure_offset_ptr:
forall v v' z
(Hval_erasure: val_erasure v v'),
val_erasure (Val.offset_ptr v z) (Val.offset_ptr v' z).
Lemma val_erasure_longofintu:
forall v v'
(Hval_erasure: val_erasure v v'),
val_erasure (Val.longofintu v) (Val.longofintu v').
Lemma val_erasure_longofint:
forall v v'
(Hval_erasure: val_erasure v v'),
val_erasure (Val.longofint v) (Val.longofint v').
Lemma val_erasure_longoffloat:
forall v v'
(Hval_erasure: val_erasure v v'),
val_erasure (Val.maketotal (Val.longoffloat v)) (Val.maketotal (Val.longoffloat v')).
Lemma val_erasure_floatoflong:
forall v v'
(Hval_erasure: val_erasure v v'),
val_erasure (Val.maketotal (Val.floatoflong v)) (Val.maketotal (Val.floatoflong v')).
Lemma val_erasure_longofsingle:
forall v v'
(Hval_erasure: val_erasure v v'),
val_erasure (Val.maketotal (Val.longofsingle v)) (Val.maketotal (Val.longofsingle v')).
Lemma val_erasure_longofwords:
forall v1 v1' v2 v2'
(Hval_erasure: val_erasure v1 v1')
(Hval_erasure: val_erasure v2 v2'),
val_erasure (Val.longofwords v1 v2) (Val.longofwords v1' v2').
Lemma val_erasure_singleoflong:
forall v v'
(Hval_erasure: val_erasure v v'),
val_erasure (Val.maketotal (Val.singleoflong v)) (Val.maketotal (Val.singleoflong v')).
Lemma val_erasure_negl:
forall v v',
val_erasure v v' ->
val_erasure (Val.negl v) (Val.negl v').
Lemma val_erasure_addl:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.addl v1 v2) (Val.addl v1' v2').
Lemma val_erasure_subl:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.subl v1 v2) (Val.subl v1' v2').
Lemma val_erasure_subl_overflow:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.subl_overflow v1 v2) (Val.subl_overflow v1' v2').
Lemma val_erasure_mull:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.mull v1 v2) (Val.mull v1' v2').
Lemma val_erasure_mullhs:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.mullhs v1 v2) (Val.mullhs v1' v2').
Lemma val_erasure_mullhu:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.mullhu v1 v2) (Val.mullhu v1' v2').
Lemma val_erasure_shrl:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.shrl v1 v2) (Val.shrl v1' v2').
Lemma val_erasure_andl:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.andl v1 v2) (Val.andl v1' v2').
Lemma val_erasure_orl:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.orl v1 v2) (Val.orl v1' v2').
Lemma val_erasure_xorl:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.xorl v1 v2) (Val.xorl v1' v2').
Lemma val_erasure_notl:
forall v v',
val_erasure v v' ->
val_erasure (Val.notl v) (Val.notl v').
Lemma val_erasure_shll:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.shll v1 v2) (Val.shll v1' v2').
Lemma val_erasure_shrlu:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.shrlu v1 v2) (Val.shrlu v1' v2').
Lemma val_erasure_rorl:
forall v1 v2 v1' v2',
val_erasure v1 v1' ->
val_erasure v2 v2' ->
val_erasure (Val.rorl v1 v2) (Val.rorl v1' v2').
Lemma val_erasure_negativel:
forall v v',
val_erasure v v' ->
val_erasure (Val.negativel v) (Val.negativel v').