reserve n for Nat;

theorem evconst:
for R being Ring, a,b being Element of R holds eval(a|R,b) = a
proof
let R be Ring, a,x be Element of R;
set q = a|R;
consider F being FinSequence of R such that
A3: eval(q,x) = Sum F and
A4: len F = len q and
A5: for j be Element of NAT st j in dom F holds
      F.j = q.(j-'1) * (power R).(x,j-'1) by POLYNOM4:def 2;
per cases;
suppose A0: q = 0_.(R);
  then q = (0.R)|R by RING_4:13;
  then a = 0.R by RING_4:19;
  hence eval(q,x) = a by POLYNOM4:17,A0;
  end;
suppose q <> 0_.(R);
  then q <> (0.R)|R by RING_4:13;
  then B: 0 = deg q  by RING_4:21 .= len q - 1 by HURWITZ:def 2;
  then 1 in Seg(len F) by A4,FINSEQ_1:1;
  then 1 in dom F by FINSEQ_1:def 3;
  then F.1 = q.(1-'1) * (power R).(x,1-'1) by A5;
  then F = <*q.(1-'1) * (power R).(x,1-'1)*> by A4,B,FINSEQ_1:40
        .= <*q.0 * (power R).(x,1-'1)*> by XREAL_1:232
        .= <*q.0 * (power R).(x,0)*> by XREAL_1:232
        .= <*a * (power R).(x,0)*> by Th28
        .= <* a * 1_R *> by GROUP_1:def 7
        .= <* a *>;
  hence thesis by A3,RLVECT_1:44;
  end;
end;
