The four-parameter identity produces solutions over the integers
ProvedEqualTwoSquares.four_param_identityFor all integers p, q, r and s, one has (pr + qs)^2 + (ps - qr)^2 = (pr - qs)^2 + (ps + qr)^2. Thus the quadruple (pr + qs, ps - qr, pr - qs, ps + qr) solves a^2 + b^2 = c^2 + d^2.
import Mathlib
namespace EqualTwoSquares
/-- Objective 1: the four-parameter identity over the integers. -/
theorem four_param_identity (p q r s : ℤ) :
(p * r + q * s)^2 + (p * s - q * r)^2 =
(p * r - q * s)^2 + (p * s + q * r)^2 := by sorry
end EqualTwoSquaresRead-back
What the Lean code literally says, in plain math · independent-agent
Read-back: four_param_identity
Declared in namespace EqualTwoSquares (file items/four_param_identity.lean); the name agrees with the file name. Its own doc line reads "Objective 1: the four-parameter identity over the integers."
What the declaration literally says
For all integers ,
There are no hypotheses and no hidden parameters: the four letters are explicit arguments of type integer, and every one of them occurs in the displayed identity. Nothing is vacuous, nothing is degenerate: the claim is asserted for all integer choices, including the all-zero choice (both sides ), the cases where some parameters are equal, and negative values of the parameters (where the identity still holds because the cross terms cancel with opposite signs).
Expanding both sides explains the content: the left-hand side expands to , and the right-hand side expands to , i.e. to the same quantity.
Audit notes
- Truth. Verified: the two sides are the same polynomial in ; the cross terms and cancel on each side independently, so the identity does not even need cancellation between the sides. Checked symbolically and numerically over a large random range of parameters. TRUE.
- Faithfulness. Name matches file name. The statement says exactly what its doc line claims — a polynomial identity in four integer parameters. No variables occur free.
- Trivializing premise. None: the theorem has no hypotheses at all.
- Satisfiability. No hypothesis to satisfy; the universal claim is non-vacuously instantiated (e.g. gives ).
- Elaboration. Included in
statements/All.lean; elaborates with only the expecteddeclaration uses 'sorry'warning.
Remark for the human auditor: the statement is over only; it is a special case of the corresponding identity in any commutative ring (cf. two_squares_mul), and unlike two_squares_mul it does not assert the product form . If the intent was to capture the Brahmagupta–Fibonacci product, this statement alone does not say it. That is a matter of coverage, not incorrectness: the statement is complete and correct as written.
FAITHFUL
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.