As a starting note, I would like to say that I haven't (yet) taken courses in Set Theory, so some higher-level notation may be lost on me (and I may not write everything conventionally), but I'll do my best.

My question is as follows: I have sets of numbers which satisfy a particular Diophantine equation. Take, for example, the Pythagorean Quadruplets:

$a^2 + b^2 + c^2 = d^2; a,b,c,d\in\mathbb{R}$

Wolfram Mathworld gives the following (unscaled) parametrization for this equation:

$a = 2mp$

$b = 2np$

$c = p^2-(m^2+n^2)$

$d = p^2+(m^2+n^2)$

However, this set of equations is not surjective, as it's missing the solution 36^{2} + 8^{2} + 3^{2} = 37^{2}

Wikipedia offers the following (unscaled) solution:

$a = m^2+n^2-p^2-q^2$

$b = 2(mq+np)$

$c = 2(nq-mp)$

$d = m^2+n^2+p^2+q^2$

This solves the above identity ({a,b,c,d} = {3,36,8,37}) with {m,n,p,q} = {2,4,-1,4}. This solution also happens to be surjective.

Here's the question: Given a Diophantine equation (e.g. Pythagorean Quadruplets), and a particular parametrization for this equation (e.g. Wikipedia's solution), how do you prove that the parametrization is surjective? That is, how do you prove that every set of integers that satisfies the Diophantine equation is generated by integer values of the parametrization?

Note that this is just an example; I want to know how it can be done in a general case.

Thanks for the help!

-Gabriel Benamy