Section tree_ind.
Variable P : tree -> Prop.
Hypothesis P_atom : forall a, P (atom a).
Hypothesis P_node : forall l, List.Forall P l -> P (node l).
Definition tree_ind (t : tree) : P t :=
tree_rect P (List.Forall P)
(List.Forall_nil _)
(fun t l Pt Pl => List.Forall_cons _ Pt Pl) P_atom P_node t.
End tree_ind.
End tree.
Fixpoint rev_rec {A} (l : list A) (acc : list A) :=
match l with
| [] => acc
| a :: l => rev_rec l (a :: acc)
end.

Lemma rev_rec_spec : forall {A : Type} (l : list A) acc,
rev_rec l acc = rev l ++ acc.