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.
split.
intros.
elim (subspace_construction H).
intros.
exists x; auto.
intro; inversion_clear H.
generalize (is_subspace_OK x).
intro H; red in H; split; try split; intuition;
(apply in_part_comp_r with (x:part_set V); auto with algebra).
apply H; auto with algebra; (apply in_part_comp_r with Ws; auto with algebra).
apply H3; auto with algebra;
(apply in_part_comp_r with Ws; auto with algebra).
Qed.
Definition Set_of_subspaces : part_set (part_set V).
apply (Build_Predicate (Pred_fun:=fun W => is_subspace W)).
red in |- *.
intros.
red in |- *; red in H.
inversion_clear H.
inversion_clear H2.
split; try split.
apply in_part_comp_r with x; auto with algebra.
intros; (apply in_part_comp_r with x; auto with algebra).
apply H; auto with algebra.
apply in_part_comp_r with y; auto with algebra.
apply in_part_comp_r with y; auto with algebra.
intros.
apply in_part_comp_r with x; auto with algebra.
apply H3; auto with algebra; (apply in_part_comp_r with y; auto with algebra).
Defined.

(** - %\intoc{\bf Theorem 1.4}% *)
Lemma Set_of_subspaces_closed_under_intersection :
forall WS : part_set Set_of_subspaces,
is_subspace (intersection (inject_subsets WS)).