
theorem Th10:
  for n being Element of NAT, T being connected admissible
  TermOrder of n, L being add-associative right_complementable right_zeroed
commutative associative well-unital distributive Abelian almost_left_invertible
non trivial doubleLoopStr, p being Polynomial of n,L holds PolyRedRel({p},T)
  is locally-confluent
proof
  let n be Element of NAT, T be connected admissible TermOrder of n, L be
  add-associative right_complementable right_zeroed commutative associative
  well-unital distributive Abelian almost_left_invertible non trivial
  doubleLoopStr, p be Polynomial of n,L;
  set R = PolyRedRel({p},T);
A1: 0_(n,L) = 0.Polynom-Ring(n,L) by POLYNOM1:def 11;
  per cases;
  suppose
A2: p = 0_(n,L);
    now
      let a,b,c be object;
      assume that
A3:   [a,b] in R and
      [a,c] in R;
      consider p9,q being object such that
A4:   p9 in NonZero Polynom-Ring(n,L) and
A5:   q in the carrier of Polynom-Ring(n,L) and
A6:   [a,b] = [p9,q] by A3,ZFMISC_1:def 2;
      reconsider q as Polynomial of n,L by A5,POLYNOM1:def 11;
      not p9 in {0_(n,L)} by A1,A4,XBOOLE_0:def 5;
      then p9 <> 0_(n,L) by TARSKI:def 1;
      then reconsider p9 as non-zero Polynomial of n,L by A4,POLYNOM1:def 11
,POLYNOM7:def 1;
      p9 reduces_to q,{p},T by A3,A6,POLYRED:def 13;
      then consider g being Polynomial of n,L such that
A7:   g in {p} and
A8:   p9 reduces_to q,g,T by POLYRED:def 7;
      g = 0_(n,L) by A2,A7,TARSKI:def 1;
      then p9 is_reducible_wrt 0_(n,L),T by A8,POLYRED:def 8;
      hence b,c are_convergent_wrt R by Lm3;
    end;
    hence thesis by REWRITE1:def 24;
  end;
  suppose
    p <> 0_(n,L);
    then reconsider p as non-zero Polynomial of n,L by POLYNOM7:def 1;
    now
      let a,b,c being object;
      assume that
A9:   [a,b] in R and
A10:  [a,c] in R;
      consider pa,pb being object such that
A11:  pa in NonZero Polynom-Ring(n,L) and
A12:  pb in the carrier of Polynom-Ring(n,L) and
A13:  [a,b] = [pa,pb] by A9,ZFMISC_1:def 2;
      not pa in {0_(n,L)} by A1,A11,XBOOLE_0:def 5;
      then pa <> 0_(n,L) by TARSKI:def 1;
      then reconsider pa as non-zero Polynomial of n,L by A11,POLYNOM1:def 11
,POLYNOM7:def 1;
      reconsider pb as Polynomial of n,L by A12,POLYNOM1:def 11;
A14:  pb = b by A13,XTUPLE_0:1;
A15:  pa = a by A13,XTUPLE_0:1;
      then pa reduces_to pb,{p},T by A9,A14,POLYRED:def 13;
      then ex p9 being Polynomial of n,L st p9 in {p} & pa reduces_to pb,p9,T
      by POLYRED:def 7;
      then
A16:  pa reduces_to pb,p,T by TARSKI:def 1;
      consider pa9,pc being object such that
      pa9 in NonZero Polynom-Ring(n,L) and
A17:  pc in the carrier of Polynom-Ring(n,L) and
A18:  [a,c] = [pa9,pc] by A10,ZFMISC_1:def 2;
      reconsider pc as Polynomial of n,L by A17,POLYNOM1:def 11;
A19:  p in {p} by TARSKI:def 1;
A20:  pc = c by A18,XTUPLE_0:1;
      then pa reduces_to pc,{p},T by A10,A15,POLYRED:def 13;
      then ex p9 being Polynomial of n,L st p9 in {p} & pa reduces_to pc,p9,T
      by POLYRED:def 7;
      then
A21:  pa reduces_to pc,p,T by TARSKI:def 1;
      now
        per cases;
        case
A22:      pb = 0_(n,L);
          then consider mb being Monomial of n,L such that
A23:      0_(n,L) = pa - mb *' p by A16,Th1;
          0_(n,L) + mb*'p = (pa + -(mb*'p)) + mb*'p by A23,POLYNOM1:def 7;
          then mb*'p = (pa + -(mb*'p)) + mb*'p by POLYRED:2;
          then mb*'p = pa + (-(mb*'p) + mb*'p) by POLYNOM1:21;
          then mb*'p = pa + 0_(n,L) by POLYRED:3;
          then mb*'p = pa by POLYNOM1:23;
          then consider mc being Monomial of n,L such that
A24:      pc = mb *' p - mc *' p by A21,Th1;
          pc = mb *' p + -(mc *' p) by A24,POLYNOM1:def 7;
          then pc = mb *' p + (-mc) *' p by POLYRED:6;
          then
A25:      pc = (mb + -mc) *' p by POLYNOM1:26;
          then
A26:      pc = (mb - mc) *' p by POLYNOM1:def 7;
          now
            per cases;
            case
              mb = mc;
              then pc = 0_(n,L) *'p by A26,POLYNOM1:24;
              then pc = 0_(n,L) by POLYRED:5;
              hence
              ex d being set st R reduces b,d & R reduces c,d by A14,A20,A22,
REWRITE1:12;
            end;
            case
              mb <> mc;
              R reduces pb,0_(n,L) by A22,REWRITE1:12;
              hence
              ex d being set st R reduces b,d & R reduces c,d by A14,A20,A19
