
theorem
  for eps being ExtReal st 0. < eps ex F being sequence of ExtREAL st
  (for n being Nat holds 0. < F.n) & SUM(F) < eps
proof
  defpred P[set,set,set] means for a,b being R_eal,s being Nat
  holds (s = $1 & a = $2 & b = $3 implies b = a/2);
  let eps be ExtReal;
  assume 0. < eps;
  then consider x0 being Real such that
A1: 0. < x0 and
A2: x0 < eps by XXREAL_3:3;
  consider x being Real such that
A3: 0. < x and
A4: x + (x qua ExtReal) < x0 by A1,XXREAL_3:50;
  reconsider x as Element of ExtREAL by XXREAL_0:def 1;
A5: for n being Nat for x being Element of ExtREAL ex y being
  Element of ExtREAL st P[n,x,y]
  proof
    let n be Nat;
    let x be Element of ExtREAL;
    reconsider m = x/2 as Element of ExtREAL by XXREAL_0:def 1;
    take m;
    thus thesis;
  end;
  consider F being sequence of ExtREAL such that
A6: F.0 = x & for n being Nat holds P[n,F.n,F.(n+1)] from
  RECDEF_1:sch 2(A5);
  take F;
  defpred P[Nat] means 0. < F.$1;
A7: for k being Nat st P[k] holds P[k+1]
  proof
    let k be Nat;
    assume
A8: 0. < F.k;
    F.(k+1) = (F.k)/2 by A6;
    hence thesis by A8;
  end;
A9: P[0] by A3,A6;
  thus
A10: for n being Nat holds P[n] from NAT_1:sch 2(A9,A7);
  then for n being Element of NAT holds 0. <= F.n;
  then
A11: F is nonnegative by SUPINF_2:39;
  for s being ExtReal holds s in rng Ser(F) implies s <= x0
  proof
    defpred P[Nat] means Ser(F).$1 + F.$1 < x0;
    let s be ExtReal;
    assume s in rng Ser(F);
    then consider n being object such that
A12: n in dom Ser(F) and
A13: s = Ser(F).n by FUNCT_1:def 3;
    reconsider n as Element of NAT by A12;
A14: for l being Nat st P[l] holds P[l+1]
    proof
      let l be Nat;
      F.(l+1) = (F.l)/2 by A6;
      then
A15:  Ser(F).l + (F.(l+1) + F.(l+1)) <= Ser(F).l + F.l by XXREAL_3:105;
      0. <= Ser(F).l & 0. <= F.(l+1) by A10,A11,SUPINF_2:40;
      then
A16:  Ser(F).(l+1) + F.(l+1) = (Ser(F).l + F.(l+1)) + F.(l+1) & Ser(F).l
      + F.(l+1) + F.(l+1) <= Ser(F).l + F.l by A15,SUPINF_2:def 11,
XXREAL_3:44;
      assume Ser(F).l + F.l < x0;
      hence thesis by A16,XXREAL_0:2;
    end;
A17: P[0] by A4,A6,SUPINF_2:def 11;
    for k being Nat holds P[k] from NAT_1:sch 2(A17,A14);
    then
A18: Ser(F).n + F.n < x0;
    0. <= Ser(F).n & 0. <= F.n by A10,A11,SUPINF_2:40;
    hence thesis by A13,A18,XXREAL_3:48;
  end;
  then x0 is UpperBound of rng Ser(F) by XXREAL_2:def 1;
  then
A19: sup(rng Ser(F)) <= x0 by XXREAL_2:def 3;
  per cases by A19,XXREAL_0:1;
  suppose
    SUM(F) < x0;
    hence thesis by A2,XXREAL_0:2;
  end;
  suppose
    SUM(F) = x0;
    hence thesis by A2;
  end;
end;
