intros P Q R H'; elim H'; simpl in |- *; auto.
intros a aP Q0 R0 H'0 H'1 H'2 H'3.
apply
stable_trans
with
(y := addEnd A A0 eqA n ltM
(nf A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM
ltM_dec os a aP) aP); auto.
apply stable0; auto.
intros a0 H'4.
apply
Cb_trans
with
(1 := cs)
(b := nf A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM
ltM_dec os a aP); auto.
apply nf_Cb; auto.
apply H'1; auto.
intros a0 H'4.
apply
Cb_genPcPf
with
(b := nf A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM
ltM_dec os a aP)
(P := aP)
(Q := Q0); auto.
apply Cb_id with (1 := cs); auto.
intros; apply Cb_in with (1 := cs); auto.
apply Cb_id with (1 := cs); auto.
Qed.
Inductive redIn :
poly A0 eqA ltM ->
poly A0 eqA ltM ->
list (poly A0 eqA ltM) ->
list (poly A0 eqA ltM) -> list (poly A0 eqA ltM) -> Prop :=
| redIn0b :
forall (P Q R : list (poly A0 eqA ltM)) (a b : poly A0 eqA ltM),
redIn b a P Q R -> redIn a b P Q R
| redIn0 :
forall (P Q R : list (poly A0 eqA ltM)) (a b : poly A0 eqA ltM),
In
(spolyp A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM
ltM_dec os a b) Q -> redIn a b P Q R
| redIn1 :
forall (P Q R : list (poly A0 eqA ltM)) (a b : poly A0 eqA ltM),
red A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec
(spolyp A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM
ltM_dec os a b) R -> redIn a b P Q R
| redIn2 :
forall (P Q R : list (poly A0 eqA ltM)) (a b c : poly A0 eqA ltM),
In c P ->
redIn a c P Q R ->
redIn b c P Q R ->
divp A A0 eqA multA divA n ltM
(ppcp A A0 A1 eqA plusA invA minusA multA divA cs n ltM a b) c ->
redIn a b P Q R.
Hint Resolve redIn1 redIn0.
Remark lem_redIn_nil :
forall (aP Q R : list (poly A0 eqA ltM)) (a b : poly A0 eqA ltM),
In a R -> In b R -> redIn a b aP Q R -> Q = nil -> aP = R -> reds a b R.
intros aP Q R a b H' H'0 H'1; elim H'1; auto.
intros P Q0 R0 a0 b0 H'2 H'3 H'4 H'5.
apply reds_com; auto.
intros P Q0 R0 a0 b0 H'2 H'3 H'4.
rewrite H'3 in H'2; elim H'2.
intros P Q0 R0 a0 b0 H'2 H'3 H'4; rewrite <- H'4.
rewrite H'4.
apply reds0; auto.
intros P Q0 R0 a0 b0 c H'2 H'3 H'4 H'5 H'6 H'7 H'8 H'9.
apply reds1 with (c := c); auto.
rewrite <- H'9; auto.
apply reds_com; auto.
Qed.

(* Specifications: *)
Theorem redIn_nil :
forall (R : list (poly A0 eqA ltM)) (a b : poly A0 eqA ltM),
In a R -> In b R -> redIn a b R nil R -> reds a b R.