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 Th31:
  sgn(4*x*n+y)*Py(a,|.4*x*n+y.|),sgn(y)*Py(a,|.y.|)
    are_congruent_mod Px(a,|.x.|)
proof
  defpred P[Nat] means
  sgn(4*x*$1+y)*Py(a,|.4*x*$1+y.|),sgn(y)*Py(a,|.y.|)
  are_congruent_mod Px(a,|.x.|);
A1: P[0] by INT_1:11;
A2: for n holds P[n] implies P[n+1]
  proof let n;set n1=n+1;
    assume
A3:   P[n];
    4*x*n1+y = 4*x + (4*x*n+y);
    then sgn(4*x*n1+y)*Py(a,|.4*x*n1+y.|),sgn(4*x*n+y)*Py(a,|.4*x*n+y.|)
      are_congruent_mod Px(a,|.x.|) by Lm7;
    hence thesis by A3,INT_1:15;
  end;
  for n holds P[n] from NAT_1:sch 2(A1,A2);
  hence thesis;
end;
