reserve a,b,n for Element of NAT;

theorem
  for a,n being Element of NAT holds GenFib(a,a,n) = ((GenFib(a,a,0)) /
  2) * (Fib(n) + Lucas(n))
proof
  let a,b be Element of NAT;
  defpred P[Nat] means GenFib(a,a,$1)=((GenFib(a,a,0))/2)*(Fib($1)+Lucas($1));
A1: for k being Nat st P[k] & P[k+1] holds P[k+2]
  proof
    let k be Nat;
    assume that
A2: P[k] and
A3: P[k+1];
    GenFib(a,a,k+2)=((GenFib(a,a,0))/2)*(Fib(k)+Lucas(k))+GenFib(a,a,k+1)
    by A2,Th34
      .=((GenFib(a,a,0))/2)*(Fib(k)+Fib(k+1)+(Lucas(k)+Lucas(k+1))) by A3
      .=((GenFib(a,a,0))/2)*(Fib(k+2)+(Lucas(k)+Lucas(k+1))) by FIB_NUM2:24
      .=((GenFib(a,a,0))/2)*(Fib(k+2)+Lucas(k+2)) by Th12;
    hence thesis;
  end;
  GenFib(a,a,1)=a by Th32;
  then
A4: P[1] by Th11,Th32,PRE_FF:1;
A5: P[0] by Th11,PRE_FF:1;
  for k being Nat holds P[k] from FIB_NUM:sch 1 (A5, A4, A1);
  hence thesis;
end;
