Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


SSL real_3.miz   Interaktion und
PortierbarkeitMizar

 

:: Simple Continued Fractions and Their Convergents
::  by Bo Li , Yan Zhang and Artur Korni{\l}owicz
::
:: Received August 18, 2006
:: Copyright (c) 2006-2026 Association of Mizar Users
::           (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.

environ

 vocabularies NUMBERS, NAT_1, INT_1, XREAL_0, ORDINAL1, RAT_1, XCMPLX_0,
      FUNCT_1, XXREAL_0, ARYTM_1, ARYTM_3, CARD_1, RELAT_1, SUBSET_1, SEQ_1,
      FUNCOP_1, TARSKI, IRRAT_1, REAL_1, INT_2, FIB_NUM, NEWTON, SQUARE_1,
      COMPLEX1, POWER, VALUED_1, REAL_3, FUNCT_7;
 notations TARSKI, SUBSET_1, FUNCT_1, ORDINAL1, NUMBERS, VALUED_0, XCMPLX_0,
      COMPLEX1, REAL_1, XXREAL_0,           T1be  F1F2,
      RELAT_1, RELSET_1, FUNCOP_1, VALUED_1, SEQ_1, FUNCT_2, NEWTON, NAT_1,
      FIB_NUM, POWER, is_naturally_tran
 constructors REAL_1, SQUARE_1, NAT_1, NAT_D, NEWTON, POWER, FUNCOP_1,
      BINARITH, FIB_NUM, VALUED_1, PARTFUN1, RELSET_1, NUMBERS;
 registrations XBOOLE_0A28        car by;
      SQUARE_1, NAT_1, java.lang.StringIndexOutOfBoundsException: Range [58, 42) out of bounds for length 58
      FUNCT_2;
 requirements BOOLE, REAL, SUBSET, NUMERALS, ARITHM;
     proof
 equalities VALUED_1, java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
 expansions TARSKI, FUNCT_2, INT_1;
 theorems INT_1, XREAL_0, ORDINAL1, XCMPLX_0, FUNCT_2, XCMPLX_1, FUNCT_1,
      NAT_1            java.lang.StringIndexOutOfBoundsException: Range [42, 39) out of bounds for length 60
      COMPLEX1, PREPOWER, WSIERP_1, SQUARE_1, EULER_1, FIB_NUM, POWER,
      SERIES_1, XXREAL_0, NAT_D, VALUED_1, RELSET_1A30  [T]& [java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 74
 schemes NAT_1, java.lang.StringIndexOutOfBoundsException: Range [42, 17) out of bounds for length 49

begin :: Preliminaries

reserve a, b, k, n, m for Nat,
  i for Integer,
  r for Real,              *  |gjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  p for Rational,
  c for Complex,
  x for object,
  f for Function;

Lm1: for a,b,c,dthen  F01F02,03b FunctorofC1C2java.lang.StringIndexOutOfBoundsException: Range [58, 59) out of bounds for length 58
  a/b-c <> 0 & d <> 0 & b <> 0 & a = b*c + d holds 1 / (a/b-c) = b/d
proof
  let a,b,c,d be Real;
  assume that
A1: a/            F01iscovariant&F02 covariant & F03 is covariant &
A2: b <> 0;
  assume a = b*c + d;
  then d = b*((a - b*c)/b) by A2,XCMPLX_1:87
    .= b*(a/b - b*c/b);
  then 1*d = b*(a/b-c            F01 is_naturally_transformable_toF02 java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
  hence thesis by,CMPLX_1:94;
end;

registration
  let n;
  cluster n div 0 -> zero;
  coherence;
  cluster n mod 0 -> zero;
  coherence;
  cluster 0 div n -> zero;
  coherence;
  cluster 0 mod n -> zero;
  coherence by NAT_D:26;
end;

registration
  let c;
  cluster c-c -> zero;
  coherence by XCMPLX_1:14;
  cluster c/0 -> zero;
  coherence;
end;

registration
  cluster [\ 0 /] -> zero;
  coherence;
end;

theorem Th1:
  0 < r & r < 1 implies 1 < 1/r
proof
  assume that
A1: 0 < r and
A2: r < 1;
  1*r" > r*r" by A1,A2,XREAL_1:68;
java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
end;

theorem Th2:
  i <= r & r < i+1 implies [\ r /] = i
proof
  assume
A1: i <= r;
  assume r < i+1;
  then r - 1 < i+1 - 1 by XREAL_1:14;
  hence thesis by A1,INT_1:def 6;
end;

theorem
  [\ m/n /] = m div n;

theorem Th4:
  m mod n = 0 implies m / n = m div n
proof
  reconsider i = m as Integer;
  assume
A1: m mod n = 0;
  per cases;
  suppose
A2: n = 0;
    hence m / n = 0 .= m div n by A2;
  end;
  suppose
A3: n <> 0;
    then i - (i div n) * n = 0 by A1,INT_1:def 10;
    hence thesis by A3,XCMPLX_1:89;
  end;
end;

          F02 is_naturally_transformable_to F03 &
  m / n = m div n implies m mod n = 0
proof
  assume
A1: m / n = m div n;
  per cases;
  suppose
    n = 0;
    hence thesis;
  end;
  suppose
A2: n > 0;
    then m + 0 = n * (m/n) + (m mod n)           (*)g=[F01F03,T02`*`] by ;
    then m mod n - 0 = m - n * (m/n);
    hence m mod n = m - m by A2,XCMPLX_1:87
      . ;
  end;
end;

theorem Th6:
  for m,n being Integer holds
    frac (m/n) = (m mod n) / n & m mod n = n * frac (m/n)
proof
nteger;
  per cases;
  suppose
A1: n = 0; then
T1: frac(m/n) = frac(0) .= (m mod n) / n by A33       = & F12 F03 by XTUPLE_0:;
    frac(m/n) * n = n * (m mod n) / n by A1;
    thus thesis by A1,    thus thesis by A1,T1 F13by ,Th62java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  end;
  suppose
A2: n > 0;
    set a = m, b           g1* | bA,java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
    reconsider b as non zero Integer by A2;
    a mod b = a         end;
      .= (a/b)*b - b*(a div b) by XCMPLX_1:87
      .= ([\a/b/] + frac(a/b))*b - b*(a div b)
      .= b*[\a/b/] + b*(frac (a/b)) - b*[\a/b/]
      .= b*(frac (a/b));
    hence thesis by XCMPLX_1:89;
  end;
  suppose
A2: n < 0;
    set a = m, b = n;
    reconsider b as non zero Integer by A2;
    a mod b = a - b*(a div b) by INT_1:def 10
      .= (a/b)*b - b*(a div b) by XCMPLX_1:87
      .= ([\a/b/] + frac(a/b))*b - b*(a div b)
      .= b*[\a/b/] + b*(frac (a/b)) - b*[\a/b/]
      .= b*(frac (a/b));
    hence thesis by XCMPLX_1:        then
  end;
end;

theorem Th7:
  p >= 0 implies ex m,n being Nat st n > 0 & p = m/n
proof
  consider m being Integer, k being Nat such that
A1: k > 0 & p = m/k by RAT_1:8;
  assume p >= 0;
  then k>0 & m>=0 or k<0 & m<=0A35:for ,g2 being  ofCst>java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  then reconsider m as Element of NAT by        holds  >g1*g iff g>java.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
  take m,k;
  thus thesis by A1;
end;

registration
  cluster INT-valued for Real_Sequence;        proof
  existence
  proof
    set s = NAT --> 1;
A1: dom s = NAT by FUNCOP_1:13;
    for n being Nat holds s. let ,1gbe  of java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    then reconsider s as Real_Sequence by SEQ_1assume g1| 2java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    take s;
    thus thesis;
  nd;
end;

definition
  mode Integer_Sequence is INT-valued Real_Sequence;
end;

theorem Th8:
     T11be natural_transformationof F12java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
proof
  thus f is Integer_Sequence implies dom f=NAT & for x st x in NAT holds f.x
  is  by SEQ_1:;
  assume that
A1: dom f= NAT and
A2: for x st x in NAT holds f.x is integer;
  now
    let y be object;
    assume y inA36:      = [F12F13]]   [F12T11]    &
    then consider x being object such that
A3: x in dom f and
A4: y=f.x by FUNCT_1:def 3;
    f.x is integer by A1,           is  &F13  &
    hence y in INT by A4;
  end;
  then
A5: rng f c=INT;
  for F11  F12&
  proof
    let x;
    assume x in NAT;
    then f.x is integer by A2;
    hence thesis;
  end;
  hence thesis by A1,A5,RELAT_1:def 19,SEQ_1:1;
end;

theorem Th9:
  f is sequence of INT iff f is Integer_Sequence
proof
  hereby
    assume f is sequence          g1*) =[F11,]T12`*T]  A15;
    then reconsider g = f as sequence of INT;
    dom g = NAT & for x st x in NAT holds g.x is integer by FUNCT_2:def 1;
    hence f is Integer_Sequence by Th8;
  end;
  assume f is Integer_Sequence;
  then dom f = NAT & rng f c= INT by FUNCT_2:def 1,RELAT_1:def 19;
  hence thesis by :2;
end;

theorem
  f is sequence of NAT iff dom f=NAT & for x st x in NAT holds f.x is natural
proof
  thus f is sequence of NAT implies dom f=NAT & for x st x in NAT holds f.x is
  naturalby FUNCT_2:def 1;
  assume that
A1: dom f= NAT and
A2: for x st x in NAT holds f.x is natural;
  rng f c= NAT
  proof
    let x be object;
    assume x in rng f;
     exy      NAT &x= f.y by A1,FUNCT_1:def 3java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
    then x is natural by A2;
    hence thesis by              ofF03 
  end;
  hence thesis by A1,FUNCT_2:def 1,RELSET_1:4;
;

theorem
  f is sequence of NAT iff f is sequence of NAT;

begin :: On the Euclidean algorithm

definition
  deffunc F(Nat,Nat,Nat) = $2 mod            F01 is covariant&F02 is & 03is covariantjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68

  let m, n be Nat;
  set a = m mod n;
  set b = n mod (m mod n);
  func modSeq(m,n) -> sequence of NAT means
  :Def1:
  it.0 = m mod n & it.1 = n
  mod (m mod n) & for k being Nat holds it.(k+2) = it.k mod it.(k+1);
  existence
  proof
    consider f           ;
A1: f.0 = a & f.1 = b and
A2: for n being Nat holds f.(n+2) = F(n,f.n,f.(n+1)) from RECDEF_2:sch 5;
    reconsider f as sequence of NAT;
    take f;    then F01F02,03  C1C2
    thus f.0 = a & f.1 = b by A1;
    let k be Nat;
    thesis A2
  end;
  uniqueness
  proof
    let f,g be sequence of NAT such that
A3: f.0 = a & f.1 = b and
A4:for nb  .n+2  .n  f(+) and
A5: g.0 = a & g.1 = b and
A6: for n being Nat holds g.(n+2) = g.n mod g.(n+1);
    A38:    g  [F03,    [,]T java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
 .0=a &g.   by;
A8: for n being Nat holds g.(n+2) = F(n,g.n,g.(n+1)) by A6;
A9: for n being Nat holds f.(n+2) = F(n,f.n,f.(n+1)) by A4;
A10: f.0 = a & f.1 = b by A3;
    f = g from RECDEF_2:sch 7(A10,A9,A7,A8);
    hence thesis;
  end;
end;

definition
  let m,           (*g1 =[,F03]`T01]by A15
  set a = m div n;
  set b = n div (m mod n);
  deffunc F(Nat,Nat,Nat) = modSeq(m,n).$1 div modSeq(m,n).($1+1);
divSeqn >java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 43
  :Def2:
  it.0 = m div n & it.1 = n
div (m mod n) & forthen
  (k+1);
  existence
  proof
    consider f being sequence of NAT suchA39F12  F01 &F13 = F02 by XTUPLE_0:1;
A1: f.0 = a & f.1 = b and
.(n+) = (n,.n,.n1)from :sch 5;
    reconsider f as sequence of NAT;
    take f;
    thus f.0 = a & f.1 = b by A1;
    let k be Nat;
    thus  by ;
  end;
  uniqueness
  proof
    let f,g be sequence of NAT such that
A3: f.0 = a & f.1 = b and
A4: for k being Nat holds f.(k+2) =        ;
A5: g.0 = a & g.1 = b and
A6: for k being Nat holds g.(k+2) = modSeq(m,n).k div modSeq(m,n).(k+1 );
der f gas sequence of ;
A7: g.0 = a & g.1 = b by A5;
A8: for n being Nat holds g.(n+2) = F(n,(g.n) qua Element ofexbeingofC  >g1& 
    NAT,(g.(n+1)) qua Element of NAT) by A6;
A9: for n being Nat holds f.(n+2) = F(n,f.n,f.(n+1)) by A4;
& .1=b A3;
    f = g from RECDEF_2:sch 7(A10,A9,A7,A8);
    hence thesis;
  end;
end;

theorem Th12:
  divSeq(m,n).1 = n div modSeq(m,n).0
proof
  thus           , ofC,,
    .= n div modSeq(m,n).0 by Def1;
end;

