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 _.