Section COMPSPECS.
Context {cs: compspecs}.
Global Opaque memory_block.
End COMPSPECS.
(******************************************  Lemmas about specific types  ******************************************)
(* We do these as Hint Extern, instead of Hint Resolve, to limit their application and make them fail faster *)
Hint Extern 1 (mapsto _ _ _ _ |-- mapsto _ _ _ _) =>
(simple apply mapsto_mapsto_int32; apply Coq.Init.Logic.I)  : cancel.
Hint Extern 1 (mapsto _ _ _ _ |-- mapsto_ _ _ _) =>
(simple apply mapsto_mapsto__int32; apply Coq.Init.Logic.I)  : cancel.
Hint Extern 1 (mapsto _ _ _ _ |-- mapsto_ _ _ _) =>
(apply mapsto_mapsto_) : cancel.
Hint Extern 1 (mapsto _ _ _ _ |-- mapsto_ _ _ _) =>
(apply mapsto_mapsto__int32)  : cancel.
Hint Extern 1 (mapsto _ _ _ _ |-- mapsto _ _ _ _) =>
(apply mapsto_mapsto_int32)  : cancel.
Hint Extern 0 (legal_alignas_type _ = true) => reflexivity : cancel.
Hint Rewrite mapsto_force_ptr: norm.
(******************************************  Definition of at_offset.  at_offset is the elementary definition. All useful lemmas about at_offset will be proved here.  ******************************************)
Definition at_offset (P: val -> mpred) (z: Z): val -> mpred :=
fun v => P (offset_val z v).
Arguments at_offset P z v : simpl never.

Lemma at_offset_derives: forall P Q p , (forall p, P p |-- Q p) -> forall pos, at_offset P pos p |-- at_offset Q pos p.