reserve x,y for object,
        D,D1,D2 for non empty set,
        i,j,k,m,n for Nat,
        f,g for FinSequence of D*,
        f1 for FinSequence of D1*,
        f2 for FinSequence of D2*;
reserve f for complex-valued Function,
        g,h for complex-valued FinSequence;

theorem Th26:
  for f be increasing natural-valued FinSequence st n > 1 holds
     (n|^f).1 + (n|^f,2) +... < 2 * n |^ (f.len f)
proof
  defpred P[Nat] means
  for f be increasing natural-valued FinSequence st n >1 & f.len f <= $1 &
    f <> {}
  holds
    Sum (n|^f) < 2 * n |^ (f.len f);
  A1:for f be natural-valued FinSequence st n>1 & len f = 1 holds
     Sum (n|^f) < 2 * n |^ (f.len f)
  proof
    let f be natural-valued FinSequence;
    assume A2:n>1 & len f =1;
    then A3:1 in dom f by FINSEQ_3:25;
    n to_power (f.1)>0 by A2,NEWTON:83;
    then 1*(n to_power (f.1)) < 2* (n to_power (f.1)) by XREAL_1:68;
    then A4:(n|^f).1 < 2 * n |^ (f.len f) by A3,Def4,A2;
    n|^f = <* (n|^f).1 *> by CARD_1:def 7,A2,FINSEQ_1:40;
    hence thesis by RVSUM_1:73,A4;
  end;
  A5:P[0]
  proof
    let f be increasing natural-valued FinSequence such that
    A6:n >1 & f.len f <= 0 & f <>{};
    len f <=1
    proof
      assume A7:len f >1;
      then 1 in dom f & len f in dom f by FINSEQ_3:25;
      then f.1 < 0 by A7,VALUED_0:def 13,A6;
      hence thesis;
    end;
    then len f =1 by NAT_1:25, A6;
    hence thesis by A6,A1;
  end;
  A8:P[i] implies P[i+1]
  proof
    assume A9:P[i];
    set i1=i+1;
    let f be increasing natural-valued FinSequence such that
    A10:n >1 & f.len f <= i1 & f <>{};
    per cases by A10,NAT_1:8;
    suppose f.len f <=i;
      hence thesis by A10,A9;
    end;
    suppose f.len f = i1;
      per cases by A10,NAT_1:25;
      suppose len f =1;
        hence thesis by A10,A1;
      end;
      suppose A11:len f >1;
        then reconsider l1=len f-1 as Nat;
        reconsider f1=f|l1 as natural-valued FinSequence;
        l1+1>1 by A11;
        then A12: l1 >= 1 & l1+1 > l1 by NAT_1:13;
        then A13:l1 in dom f & len f in dom f by A11,FINSEQ_3:25;
        then f.l1 < f.len f by A12,VALUED_0:def 13;
        then f.l1 < i1 by A10,XXREAL_0:2;
        then A14: f.l1 <= i by NAT_1:13;
        len f = l1+1;
        then A15:Sum (n|^f) = Sum (n|^  f1) + (n |^ (f.len f)) by Lm5;
        A16:len f1 = l1 by A12,FINSEQ_1:59;
        A17:f1<>{} by A12,FINSEQ_1:59;
        l1 in Seg l1 by A12;
        then A18:f.l1 = f1.l1 by FUNCT_1:49;
        A19: Sum (n|^f1) < 2 * n|^(f.l1) by A17,A18,A16,A10,A9,A14;
        1+f.l1 <= f.len f by A13,A12,VALUED_0:def 13,NAT_1:13;
        then A20: n |^ (1+f.l1) <= n |^ (f.len f) by PREPOWER:93,A10;
        n>= 1+ 1 by A10,NAT_1:13;
        then A21: 2* (n |^ (f.l1)) <= n*(n |^(f.l1)) by XREAL_1:64;
        n |^ (1+f.l1) = n* (n |^(f.l1)) by NEWTON:6;
        then Sum (n|^f1) < n |^(1+f.l1) by XXREAL_0:2,A19,A21;
        then Sum (n|^f1) < n |^(f.len f) by XXREAL_0:2,A20;
        then Sum (n|^f) < (n |^(f.len f))+(n |^(f.len f)) by A15,XREAL_1:8;
        hence thesis;
      end;
    end;
  end;
  A22:P[i] from NAT_1:sch 2(A5,A8);
  let f be increasing natural-valued FinSequence such that A23: n > 1;
  A24:Sum (n|^f) = (n|^f).1+(n|^f,2)+... by Th22;
  per cases;
  suppose f={};
    then A25:Sum (n|^f)=0 by RVSUM_1:72;
    n |^ (f.len f) >0 by A23,NEWTON:83;
    hence thesis by A24,A25;
  end;
  suppose f<>{};
    hence thesis by A22,A23,A24;
  end;
end;
