/- Copyright 2025 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. -/ import FormalConjecturesUtil import FormalConjectures.ErdosProblems.«28»

Erdős Problem 40

Reference: erdosproblems.com/40

open AdditiveCombinatorics Filter Real Setopen scoped Pointwisenamespace Erdos40

The predicate for a function $g\colon\mathbb{N} → \mathbb{R})$ that $$\lvert A\cap {1,\ldots,N}\rvert \gg \frac{N^{1/2}}{g(N)}$$ implies $\limsup 1_A\ast 1_A(n)=\infty$.

def Erdos40For (g : ) : Prop := A : Set , (fun N : N / g N) =O[atTop] (fun N ((A .Icc 1 N).ncard : )) limsup (fun N (sumRep A N : ℕ∞)) atTop =

Given a set of functions $\mathbb{N} → \mathbb{R})$, we assert that for all $g$ in that set, if $g(N) → \infty$ then $$\lvert A\cap {1,\ldots,N}\rvert \gg \frac{N^{1/2}}{g(N)}$$ implies $\limsup 1_A\ast 1_A(n)=\infty$.

def Erdos40ForSet (G : Set ( )) : Prop := g G, Tendsto g atTop atTop Erdos40For g

For what functions $g(N) → \infty$ is it true that $$\lvert A\cap {1,\ldots,N}\rvert \gg \frac{N^{1/2}}{g(N)}$$ implies $\limsup 1_A\ast 1_A(n)=\infty$?

@[category research open, AMS 11] theorem erdos_40 : Erdos40ForSet answer(sorry) := Erdos40ForSet sorry All goals completed! 🐙

If we don't pose additional conditions on the functions, then this is a stronger form of the Erdős-Turán conjecture, see Erdõs Problem 28, (since establishing this for any function $g(N) → \infty$ would imply a positive solution to Erdős Problem 28).

h_erdos_40: (g : ), Tendsto g atTop atTop (A : Set ), ((fun N N / g N) =O[atTop] fun N (A Icc 1 N).ncard) limsup (fun N (∑ p Finset.HasAntidiagonal.antidiagonal N, A.indicator (fun x 1) p.1 * A.indicator (fun x 1) p.2)) atTop = A:Set hA:(A + A).Finiten:hn: i (A + A), i nm:hm:n + 1 mthis✝:0 < mh_empty:¬Nonempty (A Icc 1 m)this:m (A + A)False h_erdos_40: (g : ), Tendsto g atTop atTop (A : Set ), ((fun N N / g N) =O[atTop] fun N (A Icc 1 N).ncard) limsup (fun N (∑ p Finset.HasAntidiagonal.antidiagonal N, A.indicator (fun x 1) p.1 * A.indicator (fun x 1) p.2)) atTop = A:Set hA:(A + A).Finiten:hn: i (A + A), i nm:hm:n + 1 mthis✝¹:0 < mh_empty:¬Nonempty (A Icc 1 m)this✝:m (A + A)this:m nFalse All goals completed! 🐙 h_erdos_40: (g : ), Tendsto g atTop atTop (A : Set ), ((fun N N / g N) =O[atTop] fun N (A Icc 1 N).ncard) limsup (fun N (∑ p Finset.HasAntidiagonal.antidiagonal N, A.indicator (fun x 1) p.1 * A.indicator (fun x 1) p.2)) atTop = A:Set hA:(A + A).Finiten:hn: i (A + A), i nm:hm:n + 1 mthis:0 < mFinite (A Icc 1 m) All goals completed! 🐙end Erdos40