Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Infinitely many distinct patterns arise from the family

Proved
EqualTwoSquares.family_patterns_infinite

by Yuxuan Xu · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

infinite-familiesnumber-theory

The set of integer quadruples of the form (1, n^2 - n + 1, 2n - 1, n^2 - n - 1), as n ranges over the integers, is infinite.

Preamble
import Mathlib
Formal statement
namespace EqualTwoSquares

/-- Objective 3: the family produces infinitely many distinct quadruples. -/
theorem family_patterns_infinite :
    (Set.range (fun n : ℤ => ((1 : ℤ), n^2 - n + 1, 2 * n - 1, n^2 - n - 1))).Infinite := by sorry

end EqualTwoSquares
Source
Mission target; machine-checked locally in examples/two-squares/Family.lean.
Read-back

What the Lean code literally says, in plain math · independent-agent

Read-back: family_patterns_infinite

Declared in namespace EqualTwoSquares (file items/family_patterns_infinite.lean); the name agrees with the file name. Its own doc line reads "Objective 3: the family produces infinitely many distinct quadruples."

What the declaration literally says

Let

F:Z⟶Z×Z×Z×Z,F(n)=(1,  n2−n+1,  2n−1,  n2−n−1),F : \mathbb{Z} \longrightarrow \mathbb{Z} \times \mathbb{Z} \times \mathbb{Z} \times \mathbb{Z}, \qquad F(n) = \bigl(1,\; n^2 - n + 1,\; 2n - 1,\; n^2 - n - 1\bigr),F:Z⟶Z×Z×Z×Z,F(n)=(1,n2−n+1,2n−1,n2−n−1),

and let S={ F(n):n∈Z }S = \{\,F(n) : n \in \mathbb{Z}\,\}S={F(n):n∈Z} be its set-theoretic image (the range of FFF, taken as a set of four-tuples of integers). Then SSS is infinite — i.e. SSS is not finite; equivalently there is no finite list exhausting all quadruples produced by the family, and in particular the family does not collapse to finitely many values (it does not, for instance, become eventually constant or periodic-with-finite-image).

There are no hypotheses and no free variables other than the set SSS itself, which is defined inside the statement. The quantification is over all integers nnn, including negative ones, so the range includes the values coming from negative indices as well; nothing restricts nnn to be large, positive, or pairwise distinct.

Infinitude here is witnessed by injectivity: distinct indices give distinct tuples (already the coordinate 2n−12n-12n−1 separates them), so the range of FFF is in bijection with the infinite set Z\mathbb{Z}Z.

Audit notes

  • Truth. Verified: no repetition among F(n)F(n)F(n) for all ∣n∣≤2000|n| \le 2000∣n∣≤2000, and the general argument is that coordinate 3, 2n−12n-12n−1, is injective in nnn, so the range is infinite. TRUE.
  • Faithfulness. Name matches file name; the doc line's "infinitely many distinct quadruples" corresponds precisely to infinitude of the range set. Every variable is bound (the bound index nnn lives inside the set comprehension); nothing free.
  • Trivializing premise. None: the declaration is a closed formula with no hypotheses.
  • Satisfiability. Nothing to satisfy; the statement is a property of a concretely defined non-empty set and is non-vacuous.
  • Elaboration. Included in statements/All.lean; elaborates with only the expected declaration uses 'sorry' warning.

FAITHFUL

Human review
  • Endorsed by Shuze Chen · Sep 26, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Yuxuan Xu · Sep 26, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me