(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* of the License, or (at your option) any later version.             *)
(*                                                                    *)
(* This program is distributed in the hope that it will be useful,    *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of     *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)
(* GNU General Public License for more details.                       *)
(*                                                                    *)
(* You should have received a copy of the GNU Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)
(** * bases_finite_dim.v *)
Set Implicit Arguments.
Unset Strict Implicit.
Require Export bases_from_generating_sets.
Require Export replacement_corollaries.
(** %\tocdef{is\_{\em[in]}finite\_dimensional}% *)
Definition is_finite_dimensional (F : field) (V : vectorspace F) :=
exists beta : basis V, (exists n : Nat, has_n_elements n beta).
Definition is_infinite_dimensional (F : field) (V : vectorspace F) :=
forall (beta : basis V) (n : Nat), ~ has_n_elements n beta.
(** %\tocdef{has\_dim}% *)
Definition has_dim (F : field) (n : Nat) (V : vectorspace F) :=
exists beta : basis V, has_n_elements n beta.
intros.
inversion_clear H.
rename x into beta.
inversion_clear H0.
inversion_clear H.
rename x into n.
exists n.
red in |- *.
exists beta; auto.
red in |- *.
exists x0; auto.
Qed.

Lemma has_dim_inj :
forall (F : field) (V : vectorspace F) (n m : Nat),
has_dim n V -> has_dim m V -> n =' m in _.