reserve k,m,n,p for Nat;
reserve x, a, b, c for Real;
reserve F, f, g, h for Real_Sequence;

theorem
  for F being Real_Sequence st
  (for n being Element of NAT holds F.n = Fib(n+1)/Fib(n))
  holds F is convergent & lim F = tau
proof
  deffunc ff(Nat) = (tau to_power $1)/(sqrt 5);
  let F;
  consider f such that
A1: for n being Nat holds f.n = Fib(n) from SEQ_1:sch 1;
  set f2 = f ^\ 2;
  set f1 = (f ^\ 1);
A2: f1 ^\ 1 = f ^\ (1 + 1) by NAT_1:48
    .= f2;
A3: for n holds f2.n <> 0
  proof
    let n;
    f2.n = f.(n+2) by NAT_1:def 3
      .= Fib((n+1) + 1) by A1;
    hence thesis by Lm3;
  end;
 reconsider jj=1 as Element of REAL by XREAL_0:def 1;
A4: for n being Nat holds (f2 /" f2) . n = jj
  proof
    let n be Nat;
    (f2 /" f2).n = (f2.n) * (f2.n)" by Th10
      .= (f2.n) * ( 1/ (f2.n))
      .= 1 by A3,XCMPLX_1:106;
    hence thesis;
  end;
  then
A6: (f2 /" f2) is constant by VALUED_0:def 18;
A7: (f /" f) ^\ 2 = (f2 /" f2) by SEQM_3:20;
  then
A8: f /" f is convergent by A6,SEQ_4:21;
  (f2 /" f2) . 0 = 1 by A4;
  then lim (f2 /" f2) = 1 by A6,SEQ_4:25;
  then
A9: lim (f /" f) = 1 by A6,A7,SEQ_4:22;
  ex g st for n being Nat holds g . n = ff(n) from SEQ_1:sch 1;
  then consider g such that
A10: for n being Nat holds g.n = ff(n);
  set g1 = g ^\ 1;
A11: for n being Nat holds g.n <> 0
  proof
    let n be Nat;
A12: (sqrt 5) " <> 0 by SQUARE_1:20,27,XCMPLX_1:202;
A13: (tau |^ n) <> 0 by Lm12,PREPOWER:5;
    g.n = (tau to_power n) / (sqrt 5) by A10
      .= (tau to_power n) * (sqrt 5)"
      .= (tau |^ n) * (sqrt 5)" by POWER:41;
    hence thesis by A13,A12,XCMPLX_1:6;
  end;
  then
A14: g is non-zero by SEQ_1:5;

A15: (f2 /" f1) = (f2 /" g1) (#) (g1 /" f1) by Th9,A14;
  set g2 = g1 ^\ 1;
  for n being Nat holds f1.n <> 0
  proof
    let n be Nat ;
    f1.n = f.(n+1) by NAT_1:def 3
      .= Fib(n+1) by A1;
    hence thesis by Lm6;
  end;
  then
A17: f1 is non-zero by SEQ_1:5;
  for n being Nat holds (g2 /" f2).n <> 0
  proof
    let n be Nat ;
A19: (g2.n) <> 0 by A14,SEQ_1:5;
A20: (g2 /" f2).n = (g2.n) * (f2.n)" by Th10;
    (f2.n)" <> 0 by A17,A2,SEQ_1:5,XCMPLX_1:202;
    hence thesis by A19,A20,XCMPLX_1:6;
  end;
  then
A21: (g2 /" f2) is non-zero by SEQ_1:5;
  g2 = g ^\ (1 + 1) by NAT_1:48;
  then
A22: (g2 /" f2) = (g /" f) ^\ 2 by SEQM_3:20;
A23: for n holds f1.n = Fib(n+1)
  proof
    let n;
    f1.n = f.(n+1) by NAT_1:def 3
      .= Fib(n+1) by A1;
    hence thesis;
  end;
  assume
A24: for n being Element of NAT holds F.n = Fib(n+1)/Fib(n);
  for n being Element of NAT holds F.n = (f1 /" f). n
  proof
    let n be Element of NAT;
    (f1 /" f). n = (f1 . n) / (f . n) by Th10
      .= Fib(n+1)/ (f.n) by A23
      .= Fib(n+1)/Fib(n) by A1;
    hence thesis by A24;
  end;
  then F = f1 /" f by FUNCT_2:63;
  then
A25: (f2 /" f1) = F ^\ 1 by A2,SEQM_3:20;
A26: (g2 /" g1) = (g1 /" g) ^\ 1 by SEQM_3:20;
A27: for n being Nat holds (g1 /" g) . n = tau
  proof
    let n be Nat;
A29: g.n = (tau to_power n) / (sqrt 5) by A10
      .= (tau to_power n) * (sqrt 5)"
      .= (tau |^ n) * (sqrt 5)" by POWER:41;
A30: g.n <> 0 by A11;
    g1.n = g.(n+1) by NAT_1:def 3
      .= (tau to_power (n + 1)) / (sqrt 5) by A10
      .= (tau to_power (n+1)) * (sqrt 5)"
      .= (tau |^ (n+1)) * (sqrt 5)" by POWER:41
      .= (tau * (tau |^ n)) * (sqrt 5)" by NEWTON:6
      .= tau * (g.n) by A29;
    then (g1 /" g).n = (tau * (g.n)) * ((g.n)") by Th10
      .= tau * ((g.n) * (g.n)")
      .= tau * 1 by A30,XCMPLX_0:def 7
      .= tau;
    hence thesis;
  end;
  tau in REAL by XREAL_0:def 1;
  then
A31: (g1 /" g) is constant by A27,VALUED_0:def 18;
A32: for x st 0 < x
  ex n being Nat st for m being Nat st n <= m holds |.(f".m) - 0.| < x
  proof
    let x;
    assume 0 < x;
    then consider k being Element of NAT such that
A33: k > 0 and
    0 < 1/k and
A34: 1/k <= x by Th3;
    for m being Nat st (k+2) <= m holds |.(f" . m) - 0.| < x
    proof
      let m be Nat;
      k + 2 = (k + 1) + 1;
      then
A36:  Fib(k+2) >= k+1 by Lm3;
      assume (k+2) <= m;
      then Fib(k+2) <= Fib(m) by Lm5;
      then k + 1 <= Fib(m) by A36,XXREAL_0:2;
      then
A37:  k + 1 <= f.m by A1;
      then 0 < f.m;
      then
A38:  0 <= (f.m)";
      k + 0 < (k+1) by XREAL_1:6;
      then
A39:  1/(k+1) < 1/k by A33,XREAL_1:88;
A40:  |.(f".m) - 0.| = |.(f.m)".| by VALUED_1:10
        .= (f.m)" by A38,ABSVALUE:def 1
        .= 1/(f.m);
      1/(f.m) <= 1/(k+1) by A37,XREAL_1:85;
      then 1/(f.m) < 1/k by A39,XXREAL_0:2;
      hence thesis by A34,A40,XXREAL_0:2;
    end;
    hence thesis;
  end;
  then
A41: f" is convergent by SEQ_2:def 6;
  then
A42: lim f" = 0 by A32,SEQ_2:def 7;
  deffunc ff(Nat) = (tau_bar to_power $1)/(sqrt 5);
  ex h st for n being Nat holds h . n = ff(n) from SEQ_1:sch 1;
  then consider h such that
A43: for n being Nat holds h.n = ff(n);
A44: for n holds f.n = g.n - h.n
  proof
    let n;
    f.n = Fib(n) by A1
      .= ((tau to_power n) - (tau_bar to_power n))/(sqrt 5) by Th7
      .= (tau to_power n)/(sqrt 5) - (tau_bar to_power n)/(sqrt 5)
      .= g.n - (tau_bar to_power n)/(sqrt 5) by A10
      .= g.n - h.n by A43;
    hence thesis;
  end;
  for n being Nat holds g.n = f.n + h.n
  proof
    let n being Nat ;
    f.n = g.n - h.n by A44;
    hence thesis;
  end;
  then g = f + h by SEQ_1:7;
  then
A46: (g /" f) = (f /" f) + (h /" f) by SEQ_1:49;
  for n being Nat holds |.h.n.| < 1
  proof
    let n being Nat ;
    h.n = (tau_bar to_power n)/(sqrt 5) by A43;
    hence thesis by Lm16;
  end;
  then
A48: h is bounded by SEQ_2:3;
  f" is convergent by A32,SEQ_2:def 6;
  then
A49: h /" f is convergent by A48,A42,SEQ_2:25;
  then
A50: (g /" f) is convergent by A8,A46;
  (g1 /" g) . 0 = tau by A27;
  then lim (g1 /" g) = tau by A31,SEQ_4:25;
  then
A51: lim (g2 /" g1) = tau by A31,A26,SEQ_4:20;
A52: (g1 /" f1) = (g /" f) ^\ 1 by SEQM_3:20;
  lim (h /" f) = 0 by A48,A41,A42,SEQ_2:26;
  then
A53: lim (g /" f) = 1 + 0 by A49,A8,A9,A46,SEQ_2:6
    .= 1;
  then
A54: lim (g2 /" f2) = 1 by A50,A22,SEQ_4:20;
  then (g2 /" f2)" is convergent by A50,A22,A21,SEQ_2:21;
  then
A55: (f2 /" g2) is convergent by SEQ_1:40;
A56: f2 /" g1 = (f2 /" g2) (#) (g2 /" g1) by A14,Th9;
  then
A57: f2 /" g1 is convergent by A31,A55,A26;
  then
A58: (f2 /" f1) is convergent by A50,A52,A15;
  hence F is convergent by A25,SEQ_4:21;
  lim (g2 /" f2)" = 1" by A50,A22,A54,A21,SEQ_2:22
    .= 1;
  then lim (f2 /" g2) = 1 by SEQ_1:40;
  then
A59: lim (f2 /" g1) = 1 * tau by A31,A56,A55,A26,A51,SEQ_2:15
    .= tau;
  lim (g1 /" f1) = 1 by A50,A53,A52,SEQ_4:20;
  then lim (f2 /" f1) = tau * 1 by A50,A59,A57,A52,A15,SEQ_2:15;
  hence thesis by A58,A25,SEQ_4:22;
end;
