Section CoverMin.
Variable A : Type.
Variable f : A -> nat.
(* To be a tree of minimum weight for a cover *)
Definition cover_min (l : list (btree A)) (t1 : btree A) : Prop :=
cover l t1 /\
(forall t2 : btree A, cover l t2 -> weight_tree f t1 <= weight_tree f t2).
Proof using.
intros t; split; auto.
intros t2 H; inversion H; auto.
generalize (permutation_length _ _ _ H0); simpl in |- *; intros; discriminate.
Qed.
Hint Resolve cover_min_one : core.

(* Minimum trees are preserved by permutation *)
Theorem cover_min_permutation :
forall (t : btree A) (l1 l2 : list (btree A)),
cover_min l1 t -> permutation l1 l2 -> cover_min l2 t.