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 trivial_ptree_map:
forall {A} t F,
(forall b f, t ! b = Some f -> F b f = f) ->
@PTree.map A A F t = t.