
theorem Th18:
  for n being Ordinal, T being connected TermOrder of n, L being
  add-associative right_complementable right_zeroed commutative associative
  well-unital distributive almost_left_invertible Abelian non trivial
doubleLoopStr, P being Subset of Polynom-Ring(n,L), p1,p2 being Polynomial of
  n,L st p1 in P & p2 in P holds S-Poly(p1,p2,T) in P-Ideal
proof
  let n be Ordinal, T be connected TermOrder of n, L be add-associative
  right_complementable right_zeroed commutative associative well-unital
  distributive almost_left_invertible Abelian non trivial doubleLoopStr, P be
  Subset of Polynom-Ring(n,L), p1,p2 be Polynomial of n,L;
  assume that
A1: p1 in P and
A2: p2 in P;
  set q1 = Monom(HC(p2,T),lcm(HT(p1,T),HT(p2,T))/HT(p1,T)), q2 = Monom(HC(p1,T
  ),lcm(HT(p1,T),HT(p2,T))/HT(p2,T));
  reconsider p19 = p1, p29 = p2 as Element of Polynom-Ring(n,L) by
POLYNOM1:def 11;
  reconsider p19, p29 as Element of Polynom-Ring(n,L);
  reconsider q19 = q1, q29 = q2 as Element of Polynom-Ring(n,L) by
POLYNOM1:def 11;
  reconsider q19, q29 as Element of Polynom-Ring(n,L);
  p29 in P-Ideal by A2,Lm2;
  then
A3: q29 * p29 in P-Ideal by IDEAL_1:def 2;
  p19 in P-Ideal by A1,Lm2;
  then q19 * p19 in P-Ideal by IDEAL_1:def 2;
  then
A4: q19 * p19 - q29 * p29 in P-Ideal by A3,IDEAL_1:16;
  set q = S-Poly(p1,p2,T);
A5: q1 *' p1 = q19 * p19 & q2 *' p2 = q29 * p29 by POLYNOM1:def 11;
  q = q1 *' p1 - HC(p1,T) * (lcm(HT(p1,T),HT(p2,T))/HT(p2,T)) *' p2 by
POLYRED:22
    .= q1 *' p1 - q2 *' p2 by POLYRED:22;
  hence thesis by A4,A5,Lm3;
end;