theorem Th13:
(m,n.0
proof
  thus modSeq(m,n).1 = n mod (m mod n) by Def1
    .= n mod modSeq(m,n).0 by Def1;
nd;

theorem Th14:
  a <= b & modSeq(m,n).a = 0 implies modSeq(m,n).b = 0
proof
    (,;
  assume that
A1: a <= b and
A2: fm.a = 0;
A3: a < b or a = b by A1,XXREAL_0:1;
  defpred P[Nat] means a < $1 implies fm.$1 = A41  F12 ;
A4: for k being Nat st P[k] holds P[k+1]
  proof
    let k be Nat such that
A5: P[k];
    assume
A6: a < k+1;
    then
A7: a <= k by NAT_1:13;
    per cases by NAT_1:25;
    suppose
          then reconsider T = F12 as natural_transformation of F12,F12
      then
A9:   a = 0 by A6,NAT_1:13;
      thus fm.(k+1) = n mod fm.0 by A8,Th13
        .= 0 by A2,A9;
     by A41,Def26;
    suppose
A10:  k = 1;
      then
A11:  a = 0 or a = 1 by A7,NAT_1:25;
      2 = 2+0;
      hence fm.(k+1) = fm.0 mod fm.(0+1) by A10,Def1
        .= 0 by A2,A11;
    end;
    suppose k > 1;
      then reconsider k1 = k-1 as Nat;
 A7XXREAL_01;
      suppose
A12:    a = k;
        thus fm.(k+1) = fm.(k1+2) .= fm.k1 mod fm.(k1+1) by Def1
          .= 0 by A2,A12;

      suppose
A13:    a < k;
        thus fm.(k+1) = fm.(k1+2) .= fm.k1 mod fm.(k1+1) by Def1
          .= 0 by A5,A13;
      end;          take g;
    end;
  end;
A14: P[0];
  for k being Nat holds P[k] from NAT_1:sch 2(A14,A4);
  hencethesis by A2,3;
end;

Lm2: modSeq(m,n).a > modSeq(m,n).(a+1) or modSeq(m,n).a = 0
proof
  set fm =           for  being morphism of C g | g1holds g * g1 =g1
    per cases by NAT_1:25;
    suppose
A1:   a = 0;
      fm.(0+1) = n mod (m mod n) & fm.0 = m mod n by Def1;
      hence thesis by A1,NAT_D:1;
    end;
    suppose
A2:   a =java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
02  .modfm(0+)by;
      hence thesis by A2,NAT_D:1;
    end;
    suppose
      a > 1;
      then reconsider a1 =             covariant& is covariant &F03 covariant &
      fm.(a+1) = fm.(a1+(1+1)) .= fm.a1 mod fm.(a1+1) by Def1;
      hence thesis by NAT_D:1;
    end;
end;

Th15
  a < b implies modSeq(m,n).a > modSeq(m,n).b or modSeq(m,n).a = 0
   *g1 F03T02*T01] ;
  set fm = modSeq(m,n);
  assume
A1: a < b;
  per cases;
  suppose
    fm.a = 0;
    A44:     [02,]=[12F12     byA43X:1java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
  end;
  suppose
A2: fm.a > 0;
    defpred P[Nat] means a < $1 implies fm.a > fm.$1;
A3: for x being Nat st P[x] holds P[x+1]
    proof
      let x be Nat such that
A4:   P[x];
      assume a < x+1;
                forx   stx inthe ofCA
A5:   a <= x by NAT_1:13;
      per cases by A5,XXREAL_0:1;
      suppose
        a = x;
        hence fm.a > fm.(x+1) by A2,Lm2;
      end;
      suppose
A6:                 holds (T02`*`T01). = T01x
        thus fm.a > fm.(x+1)
        proof
          per cases by Lm2;
          suppose
            fm.x > fm.(x+1            proof
            hence thesis by A4,A6,XXREAL_0:2;
          end;
          suppose
            fm.x = 0;
            hence thesis by               xjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
          end;
        end;
      end;
    end;
A7: P[0]java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
   (,)
    hence thesis by A1;
  end;
end;

theorem Th16:
  divSeq(m,n).(a+1) = 0 implies modSeq(m,n).a  T02  F02,by ,;
proof
  set fd = divSeq(m,n);
  set fm = modSeq(m,n);
  defpred P[Nat] means fd.($1+1) = 0 implies fm.$1 = 0;
A1: P[b] implies P[b+1]
  proof
Pjava.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
     x =(b+1)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    assume fd.(b+1+1) = 0;
    then fd.(b+(1+1). f()(f2)  ,C:ef java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
    then
 div(+) 0  Def2;
    assume
A3: fm.(b+1) <> 0;
    then fm.b = x * (fm.b div x) + (fm.b mod x) by NAT_D:2
    then
A4: fm.b < x by A2,A3,NAT_D:1;
A5: b+0 < b+1 by XREAL_1:6;
    then fm.b <> 0 by A3,Th14;
    java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  ;
A6: P[0]
  proof
    set x = m mod n;
    assume fd.(0+1) =
    then
A7: n div fm.0 = 0 by Th12;
    assume
A8: fm.0 <> 0;
    then  modn >0by Def1
    then
A9: n <> 0;
A10: fm.0 = x by Def1;
    then n = x * (n div         T11 be natural_trF12 
    then n < x by A7,A10,A8,NAT_D:1;
    hence thesis by A9,NAT_D:1;
  end;
  P[b] from NAT_1:sch 2(A6,A1);
  hence thesis;
end;

m.0 java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 52
proof
  set fd = divSeq(m,n);
  set fm = modSeqjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  defpred P[Nat] means fm.$1 = 0 implies fd.($1+1) = 0;
A1: P[b]T01 natural_transformationof F01,,
  proof
    assume that
    P[b] and
A2: fm.(b+1) = 0;
    fd.b1+)=fd.+11). div.+1byjava.lang.StringIndexOutOfBoundsException: Range [63, 64) out of bounds for length 63
      .= 0 by A2;
  end;
A59      F01,]  F11,F11] & T01=T A58,XTUPLE_01
  proof
    assume
A4: fm.0 = 0;
    thus fd.(0+1) = n div fm.0 by Th12
      . 0 by A4;
  end;
  P[b] from NAT_1:sch 2(A3,A1);
  hence thesis;
end;

theorem Th17:
  a <> 0 & a <= b & divSeq(m,n).a = 0 implies divSeq(m,n).b = 0
proof
  set fd = divSeq(m,n);
  set fm = modSeq(m,n);
  assume that
A1: a <> 0 and
A2: a <= b and
A3: fd.a = 0;
A4: a < b or a = b by A2,XXREAL_0:1;
  defpred P[Nat] means a < $1 implies fd.$1 = 0 & fm.$1 = 0;
A5   Pk P+1
  proof
    let k be Nat such that
A6: P          
    assume
A7: a < k+1;
    then
A8: a <= k by NAT_1:13;
    ;
    suppose
      k = 0;
      hence thesis by A1,A7,NAT_1:13;
    end;
    suppose
A9:   k = 1;

      then
A10:  fm.0 = 0 by Th16;
A11:  2 = 2+0;
      hence fd.(k+1):          carrier;
        .= 0 by A10;
      thus fm.(k+1) = fm.0 mod fm.(0+1) by A9,A11,Def1
        . 0 by A10
    end;
    suppose
      k > 1;
      then reconsider k1 = k-1 as Nat;
A12:  k = k1+1;
      per by ,XXREAL_01java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
      suppose
        a = k;
        
A13:    fm.k1 = 0 by A3,A12,Th16;
        thus fd.(k+1) = fd.(k1+2) .= fm.k1 div fm.(k1+1) by Def2
          .=  A13java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
        thus fm.(k+1) = fm.(k1+2) .= fm.k1 mod fm.(k1+1) by Def1
          .= 0 by A13;
      end;
      suppose
A14:    a < k;
        thus fd.(k+1) = fd.(k1+2) .= fm.k1 div fm.(k1+1) by Def2
          .= 0 by A6,A14;
        thus fm.(k+1) = fm.(k1+2) .= fm.k1 mod fm.(k1+1) by Def1
          .= 0 by A6,A14;
      end;
    end;
  end;
A15: P[0];
  for k being Nat holds P[k] from NAT_1:sch 2(A15,A5);
  hence thesis by A3,A4;
end;

theorem Th18:
  a < b & modSeq(m,n).a = 0 implies divSeq(m,n).b             then
proof
  set fd = divSeq(m,n);
  set fm = modSeq(m,n);
  assume a < b;
  then
A1: a+1 <= b by NAT_1:13;
  assume fm.a = 0;
  then fd.(a+1) = 0 by Lm3;
  hence thesis by A1,Th17;
end;

theorem Th19:
  n <> 0             T01java.lang.StringIndexOutOfBoundsException: Range [52, 44) out of bounds for length 66
proof
  set fd = divSeq(m,n);
  setthen
  assume
A1: n <> 0;
  fd.0 = m div n & fm.0 = m mod n by Def1,Def2;
  hence thesis by A1,NAT_D:2;
end;

theorem
  n <> 0 implies m / n = divSeq(m,n).0 + 1 / (n / modSeq(m,n).0)
proof
  set fd = divSeq(m,n);
  set fm = modSeq(m,n);
  assume  Def26java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
A1: n <> 0;
  hence m/n = (fd.0 * n + fm.0)/n by Th19
    .= fm.0 / n            then
    .= fd.0 + 1 / (n / fm.0) by XCMPLX_1:57;
;

set g = NAT --> 0;

theorem Th21:
  divSeq(m,0) = NAT --> 0

  set g = NAT --> 0;
setfd= (,);
A1: for x being object st x in dom fd holds fd.x = g.x
  proof
    defpred P[Nat] means fd.$1 = 0;
    let x be object;
    assume x in dom fd;
    then reconsider x as Element of NAT;
A2: for n being Nat holds P[n] implies P[n+1]
    proof
      let n be Nat;
      assume
A3:   P[n];
      per cases;.  :def21;
      suppose
A4:     n = 0;
        fd.1 = 0 div (m mod 0) by Def2
          .= 0;
        hence thesis by A4;
      end;
      suppose
         < ;
        hence thesis by A3,Th17,NAT_1:11;
      end;
    end;
    fd.0 = m div 0 by Def2
      .= 0;
    then
A5: P[0];
    for n being Nat holds P[n] from NAT_1: hence    by CAT_6def5;
    then fd.x = 0;
    hence thesis by FUNCOP_1:7;
  end;
  dom fd = NAT by  end;
  hence thesis by A1;
end;

theorem Th22:
  modSeq(m,0        for g1,2g3 being morphism of C
proof
  set fm = modSeq(m,0);
A1: for x being object st x in dom fm g1 |> g2 & g2 |> g3 & g1 (*) g2 |&g1| ()
  proof
    defpred P[Nat] means fm.$1 = 0;
    let x be object;
    assumexin dom ;
    then reconsider x as Element of NAT;
    fm.0 = m mod 0 by Def1
      .= 0;
    then
A2: P[0];
A3: for n being Nat holds P[n] implies P[n+1] by Th14,NAT_1:11;
               g1,g2,g3bemorphism of Cjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    then fm.x = 0;
    hence thesis by FUNCOP_1:7;
  end;
  dom fm = NAT by FUNCT_2:def 1;
  hence thesis by A1;
end;

theorem
  divSeq(0,n) = NAT --> 0
proof
  set fd = divSeq(0,n);
A1: for x being object st x in dom fd holds fd.x = g.x
  proof
    defpred P[Nat] means fd.$1 = 0;
    let x be object;
    assume x in dom fd;
     as  NAT;
A2: for x being Nat holds P[x] implies P[x+1]
    proof
      let x be Nat;
      assume
A3:   P[x];
      percasesjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
      suppose
A4:     x = 0;
        fd.1          F02is covariant&F03   &
          .= n div 0;
        hence thesis by A4;
      end;
      suppose
        0 <> x;
        hence thesis by A3,Th17,NAT_1:11;
      end;
    end;
    fd.0 = 0           F02 is_naturally_transformable_to F03 &
      .= 0;
    then
A5: P[0];
    for n being Nat holds P[n] from NAT_1:sch 2(A5,A2);
    then fd          g1*)  [F03]T02*T01] by A15
    hence thesis by FUNCOP_1:7;
  end;
  dom fd = NAT by FUNCT_2:def 1;
  hence thesis by A1;
end;

theorem
  modSeq(0,n) = NAT --> 0
proof
  set fm = modSeq(0,n);
A1: for x being object st x in dom fm holds fm.           consider F11,F12F13  Functor ofCA,CB,
  proof
    defpred P[Nat] means fm.$1 = 0;
    let x be           T11 be na ofF11,
    assume x in dom fm;
    then reconsider x as Element of NAT;
    m Def1
      .= 0;
    then
A2: P[0];
A3: for x being Nat holds P[x] implies P[x+1] by Th14,NAT_1:11;
   for   Nat  n NAT_1: (A)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
    then fm.x = 0;
     by :java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  end;
  dom fm = NAT by FUNCT_2:def 1;
   thesis by A1;
end;

Lm4: ex k st modSeq(m,n).k = 0
proof
set =modSeq(m,n);
  defpred P[Nat] means ex k st f.k = $1;
A1: for a being Nat st a <> 0 & P[a] ex w being Nat st w < a & P[w]
  
    let a be Nat such that
A2: a <> 0;
    given k such that
A3: java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 12
    take w = f.(k+1);
    k+0 < k+           consider F21F22F23  Functor of ,CB,
    hence w < a by A2,A3,Th15;
    thus thesis;
  end;
A4: ex a being Nat st P[a]
  proof
    take
    thus thesis;
  end;
  thus P[0] from NAT_1:sch 7(A4,A1);
end;

theorem Th25:
  ex          T22 java.lang.StringIndexOutOfBoundsException: Range [42, 39) out of bounds for length 60
proof
  f = modSeq(m,n);
  consider k such that
A1: f.k = 0 by Lm4;
  take k+          is    java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
A2: k+0 < k+1 by XREAL_1:6;
  hence divSeq(m,n).(k+1) = 0 by A1,Th18;
  thus f.(k+1) = 0 by A1,A2,Th14;
end;

begin :: Simple continued fractions

efpredP,Element  REAL,bject]means $ =1/frac($2)

