reserve n for Nat,
        i,j,i1,i2,i3,i4,i5,i6 for Element of n,
        p,q,r for n-element XFinSequence of NAT;
reserve i,j,n,n1,n2,m,k,l,u,e,p,t for Nat,
        a,b for non trivial Nat,
        x,y for Integer,
        r,q for Real;

theorem Th17:
  Px(a,|.2*x+y.|),- Px(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 Px(a,|.2*i+j.|) = Px(a,|.i.|)*Px(a,|.i+j.|) +
    A * sgn(i)*Py(a,|.i.|)*sgn(i+j)*Py(a,|.i+j.|) by HILB10_1:22;
  then Px(a,|.i.|)*Px(a,|.i+j.|) =
    Px(a,|.2*i+j.|) - A * sgn(i)*Py(a,|.i.|)*sgn(i+j)*Py(a,|.i+j.|);
  then
A1:  Px(a,|.2*i+j.|) , A * sgn(i)*Py(a,|.i.|)*sgn(i+j)*Py(a,|.i+j.|)
    are_congruent_mod Px(a,|.i.|) by INT_1:def 5;
  sgn(i+j)*Py(a,|.i+j.|) = Px(a,|.i.|)*sgn(j)*Py(a,|.j.|) +
  sgn(i)*Py(a,|.i.|)*Px(a,|.j.|) by HILB10_1:22;
  then Px(a,|.i.|)*(sgn(j)*Py(a,|.j.|)) =
    sgn(i+j)*Py(a,|.i+j.|) - sgn(i)*Py(a,|.i.|)*Px(a,|.j.|);
  then sgn(i+j)*Py(a,|.i+j.|) , sgn(i)*Py(a,|.i.|)*Px(a,|.j.|)
  are_congruent_mod Px(a,|.i.|) by INT_1:def 5;
  then
A2: (A * sgn(i)*Py(a,|.i.|))*(sgn(i+j)*Py(a,|.i+j.|)),
  (A * sgn(i)*Py(a,|.i.|))* (sgn(i)*Py(a,|.i.|)*Px(a,|.j.|))
  are_congruent_mod Px(a,|.i.|) by INT_4:11;
A3: (A * sgn(i)*Py(a,|.i.|))* (sgn(i)*Py(a,|.i.|)*Px(a,|.j.|)) =
  A* (Py(a,|.i.|)*Py(a,|.i.|))*Px(a,|.j.|)
  proof
    per cases;
    suppose i=0;
      then sgn(i)=0 & Py(a,|.i.|) = 0 by ABSVALUE:def 2,HILB10_1:3;
      hence thesis;
    end;
    suppose i<>0;
      then
A4:     sgn(i)*sgn(i) = sgn (i*i) &i*i >0 by ABSVALUE:18;
      (A * sgn(i)*Py(a,|.i.|))* (sgn(i)*Py(a,|.i.|)*Px(a,|.j.|)) =
      (A * (sgn(i)*sgn(i)))*Py(a,|.i.|)* Py(a,|.i.|)*Px(a,|.j.|)
      .= (A * 1)*Py(a,|.i.|)* Py(a,|.i.|)*Px(a,|.j.|) by A4,ABSVALUE:def 2
      .= (A * 1)*(Py(a,|.i.|)* Py(a,|.i.|))*Px(a,|.j.|);
      hence thesis;
    end;
  end;
A5: Py(a,|.i.|)^2 =Py(a,|.i.|)*Py(a,|.i.|) by SQUARE_1:def 1;
A6: Px(a,|.i.|)^2 =Px(a,|.i.|)*Px(a,|.i.|) by SQUARE_1:def 1;
  Px(a,|.i.|)^2 - A *Py(a,|.i.|)^2 = 1 by HILB10_1:7;
  then
A7: Px(a,|.2*i+j.|), (Px(a,|.i.|)^2-1)*Px(a,|.j.|)
  are_congruent_mod Px(a,|.i.|) by A5,A3,A2,A1,INT_1:15;
  Px(a,|.i.|)*(Px(a,|.i.|)*Px(a,|.j.|))
    =(Px(a,|.i.|)^2-1)*Px(a,|.j.|) -- (Px(a,|.j.|)) by A6;
  then (Px(a,|.i.|)^2-1)*Px(a,|.j.|),- (Px(a,|.j.|))
    are_congruent_mod Px(a,|.i.|) by INT_1:def 5;
  hence thesis by A7,INT_1:15;
end;
