(* The next line is "boilerplate", always required after importing an AST. *)
Instance CompSpecs : compspecs. make_compspecs prog. Defined.
Definition Vprog : varspecs.  mk_varspecs prog. Defined.
Inductive bnode :=
| BNode (keys : list Z) (children : list bnode).
Section bnode_rect.
Variables (P : bnode -> Type) (Q : list bnode -> Type)
(*            (Hleaf : forall v, P (BLeaf v))*)
(Hint : forall keys children, Q children -> P (BNode keys children))
(Hnil : Q nil) (Hcons : forall t l, P t -> Q l -> Q (t :: l)).
Fixpoint btree_rect t :=
match t as t0 return (P t0) with
(*    | BLeaf v => Hleaf v*)
| BNode keys children => Hint keys children (list_rect Q Hnil
(fun u r => Hcons u r (btree_rect u)) children)
end.
End bnode_rect.

Lemma btree_ind (P : bnode -> Prop) (*(Hleaf : forall v, P (BLeaf v))*)
(Hint : forall keys children, Forall P children -> P (BNode keys children)) t : P t.