reserve i,j,n,n1,n2,m,k,u for Nat,
        r,r1,r2 for Real,
        x,y for Integer,
        a,b for non trivial Nat;

theorem Th28:
  Px(a,n),Px(b,n) are_congruent_mod (a-b) &
  Py(a,n),Py(b,n) are_congruent_mod (a-b)
proof
  defpred P[Nat] means Px(a,$1),Px(b,$1) are_congruent_mod (a-b) &
                       Py(a,$1),Py(b,$1) are_congruent_mod (a-b);
  Px(a,0) = 1 = Px(b,0) &
  Py(a,0) = 0 = Py(b,0) by Th6;
  then
A1: P[0] by INT_1:11;
A2: for n st P[n] holds P[n+1]
  proof
    set A=a^2-'1,B= b^2-'1;
    A = a^2 -1 & B = b^2-1 by NAT_1:14,XREAL_1:233;
    then A-B = (a-b)*(a+b);
    then
A3:   A,B are_congruent_mod (a-b) by INT_1:def 5;
    a-b = 1*(a-b);
    then
A4:   a,b are_congruent_mod (a-b) by INT_1:def 5;
    let n such that
A5:   P[n];
A6:   Px(a,n+1) = Px(a,n)*a + Py(a,n)*A &
      Px(b,n+1) = Px(b,n)*b + Py(b,n)*B by Th9;
A7:   Py(a,n)*A,Py(b,n)*B are_congruent_mod (a-b) by A5,A3,INT_1:18;
    Px(a,n)*a,Px(b,n)*b are_congruent_mod (a-b) by A5,A4,INT_1:18;
    hence Px(a,n+1),Px(b,n+1)  are_congruent_mod (a-b) by A6,A7,INT_1:16;
A8:   Py(a,n+1) = Px(a,n) + Py(a,n)*a& Py(b,n+1) = Px(b,n) + Py(b,n)*b by Th9;
    Py(a,n)*a,Py(b,n)*b are_congruent_mod (a-b) by A4,A5,INT_1:18;
    hence Py(a,n+1),Py(b,n+1) are_congruent_mod (a-b) by A8,A5,INT_1:16;
  end;
  for n holds P[n] from NAT_1:sch 2(A1,A2);
  hence thesis;
end;
