
theorem Th26: :: theorem 5.38 (ii) ==> (iii), p. 207
  for n being Element of NAT, T being admissible connected
  TermOrder of n, L being add-associative right_complementable right_zeroed
commutative associative well-unital distributive Abelian almost_left_invertible
non degenerated non empty doubleLoopStr, I being add-closed left-ideal Subset
of Polynom-Ring(n,L), G being Subset of Polynom-Ring(n,L) st G c= I holds (for
  f being non-zero Polynomial of n,L st f in I holds f is_reducible_wrt G,T)
  implies (for f being non-zero Polynomial of n,L st f in I holds f
  is_top_reducible_wrt G,T)
proof
  let n be Element of NAT, T be admissible connected TermOrder of n, L be
  add-associative right_complementable right_zeroed commutative associative
  well-unital distributive Abelian almost_left_invertible non degenerated non
empty doubleLoopStr, I being add-closed left-ideal Subset of Polynom-Ring(n,L)
  , P be Subset of Polynom-Ring(n,L);
  assume
A1: P c= I;
  assume
A2: for f being non-zero Polynomial of n,L st f in I holds f
  is_reducible_wrt P,T;
  thus for f being non-zero Polynomial of n,L st f in I holds f
  is_top_reducible_wrt P,T
  proof
    set H = {g where g is non-zero Polynomial of n,L : g in I & not(g
    is_top_reducible_wrt P,T)};
    let f be non-zero Polynomial of n,L;
    assume
A3: f in I;
    assume not f is_top_reducible_wrt P,T;
    then
A4: f in H by A3;
    now
      let u be object;
      assume u in H;
      then ex g9 being non-zero Polynomial of n,L st u = g9 & g9 in I & not g9
      is_top_reducible_wrt P,T;
      hence u in the carrier of Polynom-Ring(n,L);
    end;
    then reconsider H as non empty Subset of Polynom-Ring(n,L) by A4,
TARSKI:def 3;
    consider p being Polynomial of n,L such that
A5: p in H and
A6: for q being Polynomial of n,L st q in H holds p <= q,T by POLYRED:31;
A7: ex p9 being non-zero Polynomial of n,L st p9 = p & p9 in I & not p9
    is_top_reducible_wrt P,T by A5;
    then reconsider p as non-zero Polynomial of n,L;
    p is_reducible_wrt P,T by A2,A7;
    then consider q being Polynomial of n,L such that
A8: p reduces_to q,P,T by POLYRED:def 9;
    consider u being Polynomial of n,L such that
A9: u in P and
A10: p reduces_to q,u,T by A8,POLYRED:def 7;
    ex b being bag of n st p reduces_to q,u,b,T by A10,POLYRED:def 6;
    then
A11: u <> 0_(n,L) by POLYRED:def 5;
    then reconsider u as non-zero Polynomial of n,L by POLYNOM7:def 1;
    consider b being bag of n such that
A12: p reduces_to q,u,b,T by A10,POLYRED:def 6;
A13: now
      assume b = HT(p,T);
      then p top_reduces_to q,u,T by A12,POLYRED:def 10;
      then p is_top_reducible_wrt u,T by POLYRED:def 11;
      hence contradiction by A7,A9,POLYRED:def 12;
    end;
    consider m being Monomial of n,L such that
A14: q = p - m *' u by A10,Th1;
    reconsider uu = u, pp = p, mm = m as Element of Polynom-Ring(n,L) by
POLYNOM1:def 11;
    reconsider uu,pp,mm as Element of Polynom-Ring(n,L);
    mm * uu in I by A1,A9,IDEAL_1:def 2;
    then -(mm * uu) in I by IDEAL_1:13;
    then
A15: pp + -(mm * uu) in I by A7,IDEAL_1:def 1;
    mm * uu = m *' u by POLYNOM1:def 11;
    then p - (m *' u) = pp - (mm * uu) by Lm2;
    then
A16: q in I by A14,A15;
A17: q < p,T by A10,POLYRED:43;
A18: p <> 0_(n,L) by POLYNOM7:def 1;
    then Support p <> {} by POLYNOM7:1;
    then
A19: HT(p,T) in Support p by TERMORD:def 6;
    b in Support p by A12,POLYRED:def 5;
    then b <= HT(p,T),T by TERMORD:def 6;
    then b < HT(p,T),T by A13,TERMORD:def 3;
    then
A20: HT(p,T) in Support q by A19,A12,POLYRED:40;
    now
      per cases;
      case
A21:    q <> 0_(n,L);
        then reconsider q as non-zero Polynomial of n,L by POLYNOM7:def 1;
        Support q <> {} by A21,POLYNOM7:1;
        then HT(q,T) in Support q by TERMORD:def 6;
        then
A22:    HT(q,T) <= HT(p,T),T by A10,POLYRED:42;
        HT(p,T) <= HT(q,T),T by A20,TERMORD:def 6;
        then
A23:    HT(q,T) = HT(p,T) by A22,TERMORD:7;
        now
          assume not q is_top_reducible_wrt P,T;
          then q in H by A16;
          then p <= q,T by A6;
          hence contradiction by A17,POLYRED:29;
        end;
        then consider u9 being Polynomial of n,L such that
A24:    u9 in P and
A25:    q is_top_reducible_wrt u9,T by POLYRED:def 12;
        consider q9 being Polynomial of n,L such that
A26:    q top_reduces_to q9,u9,T by A25,POLYRED:def 11;
A27:    p <> 0_(n,L) by POLYNOM7:def 1;
        then Support p <> {} by POLYNOM7:1;
        then
A28:    HT(p,T) in Support p by TERMORD:def 6;
A29:    q reduces_to q9,u9,HT(q,T),T by A26,POLYRED:def 10;
        then consider s being bag of n such that
A30:    s + HT(u9,T) = HT(q,T) and
        q9 = q - (q.(HT(q,T))/HC(u9,T)) * (s *' u9) by POLYRED:def 5;
        set qq = p - (p.(HT(p,T))/HC(u9,T)) * (s *' u9);
        u9 <> 0_(n,L) by A29,POLYRED:def 5;
        then p reduces_to qq,u9,HT(p,T),T by A23,A30,A27,A28,POLYRED:def 5;
        then p top_reduces_to qq,u9,T by POLYRED:def 10;
        then p is_top_reducible_wrt u9,T by POLYRED:def 11;
        hence contradiction by A7,A24,POLYRED:def 12;
      end;
      case
        q = 0_(n,L);
        then
A31:    m *' u = (p - m *' u) + m *' u by A14,POLYRED:2
          .= (p + -(m *' u)) + m *' u by POLYNOM1:def 7
          .= p + (-(m *' u) + m *' u) by POLYNOM1:21
          .= p + 0_(n,L) by POLYRED:3
          .= p by POLYNOM1:23;
        m <> 0_(n,L) by A31,POLYRED:5,POLYNOM7:def 1;
        then reconsider m as non-zero Polynomial of n,L by POLYNOM7:def 1;
        set pp = p - (p.(HT(p,T))/HC(u,T)) * (HT(m,T) *' u);
        HT(p,T) = HT(m,T) + HT(u,T) by A31,TERMORD:31;
        then p reduces_to pp,u,HT(p,T),T by A11,A18,A19,POLYRED:def 5;
        then p top_reduces_to pp,u,T by POLYRED:def 10;
        then p is_top_reducible_wrt u,T by POLYRED:def 11;
        hence contradiction by A7,A9,POLYRED:def 12;
      end;
    end;
    hence thesis;
  end;
end;
