reserve n,m,k for Nat;
reserve a,p,r for Real;
reserve s,s1,s2,s3 for Real_Sequence;

theorem
  p<=1 & (for n st n>=1 holds s.n=1/n to_power p) implies s is not summable
proof
  assume that
A1: p<=1 and
A2: for n st n>=1 holds s.n = 1/n to_power p;
    per cases;
    suppose
A3:   p<0;
      now
        assume s is convergent & lim s=0;
        then consider m such that
A4:     for n st n>= m holds |.s.n-0.|<1 by SEQ_2:def 7;
        consider k such that
A5:     k>m by SEQ_4:3;
        now
          let n such that
A6:       n>=k;
A7:       n>0 by A5,A6;
          then
A8:       n>=0+1 by NAT_1:13;
          n>=m by A5,A6,XXREAL_0:2;
          then |.s.n-0.|<1 by A4;
          then |.1/n to_power p.|<1 by A2,A8;
          then |.n to_power (-p).|<1 by A7,POWER:28;
          then
A9:       n to_power (-p)<1 by ABSVALUE:def 1;
          n #R (-p) >= 1 by A3,A8,PREPOWER:85;
          hence contradiction by A7,A9,POWER:def 2;
        end;
        hence contradiction;
      end;
      hence thesis by Th4;
    end;
    suppose
A10:  p>=0;
      defpred X[Element of NAT,Real] means ($1=0 & $2=1) or ($1>=1 & $2
      =1/$1 to_power p);
A11:  for n being Element of NAT ex r being Element of REAL st X[n,r]
      proof let n be Element of NAT;
A12:  n <> 0 implies n >= 0+1 by NAT_1:13;
       per cases;
       suppose
A13:      n = 0;
        reconsider jj = 1 as Real;
        take jj;
        thus thesis by A13,Lm2;
       end;
       suppose
A14:       n > 0;
         reconsider n1 = 1/n to_power p as Element of REAL by XREAL_0:def 1;
        take n1;
        thus thesis by A14,A12;
       end;
  end;
      consider s1 such that
A15:  for n being Element of NAT holds X[n,s1.n] from FUNCT_2:sch 3(A11);
A16:  s1.0 = 1 by A15;
      now
        let n;
        now
          per cases by NAT_1:6;
          suppose
A17:        n=0;
            then (n+1) #R p >= 1 by A10,PREPOWER:85;
            then
A18:        (n+1) to_power p >= 1 by POWER:def 2;
            s1.(n+1) = 1/(n+1) to_power p by A15;
            hence s1.(n+1)<=s1.n by A16,A17,A18,XREAL_1:211;
          end;
          suppose
A19:        ex m be Nat st n=m+1;
A20: n in NAT by ORDINAL1:def 12;
            n to_power p > 0 by POWER:34,A19;
            then 1/n to_power p > 0;
            then
A21:        s1.n>0 by A15,A20;
A22:        n/(n+1)<=1 by NAT_1:11,XREAL_1:183;
A23:        n/(n+1)>0 by A19;
            s1.(n+1)/s1.n = (1/(n+1) to_power p)/s1.n by A15
              .= (1/(n+1) to_power p)/(1/n to_power p) by A15,A19
              .= (1/(n+1) to_power p) * n to_power p
              .= n to_power p / (n+1) to_power p
              .= (n/(n+1)) to_power p by A19,POWER:31
              .= (n/(n+1)) #R p by A23,POWER:def 2;
            then s1.(n+1)/s1.n <= (n/(n+1)) #R 0 by A10,A23,A22,PREPOWER:84;
            then s1.(n+1)/s1.n <= 1 by A19,PREPOWER:71;
            hence s1.(n+1)<=s1 .n by A21,XREAL_1:187;
          end;
        end;
        hence s1.(n+1)<=s1.n;
      end;
      then
A24:  s1 is non-increasing;
A25:  now
        let n;
A26: n in NAT by ORDINAL1:def 12;
        assume
A27:    n>=1;
        then s.n = 1/n to_power p by A2
          .= s1.n by A15,A27,A26;
        hence s.n>=s1.n;
      end;
      deffunc U(Nat) = 2 to_power $1 * s1.(2 to_power $1);
      consider s2 such that
A28:  for n holds s2.n = U(n) from SEQ_1:sch 1;
A29:  now
        let n;
        now
          per cases by NAT_1:6;
          suppose
            n=0;
            hence s1.n >= 0 by A15;
          end;
          suppose
A30:            ex m be Nat st n=m+1;
A31: n in NAT by ORDINAL1:def 12;
            n to_power p > 0 by POWER:34,A30;
            then 1/n to_power p >= 0;
            hence s1.n>=0 by A15,A31;
          end;
        end;
        hence s1.n>=0 & s2.n = 2 to_power n * s1.(2 to_power n) by A28;
      end;
      now
        assume s2 is convergent & lim s2=0;
        then consider m such that
A32:    for n st n>=m holds |.s2.n-0.|<1/2 by SEQ_2:def 7;
        now
          let n;
          assume n>=m;
          then |.s2.n-0.|<1/2 by A32;
          then
A33:      |.2 to_power n * s1.(2 to_power n).|<1/2 by A28;
          2 to_power n >= 1 by PREPOWER:11;
          then |.2 to_power n * (1/(2 to_power n) to_power p).|<1/2 by A15,A33;
          then |.2 to_power n * (1/2 to_power (n*p)).|<1/2 by POWER:33;
          then |.2 to_power n * 2 to_power (-n*p).|<1/2 by POWER:28;
          then |.2 to_power (n+-n*p).|<1/2 by POWER:27;
          then 2 to_power (n-n*p)<1/2 by ABSVALUE:def 1;
          then 2 to_power (n-n*p)*2<1/2*2 by XREAL_1:68;
          then 2 to_power (n-n*p)*2 to_power 1<1;
          then
A34:      2 to_power (n-n*p+1)<1 by POWER:27;
          1-p>=0 by A1,XREAL_1:48;
          then n*(1-p)>=0;
          then 2 #R (n-n*p+1) >= 1 by PREPOWER:85;
          hence contradiction by A34,POWER:def 2;
        end;
        hence contradiction;
      end;
      then not s2 is summable by Th4;
      then not s1 is summable by A24,A29,Th31;
      hence thesis by A29,A25,Th19;
    end;
end;
