fact: Fixpoint gen_tree_of_list {T} (k : list (gen_tree T)) (l : list (nat * nat + T)) : option (gen_tree T) := match l with | [] => head k | inr x :: l => gen_tree_of_list (GenLeaf x :: k) l | inl (len,n) :: l => gen_tree_of_list (GenNode n (reverse (take len k)) :: drop len k) l end.
imports: Coq.QArith(QArith_base Qcanon) stdpp(well_founded) stdpp(options)