 reserve n for Nat;

theorem Th28:
   for R being Ring, S being R-homomorphic Ring
   for h being Homomorphism of R,S
   for p being Element of the carrier of (Polynom-Ring R), a being Element of R
   holds h.eval(p,a) = eval((PolyHom h).p, h.a)
   proof
     let R be Ring, S be R-homomorphic Ring; let h be Homomorphism of R,S;
     let p be Element of the carrier of (Polynom-Ring R), a be Element of R;
     defpred P[Nat] means
     for p be Element of the carrier of (Polynom-Ring R), a be Element of R
     st len p = $1 holds h.eval(p,a) = eval((PolyHom h).p, h.a);
A1:  P[0]
     proof
       let p be Element of the carrier of (Polynom-Ring R), a be Element of R;
       assume
A2:    len p = 0; then
A3:    p = 0_.R by POLYNOM4:5;
       thus h.eval(p,a) = h.eval(0_.R,a) by A2,POLYNOM4:5
       .= h.(0.R) by POLYNOM4:17 .= 0.S by RING_2:6
       .= eval(0_.S,h.a) by POLYNOM4:17 .= eval((PolyHom h).p, h.a) by A3,Th23;
    end;
A4: now let k be Nat;
    assume
A5: for m being Nat st m < k holds P[m];
    now let p be Element of the carrier of (Polynom-Ring R), a be Element of R;
      assume
A6:   len p = k;
      per cases;
        suppose k = 0;
        hence h.eval(p,a) = eval((PolyHom h).p, h.a) by A6,A1;
        end;
        suppose k > 0; then
        consider q being Polynomial of R such that
A7:      len q < len p & p = q + LM p &
        for n be Element of NAT st n < len p-1 holds q.n = p.n
          by A6,POLYNOM4:16;
        reconsider g = q as Element of the carrier of Polynom-Ring R
          by POLYNOM3:def 10;
        reconsider LMp = LM p as Element of the carrier of Polynom-Ring R
          by POLYNOM3:def 10;
        reconsider g1 = (PolyHom h).g, g2 = (PolyHom h).LMp as Polynomial of S;
A8:      (PolyHom h).g + (PolyHom h).LMp = g1 + g2 by POLYNOM3:def 10;
A9:      h.(eval(q,a)) = eval((PolyHom h).g, h.a) by A6,A7,A5;
        thus h.eval(p,a) = h.(eval(q,a) + eval(LMp,a)) by A7,POLYNOM4:19
        .= h.(eval(q,a)) + h.(eval(LMp,a)) by VECTSP_1:def 20
        .= eval((PolyHom h).g, h.a) + eval((PolyHom h).LMp, h.a) by A9,Lm4
        .= eval(g1+g2,h.a) by POLYNOM4:19
        .= eval((PolyHom h).(g+LMp), h.a) by A8,VECTSP_1:def 20
        .= eval((PolyHom h).p, h.a) by A7,POLYNOM3:def 10;
        end;
      end;
      hence P[k];
    end;
A10:  for k being Nat holds P[k] from NAT_1:sch 4(A4);
    ex n being Nat st n = len p;
    hence thesis by A10;
   end;
