(* 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.

Lemma finite_dim_vecsp_has_dim :
forall (F : field) (V : vectorspace F),
is_finite_dimensional V -> exists n : Nat, has_dim n V.