feat(ErdosProblems): add statement for Erdős Problem 882 - #5093
Conversation
|
Updated: I have now built the repository locally (Lean 4.27.0 + mathlib cache) and |
|
Disclosure: after opening this PR I found a prior sorry-free Lean formalization of the ELRSS99 lower bound by Boris Alexeev, published 2026-08-17 in https://github.com/plby/lean-proofs (src/latest/ErdosProblems/Erdos882.lean), which covers more than my file does: it proves the full statement log2 n - 1 < maximumSize n, whereas mine formalizes only the core non-divisibility lemma. My proof was written independently and follows a similar route (binary digit sums), which seems to be the natural one. I have updated my README to state this. If you prefer, the formal_proof attribute could point to Alexeev's repository instead of mine, or the statement file could be restructured to match his formulation; happy to do either. |
Adds a formalisation of Erdős Problem 882 (Erdős and Sárközy): the size of the largest
A ⊆ {1,...,n}whose nonempty subset sums form a divisibility antichain.The problem is listed as solved, with answer
(1+o(1)) log₂ n:|A| > log₂ n - 1from the constructionA = {2^m - 2^i : 0 ≤ i < m}of Erdős, Lev, Rauzy, Sándor and Sárközy [ELRSS99];|A| ≤ log₂ n + ½ log₂ log n + O(1)from Erdős Problem 1, since the antichain property implies distinct subset sums.Contents:
IsSubsetSumAntichain,maxAntichainCard, and the main statementerdos_882;A m, the ELRSS99 construction, withcard_A;erdos_882.variants.lower_bound: the key antichain property ofA m. This one is proved: asorry-free Lean 4 proof is hosted at https://github.com/ToshiDad/erdos-882 and linked via@[formal_proof using lean4 at ...]. The proof is elementary binary arithmetic (popcount subadditivity/submultiplicativity, digit splitting, and monotonicity ofn - popcount n); it is ~600 lines, hence hosted externally per CONTRIBUTING. Axiom check:'Erdos882.no_div' depends on axioms: [propext, Classical.choice, Quot.sound].erdos_882.variants.sandoranderdos_882.variants.greedyfor the other bounds mentioned on the problem page.I was unable to build locally (toolchain mismatch on my machine), so I would appreciate CI catching any syntax issues; happy to iterate.