Definition separable U W : bool :=
all (separable_element U) (vbasis W).
Definition purely_inseparable U W : bool :=
all (purely_inseparable_element U) (vbasis W).

(* Specifications: *)
Lemma separable_add K x y :
separable_element K x -> separable_element K y -> separable_element K (x + y).
Lemma separable_sum I r (P : pred I) (v_ : I -> L) K :
(forall i, P i -> separable_element K (v_ i)) ->
separable_element K (\sum_(i <- r | P i) v_ i).
Lemma inseparable_add K x y :
purely_inseparable_element K x -> purely_inseparable_element K y ->
purely_inseparable_element K (x + y).
Lemma inseparable_sum I r (P : pred I) (v_ : I -> L) K :
(forall i, P i -> purely_inseparable_element K (v_ i)) ->
purely_inseparable_element K (\sum_(i <- r | P i) v_ i).
Lemma separableP {K E} :
reflect (forall y, y \in E -> separable_element K y) (separable K E).
Lemma purely_inseparableP {K E} :
reflect (forall y, y \in E -> purely_inseparable_element K y)
(purely_inseparable K E).
Lemma adjoin_separable_eq K x : separable_element K x = separable K <<K; x>>%VS.
Definition separable_generator K E : L :=
s2val (locked (separable_inseparable_decomposition E K)).
Lemma separable_generator_mem E K : separable_generator K E \in E.
Lemma eq_adjoin_separable_generator E K :
separable K E -> (K <= E)%VS ->
E = <<K; separable_generator K E>>%VS :> {vspace _}.
Lemma separable_refl K : separable K K.
Lemma separableS K1 K2 E2 E1 :
(K1 <= K2)%VS -> (E2 <= E1)%VS -> separable K1 E1 -> separable K2 E2.
Lemma separableSl K M E : (K <= M)%VS -> separable K E -> separable M E.
Lemma purely_inseparable_refl K : purely_inseparable K K.
End Separable.