Section Part_3.
intros.
generalize (every_finite_generating_set_has_a_subset_that_is_a_basis (W0:=S)).
intro p.
assert (is_finite_subset S).
red in |- *.
red in H1.
inversion_clear H1.
inversion_clear H2.
exists x.
generalize (n_element_subset_sequence H3).
intro.
inversion_clear H2.
inversion_clear H4.
exists x0; auto.
generalize (p H2 H0); clear p; intro p.
inversion_clear p.
rename x into S1.
red in H.
inversion_clear H.
rename x into beta.
generalize (all_finite_bases_equally_big H4 (Build_basis H3)).
intro.
assert (has_n_elements n S1).
apply inject_subsets_respects_has_n_elements; auto with algebra.
assert (has_at_least_n_elements n S).
apply subset_bounds_set_size_from_below with S1; auto with algebra.
assert (has_n_elements n S).
apply has_n_elements_by_at_least_at_most; auto with algebra.
split; auto.
apply is_basis_comp with (inject_subsets S1); auto with algebra.
assert (S1 =' full S in _).
apply subset_also_has_n_elements_then_it_is_full with n; auto with algebra.
apply Trans with (inject_subsets (full S)); auto with algebra.
Qed.
intros.
generalize (finite_dim_vecsp_has_dim H); intro p.
inversion_clear p.
rename x into n.
generalize H1; intro HH2.
red in H1.
inversion_clear H1.
rename x into beta'.
assert (has_n_elements n beta).
apply all_finite_bases_equally_big with beta'; auto with algebra.
clear H2 beta'.
assert (exists m : Nat, has_n_elements m Sset /\ m <= n).
generalize (finite_basis_bounds_lin_indep_set_size' H1 H0); intros.
red in H2.
inversion_clear H2.
rename x into m.
exists m; intuition.
inversion_clear H2.
rename x into m.
inversion_clear H3.
generalize (replacement_theorem H1 H0 H4 H2); intro.
inversion_clear H3.
rename x into S1'.
set (S1 := inject_subsets S1') in *.
inversion_clear H5.
assert (has_at_most_n_elements n (union Sset S1)).
apply has_at_most_n_elements_comp with (m + (n - m)) (union Sset S1);
auto with algebra.
2: auto with arith.
apply union_has_at_most_n_plus_m_elements; auto with algebra.
unfold S1 in |- *.
apply inject_subsets_preserves_has_n_elements; auto with algebra.
simpl in |- *; auto with arith.
exists S1.
generalize (dimension_bounds_generating_set_size HH2 H6 H5).
split; intuition.
unfold S1 in |- *.
apply inject_subsets_of_part_set_included.
Qed.

Lemma has_dim_zero_then_trivial :
forall (F : field) (V : vectorspace F),
has_dim 0 V -> full V =' single (zero V) in _.