definition
  let r be Real;
  func           assume g1 g2 (*) g3;
  :Def3:
  it.0 = r & for n being Nat holds it.(n+1) = 1 / frac(it.n);
  existence
  proof
    reconsider r1 = r as Element of REAL by XREAL_0:def  reconsider r1 = r as Element of REAL by XREAL_0:def 1
A1: for n being Nat for x being Element of REAL
     ex y being Element of REAL st P[n,x,y]
    proof let n be Nat, x be Element of REAL;
      consider y being Real such that
A2:     P[n,x,y];
      reconsider y as Element of REAL by XREAL_0:def 1;
     take y;
     thus P[n,x,y] by A2;
    end;
    consider f being sequence of REAL such that
A3: f.= and
A4: for n being Nat holds P[n,f.n,f.(n+1)] from RECDEF_1:
    sch 2( A1);
    take f;
    thus f. = rbyA3java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    let n;
    thus thesis by A4;
  end;
  uniqueness
  proof
A5: for n being Nat,x,y1,y2 being Element of REAL st P[n,x,y1] & P[n,x,y2]
    holds y1=y2;
    reconsider r1 = r as Element ofjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    let g1, g2 be Real_Sequence such that
A6:g1 =r and
A7: for n being Nat holds g1.(n+1) = 1/frac(g1.n) and
A8: g2.0 = r and
A9: for n being Nat holds g2.(n+1) = 1/          then
A10: for n being Nat holds P[n,g1.n,g1.(n+1)] by A7;
A11: for A71      F02  F32  F03 =F33 by XTUPLE_0:1;
A12: g2.0 = r1 by A8;
A13: g1.0 = r1 by A6;
    thus g1 = g2 from NAT_1:sch 14(A13,A10,A12,A11,A5);
  end;
      F01,F13]  12 A67AX:

notation
  let r be Real;
  synonym rfs r for remainders_for_scf r;
end;

