Lagrange’s Reduction Algorithm

Summary: Lagrange’s descent procedure for deciding whether admits a rational . After reducing to the canonical form with square-free, one substitutes with and , obtaining a new equation with strictly smaller leading coefficient . Iteration produces a strictly decreasing positive-integer sequence; termination yields either a square coefficient (success) or no valid residue (impossibility).

Sources: additions-5, additions-7

Last updated: 2026-05-10


Setup

Given: integers (square-free, after Add. V Art. 50 reductions), find rational with a perfect square — equivalently, find integers with and

Coprimality consequences (Add. V Art. 51): and .


One Reduction Step

Assume (swap if necessary). Then

The right side must be divisible by . Apply the Add. IV Art. 48 lemma: since , write

Substituting:

For divisibility by , we need . So we enumerate residues and keep those with .

For each such , set

Dividing by :


Why

Since , we have . With :

so . Strict descent.


Three Cases After One Step

After computing , classify:

Case 1 — is a perfect square

Then has the trivial solution , , . Algorithm halts in success.

Case 2 — (after stripping square factors)

Multiply the equation by and use :

Setting , the new condition is — the same problem with smaller coefficients ( in place of , in place of , with and ). Recurse.

Case 3 —

Apply a second substitution within the same equation: set where is chosen so . The new equation is

with and , again with . Iterate until Case 1 or 2.


Termination by Infinite Descent

Across recursion, the leading coefficient passes through

a strictly decreasing sequence of positive integers, hence finite. The algorithm halts in one of:

  • Success: a square coefficient appears (Case 1) → back-substitute to recover and hence .
  • Impossibility: at some step, no in satisfies .

This is the first complete decision procedure for rational solvability of . See also infinite-descent for the proof technique.


Examples

Solvable: (Add. V, Art. 56)

Reduces to . Swap roles ():

StepEquationNotes
0
1(after swap) strip
1’
2apply Art. 54 kills middle term
3squareCase 1 ✓

Back-substituting gives , then or .

Impossible: (Add. V, Art. 58)

, . Search residues with : only works (). New equation: , . Since , swap:

→ need , i.e. new , .

Search residues with : for . None divisible by 5.

Algorithm halts: never a square.


Significance

Before Lagrange:

After Lagrange:

  • A single algorithm decides any case in finitely many steps.
  • The algorithm itself is constructive on the success side: solutions emerge via mechanical back-substitution.
  • The impossibility side gains a uniform proof method: no infinite case analysis.

This is also a direct ancestor of the modern theory of reduction of binary quadratic forms developed by Gauss in the Disquisitiones Arithmeticae (1801). Lagrange’s correspond to Gauss’s reduction-of-form coefficients along an SL₂(ℤ) orbit.


Specialisation in Add. VII (Integer Solvability)

For solving in integers (the Add. VII problem; see add7-integer-quadratic-method), the same descent specialises as the second method of Art. 70. Starting from (the auxiliary equation produced by the substitution ), Lagrange repeatedly applies choosing so that the new middle coefficient does not exceed . The transformed coefficients form a strictly decreasing sequence of non-negative integers, so the algorithm reaches a form in finitely many steps. Multiplying by and setting yields , which falls under the Add. II Art. 38 theorem.

This version has the practical advantage that the calculation depends only on , not on the right side, so a single table of coefficients serves all equations for the same .