(* 
  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).(* 
  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).(* 
  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).

(* Specifications: *)
Theorem ordered_cover_cover : forall (l : list (btree A)) (t : btree A), ordered_cover l t -> cover l t.
Theorem cover_ordered_cover : forall (l1 : list (btree A)) (t : btree A), cover l1 t -> exists l2 : _, permutation l1 l2 /\ ordered_cover l2 t.
Theorem ulist_ordered_cover : forall l1 l2 t, ordered_cover l1 t -> ulist l2 -> l1 = map (fun x : A => leaf x) l2 -> all_leaves t = l2.