Theorem: Cauchy's Lemma (Number Theory)

Let $a$ and $b$ be odd positive integers. 
Suppose $a$ and $b$ satisfy: 
{{begin-eqn}}
{{eqn | n = 1
      | l = b^2
      | o = <
      | r = 4 a
}}
{{eqn | n = 2
      | l = 3 a
      | o = <
      | r = b^2 + 2 b + 4
}}
{{end-eqn}}
Then there exist non-negative integers $s, t, u, v$ such that:
{{begin-eqn}}
{{eqn | l = a
      | r = s^2 + t^2 + u^2 + v^2
}}
{{eqn | l = b
      | r = s + t + u + v
}}
{{end-eqn}}

Proof:
Because $a$ is odd, we can write:
:$a = 2 k + 1$
for some positive integer $k$.
Then:
{{begin-eqn}}
{{eqn | l = 4 a - b^2
      | r = 4 \paren {2 k + 1} - b^2
}}
{{eqn | o = \equiv
      | r = 8 k + 4 - 1
      | rr= \pmod 8
      | c = Odd Square Modulo 8
}}
{{eqn | o = \equiv
      | r = 3
      | rr= \pmod 8
}}
{{end-eqn}}
From $(1)$, we have that $4 a - b^2$ is a positive integer. 
By Integer as Sum of Three Odd Squares, there exist $3$ odd positive integers $x, y, z$ such that:
:$(3): \quad 4 a - b^2 = x^2 + y^2 + z^2$
Because $b, x, y, z$ are all odd integers, $b + x + y + z$ must be even.
It is now to be shown that $b + x + y \pm z$ is divisible by $4$.
Suppose that $b + x + y + z$ is not divisible by $4$.
Because $b + x + y + z$ is even:
:$b + x + y + z \equiv 2 \pmod 4$
Writing $z = 2 l + 1$:
{{begin-eqn}}
{{eqn | l = b + x + y - z
      | r = b + x + y + z - 2 z
}}
{{eqn | o = \equiv
      | r = 2 - 2 \paren {2 l + 1}
      | rr= \pmod 4
}}
{{eqn | o = \equiv
      | r = 2 - 4 l - 2 
      | rr= \pmod 4
}}
{{eqn | o = \equiv
      | r = 0
      | rr= \pmod 4
}}
{{end-eqn}}
That is:
:if $b + x + y + z$ is not divisible by $4$
:then $b + x + y - z$ ''is'' divisible by $4$.
{{qed|lemma}}
Let us choose the case such that $b + x + y \pm z$ is divisible by $4$.
We define:
{{begin-eqn}}
{{eqn | l = s
      | m = \frac {b + x + y \pm z} 4
}}
{{eqn | l = t
      | m = \frac {b + x - y \mp z} 4
      | mo= =
      | r = \frac {b + x} 2 - s
}}
{{eqn | l = u
      | m = \frac {b - x + y \mp z} 4
      | mo= =
      | r = \frac {b + y} 2 - s
}}
{{eqn | l = v
      | m = \frac {b - x - y \pm z} 4
      | mo= =
      | r = \frac {b \pm z} 2 - s
}}
{{end-eqn}}
We are to show that $s, t, u, v$ are non-negative, and will satisfy:
{{begin-eqn}}
{{eqn | n = 1
      | l = a
      | r = s^2 + t^2 + u^2 + v^2
}}
{{eqn | n = 2
      | l = b
      | r = s + t + u + v
}}
{{end-eqn}}
First we show that $s, t, u, v$ are non-negative.
Because $x, y, z$ are positive:
:$s, t, u, v \ge \dfrac {b - x - y - z} 4$
So we need to show:
:$\dfrac {b - x - y - z} 4 \ge 0$
or equivalently:
:$\dfrac {b - x - y - z} 4 > -1$
Now:
{{begin-eqn}}
{{eqn | l = x + y + z
      | o = \le
      | r = \sqrt {\paren {1^2 + 1^2 + 1^2} \paren {x^2 + y^2 + z^2} }
      | c = Cauchy's Inequality
}}
{{eqn | r = \sqrt {3 \paren {4 a - b^2} }
      | c = from $(3)$
}}
{{eqn | o = <
      | r = \sqrt {4 \paren {b^2 + 2 b + 4} - 3 b^2}
      | c = from $(2)$
}}
{{eqn | r = \sqrt {b^2 + 8 b + 16}
}}
{{eqn | r = b + 4
      | c = Square of Sum
}}
{{eqn | ll= \leadsto
      | l = \frac {b - x - y - z} 4
      | o = >
      | r = -1
}}
{{end-eqn}}
showing that $s, t, u, v$ are non-negative.
Now we check $(1)$:
{{begin-eqn}}
{{eqn | l = s^2 + t^2 + u^2 + v^2
      | r = \paren {\frac {b + x + y \pm z} 4}^2 + \paren {\frac {b + x - y \mp z} 4}^2 + \paren {\frac {b - x + y \mp z} 4}^2 + \paren {\frac {b - x - y \pm z} 4}^2
}}
{{eqn | r = \frac 1 {16} \leftparen {b^2 + x^2 + y^2 + z^2 + 2 b x + 2 b y \pm 2 b z + 2 x y \pm 2 x z \pm 2 y z}
}}
{{eqn | o =
      | r = + \quad b^2 + x^2 + y^2 + z^2 + 2 b x - 2 b y \mp 2 b z - 2 x y \mp 2 x z \pm 2 y z
}}
{{eqn | o =
      | r = + \quad b^2 + x^2 + y^2 + z^2 - 2 b x + 2 b y \mp 2 b z - 2 x y \pm 2 x z \mp 2 y z
}}
{{eqn | o =
      | r = + \quad \rightparen {b^2 + x^2 + y^2 + z^2 - 2 b x - 2 b y \pm 2 b z + 2 x y \mp 2 x z \mp 2 y z}
}}
{{eqn | r = \frac 1 {16} \paren {4 \paren {b^2 + x^2 + y^2 + z^2} }
}}
{{eqn | r = \frac {4 a} 4
}}
{{eqn | r = a
}}
{{end-eqn}}
Now we check $(2)$:
{{begin-eqn}}
{{eqn | l = s + t + u + v
      | r = \frac {b + x + y \pm z} 4 + \frac {b + x - y \mp z} 4 + \frac {b - x + y \mp z} 4 + \frac {b - x - y \pm z} 4
}}
{{eqn | r = \frac {4 b} 4 + \frac {2 x - 2 x} 4 + \frac {2 y - 2 y} 4 \pm \frac {2 z - 2 z} 4
}}
{{eqn | r = b
}}
{{end-eqn}}
Therefore $s, t, u, v$ as defined are the integers we are looking for.
{{qed}}
{{Namedfor|Augustin Louis Cauchy|cat = Cauchy}}