Section subspace_awkward_utils.
(** - Officially, "a subspace is a subset that is itself a vectorspace..." We cannot have both W:(part_set V) and W:(subspace V). Therefore we need to define subspace-ness on the predicate-level as well. *)
(** %\tocdef{is\_subspace}% *)
Definition is_subspace (W : part_set V) : Prop :=
in_part (zero V) W /\
(forall x y : V, in_part x W -> in_part y W -> in_part (x +' y) W) /\
(forall (c : F) (x : V), in_part x W -> in_part (c mX x) W).
intros.
red in |- *.
red in H0.
inversion_clear H0.
inversion_clear H2.
split.
apply in_part_comp_r with S; auto with algebra.
split.
intros.
apply in_part_comp_r with S; auto with algebra.
apply H0; auto with algebra.
apply in_part_comp_r with S'; auto with algebra.
apply in_part_comp_r with S'; auto with algebra.
intros.
apply in_part_comp_r with S; auto with algebra.
apply H3; auto with algebra.
apply in_part_comp_r with S'; auto with algebra.
Qed.
(** - From the predicate, then, we may define (uniformly) a subspace having the part_set as a carrier *)
Definition subspace_construction :
forall Ws : part_set V,
is_subspace Ws -> sigT (fun W : subspace V => W =' Ws in part_set V).
unfold is_subspace in |- *.
intros Ws (H1, (H2, H3)).
cut (sigT (fun Wmod : submodule V => Wmod =' Ws in part_set V)).
intro.
inversion_clear X.
exists x.
assumption.
cut (sigT (fun Wgp : subgroup V => Wgp =' Ws in part_set V)).
intro.
inversion_clear X.
exists
(Build_submodule
(fun (a : F) (v : V) (Hyp : in_part v (x:part_set V)) =>
in_part_comp_r (H3 a v (in_part_comp_r Hyp H)) (Sym H))).
simpl in |- *.
assumption.
cut (sigT (fun Wmon : submonoid V => Wmon =' Ws in part_set V)).
intro.
inversion X.
cut (forall v : V, (min one) mX v =' (min v) in _).
intro.
exists
(Build_subgroup
(fun (v : V) (Hyp : in_part v (x:part_set V)) =>
in_part_comp_r
(in_part_comp_l (H3 (min one) v (in_part_comp_r Hyp H)) (Sym (H0 v)))
(Sym H))).
simpl in |- *.
assumption.
intro.
apply Trans with (min one mX v); auto with algebra.
cut (sigT (fun Wsgp : subsgroup V => Wsgp =' Ws in part_set V)).
intro.
inversion_clear X.
exists (Build_submonoid (in_part_comp_r H1 (Sym H))).
simpl in |- *.
assumption.
exists
(Build_subsgroup
(fun (x y : V) (Hx : in_part x Ws) (Hy : in_part y Ws) => H2 x y Hx Hy)).
simpl in |- *.
exact
(fun x : V =>
conj (fun Hx : in_part x Ws => Hx) (fun Hx : in_part x Ws => Hx)).
Defined.
Definition alt_Build_subspace (W : part_set V) (H : is_subspace W) :
subspace V := let (w, _) := subspace_construction H in w.
intros.
unfold alt_Build_subspace in |- *.
case (subspace_construction HW).
auto with algebra.
Qed.
intro.
split; try split; auto with algebra.
Qed.

(** - %\intoc{\bf Theorem 1.3}% literally (more-or-less; now easy to prove): *)
Lemma subspace_alt_characterization :
forall Ws : part_set V,
in_part (zero V) Ws /\
(forall x y : V, in_part x Ws -> in_part y Ws -> in_part (x +' y) Ws) /\
(forall (c : F) (x : V), in_part x Ws -> in_part (c mX x) Ws) <->
(exists W : subspace V, W =' Ws in part_set V).