,A25,POLYRED:45;
            end;
          end;
          hence ex d being set st R reduces b,d & R reduces c,d;
        end;
        case
A27:      pc = 0_(n,L);
          then consider mc being Monomial of n,L such that
A28:      0_(n,L) = pa - mc *' p by A21,Th1;
          0_(n,L) + mc*'p = (pa + -(mc*'p)) + mc*'p by A28,POLYNOM1:def 7;
          then mc*'p = (pa + -(mc*'p)) + mc*'p by POLYRED:2;
          then mc*'p = pa + (-(mc*'p) + mc*'p) by POLYNOM1:21;
          then mc*'p = pa + 0_(n,L) by POLYRED:3;
          then mc*'p = pa by POLYNOM1:23;
          then consider mb being Monomial of n,L such that
A29:      pb = mc *' p - mb *' p by A16,Th1;
          pb = mc *' p + -(mb *' p) by A29,POLYNOM1:def 7;
          then pb = mc *' p + (-mb) *' p by POLYRED:6;
          then
A30:      pb = (mc + -mb) *' p by POLYNOM1:26;
          then
A31:      pb = (mc - mb) *' p by POLYNOM1:def 7;
          now
            per cases;
            case
              mb = mc;
              then pb = 0_(n,L) *'p by A31,POLYNOM1:24;
              then pb = 0_(n,L) by POLYRED:5;
              hence
              ex d being set st R reduces b,d & R reduces c,d by A14,A20,A27,
REWRITE1:12;
            end;
            case
              mb <> mc;
              R reduces pc,0_(n,L) by A27,REWRITE1:12;
              hence
              ex d being set st R reduces b,d & R reduces c,d by A14,A20,A19
,A30,POLYRED:45;
            end;
          end;
          hence ex d being set st R reduces b,d & R reduces c,d;
        end;
        case
          not(pb = 0_(n,L) or pc = 0_(n,L));
          then reconsider pb,pc as non-zero Polynomial of n,L by POLYNOM7:def 1
;
          now
            per cases;
            case
              pb = pc;
              hence
              ex d being set st R reduces b,d & R reduces c,d by A14,A20,
REWRITE1:12;
            end;
            case
A32:          pb <> pc;
              now
                assume pb - pc = 0_(n,L);
                then (pb + -pc) + pc = 0_(n,L) + pc by POLYNOM1:def 7;
                then pb + (-pc + pc) = 0_(n,L) + pc by POLYNOM1:21;
                then pb + 0_(n,L) = 0_(n,L) + pc by POLYRED:3;
                then pb + 0_(n,L) = pc by POLYRED:2;
                hence contradiction by A32,POLYNOM1:23;
              end;
              then reconsider h = pb-pc as non-zero Polynomial of n,L by
POLYNOM7:def 1;
              consider mb being Monomial of n,L such that
A33:          pb = pa - mb *' p by A16,Th1;
              consider mc being Monomial of n,L such that
A34:          pc = pa - mc *' p by A21,Th1;
              now
                assume -mb + mc = 0_(n,L);
                then mc + (-mb + mb) = 0_(n,L) + mb by POLYNOM1:21;
                then mc + 0_(n,L) = 0_(n,L) + mb by POLYRED:3;
                then mc + 0_(n,L) = mb by POLYRED:2;
                hence contradiction by A32,A33,A34,POLYNOM1:23;
              end;
              then reconsider hh = -mb + mc as non-zero Polynomial of n,L by
POLYNOM7:def 1;
A35:      --(mc *' p) = mc *' p by POLYNOM1:19;
              h = (pa - mb *' p) + -(pa - mc *' p) by A33,A34,POLYNOM1:def 7
                .= (pa - mb *' p) + -(pa + -(mc *' p)) by POLYNOM1:def 7
                .= (pa - mb *' p) + (-pa + --(mc *' p)) by POLYRED:1
                .= (pa + -(mb *' p)) + (-pa + --(mc *' p)) by POLYNOM1:def 7
                .= ((pa + -(mb *' p)) + -pa) + (mc *' p) by A35,POLYNOM1:21
                .= ((pa + -pa) + -(mb *' p)) + (mc *' p) by POLYNOM1:21
                .= (0_(n,L) + -(mb *' p)) + (mc *' p) by POLYRED:3
                .= -(mb *' p) + (mc *' p) by POLYRED:2
                .= ((-mb) *' p) + (mc *' p) by POLYRED:6
                .= hh *' p by POLYNOM1:26;
              then consider f1,g1 being Polynomial of n,L such that
A36:          f1 - g1 = 0_(n,L) and
A37:          R reduces pb,f1 & R reduces pc,g1 by A19,POLYRED:45,49;
              (f1 + -g1) + g1 = 0_(n,L) + g1 by A36,POLYNOM1:def 7;
              then f1 + (-g1 + g1) = 0_(n,L) + g1 by POLYNOM1:21;
              then f1 + 0_(n,L) = 0_(n,L) + g1 by POLYRED:3;
              then f1 + 0_(n,L) = g1 by POLYRED:2;
              then f1 = g1 by POLYNOM1:23;
              hence
              ex d being set st R reduces b,d & R reduces c,d by A14,A20,A37;
            end;
          end;
          hence ex d being set st R reduces b,d & R reduces c,d;
        end;
      end;
      hence b,c are_convergent_wrt R by REWRITE1:def 7;
    end;
    hence thesis by REWRITE1:def 24;
  end;
end;
