reserve c for Complex;
reserve r for Real;
reserve m,n for Nat;
reserve f for complex-valued Function;
reserve f,g for differentiable Function of REAL,REAL;
reserve L for non empty ZeroStr;
reserve x for Element of L;

theorem Th38:
  for L being add-associative right_zeroed right_complementable
              distributive unital non empty doubleLoopStr
  for x,y being Element of L holds
  eval(seq(n,x),y) = seq(n,x).n * power(y,n)
  proof
    let L be add-associative right_zeroed right_complementable
    distributive unital non empty doubleLoopStr;
    let x,y be Element of L;
    set p = seq(n,x);
    consider F being FinSequence of L such that
A1: eval(p,y) = Sum F and
A2: len F = len p and
A3: for n being Element of NAT st n in dom F holds
    F.n = p.(n-'1)*(power L).(y,n-'1) by POLYNOM4:def 2;
    per cases;
    suppose
A4:   len p > 0;
      then
A5:   len p >= 0+1 by NAT_1:13;
      then
A6:   len p in dom F by A2,FINSEQ_3:25;
      p <> 0_.L by A4,POLYNOM4:3;
      then x <> 0.L by Th28;
      then
A7:   len p = n+1 by Th27;
A8:   n+1-'1 = n by NAT_D:34;
      now
        let i be Element of NAT;
        assume that
A9:     i in dom F and
A10:    i <> n+1;
        i in Seg len F by A9,FINSEQ_1:def 3;
        then i >= 0+1 by FINSEQ_1:1;
        then i-'1 = i-1 by XREAL_1:19,XREAL_0:def 2;
        then i-'1 <> n by A10;
        then
A11:    p.(i-'1) = 0.L by Th25;
        thus F/.i = F.i by A9,PARTFUN1:def 6
        .= 0.L*(power L).(y,i-'1) by A3,A9,A11
        .= 0.L;
      end;
      hence eval(p,y) = F/.(n+1) by A1,A7,A5,A2,FINSEQ_3:25,POLYNOM2:3
      .= F.(n+1) by A7,A6,PARTFUN1:def 6
      .= p.n*power(y,n) by A3,A7,A5,A8,A2,FINSEQ_3:25;
    end;
    suppose len p = 0;
      then
A12:  p = 0_.L by POLYNOM4:5;
      then p.n = 0.L by ORDINAL1:def 12,FUNCOP_1:7;
      hence thesis by A12,POLYNOM4:17;
    end;
  end;
