theorem Th31:
  W.(a,p) = x & m<= n implies W.(a,(p+*(m+1,p.m))) = (x+*(m+1,x.m) )
proof
  assume that
A1: W.(a,p) = x and
A2: m<=n;
  reconsider m9 = m+1 as Nat of n by A2,Th8;
  set y = W.(a,(p+*(m9,p.m))), z = (x+*(m9,x.m));
  for k being Nat of n holds y.k = z.k
  proof
    let k be Nat of n;
    now
      per cases;
      suppose
A3:     k = m9;
        thus y.k = W.(a,(p+*(m9,p.m)).k) by Def9
          .= W.(a,p.m) by A3,Th10
          .= x.m by A1,Def9
          .= z.k by A3,Th13;
      end;
      suppose
A4:     k <> m9;
        thus y.k = W.(a,(p+*(m9,p.m)).k) by Def9
          .= W.(a,p.k) by A4,FUNCT_7:32
          .= x.k by A1,Def9
          .= z.k by A4,FUNCT_7:32;
      end;
    end;
    hence thesis;
  end;
  hence thesis by Th14;
end;
