reserve a,b,n for Element of NAT;

theorem
  for a,n being Element of NAT holds GenFib(a,0,n+1) = a * Fib(n)
proof
  let a,n be Element of NAT;
  defpred P[Nat] means GenFib(a,0,$1+1)=a*Fib($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,0,(k+2)+1)=GenFib(a,0,(k+1)+2)
      .=a*Fib(k)+GenFib(a,0,(k+1)+1) by A2,Th34
      .=a*(Fib(k)+Fib(k+1)) by A3
      .=a*Fib(k+2) by FIB_NUM2:24;
    hence thesis;
  end;
  GenFib(a,0,2)=GenFib(a,0,0+2) .=GenFib(a,0,0)+GenFib(a,0,0+1) by Th34
    .=a+GenFib(a,0,1) by Th32
    .=a+0 by Th32;
  then
A4: P[1] by PRE_FF:1;
A5: P[0] by Th32,PRE_FF:1;
  for k being Nat holds P[k] from FIB_NUM:sch 1 (A5, A4, A1);
  hence thesis;
end;
