Solutions of Pythagorean Equation/Primitive/Proof 2

Proof
Let $\left({A, B, C}\right)$ be a Pythagorean Triple:


 * $A^2 + B^2 = C^2$

By the Pythagorean theorem, this equation describes the sides of a right triangle:

(picture goes here)

By the definitions of sine and cosine:

That is,

Next, we invoke Equiangular Triangles are Similar and Proportion is Equivalence Relation to write:

We construct the following restriction of $\tan \dfrac \theta 2$.

From Shape of Tangent Function, $\tan \dfrac \theta 2: \left({0 \,.\,.\, \pi}\right) \leftrightarrow \left({0 \,.\,.\, +\infty}\right)$ is a bijection.

Restrict $\tan \dfrac \theta 2$ on this interval so that its image is the set of strictly positive rational numbers:


 * $\tan \dfrac \theta 2: \tan^{-1}\left[{\Q_{>0}}\right]\cap \left({0 \,.\,.\, \pi}\right) \leftrightarrow \Q_{>0}$

Then $\displaystyle \tan \frac \theta 2 = \frac p q$ for any $\dfrac p q \in \Q_{>0}$, where $\dfrac p q$ is the canonical form of a rational number.

From the Double Angle Formulas:

Thus these proportions describe the sides of a right triangle:

(picture goes here)

By the Pythagorean theorem $\left({2pq,q^2 - p^2, q^2 + p^2}\right)$ is a Pythagorean triple.

That $p, q \in \Z_{>0}$ follows from $\dfrac p q \in \Q_{>0}$.

That $p \perp q$ follows from the assumption that $\dfrac p q$ was written in canonical form.

That every triple is of this form follows from the bijectivity of the tangent function as restricted above.

Recall $q^2 - p^2$ describes the side of a triangle, and so is positive.

Then $q^2 - p^2 > 0$ and therefore $q > p$.

It remains to be proven that:


 * this triple is primitive


 * $p$ and $q$ are of opposite parity.

Historical Note
This solution was known to.