
theorem Th21:
  for L be right_zeroed add-associative right_complementable
  well-unital distributive non empty doubleLoopStr, p, q be Polynomial of L
  holds len (p*'q) <= (len p)+(len q)-'1
proof
  let L be right_zeroed add-associative right_complementable well-unital
  distributive non empty doubleLoopStr, p,q be Polynomial of L;
  now
    let i be Nat;
A1: len p + len q -' 1 >= len p + len q - 1 by XREAL_0:def 2;
    i in NAT by ORDINAL1:def 12;
    then consider r be FinSequence of the carrier of L such that
A2: len r = i+1 and
A3: (p*'q).i = Sum r and
A4: for k be Element of NAT st k in dom r holds r.k=p.(k-'1) * q.(i+1
    -'k) by POLYNOM3:def 9;
    assume i >= len p + len q -' 1;
    then i >= len p + (len q - 1) by A1,XXREAL_0:2;
    then len p <= i - (len q - 1) by XREAL_1:19;
    then
A5: -len p >= -(i - len q + 1) by XREAL_1:24;
    now
      let k be Element of NAT;
      assume
A6:   k in dom r;
      then
A7:   r.k = p.(k-'1) * q.(i+1-'k) by A4;
      k in Seg len r by A6,FINSEQ_1:def 3;
      then k <= i+1 by A2,FINSEQ_1:1;
      then
A8:   i+1-k >= 0 by XREAL_1:48;
      per cases;
      suppose
        k-'1 < len p;
        then k-1 < len p by XREAL_0:def 2;
        then -(k-1) > -len p by XREAL_1:24;
        then 1-k > len q - 1 - i by A5,XXREAL_0:2;
        then i+(1-k)>len q - 1 by XREAL_1:19;
        then i+1-'k > len q -1 by A8,XREAL_0:def 2;
        then i+1-'k >= len q -1 +1 by INT_1:7;
        then q.(i+1-'k) = 0.L by ALGSEQ_1:8;
        hence r.k = 0.L by A7;
      end;
      suppose
        k-'1 >= len p;
        then p.(k-'1) = 0.L by ALGSEQ_1:8;
        hence r.k = 0.L by A7;
      end;
    end;
    hence (p*'q).i = 0.L by A3,POLYNOM3:1;
  end;
  then len p + len q -' 1 is_at_least_length_of p*'q by ALGSEQ_1:def 2;
  hence thesis by ALGSEQ_1:def 3;
end;
