reserve i,j,k,n,m for Nat,
        b,b1,b2 for bag of n;

theorem Th27:
  for L being right_zeroed add-associative right_complementable
       well-unital distributive non trivial doubleLoopStr,
     p being Polynomial of n,L
     ex q being Polynomial of n+m,L st
        rng q c= rng p \/ {0.L}&
     for x being Function of n, L,
         y being Function of (n+m), L st y|n=x
       holds eval(p,x) = eval(q,y)
proof
  let L be right_zeroed add-associative right_complementable
    well-unital distributive non trivial doubleLoopStr,
    p be Polynomial of n,L;
  defpred P[Nat] means ex q be Polynomial of n+$1,L st
    rng q c= rng p \/ {0.L}&
     for x be Function of n, L,
     y be Function of (n+$1), L st y|n=x
     holds eval(p,x) = eval(q,y);
A1:P[0]
  proof
    reconsider q=p as Polynomial of n+0,L;
    take q;
    thus rng q c= rng p \/ {0.L} by XBOOLE_1:7;
   :: let x be Function of n, L,y be Function of (n+0), L;
    thus thesis;
  end;
A2:P[k] implies P[k+1]
  proof set k1=k+1;
    assume P[k];then
    consider q be Polynomial of n+k,L such that
A3: rng q c= rng p \/{0.L} and
A4: for x be Function of n, L,y be Function of (n+k), L st y|n=x
      holds eval(p,x) = eval(q,y);
    reconsider P = q extended_by_0 as Polynomial of n+k1,L;
    take P;
    rng P = rng q \/ {0.L} by Th10;
    then rng P c= rng p \/{0.L}\/{0.L} by A3,XBOOLE_1:13;
    hence rng P c= rng p \/ {0.L} by XBOOLE_1:7,12;
    let x be Function of n, L,
    y be Function of n+k1, L such that
A5: y|n=x;
A6: rng (y|(n+k)) c= rng y & rng y c= the carrier of L by RELAT_1:70;
    len (@y) = n+k1 & n+k < n+k+1 by CARD_1:def 7,NAT_1:13;
    then len (@y|(n+k)) = n+k by AFINSQ_1:54;
    then reconsider Y= @y|(n+k) as Function of n+k,L by A6,FUNCT_2:2;
    Segm n c= Segm (n+k) by NAT_1:39,11;
    then
A7:  Y |n = x by A5,RELAT_1:74;
    thus eval(P,y) = eval(q,Y) by Th18
    .= eval(p,x) by A4,A7;
  end;
  P[k] from NAT_1:sch 2(A1,A2);
  hence thesis;
end;
