reserve a,b,n for Element of NAT;

theorem
  for n,m being Nat holds Fib(m) * Lucas(n) + Lucas(m) * Fib(n) = GenFib
  (Fib(0),Lucas(0),n+m)
proof
  let n,m be Nat;
  defpred P[Nat] means Fib($1)* Lucas(n) + Lucas($1)* Fib(n) = GenFib(Fib(0),
  Lucas(0),n+$1);
  2*Fib(n)= GenFib(0,2,n)
  proof
    defpred R[Nat] means 2* Fib($1)= GenFib(0,2,$1);
A1: R[1] by Th32,PRE_FF:1;
A2: for i being Nat st R[i] & R[i+1] holds R[i+2]
    proof
      let i be Nat;
      assume
A3:   ( R[i])& R[i+1];
      2* Fib(i+2)=2*(Fib(i)+Fib(i+1)) by FIB_NUM2:24
        .=2* Fib(i)+2* Fib(i+1)
        .= GenFib(0,2,i+2) by A3,Th34;
      hence thesis;
    end;
A4: R[0] by Th32,PRE_FF:1;
    for i being Nat holds R[i] from FIB_NUM:sch 1 (A4, A1, A2);
    hence thesis;
  end;
  then
A5: P[0] by Th11,PRE_FF:1;
  Lucas(n) + Fib(n) = GenFib(0,2,n+1)
  proof
    defpred Q[Nat] means Lucas($1) + Fib($1) = GenFib(0,2,$1+1);
A6: for j being Nat st Q[j] & Q[j+1] holds Q[j+2]
    proof
      let j be Nat;
      assume
A7:   ( Q[j])& Q[j+1];
      Lucas(j+2) + Fib(j+2)=Lucas(j)+Lucas(j+1)+Fib(j+2) by Th12
        .=Lucas(j)+Lucas(j+1)+(Fib(j) +Fib(j+1)) by FIB_NUM2:24
        .=GenFib(0,2,j+1)+ GenFib(0,2,j+2) by A7
        .=GenFib(0,2,j+3) by Th35
        .=GenFib(0,2,(j+2)+1);
      hence thesis;
    end;
    Lucas(1) + Fib(1)= 0+ GenFib(0,2,1) by Th11,Th32,PRE_FF:1
      .= GenFib(0,2,0+0)+ GenFib(0,2,0+1) by Th32
      .= GenFib(0,2,0+2) by Th34
      .= GenFib(0,2,1+1);
    then
A8: Q[1];
A9: Q[0] by Th11,Th32,PRE_FF:1;
    for j being Nat holds Q[j] from FIB_NUM:sch 1 (A9, A8, A6);
    hence thesis;
  end;
  then
A10: P[1] by Th11,PRE_FF:1;
A11: for k being Nat st P[k] & P[k+1] holds P[k+2]
  proof
    let k be Nat;
    assume
A12: ( P[k])& P[k+1];
    Fib(k+2)* Lucas(n) + Lucas(k+2)* Fib(n) = (Fib(k)+Fib(k+1))* Lucas(n)
    + Lucas(k+2)* Fib(n) by FIB_NUM2:24
      .=Fib(k)*Lucas(n)+Fib(k+1)* Lucas(n) + (Lucas(k)+Lucas(k+1))* Fib(n)
    by Th12
      .= GenFib(0,2,(n+k))+GenFib(0,2,(n+k)+1) by A12,Th11,PRE_FF:1
      .= GenFib(0,2,(n+k)+2) by Th34
      .= GenFib(Fib(0),Lucas(0),n+(k+2)) by Th11,PRE_FF:1;
    hence thesis;
  end;
  for k being Nat holds P[k] from FIB_NUM:sch 1 (A5, A10, A11);
  hence thesis;
end;
