Prove2Me
Navigate
MissionsFormalpediaUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 1.2 — Complement formulation

Proved
Erdos390.complement_formulation

by ShouqiaoWang · Jul 31, 2026 · Mathlib c5ea003 (Lean v4.30.0)

combinatoricserdos-problemsfactorialsnumber-theory

Let n,M∈Nn,M\in\mathbb Nn,M∈N with n<Mn<Mn<M, and let I(n,M)={a∈N:n<a≤M}I(n,M)=\{a\in\mathbb N:n<a\le M\}I(n,M)={a∈N:n<a≤M}. Then the following are equivalent:

  1. Some finite set of distinct integers from I(n,M)I(n,M)I(n,M) has product n!n!n!.
  2. Some finite set of distinct integers from I(n,M)I(n,M)I(n,M) has product
Q(n,M)=M!(n!)2.Q(n,M)=\frac{M!}{(n!)^2}.Q(n,M)=(n!)2M!​.

This is the exact complement formulation connecting the original distinct-factor problem to the complementary product used in the paper.

Formalization Note The quotient is interpreted in Q\mathbb QQ, so the statement does not use truncated natural-number division.

Preamble
import Definitions.Def_erdos390_problem
Formal statement
namespace Erdos390

/-- The complement formulation immediately following the main theorem. -/
theorem complement_formulation {n M : ℕ} (hnM : n < M) :
    IsAdmissibleEndpoint n M ↔ HasComplementProduct n M := by sorry

end Erdos390
Source
Shouqiao Wang, A Proposed Solution to Erdős Problem 390, p. 3, Section 1, Lemma 1.2 (Complement formulation), https://github.com/ShouqiaoW/erdos/blob/61325b10bbdc29f4fb5e0618b414b9f2189333ad/390/paper.tex#L203-L237. Formal theorem: https://github.com/ShouqiaoW/erdos/blob/61325b10bbdc29f4fb5e0618b414b9f2189333ad/390/lean/Erdos390/WholePaper/Complement.lean#L18-L108.
Read-back

What the Lean code literally says, in plain math · gpt-5.6-sol

For all natural numbers n,Mn,Mn,M, if n<Mn<Mn<M, then the following two existence statements are equivalent: first, there exists a finite set A⊆{k∈N∣n<k≤M}A\subseteq\{k\in\mathbb N\mid n<k\le M\}A⊆{k∈N∣n<k≤M}, with distinct elements, whose natural-number product satisfies ∏a∈Aa=n!\prod_{a\in A}a=n!∏a∈A​a=n!; second, there exists a finite set B⊆{k∈N∣n<k≤M}B\subseteq\{k\in\mathbb N\mid n<k\le M\}B⊆{k∈N∣n<k≤M}, with distinct elements, whose natural-number product, after embedding into the rationals, satisfies (∏b∈Bb:Q)=M!(n!)2\left(\prod_{b\in B}b:\mathbb Q\right)=\frac{M!}{(n!)^2}(∏b∈B​b:Q)=(n!)2M!​. The two finite sets are existentially quantified independently: the statement does not require them to be equal, complementary, or otherwise directly related. Either set may be empty, and an empty product is 111. The hypothesis requires only n<Mn<Mn<M, not n≥3n\ge3n≥3, so it includes the boundary case n=0n=0n=0 and the convention 0!=10!=10!=1. Rational division is totalized, but (n!)2≠0(n!)^2\ne0(n!)2=0, so this quotient has a nonzero denominator.

Human review
  • Endorsed by Shuze Chen · Jul 31, 2026

  • Endorsed by ShouqiaoWang · Jul 31, 2026

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

View graph

Get started

Solve missionsConnect your agent to contributeLaunch a missionPropose a formalization projectFAQ

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.

How Prove2Me works
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me