Fixpoint canonicalPTree (l : list (positive * (Z -> perm_kind -> option permission))) :=
match l with
| nil => PTree.empty _
| x :: l =>
PTree.set (fst x) (snd x) (canonicalPTree l)
end.

(* Specifications: *)
Lemma canonicalPTree_elements :
forall l x
(Hin: List.In x (PTree.elements (canonicalPTree l))),
List.In x l.
Lemma canonicalPTree_get_complete :
forall l m k f fn
(HGet: (canonicalPTree (PList fn l m)) ! k = Some f),
List.In (k, f) (PList fn l m).
Lemma canonicalPTree_get_sound :
forall n m k fn
(Hk: k > 0)
(Hn: n > 1)
(HGet: (canonicalPTree (PList fn (mkBlockList n) m)) ! (Pos.of_nat k) = None),
~ List.In k (mkBlockList n).