reserve i,n,m for Nat,
        r,s for Real,
        A for non empty closed_interval Subset of REAL;

theorem
  313/100 < PI < 315/100
proof
  set L=Leibniz_Series,P=Partial_Sums L;
  deffunc P(Nat)=2/(4*$1*$1 + 16*$1 +15);
  deffunc P10(Nat) = P($1)+P($1+2) + P($1+4)+P($1+6)+P($1+8);
  deffunc P50(Nat) = P10($1)+P10($1+10)+P10($1+20)+
                     P10($1+30)+P10($1+40);
A1:n is odd implies P.(n+2) = P.n + P(n)
  proof
    assume n is odd;
    then P.(n+2) = P.n + 2/(4*n^2 + 16*n +15) by Th16;
    hence thesis;
  end;
  A2: n is odd implies P.(n+10) = P.n +P10(n)
  proof
    assume A3: n is odd;
    8=4*2;
    then A4: P.(n+8+2) = P.(n+8)+P(n+8) by A1,A3;
    6=3*2;
    then A5: P.(n+6+2) = P.(n+6)+P(n+6) by A1,A3;
    4=2*2;
    then A6: P.(n+4+2) = P.(n+4)+P(n+4) by A1,A3;
    A7: P.(n+2+2) = P.(n+2)+P(n+2) by A3,A1;
    P.(n+2) = P.(n)+P(n) by A3,A1;
    hence thesis by A4,A5,A6,A7;
  end;
  A8: n is odd implies P.(n+50) = P.n +P50(n)
  proof
    assume A9: n is odd;
    40=20*2;
    then A10: P.(n+40+10) = P.(n+40)+P10(n+40) by A2,A9;
    30=15*2;
    then A11: P.(n+30+10) = P.(n+30)+P10(n+30) by A2,A9;
    20=10*2;
    then A12: P.(n+20+10) = P.(n+20)+P10(n+20) by A2,A9;
    10=5*2;
    then A13: P.(n+10+10) = P.(n+10)+P10(n+10) by A2,A9;
    P.(n+10) = P.(n)+P10(n) by A9,A2;
    hence thesis by A10,A11,A12,A13;
  end;
  A14: 2*25=50;
  A15: 1=1+2*0;
  reconsider I=1 as Nat;
  A16: 50+1 is odd by A14;
  then A17:51+50 is odd by A14;
  A18: P.(1+50) = 2/3+P50(1) by Th16,A15,A8;
  A19: P.(51+50) = P.(51)+P50(51) by A16,A8;
  A20: P.(101+50) = P.(101)+P50(101) by A8,A17;
  L.152 = (-1) |^(76*2) * (1|^(2*152+1))/ (2*152+1) by Def2
  .= 1/305;
  then A21:P.(151+1) = P.(151) + 1/ (305) by SERIES_1:def 1;
  A22: 313/400 < P.101 by A18,A19;
  A23: P.152 < 315/400 by A18,A19,A21,A20;
  P.(50*2+1) <= PI/4 <= P.(76*2) by Th14,Th15;
  then 313/400 < PI/4 < 315/400 by A22,A23,XXREAL_0:2;
  then 313/400*4 < PI/4*4 < 315/400*4 by XREAL_1:68;
  hence thesis;
end;
