intros.
red in |- *.
assert (lin_indep beta).
red in H0.
inversion_clear H0.
inversion_clear H2; auto.
split; auto.
cut (included W (span beta:part_set _)).
intro.
red in |- *.
red in H.
apply included_antisym; auto with algebra.
apply included_comp with (span W:part_set _) (span beta:part_set _);
auto with algebra.
apply span_smallest_subspace_containing_subset; auto with algebra.
apply NNPP; intro.
assert (exists x : W, ~ in_part (W x) (span beta:part_set _)).
apply NNPP; intro; apply H2.
red in |- *.
intros.
apply NNPP; intro.
apply H3.
red in H4; exists (Build_subtype H4).
intro; apply H5.
simpl in H6.
simpl in |- *.
auto.
inversion_clear H3.
assert (~ in_part (W x) beta).
intro; apply H4.
apply set_included_in_its_span; auto with algebra.
assert (lin_indep (union beta (single (W x)))).
elim (lin_dep_vs_span_lemma H1 H3).
intros.
intro.
apply H4; auto with algebra.
red in H0.
inversion_clear H0.
inversion_clear H7.
apply H5; auto with algebra.
apply H8; auto with algebra.
apply in_part_comp_l with (subtype_elt x); auto with algebra.
Qed.

(** - %\intoc{Corollary to 1.12}%: *)
Lemma basis_iff_max_lin_indep :
forall (F : field) (V : vectorspace F) (beta : part_set V),
is_basis beta <-> max_lin_indep beta (full V).