## JSH: More with Quadratic Diophantine Theorem

I introduced a nifty new theorem in another thread which has become bogged down with replies so here's a new thread where I can bring focus back to the theorem itself.

In the ring of integers, given the quadratic expression

c_1*x^2 + c_2*xy + c_3*y^2 = c_4*z^2 + c_5*zx + c_6*zy

where the c's are constants, for solutions to exist it must be true that

((c_2 - 2c_1)^2 + 4c_1*(c_2 - c_1 - c_3))v^2 + (2(c_2 - 2c_1)*(c_6 - c_5) + 4c_5*(c_2 - c_1 - c_3))v + (c_6 - c_5)^2 - 4c_4*(c_2 - c_1 - c_3) = n^2 mod p

for some n, where p is any prime coprime to z for a given solution, when

v = -(x+y)z^{-1} mod p.

I've focused in other places on solutions true for all primes, but notice you can also just pick a small prime and simply loop through all residues modulo that prime for x, y and z to see if any will work to give you a quadratic residue modulo that prime, which is accomplished by just looping v through all possible residues. One problem with that approach is that you're then assuming that z is coprime to that particular prime. There may be other ways to use the theorem. I just discovered it a few days ago so I'm still figuring things out.

I'll go ahead and give a simple example of it in use, which is for a case which is true for all primes.

For example with x^2 + y^2 = z^2, I have

c_1 = 1, c_2 = 0, c_3 = 1, c_4 = 1, c_5 = 0, and c_6 = 0

which gives

-4v^2 + 8 = n^2 mod p

for every prime coprime to z, for some n, when v = -(x+y)z^{-1} mod p.

Making the substitution for v gives

-4(-(x+y)z^{-1})^2 + 8 = n^2 mod p

so

-4(x+y)^2 + 8z^2 = n^2*z^2 mod p

and since x^2 + y^2 = z^2, I can substitute out z, to get

4(x-y)^2 = n^2*z^2 mod p

so the requirement is met, as of course, there are an infinity of integer solutions to x^2 + y^2 = z^2.

I'll also give the solution for Pell's Equation:

x^2 - Dy^2 = 1

so

c_1 = 1, c_2=0, c_3 = -D, c_4 = 1, c_5 = 0, c_6 = 0, and z=1

which gives

4Dv^2 - 4D + 4 = n^2 mod p

and v = -(x+y) mod p, so I have

4D(x+y)^2 - 4D + 4 = n^2 mod p

and since that must be true for all primes p, since z=1, I have in general that the left hand side must be a perfect square so it must be true then that

D(x+y)^2 - D + 1 = S^2

where S is some integer, and I have in general that

x+y = sqrt((S^2 + D - 1)/D).

The utility of this result was questioned in other threads though my primary interest in putting it forward was to make sure the theorem didn't just give circular results and clearly it does not.

But also that result can be used to relate certain values for D to select Pythagorean Triples as notice that if you let S = jD +/- 1, you have

x+y = sqrt(Dj^2 +/- 2j + 1)

which is

x+y = sqrt((D-1)j^2 + (j +/- 1)^2)

and I have the existence of solutions related to another Diophantine relation of the form

(D-1)u^2 + v^2 = w^2

with the condition that u = j and v = j+/-1.

For instance with D=2, I have that I need solutions to

u^2 + v^2 = w^2

with u=j, and v=j+/-1, and j=20 works as 20^2 + 21^2 = 29^2, and gives x+y = 29, and again x=17, y=12 is a known solution to x^2 - 2y^2 = 1.

So you can find solutions for D=2 just by scanning through Pythagorean Triples.

These first examples do not necessarily give a sense of the full reach of the Quadratic Diophantine Theorem as it was just discovered by me Friday, and I'm just casting about now looking for quick and easy examples.

The full theorem works to put conditions on

c_1*x^2 + c_2*xy + c_3*y^2 = c_4*z^2 + c_5*zx + c_6*zy

and it's not clear to me how much you can do with it at this time, but it's fun to wonder about it.

Deriving the theorem was trivial using what I call tautological spaces, which are mathematical regions where a particular truth holds.

The simplest presentation I know of, of a tautological space is

x+y+vz = 0(mod x+y+vz)

which is equivalent to

x+y+vz = x+y+vz

so the truth of the space is that x+y+vz is a factor of everything within it as shown.

I do basic manipulations on tautological spaces and then subtract an equation to be analyzed from that space and then analyze the residue.

I have pioneered this technique which I discovered back in December of 1999, when I was desperately looking for more analytical power in pursuit of a proof of Fermat's Last Theorem.

To me it is a natural extension of Gauss's work on congruence relations.