The family gives a positive solution with four pairwise distinct entries
ProvedEqualTwoSquares.explicit_family_solutionLet n be an integer with 4 <= n. Then the quadruple with entries 1, n^2 - n + 1, 2n - 1 and n^2 - n - 1 satisfies 1^2 + (n^2 - n + 1)^2 = (2n - 1)^2 + (n^2 - n - 1)^2, all four entries are strictly positive, and the four entries are pairwise distinct.
import Mathlib
namespace EqualTwoSquares
/-- Objective 2 assembled: a positive solution with four pairwise distinct entries. -/
theorem explicit_family_solution {n : ℤ} (hn : 4 ≤ n) :
(1 : ℤ)^2 + (n^2 - n + 1)^2 = (2 * n - 1)^2 + (n^2 - n - 1)^2 ∧
(0 < (1 : ℤ) ∧ 0 < n^2 - n + 1 ∧ 0 < 2 * n - 1 ∧ 0 < n^2 - n - 1) ∧
((1 : ℤ) ≠ 2 * n - 1 ∧
(1 : ℤ) ≠ n^2 - n - 1 ∧
(1 : ℤ) ≠ n^2 - n + 1 ∧
2 * n - 1 ≠ n^2 - n - 1 ∧
2 * n - 1 ≠ n^2 - n + 1 ∧
n^2 - n - 1 ≠ n^2 - n + 1) := by sorry
end EqualTwoSquaresRead-back
What the Lean code literally says, in plain math · independent-agent
Read-back: explicit_family_solution
Declared in namespace EqualTwoSquares (file items/explicit_family_solution.lean); the name agrees with the file name. Its own doc line reads "Objective 2 assembled: a positive solution with four pairwise distinct entries."
What the declaration literally says
Let satisfy . Put
Then the following three things hold jointly:
- The equation: , i.e. ;
- Positivity of all four entries: , , , and ;
- Pairwise distinctness: all six pairwise disequalities among the four entries hold, namely , , , , , .
Unlike the sibling item explicit_family_chain, this statement does not assert any ordering of the four entries — only that no two of them are equal. The lower bound is the only hypothesis; it is genuinely needed (at one gets , so distinctness fails, and at positivity/distinctness fail as well).
Audit notes
- Truth. All nine listed conjuncts verified for every by direct evaluation, and justified symbolically: positivity is clear from , , ; distinctness reduces to , and the constant gap between and , all valid for . TRUE.
- Faithfulness. Name matches file name. The doc line claims "a positive solution with four pairwise distinct entries", and the statement delivers exactly: the family identity, strict positivity of each of the four entries, and all six pairwise disequalities (complete pairwise distinctness, not a partial list). Variables: only , implicit, constrained by the hypothesis and occurring throughout; nothing free.
- Trivializing premise. None: is a pure numerical bound and is not the conclusion nor a contradiction.
- Satisfiability. Satisfiable with plenty of witnesses ( already gives the entry set and the equality ); non-vacuous.
- 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.