Program Definition juicy_mem_storebytes j b ofs bytes: option juicy_mem :=
  if range_perm_dec (m_dry j) b ofs (ofs + Z_of_nat (length bytes)) Cur Writable
    then Some (storebytes_juicy_mem j _ b ofs bytes _)
    else None.

(* Specifications: *)
Lemma juicy_mem_storebytes_succeeds: forall j j' b ofs bytes, juicy_mem_storebytes j b ofs bytes = Some j' -> exists m', storebytes (m_dry j) b ofs bytes = Some m' /\ m' = m_dry j'.
Lemma pshare_sh_bot: forall p, pshare_sh p = Share.bot -> False.
Lemma after_alloc_contents_cohere: forall jm lo hi m' b (H : alloc (m_dry jm) lo hi = (m', b)), contents_cohere m' (after_alloc lo hi b (m_phi jm) (juicy_mem_alloc_aux1 jm lo hi m' b H)).
Lemma after_alloc_access_cohere: forall jm lo hi m' b (H : alloc (m_dry jm) lo hi = (m', b)), access_cohere m' (after_alloc lo hi b (m_phi jm) (juicy_mem_alloc_aux1 jm lo hi m' b H)).
Lemma after_alloc_max_access_cohere: forall jm lo hi m' b (H : alloc (m_dry jm) lo hi = (m', b)), max_access_cohere m' (after_alloc lo hi b (m_phi jm) (juicy_mem_alloc_aux1 jm lo hi m' b H)).
Lemma after_alloc_alloc_cohere: forall jm lo hi m' b (H : alloc (m_dry jm) lo hi = (m', b)), alloc_cohere m' (after_alloc lo hi b (m_phi jm) (juicy_mem_alloc_aux1 jm lo hi m' b H)).