/- Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ module public import FormalConjecturesUtil /-! # Erdős Problem 1211 *References:* - [erdosproblems.com/1211](https://www.erdosproblems.com/1211) - [CFP22] Conlon, David and Fox, Jacob and Pham, Huy Tuan, *The upper logarithmic density of monochromatic subset sums*. Mathematika 68 (2022), 1292--1301. [arXiv:2105.15195](https://arxiv.org/abs/2105.15195) - [Er80] Erdős, Paul, *A survey of problems in combinatorial number theory*. Ann. Discrete Math. (1980), 89-115. [PDF](https://www.renyi.hu/~p_erdos/1980-03.pdf) -/ @[expose] public section open Filter namespace Erdos1211 /-- `IsNatPartition A B` says that `A` and `B` are disjoint and `A ∪ B` is all of `ℕ`. Here `ℕ` contains $0$. This is harmless: $0$ adds nothing to a sum of distinct elements and does not count in the density below, so partitions of `ℕ` and of the positive integers give the same values. -/ def IsNatPartition (A B : Set ℕ) : Prop := Disjoint A B ∧ A ∪ B = Set.univ /-- The upper logarithmic density $$\overline{\delta}(X)=\limsup_{x\to\infty}\frac{1}{\log x}\sum_{n\in X,\ n