Section OrderedCover.
Variable A : Type.
(* An ordered cover is a cover where the positions of the elements in the list are fixed *)
Inductive ordered_cover : list (btree A) -> btree A -> Prop :=
| ordered_cover_one :
forall (t : btree A) (l : list (btree A)), ordered_cover (t :: nil) t
| ordered_cover_node :
forall (t1 t2 : btree A) (l1 l2 l3 : list (btree A)),
ordered_cover l1 t1 ->
ordered_cover l2 t2 -> ordered_cover (l1 ++ l2) (node t1 t2).
Hint Resolve ordered_cover_one ordered_cover_node : core.
intros l t H; elim H; auto.
intros t1 t2 l1 l2 l3 H0 H1 H2 H3.
Proof using.
apply cover_app; auto.
Qed.

(* It is always possible to get an ordered cover from a cover *)
Theorem cover_ordered_cover :
forall (l1 : list (btree A)) (t : btree A),
cover l1 t -> exists l2 : _, permutation l1 l2 /\ ordered_cover l2 t.