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 Th27:
  for f1,f2 be increasing natural-valued FinSequence st
    n > 1 & (n|^f1).1 + (n|^f1,2) +... = (n|^f2).1 + (n|^f2,2) +...
     holds f1 = f2
proof
  A1:for f be natural-valued FinSequence st
        n > 1 & Sum (n|^f) <= 0 holds f={}
  proof
    let f be natural-valued FinSequence such that
    A2:n > 1 & Sum (n|^f) <= 0;
    assume f<>{};
    then consider x such that
    A3: x in dom f by XBOOLE_0:def 1;
    reconsider x as Nat by A3;
    A4:for i st i in dom (n|^f) holds 0 <= (n|^f).i;
    dom (n|^f) =dom f by Def4;
    then A5: 0 >= (n|^f).x by A4,A2,RVSUM_1:85,A3;
    n to_power (f.x) > 0 by A2, NEWTON:83;
    hence thesis by A5,A3,Def4;
  end;
  defpred P[Nat] means
  for f1,f2 be increasing natural-valued FinSequence st
    n > 1 & Sum (n|^f1) <= $1 & Sum (n|^f1) = Sum (n|^f2)
    holds f1 = f2;
  A6:P[0]
  proof
    let f1,f2 be increasing natural-valued FinSequence such that
    A7:n > 1 & Sum (n|^f1) <= 0 &
    Sum (n|^f1) = Sum (n|^f2);
    f1 ={} by A7,A1;
    hence thesis by A7,A1;
  end;
  A8:P[i] implies P[i+1]
  proof
    assume A9:P[i];
    set i1=i+1;
    let f1,f2 be increasing natural-valued FinSequence such that
    A10:n > 1 & Sum (n|^f1) <= i+1 &
    Sum (n|^f1) = Sum (n|^f2);
    per cases by A10,NAT_1:8;
    suppose Sum (n|^f1) <= i;
      hence thesis by A10,A9;
    end;
    suppose A12:Sum (n|^f1) = i1;
      set l1=len f1;
      set l2=len f2;
      A13: f1 <>{} by A12,RVSUM_1:72;
      A14: f2 <>{} by A10,A12,RVSUM_1:72;
      A15:f1.l1 <= f2.l2 by Lm6,A10,A12;
      A16: f1.l1 >= f2.l2 by Lm6,A10,A12;
      then A17: f1.l1 = f2.l2 by A15,XXREAL_0:1;
      reconsider L1=l1-1,L2=l2-1 as Nat by A14, A13;
      reconsider F1=f1|L1,F2=f2|L2 as increasing natural-valued FinSequence;
      A18:n |^ (f2.l2) = n |^ (f1.l1) by A16,A15,XXREAL_0:1;
      A19:l1=L1+1 & l2=L2+1;
      then A20:  Sum (n|^f1) = Sum (n|^ F1) + (n |^ (f1.l1)) &
      Sum (n|^f2) = Sum (n|^ F2) + (n |^ (f2.l2)) by Lm5;
      n |^ (f1.l1) >0 by PREPOWER:6,A10;
      then Sum (n|^ F1)+0 < Sum (n|^f1) by A20,XREAL_1:8;
      then A22: Sum (n|^ F1) <= i by A12,NAT_1:13;
      f1=F1^<*f1.l1*> & f2=F2^<*f2.l2*> by A19,FINSEQ_3:55;
      hence thesis by A17,A22,A10, A20,A18,A9;
    end;
  end;
  A23:P[i] from NAT_1:sch 2(A6,A8);
  let f1,f2 be increasing natural-valued FinSequence;
  A24:(n|^f1).1+(n|^f1,2)+... = Sum (n|^f1) by Th22;
  (n|^f2).1+(n|^f2,2)+... = Sum (n|^f2) by Th22;
  hence thesis by A23,A24;
end;
