Definition tree_eq (m1 m2: PTree.t L.t) : Prop :=
  forall i, opt_eq (PTree.get i m1) (PTree.get i m2).

Lemma tree_eq_node: forall l1 o1 r1 l2 o2 r2, tree_eq l1 l2 -> tree_eq r1 r2 -> opt_eq o1 o2 -> tree_eq (PTree.Node l1 o1 r1) (PTree.Node l2 o2 r2).