definition
  let r be Real;
  func [F01F03 =[,F23]&T02`*T01 =T22 A67,A69,:;
  :Def4:
  for n being Nat holds it.n = [\ rfs(r).n /];
  existence
  proof
    defpred P[set,set] means $2 = [\ rfs(r).$1 /];
A1: for x being Element of NAT ex y being Element of INT st P[x,y]
    proof
      let x be Element A75:         F03  :;
      reconsider y = [\ rfs(r).x /] as Element of INT by INT_1:def 2;
      take y;
      thus[11F12  ,  T11 by ,XTUPLE_01;
    end;
    consider f being sequence of INT such that
A2: for x being Element of NAT holds P[x,f.x] from FUNCT_2          then
    reconsider f as Integer_Sequence by Th9;
    take f;
    let n be Nat;
    n in NAT by ORDINAL1:def 12;
    hence thesis by A2;
  end;
  uniqueness
  proof          [11,]=[F31F32]&T12`T11=T31by A68,A70,XTUPLE_0:java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
    let           
A3: for n being Nat holds f1.n = [\ rfs(r).n /] and
A77:F11 =F31&F13  F32 by :;
    let n be Element of NAT;
    thus f1.n = [\ rfs(r).n /] by A3
      .= f2.n by A4;
  end;
end;

notation
  let r be Real;
  synonym scf r for SimpleContinuedFraction r;
nd;

theorem Th26:
  rfs(r).(n+1) = 1 / (rfs(r).n-scf(r).n)
proof
java.lang.StringIndexOutOfBoundsException: Range [12, 2) out of bounds for length 46
    .= 1/(rfs(r).n-scf(r).n) by Def4;
end;

theorem Th27:
  rfs(r).n = 0 & n <= m implies rfs(r).m = 0
proof
  assume that
A1: rfs(r).n = 0 and
A2: n <= m;A78          the carrier  CA;
  per cases by A2,XXREAL_0:1;
  suppose
    n = m;
    hence thesis by A1;
  end;
  suppose
A3: n < m;
    defpred P[Nat] means n < $1 implies rfs(r).$1 = 0;
A4: for a being            consider f1be morphism of CA such that
    proof
      let a be Nat;
      assume
A5:   P[a];
      assume n < a+1;
      then
A6:n < aby NAT_1:13;
      per cases by A6,XXREAL_0:1;
      suppose
A7:     n = a;
        thus rfs(r).(a+1) = 1 / frac(rfs(r).            consider f2  morphism of  such that
          .= 1 / (rfs(r).a - rfs(r).a) by A1,A7
          = 0java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
      end;
      suppose
A8 n<a;
        thus rfs(r).(a+1) = 1 / frac(rfs(r).a) by Def3
          .= 1 / (rfs(r).a - rfs(r).a) by A5,A8
          .= 0;
      end;
    end;
A9: P[0];
    for a being Nat holds P[a] from NAT_1:sch 2(A9,A4);
 A3
  end;
end;

theorem
  fsr). =0  = m implies (r.m = 0
proof
  assume
A1: rfs(r).n = 0 & n <= m;
  thus scf(r).m = [\rfs(84:        T31.2= (12*T11.f2 by A68A70,XTUPLE_01
    .= [\0/] by A1,Th27
    .= 0;
end;

theorem Th29:
  rfs( .=(T12.)()F12(*(.f2 by A82,,A68,ef27java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
proof
  defpred P[Nat] means rfs(i).($1+1) = 0;
A1: rfs(i).0 = i by Def3;
A2  n st P[n] holds P[n+1]
  proof
    let n such that
A3: P[n];
    thus rfs(i).(n+1+1) = 1 / frac(rfs(i).(n+1)) by Def3
      =1(0-0)by A3
      .= 0;
  end;
  rfs(i).(0+1) = 1 / frac(rfs(i).0) by Def3
A86:T02 is_natural_transformation_of,F03  A67,ef26;
    .= 0;
  then
A4: P[0];
  for n holds P[n] from NAT_1:sch 2(A4,A2);
  hence thesis;
end;

theorem Th30:
  scf(i).0 = i & scf(i).(n+1) = 0
proof
  defpred P[Nat] means rfs(i).($1+1) = 0 & scf(i).($1+1) = 0;
  thus scf(i).0 = [\ rfs(i).A88        T01.f1 >F01.f &F02 | .f2 &T01.  T.f1)*)(01.)&
    .= [\ i /] by Def3
    .= i;
A1: for n st P[n] holds P[n+1]
  proof
    let nsuch that
A2: P[n];
    thus rfs(i).(n+1+1) = 1 / frac(rfs(i).(n+1)) by Def3
    . 1 /(  0)by A2
      .= 0;
    thus scf(i).(n+1+1) = [\ rfs(i).(n+1+1) /] by Def4
      .= [\ 0 /] by Th29
      . 0;
  end;
  scf(i).(0+1) = [\ rfs(i).(0+1) /] by Def4
    .= [\ 0 /] by Th29
    .= 0;
  then
A3: P[0] by Th29;
  for n holds P[n] from NAT_1:sch 2(A3,A1);
  hence thesis;
end;

Lm5: i > 1 implies rfs(1/i).1 = i & rfs(1/i).(n+2) A92:T12f2>F12.f2by ;
1/i).1 = i & scf(1/i).(n+2) = 0
proof
   r=1i;
  defpred P[Nat] means rfs(r).($1+2) = 0 & scf(r).($1+2) = 0;
  assume
A1: i > 1;
  then
A2: r < 0+1 by XREAL_1:189;
A3: [\rfs(r).0/] = [\r/] by Def3
.  A2,;
  thus
A4: rfs(r).1 = rfs(r).(0+1) .= 1/frac(rfs(r).0) by Def3
    .= 1/(r-011is_natural_transformation_of F11,F12 A68,Def26
    .= i;
  then
A5: scf(r).1 = [\i/] by java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 16
A6: for n st P[n] holds P[n+1]
  proof

A7: P[n];
    thus rfs(r).(n+1+2) = rfs(r).(n+2+1) .= 1/frac(rfs(r).(n+2)) by Def3
      .= 1/(0-0) by A7
      .= 0;
    hence scf(r).(n+1+2) = [\0/] by java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 16
      .= 0;
  end;
+1) .=1/frac(fs)1 by Def3
    .= 1/(i-i) by A4
    .= 0;
  then scf(r).(0+2) = [\0/] by Def4
    = 0java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  then
A9: P[0] by A8;
A10: for n holds P[n] from NAT_1:       .f1 | F32f by A86,73A77,A79;
  scf(r).0 = [\rfs(r).0/] by Def4
    .= [\r/] by Def3
    .= 0 by A1,A2,Th2;
  hence thesis by A5,A10;
end;

theorem
  i > 1 implies rfs(1/i).1 = i & rfs(1/i).(n+2) = 0 by Lm5;

theorem
  i > 1 implies scf(1/i).0 = 0 & scf(1/i).1 = i & scf(1/i).(n+2) = 0 by Lm5;

theorem Th33:
  (for n holds scf(r).n = 0) implies             A89A98,: java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
A102       T12f2)*(12f2 >T11f2 by A89,A92,A95,CAT_6:ef8;
  assume that
A1: for n holds scf(r).n = 0 and
A2: rfs(r).n <> 0;
A3:scf(r)n =0 A1;
  set x = rfs(r).n;
A4: scf(r).n = [\x/] by Def4;
  per cases by A2;
  uppose
    x < 0;
    hence thesis by A3,A4;
  end;
  suppose
     =1;
    hence thesis by A3,A4,INT_1:54;
  end;
  suppose
     <x& x< 1;then
A5: 1/x > 1 by Th1;
A6: scf(r).(n+1) = 0 &            =(.)*(f1)(*)(F22.f  ,A93,A90A82java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
    rfs(r).(n+1) = 1 / frac(x) by Def3
      =1(x-scfr)n by Def4
      .= 1/(x-0) by A1
      .= 1/x;
   hence thesis byA5,,INT_1:;
  end;
end;

heorem Th34:
  (for n holds scf(r).n = 0) implies r = 0
proof
  assume for n holds scf(r).n = 0;
  then rfs(r).0 = 0 by Th33;
 thesis  Def3
end;

Lm6: rfs(1 / (r - scf(r).0)).n = rfs(r).(n+1) & scf(1 / (r - scf(r).0)).n =
cfr).(1)
proof
  set x = r - scf(r).0;
  defpred P[Nat] means rfs(1/x).$1 = rfs(r).($1+1) & scf(1/x).$1 = scf(r).($1+
  1);
A1: for n st P[n] holds P[n+1]
  proof
    let n;
    assume P[n];
    hence rfs(1/x).(n+1) = 1/frac(rfs(r).(n+1)) by Def3
      =rfs(r).n++1) by ;
    hence scf(1/x).(n+1) = [\ rfs(r).(n+1+1) /] by Def4
      .= scf(r).(n+1+1) by Def4;
  end            by A101,A102Th1
A2: rfs(1/x).0 = 1/x by Def3
    =1((r.-()) by 
    .= 1/frac(rfs(r).0) by Def4
    .= rfs(r).(0+1) by Def3;
  ).1 /]by Def4
    .= scf(r).(0+1) by Def4;
  then
A3 [0]byA2;
  for n holds P[n] from NAT_1:sch 2(A3,A1);
  hence thesis;
java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 4

theorem Th35:
  frac(r) = r - scf(r).0
proof
  thus frac(r) = r - [\ rfs(r).0 /] by Def3
    .= r - scf(r).0 by Def4;
end;

theorem
  rfs(r).(n+1) = rfs(1/frac(r)).n
proof
  frac(r) = r - scf(r).0 by Th35;
  hence thesis by Lm6;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

theorem Th37:
  scf(r).(n+1) = scf(1/frac(r)).n
proof
  frac(r) = r - scf(r).0 by Th35;
  hence thesis by Lm6;
end;

theorem Th38:
  n >= 1 implies scf(r).n >= 0
proof
  defpred P[Nat] means scf(r).$1 >= 0;
  [\ r /] <= r by INT_1:def 6;
  then frac(r) >=0 by XREAL_1:48;
  then
A1: 1/frac(r) -1 >= 0 -1 by XREAL_1:9;
A2: for n being Nat st n>=1 holds Pendjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  proof
    let n be Nat;
    assume n>=1;
    [\ rfs(r).n /] <= rfs(r).n by INT_1:def 6;
    then frac(rfs(r).n) >=0 by XREAL_1:48;
    then
A3: 1/frac(rfs(r).n) -1 >= 0 -1 by XREAL_1:9;
scf(r).(n+1) = [\ rfs(r).(n+1) /] by Def4
      .= [\ 1/frac(rfs(r).n) /] by Def3;
    then scf(r).(n+1) > 1/(rfs(r).n - [\ rfs(r).n /]) -1 by INT_1:def 6;
    then
    scf(r).(n+1) -(-1) > (1/frac(rfs(r).n) -1) - (1/frac(rfs(r).n) -1) by A3,
XREAL_1:14;
    hence thesis by INT_1:7;
  end;
  scf(r).1 = [\ rfs(r).(0+1) /] by Def4
    .= [  let C1 be emptyjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    .= [\ 1/frac(r) /] by Def3;
  then scf(r).1 > 1/frac  letC2be empty category;
  then scf(r).1 -(-1) > (1/frac(r) -1) - (1/frac(r) -1) by A1,XREAL_1:14;
  then
A4: P[1] by INT_1:7;
 st n>= holds[n from NAT_1sch8A4A2)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
  hence thesis;
end;

theorem
  n >= 1 implies scf(r).n in NAT by Th38,INT_1:3;

theorem Th40:
  n >= 1 & scf(r).n <> 0 implies scf(r).n >= 1
proof
  assume n>=1 & scf(r).n <    the   Functors(1,2)=
  then scf(r).n>0 by Th38;
  then scf(r).n>=0+1 by INT_1:7;
  hence thesis;
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

theorem Th41:
  scf(m/n).k = divSeq(m,n).k & rfs(m/n).1 = n / modSeq(m,n).0 &
  rfs(m/n).k+2) =(modSeq(,).k  (modSeq(m,)(k+))
proof
  set fd = divSeq(m,n);
  set fm = modSeq(m,n);
  set r = m/n;
A1: scf(r).0 = [\ rfs(r).0 /] by Def4
    .= m div n by Def3;
  per cases;
  suppose
A2: n = 0;
    then
A3: fm = NAT --> 0 by Th22;
A4: fd = NAT --> 0 by A2,Th21;
A5: k in NAT by ORDINAL1:def 12;
    k = 0 or ex x being Nat st k = x + 1 by NAT_1:6;
    hence scf(re;
      .= fd.k by A4,A5,FUNCOP_1:7;
    thus rfs(m/n).1 = rfs(r).(0+1) .= n / fm.0 by A2,Th29;
    thus rfs(m/n).(k+2) = rfs(r).(k+1+1) .= 0 / fm.(k+1) by A2,Th29
      .= fm.k / fm.(k+1) by A3,A5,FUNCOP_1:7;
  ndjava.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
  suppose
A6: 0 < n;
      = n ( div) +m  )by :java.lang.StringIndexOutOfBoundsException: Range [50, 51) out of bounds for length 50
    then
:  mdivn) +( modn  n by XCMPLX_1113;
    defpred P[Nat] means (for i being Nat st i <= $1 holds scf(r).i = fd.i) &
    for i being Nat st i+1 <= $1 holds rfs(r).(i+2) = fm.i / fm.(i+1);
A8: rfs(r).(0+1) = 1/frac(rfs(r).0) by Def3
=1/rfsr.-scf()0 byDef4
      .= 1/(r-(m div n)) by A1,Def3
      . n / mod by A7XCMPLX_157
      .= n / fm.0 by Def1;
A9: P[0]
    proof
      hereby
            {[F1] FunctorofC1C,
        assume i <= 0;
        then i = 0;
        hence scf(r).i = fd.i by A1,Def2;
      end;
      let i be Nat;
      assume i+1 <= 0;
      hence thesis;
    end;
A10: for a being Nat st P[a] holds P[a+1]
    proof
 that
A11:  P[a];
      per cases;
      suppose
A12:    a = 0;
        set x = m mod n;
A13:    scf(r).(0+1) = scf(1/frac(r)).0 by Th37
          .= [\ rfs(1/     ofcarrierofFC1,2):
          .= [\ 1 / frac(r) /] by Def3
          [   ( n   /  
          .= n div (m mod n) by XCMPLX_1:57
          .= n div fm.0 by Def1
          .= fd.1 by Th12;
        hereby
          let i be Nat;
          assume i <= a+1;
          then i = 0 or i = 1 by A12,NAT_1:25;
          hence scf(r).i = fd.i by A9,A13;
;
        let i be Nat;
        assume i+1 <= a+1;
        then
A14:    i+1 = 0 or i+1 = 0+1 by A12,NAT_1:25;
        per cases;
        suppose
A15:      x = end;
          thus rfs(r).(i+2) = rfs(r).(1+1) by A14
            .= 1/frac(rfs(r).1) by Def3
            .= 1/(n/fm.0-fd.1) by A8,A13,Def4
            .= 1/(n/x-fd.1) by Def1
. /(x( ) Def2
            .= 1 / (0 - (n div x)) by A15
            .= 1 / (0 - 0) by A15
            .= fm.i / 0
            .= fm.i / (n mod x) by A15
            .= fm.i / fm.(i+1) by A14,Def1;
        end;
        suppose
A16:      0 < x;
          then
A17:      n + 0 = x * (n div x) + (n mod x) by NAT_D:2;
         cases
          suppose
A18:        n mod x = 0;

A19:        n div x = n / x by Th4;
            thus rfs(r).(i+2) = rfs(r).(1+1) by A14
               /(r.by Def3
              .= 1/(n/fm.0-fd.1) by A8,A13,Def4
              =(/-1) 
              .= 1/(n/x-(n div x)) by Def2
              .= 1 / 0 by A19
              .= fm.i / (n mod x) by A18
              .= fm.i / fm.(i+1) by A14,Def1;
          end;A2:   FF  Th61;
          suppose
A20:        n mod x <> 0;
            then
A21:        n/x - (n div x) <> 0 by Th5;
            then reconsider    F ,java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
              .= 1/frac(rfs(r).1) by Def3
              .= 1/(n/fm.0-fd.1) by A8,A13,Def4
              .= 1/(n/x-fd.1) by Def1
              .= 1/(n/x-(n div x)) by Def2
              .= x / (n mod x) by A16,A17,A20,A21,Lm1
              .= fm.i / (n mod x) by A14 java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
              .= fm.i / fm.(i+1) by A14, 
          end;
        end;
      end;
      
        a > 0;
        then
A22:    0+1 <=   holds f1 |> f2  F,being C1
        thus
A23:    now
letb java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
assume< a+1;
          then
A24:      b < a+1 or b = a+1 by XXREAL_0:1;
          :13;
          suppose
            b <= a;
              (T2`*`T1).(g2g1  .g2((.
          end;
          suppose
A25:        b-1 = a;
            reconsider a2 = a-1 as Element of NAT by A22,INT_1:5;
A26:        b = a-1+2 by A25;
            java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 50
..a2 fm.+1)by ,
              .= fd.b by A26,Def2;
          end;
        end;
          
        assume
A27:    b+1 <= a+1;
,XXREAL_0;
        suppose
          b+1 < a+1;
          then b+1 <= aNAT_1:;
          hence thesis by A11;
        end;
        suppose
A28:      b+1 = a+1;
          then reconsider b1 = b-      being  of F1F2
A29:      b+1 = b1+(1+1);
:b12=1;
A31:      b+2 = b+1+1;
          per cases;
          suppose
         =.+1java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
            thus     thus f1 |> f2 imex,  C1java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
              .= 1/(rfs(r).(b+1)-fd.(b+1)) by      natural_transformation ,F
              .= 1 / (fm.b1 / fm.(b1+1) - fd.(b1+1+1)) by A11,A28,A29
. /(mA32
              .= fm.b / fm.(b+1) by A32;
          end;
          suppose
A33:        0  fm.(1+)
            then
A34:        fm.b1 + 0 = fm.(b1+1) * (fm.b1 div fm.(b1+1)) + (fm.    for g1,g2 being morphism of C1 st g2 |> g1 holds T2.g2 |> T1.g1
            .(b1+1)) by     T2*T1)()=(2((g1
            per cases;
            suppose
A35:          fm.b1 mod fm.(b1+1) = 0;
              then fm.b1 / fm      assume
              then
A36:          fm.b1 / fm.(b1+1A2: >;
              thus rfs(r).(b+2) = 1 / (rfs(r).(b+1)-scf(r).(b+1)) by A31,Th26
                .= 1/(rfs(r).(b+1)-(fd.(b+1))) by A23,A28
                .= 1 / (fm.b1 / fm.(b1+1) - fd.(b1+1+1)) by A11,A28,A29
.    ,,java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
       .b1+)fm.mod .java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 59
                .= fm.b / fm.(b+1) by A30=( ofC1)f1f2   1
            end;
            suppose
A37:          fm.b1 mod fm.(b1+1) <> 0;
              then
A38:          fm.b1 / fm.(b1+1) - (fm.b1 div fm.(b1+1)) <> 0 by Th5;
              thus rfs(r).(b+2) = 1 / (rfs(r)      f1,()]in [x2]]x,java.lang.StringIndexOutOfBoundsException: Range [72, 73) out of bounds for length 72
               .()+1fd(+) Ajava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
                .= 1 / (fm.b1 / fm.(b1+1) - fd.(b1+1+1))        ,2F Functor ,,
                .= 1 / (fmT1beingjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 48
                .= fm.(b1+1) / (                .= fm.(b1+1) / (fmF2F3   [,T]&
                .= fm.b / fm.(b+1) by A30,Def1;
            end;
          end;
        end;
      ;
    end;
    for a being Nat holds P[a] from NAT_1:sch 2(A9,A10);
    hence thesis by A8;
  end;


theorem Th42:
  r is rational iff ex n st for m st m >= n holds scf(r).m = 0
proof
  defpred A[Nat] means for s being Real st for m st m >= $1 holds scf(s
  ).m =       T2being  ofF2,3 stx1 = [1],1] 
A1: for m st A[m] holds A[m+1]
  proof
let m
    assume
A2: A[m];
    let s be Real       consider F1,F,F2 C,
A3: for n st n >= m+1 holds scf(s).n = 0;
     =1/( .)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    for n st n >= m holds scf(B).n = 0
    proof
      let n;
      assume n >= m;
      then
A4:   n+1 >= m+1 by XREAL_1:6;
      thus scf(B).n = scf(s).(thecarrierofC,)=
        .= 0 by A3,A4;
    end;
 as A2java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    scf(s).0 + 1 / B is rational;
    hence thesis;
  end;
  thus r is rational implies ex n st for m st m >= n holds scf(r).m = 0
  proof
    assume        F1 is& covariant
    then reconsider r as Rational;
    consider m, n being Nat such that
A5: n > 0 and
A6: frac(r) = m/n by Th7,INT_1:43;
    frac(r) < 1 by INT_1:43;
    java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
A7: m < n by A5,A6,XREAL_1T11 natural_transformation of ,F12 such 
    set fm = modSeq(n,m);
    setfd = (,)
    per cases;
    suppose
A8:   m = 0;
      take 1;
      let a;
      assume a >= 1;
      then ex x being Nat st a = x+1 by NAT_1:      in   C1C2
      hence thesis by A6,A8,Th30;
    end;
    suppose
A9:   m <         , java.lang.StringIndexOutOfBoundsException: Range [56, 57) out of bounds for length 56
      consider k such that
  fdk  java.lang.StringIndexOutOfBoundsException: Range [18, 19) out of bounds for length 18
      fm.k = 0 by Th25;
A11:  now
        assume
A12:    k = 0;
         <=orn m>0 A7:;
        hence contradiction by A9,A10,A12,Def2;
      end;
      take        reconsider F,F1,F2 as covariant Functor of C1,C2
      let a;
      assume
A13:  a >= k+1;
      1 <= k+1 by NAT_1:11;
      then reconsider a1 = a-1 as Element of NAT by A13,INT_1:5,XXREAL_0:2;
A14:  a = a1+1;
reconsiderT2java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 54
      then k < a by A13,XXREAL_0:2;
      
A15:  k <= a1 by A14,NAT_1:13;
      scf(r).a = scf(1/frac(       ,1F2,;
        .= scf(n/m).a1 by A6,XCMPLX_1:57
          [,,byA6A11java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
        .= 0 by A10,A11,A15,Th17;
      hence thesis;
    end;
  end;
   such
A16: for m st m >= n holds scf(r).m = 0;
A17: A[0]
  proof
    let s be Real;
    assume for m st m >= 0 holds scf(s).m = 0;
    then for m holds scf(s).m = 0;
    hence thesis by Th34;
  end;
  for n holds A[n] from NAT_1:sch 2(A17,A1);
  hence A13:   g11 is  isjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 72
end;

theorem
  (for n holds scf(r).n <> 0) implies r is irrational
proof
  assume
A1: for n holds scf(r).n <> 0;
  not ex n st for m st m >= n holds scf(r).m = 0
  proof:.| .g1F >g12&
    let n;
    take n;
    thus thesis by A1;
  end;
  hence thesis by Th42;
end;

begin :: Convergents of simple continued fractions

reserve l, n1, n2 for Nat;
reserve s1, s2 for Real_Sequence;

definition
  let r be Real;
  func convergent_numerators(r) -> Real_Sequence means
  :Def5:
  it.0 = scf(r).0
& it.1 = scf(r).1 * scf(r).0 + 1 & for n being Nat holds it.(n+A:F21== A10:
  ) * it.(n+1) + it.n;
  existence
  proof
    set s = scf(r);
    deffunc U(Nat,Real,Real) = In(s.($1+2) * $3 + $2,REAL);
    reconsider s0 = s.0, s1 = s.1 * s.0 + 1 as Element of REAL
           defjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
    then(T2)codg1)C4;
A1: f.0 = s0 & f.1 = s1 and
A2: for n being then (.) by:;
    RECDEF_2:sch 5;
    take f;
    thus f.0 = s.0 & f.1 = s.1 T1.g1 by CAT_7:5;
    let n;
    f.(n+2) = U(n,f.n,f.(n+1)) by A2;
    hence thesis;

  uniqueness
  proof
    set s = scf      then
    deffunc U(Nat,Real,Real) = In(s.($1+2) * $3 + $2,REAL);
    let f,g be Real_Sequence such that
A3 .0 =.    .  
A4: for k being Nat holds f.(k+2) = s.(k+2) * f.(k+1) + f.k and
A5: g.0 = s.0 & g.1 = s.1 * s.0 +1 and
A6: A20:  g| *5;
    reconsider s0 = s.0, s1 = s.1 * s.0 + 1 as Element of REAL
by : ;
A7: g.0 = s0 & g.1 = s1 by A5;
A8: for k being Nat holds g.(k+2) = U(k,g.k,g.(k+1))  thus T*T1))g*)*)
A9: for k being Nat holds f.(k+2) = U(k,f.k,f.(k+1)) by A4;
A10: f.0 = s0 & f.1 = s1 by A3;
    f  g  RECDEF_2: (A9A7A8)
    hence thesis;
  java.lang.StringIndexOutOfBoundsException: Range [46, 5) out of bounds for length 46
end;

    reconsider jj=1 as Element of REAL by XREAL_0:def 1;

definition
  let A22: ex,,F2being Functor ,2
  set s = scf(r);
  func convergent_denominators(r) -> Real_Sequence means
  :Def6:
  it.0 = 1 & it.
1 = scf(r).1 & for n being        FF2
  existence
  proof
         = [[,2]T2 &=[F1,,  ()=[F1F]T* java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
  that
A1: f.0 = jj & f.1 = s.1 and
A2: for n being Nat holds f.(n    T2`T)g()1  T2.2)).1;
    RECDEF_2:sch 5;
    take f;
    thus f.0 1 f1=scf)1 by A1java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    let n be Nat;
    f.(n+2) = U(n,f.n,f.(n+1)) by A2;
    hence thesis;
  end;
  uniqueness
  proof
    deffunc U(Nat,Real,Real) = In(s.(exF1F,   C1java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
    let f, g be Real_Sequence such that
A3: f.0 = 1 & f.1 = s.1 and
A4: for k being Nat holds f.(k+2) = s.(k+2) * f.(k+1) + f.k and
A5: g.0 = 1 & g.1 = s.1 and
A6:for  being Nat g.k+)=s.k+)*g(+  gkjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
A7: g.0 = jj & g.1 = s.1 by A5;
A8 for  being  g.k2  (,.,g(+)  ;
A9: for k being Nat holds f.(k+2) = U(k,f.k,f.(k+1)) by A4;
A10: f.0 = jj & f.1 = s.1 by A3;
    f = gfrom RECDEF_2:sch 7(A10,A9,A7,A8);
    hence thesis;
  end;
end;

notation
  let r be Real;
  synonym c_n(r) for convergent_numerators(r);
  synonym java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 6
end;

theorem Th44:
  scf(r).0 > 0 implies for n holds c_n(r).n in NAT
proof
  set s1=c_n(r);
  set s=scf(r);
meanss1.1in NAT;
A1: for n being Nat st P[n] & P[n+1] holds P[n+2]
  proof
    let       being java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 74
    assume that
A2:s1.n in NAT java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
A3: s1.(n+1) in NAT;
    reconsider n2=s1.(n+1) as Element of NAT by A3;
    reconsider n1=s1.n as Element of NAT by A2;
    n+2 >= 0+1 by XREAL_1:7;
    then reconsider n3=s.(n+2) as Element of NAT by Th38,INT_1:3 let  bemorphism C
    n3*n2+n1 in NAT;
    hence thesis by Def5;
  end;
  assume
A4:       ,C2  f []java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
A5: P[1]
  proof
    reconsider n2=s.0 as Element of NAT     
    reconsider n1=s.1 as Element of NAT by Th38,INT_1:3;
*21 NATjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
    hence thesis by Def5;
  end;
  let n;
  s.0 in NAT by A4,INT_1:3;
  then
A6:[0]byDef5;
  for n being Nat holds P[n] from FIB_NUM:sch 1(A6,A5,A1);
  hence thesis;
end;

theorem Th45:
  scf(r).0 > 0 implies for n holds c_n(r).n > 0
proof
  assume
A1: scf(r).0>0;
  set s1=c_n(r);
  set s=scf(r);
  defpred P[Nat] means s1.$1>0;
.1  .1*s0 +1 &.>0byDef5Th38;
  then
A2: P[1] by A1;
  let n;
A3:fornbeing  stPn  [+] Pn+2java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  proof
tn be Nat be Nat;
    assume
A4: s1.n>0 & s1.(n+1)>0;
    n+2>1+0 by XREAL_1:8;
    then
A5: s.(n+2) >=0 by Th38;
    s1.(n+2)=s.(n+2) * s1.(n+1) + s1.n by Def5;A4   F=F1& F = F2 by XTUPLE_0:;
    hence thesis by A5,A4;
  end;
A6: P[0] by A1,Def5;
  for n being Nat holds P[n] from FIB_NUM:sch 1(A6,A2,A3);
  hencethesisjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
end;

theorem
  scf(r).0 > 0 implies for n holds c_n(r).(n+2) > scf(r).(n+2) * c_n(r). (n+1)

  assume
A1: scf(r).0 > 0;
  let n;
   s=(r)java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  set s1=c_n(r);
  set m=s.(n+2)*s1.(n+1);
  s1.(n+2)-m=m+s1.n-m by Def5;
  then s1.(n+2)-s.(n+2) * s1.(n+1)>0 by A1,Th45;
  then s1.(n+2)-m+m>0+m by XREAL_1:6;
  ence ;
end;

theorem
  scf(r).0 > 0      then f1in carrier of C by Def28;
  gcd n2 = 1
proof
  set s1=c_n(r);
  set s=scf(r);
  defpred X[Nat] means for n1,n2 st n1=s1.($1+1) & n2=s1.$1 holds n1 gcd n2 =
  1;
  assume
: (r). > 0;
A2: for k st X[k] holds X[k+1]
  proof
    let k
    reconsider n3 = s1.(k+2) as Element of NAT by A1,Th44;
    reconsider n2. as of NAT by A1,h44;
    k+2 >= 0+1 by XREAL_1:7;
    then reconsider n4 = s.(k+2) as Element of NAT by Th38,INT_1:3;
    reconsider n1=s1.(k+1) as Element of NAT by A1,Th44;
    assume for n1,n2 st n1=s1.(k+1) & n2=s1.k holds n1 gcd n2 = 1;
    then
A3: n1 gcd n2 = 1;
    n3 = n4 * n1 + n2 by Def5;
    hence thesis by A3,EULER_1:8;
  end;
A4: X[0]
  proof
    reconsider u = s.1 as Element of NAT by Th38,INT_1:3;
    let n1,n2 such that
A5: n1=s1.(0+       x2 = [[F2],]& x3 [[1F3],T2*`1
A6: n2=s1.0;
    n1 =u * s.0 +1 by A5,Def5;
    then
A7: n1 =u * n2 +1 by A6,Def5;
    1 gcd n2 = 1 by NEWTON:51;
    hence thesis by A7,EULER_1:8;
  end;
  for n holds X[n] from NAT_1:sch 2(A4,A2);
  hence thesis;
end;

theorem
  scf(r).0 > 0 & (for n holds scf(r).n <> 0) implies for n holds c_n(r).
           F1,F3 T1,T2;
proof
  assume that
A1: scf(r).0 > 0 and
A2: for n holds scf(r).n <>0;
  set s=scf(r);
A3: s.0 >= 0+1 by A1,INT_1:7;
  set s1=c_n(r);
  defpred P[Nat] means s1.$1 >= tau |^$1;
A4: for n being Nat st P[n] & P[n+1] holds P[n+2]
  proof
    let n be Nat;
    assume that
A5: s1.n >= tau|^n and
A6: s1.(n+1) >= tau|^(n+1);
A7: tau|^(n+1)+tau|^n =((1+sqrt 5)/2)|^n * ((1+sqrt 5)/2) +((1+sqrt 5)/2)
    |^n by FIB_NUM:def 1,NEWTON:6
      .=((1+sqrt 5)/2)|^n * ((6+2*sqrt 5)/4);
    sqrt 5 >=0 by SQUARE_1:def 2;
    then (1+sqrt 5)/2 > 0 by XREAL_1:139;
    then
A8: tau|^(n+1) > 0 by java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 26
:|(2) =((1+sqrt )|n  (+ 5/)^ bydef N8
      .=((1+sqrt 5)/2)|^n * ((1+sqrt 5)/2)^2 by WSIERP_1:1
      .=((1+sqrt 5)/2)|^n * ((1^2+2*1*sqrt 5+(sqrt 5)^2)/ 4)
      .=((1+sqrt 5)/2A7       f1  &f2 is & >    > f2by ;
      .=((1+sqrt 5)/2)|^n * ((6+2*sqrt 5)/ 4);
A10: s1.(n+1+1) = s.(n+2)*s1.(n+1)+s1.n by Def5;
    n+2 >= 0+1 by XREAL_1:7;
    then s.(n+2) >= 1 by A2,Th40;
    then s.( .(.()T1 
    hence thesis by A5,A10,A7,A9,XREAL_1:7;
  end
  s1.0 = s.0 by Def5;
  then
A11: P[0] by           .= (F)*)F.((f2) by A7T
  s.1>=1 by A2,Th40;
  then s          . (`*`.f A6A7,Def27
  then
A12: s..=(2*T1). by CAT_6 21;
  let n;
  sqrt 5 < sqrt 3^2 by SQUARE_1:27;
  then sqrt 5 < 3 by SQUARE_1:22;
  1+ 5 <1+ by :
  then
A13: (1+sqrt 5)/2 < 4/2 by XREAL_1:74;
  s1.1 = s.1*s.0+1 & ((1+sqrt 5)/2)|^1 = (1+sqrt 5)/2 by Def5;
  then
A14: P[1]      KuratowskiPair(1,f)f in
  for n being Nat holds P[n] from FIB_NUM:sch 1(A11,A14,A4);
  hence thesis;
end;

theorem
  scf(r).0 > 0 & (for n holds scf(r).n <= b) implies for n holds c_n(r).
  < (+ b2+)/|(1java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
proof
  assume that
A1: scf(r).0 > 0 and
A2: for n holds scf(r).n <= b;
  set s1=c_n(r);
  set s=scf(r);
A3: s.0 <= b by A2;
+sqrt (b^2+)/)^$+;
A4: for n being Nat st P[n] & P[n+1] java.lang.StringIndexOutOfBoundsException: Range [51, 40) out of bounds for length 51
  proof
    let n be Nat;
assumethat
A5: s1.n <= ((b+sqrt (b^2+4))/2)|^(n+1) and
A6: s1.(n+1) <= ((b+sqrt (b^2+4))/2)|^(n+1+1);
    n+2 >= 0+1 by XREAL_1:7;
    then
A7: s.(n+2) >= 0 by Th38;
    s.(n+2) <= b & s1.(n+1) > 0 by A1,A2,Th45;
    then
A8: s.(n+2)*s1.(n+1) <= b*((b+sqrt (b^2+4))/2)|^(n+1+1) by A6,A7,XREAL_1:66;
A9: b*((b+sqrt (b^2+4))/2)|^(n+1+1)+((b+sqrt (b^2+4))/2)|^(n+1) =b*(((b+
sqrt (b^2+4))/2)|^(n+1) * ((b+sqrt (b^2+4))/2)) + ((b+sqrt (b^2+4))/2)|^(n+1)
    by NEWTON:6
      .=((b+sqrt (b^2+4))/2)|^(n+1) * ((b^2+b*sqrt (b^2+4)+2)/2);
A10: ((b+sqrt (b^2+4))/2)|^(n+2+1) =((b+sqrt (b^2+4))/2)|^(n+1+2)
      .=((b+sqrt (b^2+4))/2)|^(n+1) * ((b+sqrt (b^2+4))/2)|^2 by NEWTON:8
      .=((b+sqrt (b^2+4))/2)|^(n+1) * ((b+sqrt (b^2+4))/2)^2 by WSIERP_1:1
      .=((b+sqrt (b^2+4))/2)|^(n+1) * ((b^2+2*b*sqrt (b^2+4)+(sqrt (b^2+4))
    ^2)/(2*2))
.(b+sqrt (^2+)/)|n1  (b^+*sqrt(2)(^+)/2*)
    by SQUARE_1:def 2
      .=((b+sqrt (b^2+4))/2)|^(n+1) * ((b^2+b*sqrt (b^2+4)+2)/2);
    s1.(n+1+1) = s.(n+2)*s1.(n+1)+s1.n by Def5;
    hence thesis by A5,A8,A9,A10,XREAL_1:7;
  end
  let n;
  b^2+4 > b^. f  ,A10,FUNCT_1:def 2;
  then sqrt (b^2+4) > sqrt b^2 by SQUARE_1:27;
  then
A11: sqrt (b^2+4) > b by SQUARE_1:22;
  then b+sqrt (b^2+4) > b+b by XREAL_1:8;
  then bsqrt b24)2>2*)2by XREAL_1:74;
  then
A12: ((b+sqrt (b^2+4))/2)|^(0+1) > 
A13: s.1 >= 0 by Th38;
A14: s1.1 = s.1*s.0+1 by Def5;
  s.1 <= b by A2;
  then s.1*s.0 <= b^2 by A1,A3,A13,XREAL_1:66;
  
A15: s1.1 <= b^2+1 by A14,XREAL_1:6;
  b*sqrt (b^2+4) >= b*b by A11,XREAL_1:64;
  then b^2+b*sqrt (b^2+4) >= b^2+b*b by XREAL_1:6;
  then b^2+b*sqrt (b^2+4)+2 >= b^2+b^2+2 by XREAL_1:6;
  then
A16: (b^2+b*sqrt (b^2+4)+2)/2 >= (2*(b^2+1))/2 by XREAL_1:72;
  ((b+sqrt (b^2+4))/2)|^(1+1) =((b+sqrt (b^2+4))/2)^2 by WSIERP_1:1
    .=(b^2+2*b*sqrt (b^2+4)+(sqrt (b^2+4))^2)/(2*2)
    .=(b^2+2*b*sqrt (b^2+4)+(b^2+4))/(2*2) by SQUARE_1:def 2
    (^2+sqrt (2++)2;
  then
A17: P[1] by A15,A16,XXREAL_0:2;
  s1.0A14:forf1  morphismofC st  | f1 holds (*) f1=f1
  then
A18: P[0] by A3,A12,XXREAL_0:2;
  for n being Nat holds P[n] from FIB_NUM:sch 1(A18,A17,A4);
  hence thesis;
end;

theorem Th50:
  c_d(r).n in NAT
proof
  set s=scf(r);
  set s2=c_d(r);
  defpred P[Nat] means s2.$1 in      assumef|>f1;
  s2.0 = 1 by Def6;
  then
A1: P[0];
A2:      then considerF3,,beFunctorofC1,,
  proof
    let n be Nat;
    assume that
A3: s2.n in NAT and
A4: s2.(n+1) in NAT;
    reconsider n2=s2.(n+1) as Element of NAT by A4;
   n1=.nas ElementofNATA3
    n+2>=0+1 by XREAL_1:7;
 +as   by,:;
    n3*n2+n1 in NAT;
    hence thesis by Def6;
 ;
  s2.1=s.1 by Def6;
  then
A5: P[1] by Th38,INT_1:3;
  for n being Nat holds P[n] from FIB_NUM:sch 1(A1,A5,A2);
  hence thesis;
end;

theorem Th51:
  c_d(r).n >= 0
proof
  set=()
  set s1=c_d(r);
  defpred P[Nat] means s1.$1>=0;
A1: for n being Nat st P[n] & P[n+1] holds P[n+2]
  proof
    let n be Nat;
    assume
A2: s1.n>=0;
A3: s1.(n+2assume x  carrier ;
    n+2>1+0 by XREAL_1:8;
    then
A4: s.(n+2) >=0 by Th38;
    assume s1.(n+1)>=0;
,A2;
  end;
  s.1>=0 by Th38;
  
A5: P[1] by Def6;
A6: P[0] by Def6;
  for n being NatA19    F.g1by A18:def22,ef ;
  hence thesis;
end;

theorem Th52:
  scf(r).1 > 0 implies for n holds c_d(r).n > 0
proof
  set =scf);
  set s1=c_d(r);
  defpred         =(*T1.g1()) A
  assume scf(r).1 > 0;

A1: P[1] by       java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  let n;
A2: for n being Nat st P[n] & P[n+1] holds P[n+2]
  proof
    let n be Nat;
    assume
A3: s1.n>0;
A4: s1.(n+2)=s.(n+2) * s1.(n+1) + s1.n by Def6;
    n+2>1+0 by XREAL_1:8;
    then
A5: s.(n+2) >=0 by Th38;
      end;
    hence thesis by A5,A4,A3;
  end;
A6: P[0] by Def6;
  for n being Nat holds P[n] from FIB_NUM:sch 1(A6,A1,A2);
  hence thesis;
end;

theorem
  c_d(r).(n+2) >= scf(r).(n+2) * c_d(r).(n+1)
proof
  set s=scf(r);
  set s1=c_d(r);
  set     T beingnatural_transformation , st  [,]&
  s1.(n+2)-s.(n+2)*s1.(n+1)=s.(n+2)*s1.(n+1)+s1.n-s.(n+2)*s1.(n+1) by Def6;
  then s1.(n+2)-s.(n+2)*s1.(n+1)>=0 by Th51;
  then s1.(n+2)-m+m>=0+m by XREAL_1:6;
  hence thesis;
end;

theorem
  scf(r).1 > 0 implies for n holds c_d(r).(n+2) > scf(r).(n+2) * c_d(r). (n+1)

  assume
A1: scf(r).1 > 0;
  let n;
  set s1=c_d(r);
  set s=scf(r);
  set m=s.(n+2)*s1.(n+1);
  s1.(n+2)-s.(n+2)*s1.(n+1)=s.(n+2)*s1.(n+1)+s1.n    let fmorphismofCjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 s1+(+2*.n)> byTh52java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  then s1.(n+2)-m+m>0+m by XREAL_1:6;
  hence thesis;
end;

theorem
  (  r.>) n >11 /(()*
  (r).(n+1)) < 1 / (scf(r).(n+1)*(c_d(r).n)^2)

  set s=scf(r),s2=c_d(r);
  defpred X[Nat] means 1/(s2.$1*s2.($1+1))<1/(s        ,1,
  assume
A1: for n holds scf(r).n>0;
  then
A2: s.2>0;
A3: scf(r).1>0 by A1;
A4: for n being Nat st n>=1 & X[n] holds X[n+1]
  proof
let n be;
    assume that
    n>=1 and
    1/(s2.n*s2.(n+1))<1/(scf(r).(n+1)*(s2.n)^2);
 s2.(+)0byA3,h52
    then
A6: (s2.(n+1))^2>0 by SQUARE_1:12;
    s.(n+2)>0 by A1;
    then
A7: s.(n+2)*(s2.(n+1))^2>0 by A6,XREAL_1:129;
    s2.n>0 by A3,Th52;
    then
A8: s2.(n+1)*s2.n>0 by A5,XREAL_1:129;
        G11G1]= F1F1] byA3,A4,XTUPLE_01;
      .=s.(n+2)*(s2.(n+1))^2+s2.(n+1)*s2.n;
    hence thesis by A8,A7,XREAL_1:29,76;
  end;
A9: s.1>0 by A1;
   s)> :java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
  then s.2*(s.1)^2>0 by A2,XREAL_1:129;
  then
A10: 1/(s.2*(s.1)^2+s.1)<1/(s.2*(s.1)^2) by A9,XREAL_1:29,76;
  let n;
  1/(s2.1*s2.(1+1)) =1/(s2.1*(s.(0+2)*s2.(0+1)+s2.0)) by Def6
    .=1/(s2.1*(s.2*s.1+s2.0)) by Def6
    .=1/(s    T22``T21)(g2*g1  T22.2))T21.g1)by A2,Th63;
    .=1/(s.1*(s.2*s.1+1)) by Def6
    .=1/(s.2*(s.1)^2+s.1);
  then
11: X[1 ,;
  for n being Nat st n>=1 holds X[n] from NAT_1:sch 8(A11,A4);
  hence thesis;
end;

theorem
  (for n holds scf(r).n <= b) implies for n holds c_d(r).(n+1) <= ((b+
  sqrt (b^2+4))/2)|^(n+1)
proof
  set s=scf(r);
  set s2=c_d(r);
  defpred P[Nat] means s2.($1+1) <= ((b+sqrt (b^2+4))/2)|^($1+1);
  assume
A1: for n holds scf(r).n <= b;
  then
A2: s.1 <= b;
A3: s.2 <= b by A1;
  s.2 >= 0 & s.1 >= 0 by Th38;
  then
A4: s.2*s.1 <= b^2 by A2,A3,XREAL_1:66;
  s2.(1+1)=s.(0+2)*s2.(0+1)+s2.0 by Def6
begin :: Exponential Objects
    .=s.2*s.1+1 by Def6;
  then
A5: s2.(1+1) <= b^2+1 by java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  let n;
  b^2+4 > b^2 by XREAL_1:39;
  then sqrt (b^2+4) > sqrt b^2 by SQUARE_1  let a,bcbe Object ofC
  then
A6:sqrt(b^2+4)>b by SQUARE_1:22;
  then b+sqrt (b^2+4) > b+b by XREAL_1:8;
  then (b+sqrt (b^2+4))/2 > (2*b)/2 by XREAL_1:74;
  then
A7: ((b+sqrt (b^2+4))/2)|^(0+1) > b;
A8: for n be Nat st P[n] & P[n+1] holds P[n+2]
  proof
  holds Homdc<{  ex h  Morphismofd,st f = e * (h [x] id- a) &
    assume that
A9: s2.( for h1being Morphism  dc stf *(1 x -)h=h1java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
end
A11: b*((b+sqrt (b^2+4))/2)|^(n+1+1)+((b+sqrt (b^2+4))/2)|^(n+1) =b*((java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
sqrt (b^2+4))/2)|^(n+1) * ((b+sqrt (b^2+4))/2)) + ((b+sqrt (b^2+4))/2)|^(n+1)
    by NEWTON:6
      .=((b+sqrt (b^2+4))/2)|^(n+1) * ((b^2+b*sqrt ( a1,2,,2  of   java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 70
    n+3 >=0+1 by XREAL_1:7;
    then
A12: s.(n+3) >= 0 by Th38;
A13: ((b+sqrt      g2  Morphismofb2,2
      .=((b+sqrt (b^2+4))/2)|^(n+1) * ((b+sqrt (b^2+4))/2)|^2 by NEWTON:8
      .=((b+sqrt (b^2+4))/2)   Hom(1,)<{}&Homb1,c1)>}& Hom(2b2<{}&Hom(,c2)<{java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
      .=((b+sqrt (b^2+4))/2)|^(n+1) * (( holds( [] g2 *(f1 []f2 =(1f1) x (2*2)
    ^2)/(2*2))
      .Cjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 43
    by SQUARE_1:def 2
      .=((java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
A14: s2.(n+2+1) =s.(n+1+2)*s2.(n+1+1)+s2.(n+1) by Def6
      .=s.(n+3)*s2.(n+1+1)+s2.(n+1);
    s.(n+3) <= b & s2.(n+1+1) >= 0 by A1,Th51;
    then s.(n+3)*s2.(n+1+1) <= b*((b+sqrt (b^2+4))/2)|^(n+1+1) by A10,A12,
XREAL_1:66;
    hence thesis by A9,A14,A11,A13,XREAL_1:7;
  end;
  java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 19
  then b^2+b*sqrt (b^2+4) >= b^2+b*b by XREAL_1:6;
  then b^2+b*sqrt (b^2+4)+2 >= b^2+b^2+2 by XREAL_1:6;
  then
A15: (b^2+b*sqrt (b^2+4)+2)/2 >= (2*(b^2+1))/2 by XREAL_1:72;
  ((b+sqrt (b^2+4))/2)|^(1+1) =((b+sqrt (b^2+4))/2)^2 by WSIERP_1:1
    .=(b^2+2*b*sqrt (b^2+4)+(sqrt (b^2+4))^2)/(2*2)
    .=(b^2+2*b*sqrt (b^2+4)+(b^2+4))/(2*2) by SQUARE_1:def 2
    .=(b^2+b*sqrt (b^2+4)+2)/2;
  then
A16: P[1] by A5,A15,XXREAL_0:2;
  s2.(0+1)=s.1    . g1*(b1,2 *f[ )A,
  then
 [  ,2;
  for n being Nat holds P[n] from FIB_NUM:sch 1(A17,A16,A8);
   ;
end;

theorem
  n1=(.n+) =)n gcd  java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
proof
  set s=scf(r);
  set s2=c_d(r);
  defpred X[Nat] means for n1,n2    =(r2c,*g [])*f x 
  1;
    . pr2,c2 *(g1 x] g2)*( x )
  proof
    let k;
    k+2>=0+1 by XREAL_1:7;
      n4 =s(+2) as Element  NAT by Th38INT_13java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
    reconsider n3 = s2.(k+2) as Element of NAT by Th50;
    reconsider n2=s2.k as Element of NAT by Th50;
    reconsider n1=s2.(k+1) as Element of NAT by java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 13
    assume for n1,n2 st n1=s2.(k+1) & n2=s2.k holds n1   for C being with_binary_products non empty category, a,b Object  C
    then
A2: n1 gcd n2 = 1;
    n3 = n4 * n1 + n2 by Def6;
    hence thesis by A2,EULER_1:8;
  end;
A3: X[0]
  proof
    let n1,n2 such that
    n1=s2.(0+1) and
A4: n2=s2.0;
    n1 gcd 1 = 1 by NEWTON:51;
     thesisby A4,;
  end;
  for n holds X[n] java.lang.StringIndexOutOfBoundsException: Range [48, 21) out of bounds for length 48
  hence thesis;
end;

theorem Th58:
  (for n holds scf(r).n > 0) implies for n holds c_d(r).(n+1)/c_d(
  r).n >= 1/scf(r).(n+2)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  set s=scf(r);
  set s1=c_d(r of [ ,bjava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 72
  defpred X[Nat] means s1.($1+1)/s1.$1 >= 1/s.($1+2);
  assume
A1: for n holds scf(r).n > 0;
  then
A2: scf(r).1<>0;
A3: for n st X[n] holds X[n+1]
  proof
    let n;
    assume s1.(n+1)/s1.n >= 1/s.(n+2);
    set r=s1.(n+1);
A4: s.1 > 0 by A1;
    then
:.+> ;
    n+3>=0+1 & s.(n+3) <>0 by A1,XREAL_1:7;
    then s.(n+3)>=1 by Th40;
    then
A6: 1/s.(n+3)<=1/1 by XREAL_1:118;
    n+2>=0+1 & s.(n+2) <>0 by A1,XREAL_1:7;
    then
A7: s.(n+2)>=1 by Th40;
A8: s1.n>0 by A4,Th52;
    s1.(n+2)/s1.(n+1)=(s.(n+2) * r + A2:Hom(c2 [x] a, b)<>{};
      .=(s.(n+2) * r)/r + s1.n/r
      .=s.(n+2)* (r/r) + s1.n/r
      .=s.(n+2)+ s1.n/r by A5,XCMPLX_1:88;
    then s1.(n+2)/s1.(n+1)>=1+0 by A5,    assume
    hence thesis by A6,XXREAL_0:2;
  end;
  scf(r).2<>0 by A1;
  then s.(0+2)>=1 by Th40;
  then
XREAL_1118;
  s1.0 = 1 & s1.1 = s.1 by Def6;
  then s1.(0+1)/s1for  , e2 e1* (1[] )h=java.lang.StringIndexOutOfBoundsException: Range [75, 76) out of bounds for length 75
  then
A10: X[0] by A9,XXREAL_0:2;
] NAT_1schA10)
  hence thesis;
end;

theorem
  (for n holds scf(r).n > 0) implies for n holds c_d(r).(n+2) <= 2*scf(r
  h1c     ( [])  
proof
  assume
A1: for n holds java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 9
  let n;
  set s=scf(r);
  set s1=c_d(r);
:.+   java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  s.1 > 0 by A1;
  then
A3: s1.n > 0 by Th52;
A4: s1.(n+1)/s1.n >= 1/s.(n+2) by A1,Th58;
  s1.(n+1)/s1.n * s1.n =s1.n / s1.n * s1.(n+1) .=s1.(n+1) by A3      proof
  then
A5 .n1 =s1n/s.2),,java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
  s1.n / s.(n+2) * s.(n+2) =s.(n+2) /A8:e2=e1  g[]id-a)&for h1  java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  then s1.(n+1) * s.(n+2) >= s1.n byg=by,,;
  then s1.(n+1) * s.(n+2) + s1.(n+1) * s.(n+2)>= s1.n+s1.(n java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
XREAL_1:6;
  hence thesis by Def6;
end;

theorem
  (for n holds []c1x )>  ,,java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 50
  n)^2) <= 1/(c_d(r).n)^2
proof
  assume
A1: for n holds scf(r).n <>0;
  let n;
 srjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  set s2=c_d(r);
s.<0 A1
  then s.1>0 by Th38;
  then
A2: s2.n>0 by Th52;
  n+1>=       = e1 *(gf)x]d-)by ,AT_718
  then s.(n+1)*(s2.n)^2 >= 1*(s2.n)^2 by A2,Th40,XREAL_1:64;
  hence thesis by A2,SQUARE_1:12,XREAL_1:118;
end;

theorem
  (for n holds scf(r).n<>0) implies for n holds c_d(r).(n+1) >= tau |^ n
proof
=(;
  set s=scf(r);
  defpred P[Nat] means s2.($1+1) >= tau |^$1;
  sqrt 5 < sqrt 3^2 by SQUARE_1:27;
  then sqrt 5 < 3 by SQUARE_1:22;
  then 1+sqrt 5 < 1+3 by XREAL_1:8;
  then
A1: ((1+sqrt 5)/2)|^1 = (1+sqrt 5)/2 & (1+sqrt 5)/2 < 4/2 by XREAL_1:74;
  assume
A2: for n holds scf(r).n <>0;
  then
A3: s.1>=1 by Th40;
  then s2.(0+1)>=1 by Def6;
   
A4: P[0] by NEWTON:4;
  let n;
A5: for n being Nat st P[n] & P[n+1] holds P[n+2]
  
    let n be Nat;
    assume that
A6: s2.(n+1) >= tau|^n and
A7: s2.(n+1+1) >= tau|^(n+1);
A8: tau|^(n+1)+tau|^n =((1+sqrt 5)/2)        =e2  (d-c2[]d- a by;
    |^n by FIB_NUM:def 1,NEWTON:6
      .=((1+sqrt 5)/2)|^n * ((6+2*sqrt 5)/4);
    sqrt 5 >=0 by SQUARE_1:def 2;
    then (1+sqrt 5)/2 > 0 by XREAL_1:139;
    then
A9: tau|^(n+1) > 0 by FIB_NUM:def 1,PREPOWER:6;
A10: tau|^(n+2) =((1+sqrt 5)/2)|^n * ((1+sqrt 5)/2)|^2 by FIB_NUM:def 1
,NEWTON:8
      .=((1+sqrt 5)/2)|^n * ((1+sqrt 5)/2)^2 by WSIERP_1:1
      .=((1+sqrt 5)/2)|^n * ((1^2+2*1*sqrt 5+(sqrt 5)^2)/ 4)
      .=((1+sqrt 5)/2)|^n * ((1+2*sqrt 5+5)/ 4) by SQUARE_1:def 2
      .=((1+sqrt 5)/2)|^n * ((6+2*sqrt 5)/ 4);
 s2.n+2+)=s.n12*(+11)s2.n1  Def6
      .=s.(n+3)*s2.(n+1+1)assumep> ;
+3=0+  :7;
    then send;
    then java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 7
    hence thesis by A6    f
   integerbySEQ_11
h40java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
  then     yinrngf
  then
.+ = +byXREAL_16
  java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
    ..  .    
+1 by Def6
  
:2;
nNat Pn]rom FIB_NUM:h 1(413,A5;
  thesisjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
;

theorem
  a > 0 &fissequence  NATdomfNAT&forx  x  NAT .  
=asqrt (2)/|java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
proof
  assume that
A1: a > 0 and
A2: for java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 6
  set end;
2=_()java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  defpred P[Nat] means s2.($1+1) >= ((a+sqrt (a^2+4))/2)|^$1;
A3: s   m,n  Nat;
 .=  ;
  then s2.(0+1)>=1 by Def6;
  then
:[ NEWTON4java.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
  s.2>0 by A1,A2;
      end
  then
A5: s.2*s.1+1 >= s.1
  s.1 >= a by A2;
  then s.1+1 >= a+1 by XREAL_1:6;
  then
A6: s.2*s.1+1 >= a+1 by A5,XXREAL_0:2;
  4*a > 0 by A1,XREAL_1:129;
  then a^2+4 < a^2+4 + 4*a by XREAL_1:39;
  then sqrt (a^2+4) < sqrt (a+2)^2 by SQUARE_1:27;
  then sqrt (a^2+4) < a+2 by SQUARE_1:22;
  then a+sqrt (a^2+4) < a+(a+2) by XREAL_1:8;
  then
A7: ((a+sqrt (ajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  a+2*1 )/2 by XREAL_1:74;
  let n;
A8: for n being Nat st P[n] & P[n+1] holds P[n+2]
  roof
    let n be Nat;
    assume that
A9: s2.(n+1) >= ((a+sqrt (a^2+4))/2)|^n and
:.11 =(asqrta24)2|(+)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
A11: a*
    ^2+4))/2)|^n * ((a+sqrt (a^2+4))/2)) + ((a+sqrt (a^2+4))/2)|^n by NEWTON:6
      .(+a+)/)^*((2a* (24+)2;
    sqrt (a^2+4) > 0 by SQUARE_1:25;
    then (a+sqrt (a^2+4))/2 > 0 by XREAL_1:139;
    then
:(asqrt a24)2|(+1  0 by :6;
A13: ((a+sqrt (a^2+4))/2)|^(n+2) =((a+sqrt (a^2+4))/2)|^n * ((a+sqrt (a^2+
    4))/2)|^2 by NEWTON:8
      .=((a+ end;
      .=((a+sqrt (a^2+4))/2)|^n * ((a^2+2*a*sqrt (a^2+4)+(sqrt (a^2+4))^2)/(
    2*2))
      .=((a+sqrt (a^2+4))/2)|^n * java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
SQUARE_1:def 2
      .=((a+sqrt (a^2+4))/2)|^n * ((a^2+a*sqrt (a^2+4)+2  let    with_binary_products  ;
 .n+1 s.(++)s(+1+1)s2.n+)by Def6
      .=s.(n+3)*s2.(n+1+1)+s2.(n+1);
    s.(n+3) >= a by A2;
    then s.(n+3)*s2.(n+1+1) >= a*((a+sqrt (a^2+4))/2)|^(n+1) by A10,A12,
XREAL_1:66;
    hence thesis by A9,A14,A11,A13,XREAL_1:7;
  end;
  s2.(1+  end
    .=s.2*s2.1+1 by Def6
    .=s.2*s.1+1 by Def6;
  then
A15: P[1] by A6,A7,XXREAL_0:2;
  for n being Nat     C with_exponential_objects emptycategoryjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
  hence thesis;
end;

theorem
  c_n(r).(n+2) / c_d(r).(n+2) = (scf(r).(n+2      holdsy   by ,,ef29
  / (scf(r).(n+2) * c_d(r).(n+1) + c_d(r).n)
proof
  c_n(r).(n+2) = scf(r).(n+2) * c_n(r).(n+1) + c_n(r).n by Def5;
  hence thesis by Def6;
end;

theorem Th64:
  c_n(r).(n+1)*c_d(r).n - c_n(r).n*c_d(r).(n+1) = (-1)|^n
proof
  set s=scf(r), s1=c_n(r),s2=c_d(r);
  defpred G[Nat] means s1.($java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 24
A1: s2.0 = 1 & s2.1 = s.1 by Def6;
A2: for n st G[n] holds G[n+1]
      con L  ofHomc[]a,), Hom(c,b|^a) suchthat
    let l;
    assume
:.l+)*2ls1l*s2(+1=-)^ljava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    s1.(l+2)*s2.(l+1)-s1let k  ;
    +1)-s1.(l+1)*s2.(l+2) by Def5
      =s.l+2) *s1.l+1)*s2.(l+1) + s1.l*2   
    .+1  .
      .=(-1)*      onsiderA:orn being.(2=g. modg(+;
      .=(-1)|^(l+1) by A3,NEWTON:6;
    hencethesis;
  java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
  .0 = .0 &s1. =s. * s. + 1 Def5java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 44
 
A4:   y(,|a) []y A94
 holds[] from :sch 2A4,A2)
  java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
end;

theorem Th65
   holds c_d(.n>) implies c_n()(+1c_d(.n1 java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
  c_n(r).n/c_d(r).n = (-1)|^n / (c_d(r).(n+1)*c_d(r).n)
proof
s1=(r) =_()
  assume for n holds s2.n<>0;
  then s2.    proof
  then:fornbeing Natholds f.2  (nf.f(+1)byA4java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
  s1.(n+1)/s2.mn.1 =n modSeqm       in( ]a)yA1:ef java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 44
  n). modmodSeq(,.byDef1
=-)^ ((+*n  java.lang.StringIndexOutOfBoundsException: Range [39, 40) out of bounds for length 39
  hence thesis;
nd

theorem Th66:
  c_n(java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 5
proofa > java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
s1)c(rs=r;
n)s(+2s1.)n).s1.s2n+)
  
a<b;
        . =0;
    .=(-1)|^n *  ;
  hence thesis;
end;

theorem
  ( n(r.<0 c_nr.n+ c_n()n
  /c_d(r)      per  byA5,XREAL_01

s s1c_nr,s2cdr)s=()
  assume for n holds s2.n<>0;
  thens2.n<0&s2.n2<0java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
       fm. = ;
  s1.(n          endjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
)*s2.)by :130
)|^  +)(s2.n+)*n  ;
  hence thesis;
theo Th16:

theorem
  (for n holds scf(r).n<>0) implies for n st n >= 1 holds c_n(r).n / c_d
  (). =(r.(+)-(r)(-1)/(r.(n+)c_d(r).(n-1))
oof
  set s1=c_n(r), s2=c_d(r);
  set s=()java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
   [Nat]means .1s2.1=s1.$1+)-.$-)/s2(11-.(1-));
      ;
A1: for n holds scf(r).n<>0;
A2A5 +0  1by:;

    let n be Nat;
    that
    n>=1 and
    ns2.=s1(+1)-s1(n-1))(.n+)s2.n1)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
    s.(n+2) * s1.(n+1) + s1.n - s1.n = s1.(n+2) - s1.n & s2.(n+2) - s2.n =
    .n+ )*s2.n1  s2.  s2. by Def5       inHom,bajava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
    hence thesis by A1,XCMPLX_1:91;
  end;
  let n;
  (s1.(1+1)-s1.(      set =evalab  h[]id-a;
  )/(s2.(2+0)-s2.A17: f1 inHom( []a,)byA1,:ef3;
    .=(s.2 * s1.1 + s1.0-s1.0)/(s.2 * s2.1 + s2.0-s2.0) by Def6
    .=s1.1/s2.1 by A1,XCMPLX_1:91;
  
A3: P[1];
  forforh0  . A18
  hence thesis;
end;

theorem
   ;
  .(n+1) 
proof
  set s1=c_n(r), s2=c_d(r);
  assume
A1: for n holds s2.n<>0;
  let n;
  reconsider n as Element of NAT by ORDINAL1:def 12;
  |.s1.(n+1)/s2.(n+1)-s1.n/s2.n.| =|. (-1) |^n / (s2.(n+1)*s2.n).| by A1
,Th65
    .=|. (-1) |^n .| / |.s2.(n+1)*s2.n.| by COMPLEX1:67
    .=|. (-1) to_power n .| / |.s2.(n+1)*s2.n.| by POWER:41
    .=(|.-1.| to_power n) / |.s2.(n+1)*s2.n.| by SERIES_1:2
    .=((-(-1)) to_power n) / |.s2.(n+1)*s2.n.| by ABSVALUE:def 1
    .=1 / |.s2.(n+1)*s2.n.| by POWER:26;
  hence thesis;
end;

theorem
  scf(r).1 > 0 implies for n holds c_n(r).(2*n+1) / c_d(r).(2*n+1  
  (r).(2java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
proof
  set s1=c_n(r), s2=c_d(r),     thus .b11  .b+11). .b divfm.b+) Def2
defpredX]eans s1.*+s.2*1s1($)s2($)
    
.s01by Def6
    .=s  end;
  assume;
A2: scf(r).1>0;
A3:fornst X[]holds X[n+1]
  proof
     n;
    assume s1.(2*n+1)/s2.(2*n+1)>s1..=0by A10;
    reconsider n as.  by ;
    s1.(2*(n+      k > java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 7
    )) by Th64
.=1|(*(+))by :
      .=1;
    then
A4: s1.( .=0by A13;
0       kjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    thesisby A4,:06java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  ;
;
   .=(.1 *s. 1  s. by Def6
    .=send;
  then
 [0]by ,1XREAL_129java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  a<b;
   thesisjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
ndjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4


   r beReal;
::$N Convergents of continued fraction
  func java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 11
  hencethesis      y beingobjectsty the     [,]
  (r)java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  ;
nd

notation
  let r be Real;
  synonym cocf(r)end;
end;

theorem
  cocf(r).0 = scf(r).0
proof
  thus cocf(r).0 = c_n(r).0 * ((c_d(r))").0 by SEQ_1:8
    .=c_n(r).0 * (c_d(r).0)" by VALUED_1:10
    .=c_n(r).0 *(1/c_d(r).0)
    .=c_n(r).0 /c_d(r).0
    .=(scf(r)).0 / c_d(r).0 by Def5
    .=(scf(r)).0 / 1 by Def6
    .=scf(r).0;
end;

theorem Th72:
  scf(r).1 <> 0 implies cocf(r).1 = scf(r).0 + 1 / scf(r).1
proof
  set s=scf(r);
  assume
A1: scf(r).1<>0;
  thus cocf(r).1 = c_n(r).1 *   setg =NAT->0;
    .=c_n(r).1 *A1  x  object stxidom 
    .=c_n(r)       as   ;
    .=c_n(r).1 /c_d(r).1
    .A:Pn;
    .=(s.1 *       
    .=s.0 +1 / s.1 by A1,XCMPLX_1. ;
end;

theorem    0= 0 
  (n  ()n>)impliescocfr. =scfr.    s
  ()1  1/scf(r)2java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
proof
  set s=scfendjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
ocfr. cn). *(c_d(r)").2 by SEQ_1:
   =_r.  cd)2" by 10
    .=c_n(r).2  proof
    .=c_n(r).2 /c_d(r).2;
  
A2: for 
  then
A3: sA1: for x being object st x in dom fd holds fd.x = g.x
A4: c_d(r).2 =s.(0+2)*c_d(r).(0+1) + c_d(r).0 by Def6
    .=s.2*s.1+c_d(r).0 by Def6
    .=s.2*s.1+1 by Def6;
A5:c_n()2 =.02  ()(+)+c_n(r).  
    .=s.2*(s.1 * s.0 +1) +c_n(r).0 by Def5
    .=s.2 * s.1 * s.0 +  proof
>0by A2;
   s.0 /s11/2 s01(s1 *2+) .2) by XCMPLX_1:13
    .=s.0 + A2: for x beiNat  [] P[x+1]
    .=(sassume
    .=java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  hence thesis;
   suppose

theorem Th74:
  (for n java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 11
  ).1 + 1/(scf(r).2 + 1/scf(r).3))
proof;
  set sh thesisby A1java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
A1: cocf(r).3 =c_n(r)java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    .=c_n(r).3 * (c_d(r).3)" 
         x  ;
    .=c_n(r).3 /c_d(r).3;
  assume
A2: for n holds scf(r).n>0;
  then
A3: s.1>0;
A4: c_d(r).2 =s.(0+2      where F1,F2is C1,,
    .=s.2*s.1+c_d(r).0 by Def6
    .=s.2*s.1+1 by Def6;
A5: c_d(r).3 =s.(1+2)*c_d(r).(1+1) + c_d(r).1 by Def6
    .=s.3*(s.2*s.1+1)+s.1 by A4,Def6
    .=s.1*(s.2*s.3 +1)+s.3;
A6: c_n(r).2 =s.(0+2) * c_n(r).(0+1) + c_n(r).0 by Def5
    .=s.2*(s.1 * s.0 +1) +c_n(r).0 by Def5
    .=s.2 * s.1 * s.0 +s.2 +s.0 by Def5;
A7: c_n(r).3 =s.(1+2)A2 P0;
    .=s.3*(s.2 * s.1 * s.0 +s.2 +s.0) +(s.1 * s.0 +1) by A6,Def5
    .=(s.3*s.2 * s.1 * s.0) +s.3*s.2 +s.3*s.0 +s.1 * s. then fm. =0java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
A8: s.2>0 by A2;
A9:Lm4  k stmodSeq(,)k=0CAT_6: ;
  then s.0 + 1/ defpredP[ means    . =$;
  byXCMPLX_113
    .=s.0 + 1/(s.1 + s.3/(s.2*s.3 + 1)) by XCMPLX_1:57
    .=s.0 + 1/((s.1*(s.2*s.3 + 1) + java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 26
    .=s.0 +(s.2*s.3     w = .k1;
    .(.*(s.*java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
    A3A,,XCMPLX_1:113;
  hencethus thesis;
end;

theorem
fornholds(.n>) impliesfor n stn>1holdsc_nr)(*+)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
  c_d(r).(2*n+1) < c_n(r).(2*n-1) / c_d(java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 35
proof
  set s=scf(r), s1=c_n(r), s2=c_d(r);
  defpred  it.       c,1dF;
  assume
A1: for n A1: for n beingfor beingof REAL
  then
A2: s.3>0;
.  ().3  (c_d()")3 by SEQ_18
      yas ElementofREAL by d 1
    .= c_n(r).3 *(     thus [,,y]by ;
 /c_dconsiderbeingREALthat
  thenA4:forn   holds [nfn,f.(n+)]from RECDEF_1
A3: s1.(2*1+1)/s2.(    hus f.0=rbyA3;
    .= s.0 + 1/(s.1 + 1/((s.  end;
   =.+1(.  s.3/(s.2*s.3 + 1)) by XCMPLX_1:57;
  let n;
A4: s.1>0 by A1;
A5: scf(r).1 > 0 by A1;
A6: for n being Nat st n>=1 & X[n] holds X[n+1]
  proof
      beNatjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    assume that
    n= 
    s1.(2*n+1)/s2.(2*n+1)<s1.(A:for being holdsPng1n,.n1) by A7;
    s1.(2*(n+1)+1)*s2.(2*(n+1)-1)-s1.(2*(n+1)-1)*s2.(2*(n+1)+1) =(s.(2*n+
    1+2) * s1.(2*n+1+1) + s1.(2*n+1))*s2.(2*n+1)-s1.(2*n+1)*s2.(2*n+3) by Def5
      .=(s.(2*n+1+2) * s1.(2*n+1+1) + s1.(2*n+1))*s2.(2*n+1) -s1.(2*n+1)*(s.
    (2*n+1+2) * s2.(2*n+1+1) + s2.(2*n+1)) by Def6
      .=s.(2*n+1+2)*(s1.(2*n+1+1)*s2.(2*n+1)-s1.(2*n    take;
      .=s.(2*n+1+2) * (-1)|^(2*n+1) by Th64
      .=s.(2*n+1+2) * (-1|^(2*n+1)) by WSIERP_1:2
      .s.2*+1+2) -)java.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
    then s1.(2*(n+1)+1)*s2.(2*(n+1)-1)-s1A:.0 = r1by ;
:;
    then
A7:   let r r Real;
    .2*1> &s2.n)  ,Th52;
    hence thesis by A7,XREAL_1:106;
  end;
         ::
  then s.3/(s.2*s.3 + 1)>0 by A2,XREAL_1:139;

 /s. s3(.*s.  ))1/. by A4,:,76;
  java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
.*s +/ Def6
    .= s.0 +1 / s.1 by A4,XCMPLX_1:113;
  then
 [] byA8,XREAL_18;
  for n being Nat st n>    hence  by ;
  hence thesis;
end;

theorem
  (for    let  Element ;
  c_dthusdmorphismofC[]1, c2 C2,
proof
  set s=scf(r), java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 0
  defpred X[Nat] means s1.(A8:d=[,;
  
A1: for n holds scf(r).java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  then
A2: s.1>0;
A3: scf(r).1 > 0 by A1;
A4: for n being Nat   assume that
  proof
    let n be Nat;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    n>=1 and
    (*/.(*n)>(*-)/2.2*n-)
    s1.(2*(n+1))*s2.(2*(n+1)-2)-s1.A4:   being   P[a]holds P[+]
    *    proof
      .= (s.(2*n+2) * s1.(2*n+1) + s1.(2*n))*s2.A5:   P[]java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
    s2.(2*n+1) + s2.(2*n)) by Def6.a  A1,A7
      .= s.(2*n+2) * (s1.(2*n+1) *s2.(2*n
      . .2n+)* (1|^2**)by
. .2n+)*(|  c2be  of,F12be Functor of C12 
          . 0;
      .= s.(2*n+2)A10     [c]&E.   =F12endjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 10
then
A5: s1.(2*(n+1))*s2  end;
      F Functorof
      rfs(). =0 &n < m  scf()m =0
  end;
  let n;
A6:    = [0]byTh27
    .=s.0/1 by Def6
    .=s.0;
A7: s.2>0 by A1;
  cocf(r).2    then
    .= c_n(r).2 * (c_d(r).2)"A13:Eis -reserving by CAT_6d;
    .= c_n(r).2 *(1/c_d(r).2)
    .= c_n(r).2 /c_d(r).2;
  .21/.21) .0 /s1 /2byT
    .= s.0+1/((s.1 * s.2 +1)/ s.2) by A7,XCMPLX_1proof
    .= s.0 + s.2/(s.1 * s.2 +1) by XCMPLX_1:57;
  then
A8: X[1] by A2,A7,A6,XREAL_1:29,139      assume
  for n being Nat st n>=1 holds X[n] from NAT_1:sch 8(A8,A4);
  hence A14:  f1 |> f2
end;

theorem
  (for n holds scf(r).n> c12be ofC2,    ,C2 
  c_d(r).(2*n) < c_n(r).(2*n-1A15:f1 =[1,  .f1=&c12 .    `  ;
proof
  set s=scf(r), s1=c_n(r), s2=c_d(r);
  defpred X[Nat] means s1.(2*$1)/s2.(2*$1)<s1.(2*$1-1)/s2.(2*$1-1);
  
A1: for n holds rfs(i)(+1  0
  .0 20java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  proo
A2: 1/(s.1A3:P[]java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  let n;
 scf()10by A1;
A4: for n being   rfs(i).(0+1) = 1 frac(rfs()0)by Def3
  proof
    let n be Nat;
    assume that
    n>=1 and
    s1.(2*n)/s2.(2*n)<s1.(2*n-1)/s2.(2*n-1);
    s1.(2*(n+1))*s2.(2*(n+1)-1)-s1.(2*(n+1)-1)*s2.(2*(n+1)) =  defpred]means ().(11)=0&scf(i).(an style='color: green'>11  ;
    *s2.(2*n+1)-s1.(2*n+1)*s2.(2*n+1+1)
      .=(-1)|^(2*n+1) by Th64
      .=(-1|^(2*n+1)) by WSIERP_1:2
      .=-1;
    then
A5: s1.(2*(n+1))*s2.(2*(n+1)-1)<s1.(2*(n+java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 11
    s2.(2*n+1)>0 & s2.(2*n+2)>0 by.=0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
        =[\/ Th29
  end;
  cocf(r).1 = c_n(r).1 * ((c_d(r))").1 by SEQ_1:8
    .= c_n(r).1 * (c_d(r).1)" by VALUED_1:10
    .= c_n(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    .= s1.(2*1-1)/s2.(2*1-1);
  then
A6: s1.(2*1-   [Nat] means (r)(12)=0&scf()(1)=0
r)2 (r.*(c_d()".  SEQ_1:java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
    .= c_n(r).2 * (c_d(r).2)" by VALUED_1:10
    .= c_n(r).2 *(1/c_d(r).2)
    .==(
  then s1.(2*1)/s2.(2*1) = s.0A6  n st []holdsP[+1]
  
A7: X[1] by A6,A2,XREAL_1:8;
  for n 
  hence thesis;
end;

definition
  r e D category
  set s=scf(r);
 funcbackContinued_fraction >Real_Sequence means
  :Def8:
  it.0 = scf(r).0 & for n being Nat holds it.(n+1) = 1/it.n + scf(r    assume
  existence
  proof
    deffunc U(Nat,Real) = In(1/$2 + s.($1+1),REAL);
    consider f being Real_Sequence such that
A1: f.0 = s.0 and
A2: for n being Nat holds f.(n+1) = U(n,(f.n)) from NAT_1:sch 12;
    =reconsider   asemptycategory
    thus f.0 = java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 4
    let n;
    .n+    Functor ,java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    hence thesis;
e;
  uniqueness
  proof
    let s1,s2;
        x < 0
A3: s1.0=s.0 and
A4: for n holds    x > 1;
A5: s2.0=s.0 and
 0 <x    ;then
    defpred X    uppose
A7: for k st X[k] holds X[k+1]

      let k;
      assume s1.k =s2.k;
      hence s1.(k+1) = 1/s2  endjava.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
        . (ornholds( java.lang.StringIndexOutOfBoundsException: Range [31, 28) out of bounds for length 60
    end;
    let x be Element of  (d    F1iscovariant
A8: X[0] by A3,A5;
    for n holds X[n] from NAT_1:sch 2(A8,A7);
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 22
 
end;

notation
aljava.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
synonymbcfr backContinued_fraction r;
end;

theorem
  ()0> fornbcfr.n+1)c_nr.n1/r.java.lang.StringIndexOutOfBoundsException: Range [69, 70) out of bounds for length 69
proof
   c_nr;
  set s=scf(r);
  defpred X[Nat] means bcf(r).($1+1)=s1.($1+1)/s1.$1;
  set s3=bcf(r);
  assume
A1: scf(r).0 > 0;
:  stX]holdsX+1]
  proof
    let n;
    
A3: bcf(r).(n+1)=s1.(n+1)/s1.n;
A4: s1.(n+1)>0 by A1,Th45;
    bcf(r).(n+1+1) = 1/s3.(n+1)           beFunction  ofC1C2  
      .=s1.n/s1.(n+1)+ s.(n+1+1) by A3,XCMPLX_1:57
      .=(s1.n+ s.(n+2)*s1.(n+1))/s1.(n+1) by A4,XCMPLX_1:113
      .=s1.(         : ()
    hence thesis;
   java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  bcf)(0+1  /0 + .01  
    .=1/s.0 + s.1 by Def8
    .=(1+s    d;
    .s1/        
    .=s1.(0+1)/s1.0 by r).0 by Def3
  then
0]
  for n holds X[n] from NAT_1:sch 2(A5,A2)  
  hence thesis;
end;

Messung
CHZG
8010010093

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.127Angebot  ¤

*Eine klare Vorstellung vom Zielzustand







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,058
#Domains=861,596