
theorem Th22:
  for L be add-associative right_zeroed right_complementable
right_zeroed distributive unital non empty doubleLoopStr for p be Polynomial
of L for x be Element of L holds eval(Leading-Monomial(p),x) = p.(len p-'1) * (
  power L).(x,len p-'1)
proof
  let L be add-associative right_zeroed right_complementable right_zeroed
  distributive unital non empty doubleLoopStr;
  let p be Polynomial of L;
  let x be Element of L;
  set LMp=Leading-Monomial(p);
  consider F be FinSequence of the carrier of L such that
A1: eval(LMp,x) = Sum F and
A2: len F = len LMp and
A3: for n be Element of NAT st n in dom F holds F.n = LMp.(n-'1)*(power
  L).(x,n-'1) by Def2;
A4: len F = len p by A2,Th15;
  per cases;
  suppose
    len p > 0;
    then
A5: len p >= 0+1 by NAT_1:13;
    then len p in Seg len F by A4,FINSEQ_1:1;
    then
A6: len p in dom F by FINSEQ_1:def 3;
A7: len p-1 >=0 by A5,XREAL_1:19;
    now
A8:   len p-'1 = len p-1 by A7,XREAL_0:def 2;
      let i be Element of NAT;
      assume that
A9:   i in dom F and
A10:  i <> len p;
      i in Seg len F by A9,FINSEQ_1:def 3;
      then i >= 0+1 by FINSEQ_1:1;
      then i-1 >= 0 by XREAL_1:19;
      then i-'1 = i-1 by XREAL_0:def 2;
      then
A11:  i-'1 <> len p-'1 by A10,A8;
      thus F/.i = F.i by A9,PARTFUN1:def 6
        .= LMp.(i-'1)*(power L).(x,i-'1) by A3,A9
        .= 0.L*(power L).(x,i-'1) by A11,Def1
        .= 0.L;
    end;
    then Sum F = F/.(len p) by A6,POLYNOM2:3
      .= F.(len p) by A6,PARTFUN1:def 6
      .= LMp.(len p-'1)*(power L).(x,len p-'1) by A3,A6;
    hence thesis by A1,Def1;
  end;
  suppose
A12: len p = 0;
    then
A13: p = 0_.(L) by Th5;
    LMp = 0_.(L) by A12,Th12;
    hence eval(Leading-Monomial(p),x) = 0.L by Th17
      .= 0.L*(power L).(x,len p-'1)
      .= p.(len p-'1)*(power L).(x,len p-'1) by A13,FUNCOP_1:7;
  end;
end;
