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 Th30:
  sgn(2*x+y)*Py(a,|.2*x+y.|),-sgn(y)*Py(a,|.y.|)
    are_congruent_mod Px(a,|.x.|)
proof
  set i=x,j=y,A=a^2-'1;
  2*i+j = i+(i+j);
  then sgn(2*i+j)*Py(a,|.2*i+j.|) = Px(a,|.i.|)*sgn(i+j)*Py(a,|.i+j.|) +
    sgn(i)*Py(a,|.i.|)*Px(a,|.i+j.|) by Th25;
  then sgn(2*i+j)*Py(a,|.2*i+j.|) - sgn(i)*Py(a,|.i.|)*Px(a,|.i+j.|) =
  Px(a,|.i.|)*(sgn(i+j)*Py(a,|.i+j.|));
  then
A1: sgn(2*i+j)*Py(a,|.2*i+j.|), sgn(i)*Py(a,|.i.|)*Px(a,|.i+j.|)
  are_congruent_mod Px(a,|.i.|) by INT_1:def 5;
A2:sgn(i)*Py(a,|.i.|)*(A * sgn(i)*Py(a,|.i.|)*sgn(j)*Py(a,|.j.|)) =
  (sgn(i)*sgn(i)*Py(a,|.i.|))*(a^2-'1)*Py(a,|.i.|)*sgn(j)*Py(a,|.j.|)
  .= Py(a,|.i.|) * A*Py(a,|.i.|)*sgn(j)*Py(a,|.j.|) by Lm6;
A3: Px(a,|.i.|)^2 - (a^2-'1) *Py(a,|.i.|)^2 =1 by Th10;
  Px(a,|.i+j.|) = Px(a,|.i.|)*Px(a,|.j.|) +
    (a^2-'1) * sgn(i)*Py(a,|.i.|)*sgn(j)*Py(a,|.j.|) by Th25;
  then Px(a,|.i+j.|)- (a^2-'1) * sgn(i)*Py(a,|.i.|)*sgn(j)*Py(a,|.j.|) =
    Px(a,|.i.|)*Px(a,|.j.|);
  then Px(a,|.i+j.|), (a^2-'1) * sgn(i)*Py(a,|.i.|)*sgn(j)*Py(a,|.j.|)
  are_congruent_mod Px(a,|.i.|) by INT_1:def 5;
  then sgn(i)*Py(a,|.i.|)*Px(a,|.i+j.|),
    Py(a,|.i.|)*A*Py(a,|.i.|)*sgn(j)*Py(a,|.j.|) are_congruent_mod Px(a,|.i.|)
    by A2,INT_4:11;
  then
A4: sgn(2*i+j)*Py(a,|.2*i+j.|),
  (Px(a,|.i.|)^2-1)*sgn(j)*Py(a,|.j.|) are_congruent_mod Px(a,|.i.|)
    by A3,A1,INT_1:15;
  (Px(a,|.i.|)^2-1)*sgn(j)*Py(a,|.j.|)-(- sgn(j)*Py(a,|.j.|)) =
    Px(a,|.i.|) * (Px(a,|.i.|)*sgn(j)*Py(a,|.j.|));
  then (Px(a,|.i.|)^2-1)*sgn(j)*Py(a,|.j.|),- sgn(j)*Py(a,|.j.|)
    are_congruent_mod Px(a,|.i.|) by INT_1:def 5;
  hence thesis by A4,INT_1:15;
end;
