From mathcomp.ssreflect Require Import seq.
Definition merge_func {A} (f1 f2:Z -> option A):
(BinNums.Z -> option A):=
fun ofs => if f1 ofs then f1 ofs else f2 ofs.

Lemma xmap_step:
forall {A B} t f p,
@PTree.xmap A B f t p =
PTree.xmap (fun b => f (PTree.prev_append p b)) t 1.