(**)
intros U F F' F'' F''' A A' n v w. set(I:=simple_P0 _ _ _ _(simple_P4 _ A)(
simple_P5 _ A)(simple_P6 _ A)(simple_P7 _ A)). fold n v w in I. assert(V:forall
x:U,v(proj1_sig(I x))=0%R\/v(proj1_sig(I x))=1%R). intro. elim(eq_nat_dec(
proj1_sig(I x))0). intro a. rewrite a;auto. intro b. elim(eq_nat_dec(proj1_sig(
I x))1). intro a. rewrite a;auto. intro c. elimtype False. elim(proj2_sig(I x))
. intuition.
(**)
assert(Z0:forall x:U,v(proj1_sig(I x))=0%R->(Complement _ A)x). intros. assert(
Z:proj1_sig(I x)=0). apply(simple_P6 _ A). auto. elim(proj2_sig(I x)). rewrite
Z;intuition. assert(Z1:forall x:U,v(proj1_sig(I x))=1%R->A x). intros. assert(Z
:proj1_sig(I x)=1). apply(simple_P6 _ A). auto. elim(proj2_sig(I x)). rewrite Z
;intuition.
(**)
assert(Q0:forall x:U,~A x->v(proj1_sig(I x))=0%R). intros. assert(Q:w 0 x).
auto. elim(proj2_sig(I x)). intros q1 q2. elim q2. intros q3 q4. rewrite<-(q4 0
Q). auto. assert(Q1:forall x:U,A x->v(proj1_sig(I x))=1%R). intros. assert(Q:w
1 x). auto. elim(proj2_sig(I x)). intros q1 q2. elim q2. intros q3 q4. rewrite
<-(q4 1 Q). auto.
(**)
red. fold I. intros D B. unfold preimg. elim(classic(D(INR 0))). elim(classic(D
(INR 1))). intros H1 H0. cut(Full_set _=fun x=>D(v(proj1_sig(I x)))). intro H.
rewrite<-H. apply sigalg_P3. elim F'. intros x K;exists x;auto. auto. auto.
apply Extensionality_Ensembles. split. red. intros x H. clear H. red. elim(
classic(A x)). intro H. rewrite(Q1 x H). auto. intro H. rewrite(Q0 x H). auto.
red. intros. apply Full_intro. intros H1 H0. cut(Complement _ A=fun x=>D(v(
proj1_sig(I x)))). intro H. rewrite<-H. apply F''. auto. apply
Extensionality_Ensembles. split. red. intros x H. red. elim(V x). intro HH.
rewrite HH. auto. intro. elimtype False. apply H. red. apply Z1. auto. red.
intros x H. red in H. elim(V x). intro. red. apply Z0. auto. intro HH. rewrite
HH in H. intuition.
(**)
elim(classic(D(INR 1))). intros H1 H0. cut(A=fun x=>D(v(proj1_sig(I x)))).
intro H. rewrite<-H. auto. apply Extensionality_Ensembles. split. red. intros x
H. red. rewrite(Q1 x H). auto. red. intros x H. red in H. elim(V x). intro HH.
rewrite HH in H. intuition. intuition. intros H1 H0. cut(Empty_set _=fun x=>D(v
(proj1_sig(I x)))). intro H. rewrite<-H. apply sigalg_P1. elim F'. intros x K;
exists x;auto. auto. auto. apply Extensionality_Ensembles. split. intuition.
red. intros x H. red in H. elim(V x). intro HH. rewrite HH in H. intuition.
intro HH. rewrite HH in H. intuition. Qed.

(* Specifications: *)
Lemma simple_P9:
(forall(U:Type)(n:nat)(v:nat->R)(w:nat->Ensemble U)(S0:simple_0 _ n v w)(S1:
simple_1 _ n v w)(S2:simple_2 _ n v w)(S3:simple_3 _ n v w),
forall c:R,0<c->simple_0 _ n (fun i:nat=>v i*c)w)%R. auto. Qed.
Lemma simple_P10:
(forall(U:Type)(n:nat)(v:nat->R)(w:nat->Ensemble U)(S0:simple_0 _ n v w)(S1:
simple_1 _ n v w)(S2:simple_2 _ n v w)(S3:simple_3 _ n v w),
forall c:R,0<c->simple_1 _ n (fun i:nat=>v i*c)w)%R. auto. Qed.
Lemma simple_P11:
(forall(U:Type)(n:nat)(v:nat->R)(w:nat->Ensemble U)(S0:simple_0 _ n v w)(S1:
simple_1 _ n v w)(S2:simple_2 _ n v w)(S3:simple_3 _ n v w),
forall c:R,0<c->simple_2 _ n (fun i:nat=>v i*c)w)%R.