From mathcomp.ssreflect Require Import ssreflect seq ssrbool
ssrnat ssrfun eqtype seq fintype finfun.
Set Implicit Arguments.
Require Export compcert.lib.Maps.
From VST.veric Require Import shares juicy_mem juicy_mem_lemmas.
(*IM using proof irrelevance!*)
Set Nested Proofs Allowed.
Definition access_map := Maps.PMap.t (Z -> option permission).
Definition delta_map := Maps.PTree.t (Z -> option (option permission)).
Definition dmap_get' (dm:delta_map) b ofs:=
match dm ! b with
Some f =>
match f ofs with
Some p => Some p
| None => None
end
|None => None
end.
Definition dmap_get (dm:delta_map) b ofs:=
(fun _ => None, dm) !! b ofs.
Hint Transparent dmap_get.

(* go back in time It is to go back to the previous definition. only to help transitioning. Hopefully one day we get rid of this. *)
Lemma dmap_get_bit':
forall dm b ofs, dmap_get dm b ofs  = dmap_get' dm b ofs.