Under parity alignment the equation becomes XY = UV
ProvedEqualTwoSquares.sum_sq_eq_halvesLet a, b, c and d be integers with a^2 + b^2 = c^2 + d^2, and suppose that a - c and b - d are even. Then there are integers X, Y, U and V with X + Y = a, X - Y = c, U - V = b, U + V = d and X * Y = U * V.
import Mathlib
namespace EqualTwoSquares
/-- Objective 4, substitution: under parity alignment the equation becomes XY = UV. -/
theorem sum_sq_eq_halves {a b c d : ℤ} (h : a^2 + b^2 = c^2 + d^2)
(hac : Even (a - c)) (hbd : Even (b - d)) :
∃ X Y U V : ℤ,
X + Y = a ∧ X - Y = c ∧ U - V = b ∧ U + V = d ∧ X * Y = U * V := by sorry
end EqualTwoSquaresRead-back
What the Lean code literally says, in plain math · independent-agent
Read-back: sum_sq_eq_halves
Declared in namespace EqualTwoSquares (file items/sum_sq_eq_halves.lean); the name agrees with the file name. Its own doc line reads "Objective 4, substitution: under parity alignment the equation becomes XY = UV."
What the declaration literally says
Let be integers subject to three hypotheses:
- (the sum-of-two-squares equation);
- is even;
- is even.
Then there exist integers satisfying all five of the following simultaneously:
"Even" here means divisible by in ( for some integer ; negative differences and zero count as even). Note that no division appears in the statement: the "halves" are captured implicitly by the four linear equations, which say
and it is precisely hypotheses 2 and 3 that guarantee these four quantities are integers: even implies is even, so exist with , ; likewise even implies even, so exist with , . Note the asymmetry in the third and fourth equations: while , i.e. and — this matches the substitution convention , .
The product identity then follows from hypothesis 1: and , and is a rearrangement of .
Everything degenerate is covered: (take ), non-positive entries, coincident entries, and cases where some of vanish (e.g. forces and then ).
Audit notes
- Truth. TRUE. Existence of the four witnesses is exactly the divisibility-by- discussion above (hypotheses 2 and 3 are precisely what is needed, and no more), and the final equation is the rearrangement of hypothesis 1 just displayed. Verified exhaustively: for every quadruple with satisfying together with evenness of and , the explicit witnesses , , , satisfy all five conclusions — zero failures.
- Faithfulness. Name matches file name; the doc line "under parity alignment the equation becomes " is rendered literally: the two evenness hypotheses are the parity alignment (only its first branch; the swap branch is not needed here), and the conclusion supplies together with . All variables are bound: are implicit arguments, are existentially bound; every one of them occurs in the conclusion, so none is unconstrained.
- Trivializing premise. None: the evenness hypotheses are not the conclusion (the conclusion is the existence of witnesses together with a product equation), they are not contradictory, and they do not single out only trivial instances of the sum-of-squares equation. Note also that these hypotheses do restrict the instances (the branch where and are both odd is excluded), but the remaining family of instances is still rich — e.g. satisfies all three hypotheses.
- Satisfiability. All three hypotheses are simultaneously satisfiable, in trivial and non-trivial ways: ; (, even, even, realised by with ). Non-vacuous, infinitely many witnesses.
- Elaboration. Included in
statements/All.lean; elaborates with only the expecteddeclaration uses 'sorry'warning.
FAITHFUL
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.