intros a; case a; unfold nf, Cb in |- *; auto.
intros x c Q H';
case
(Reducef A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM ltM_dec
os Q (exist (fun l : list (Term A n) => canonical A0 eqA ltM l) x c));
auto.
intros x0; case x0.
intros x1 H'0 H'1.
change
(CombLinear A A0 eqA plusA multA eqA_dec n ltM ltM_dec Q
(mults (A:=A) multA (n:=n) (unit (mks A A0 eqA n ltM x1 H'0)) x1))
in |- *.
apply CombLinear_mults1 with (1 := cs); auto.
apply unit_nZ; auto.
apply reducestar_cb with (a := x) (1 := cs); auto.
Qed.
Definition foreigner : poly A0 eqA ltM -> poly A0 eqA ltM -> Prop.
intros a b; case a; case b.
intros x; case x.
intros H' x0 H'0; exact True.
intros a0 l H' x0; case x0.
intros H'0; exact True.
intros a1 l0 H'0;
exact
(eqT (ppc (A:=A) A1 (n:=n) a0 a1) (multTerm (A:=A) multA (n:=n) a0 a1)).
Defined.
Definition foreigner_dec :
forall a b : poly A0 eqA ltM, {foreigner a b} + {~ foreigner a b}.
intros a b; case a; case b.
intros x; case x.
simpl in |- *; auto.
intros a0 l c x0; case x0; simpl in |- *; auto.
intros a1 l0 H'.
apply eqT_dec; auto.
Defined.

Theorem foreigner_red :
forall (a b : poly A0 eqA ltM) (P : list (poly A0 eqA ltM)),
foreigner a b -> In a P -> In b P -> red (spolyp a b) P.