/- 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 50

References:

    erdosproblems.com/50

    [Er95] Erdős, Paul, Some of my favourite problems in number theory, combinatorics, and geometry. Resenhas (1995), 165-186.

    [Sch38] Schoenberg, I. J. "On asymptotic distributions of arithmetical functions." Transactions of the American Mathematical Society 39.2 (1936): 315-330.

@[expose] public sectionopen Filter Set MeasureTheory Topologyopen scoped Nat Topologynamespace Erdos50

A function $f : \mathbb{R} \to \mathbb{R}$ is the asymptotic distribution function of the values of $\varphi(n)/n$ if for all $c \in [0, 1]$, the natural density of ${n : \varphi(n) < cn}$ exists and equals $f(c)$.

def IsDistributionOfPhiRatio (f : ) : Prop := c Icc (0 : ) 1, {n : | (φ n : ) < c * n}.HasDensity (f c)

A function $f : \mathbb{R} \to \mathbb{R}$ is purely singular (or singular continuous) on a set $s \subseteq \mathbb{R}$ if it is continuous on $s$ and its derivative within $s$ equals zero almost everywhere on $s$ with respect to Lebesgue measure.

def IsPurelySingularOn (f : ) (s : Set ) : Prop := ContinuousOn f s ∀ᵐ x (volume.restrict s), derivWithin f s x = 0

Schoenberg [Sch38] proved that the asymptotic distribution function of $\varphi(n)/n$ exists. That is, for any $c \in [0, 1]$, the proportion of integers $n \le N$ satisfying $\varphi(n)/n < c$ approaches a limit as $N \to \infty$. This limit function is the cumulative distribution function of the values of $\varphi(n)/n$.

@[category research solved, AMS 11] theorem erdos_50_schoenberg : f : , IsDistributionOfPhiRatio f := f, IsDistributionOfPhiRatio f All goals completed! 🐙

Erdős [Er95] proved that the distribution function of $\varphi(n)/n$ is purely singular on $[0, 1]$: it is continuous there, but its derivative is zero almost everywhere on $[0, 1]$.

@[category research solved, AMS 11] theorem erdos_50_singular (f : ) (hf : IsDistributionOfPhiRatio f) : IsPurelySingularOn f (Icc 0 1) := f: hf:IsDistributionOfPhiRatio fIsPurelySingularOn f (Icc 0 1) All goals completed! 🐙

Let $f$ be the asymptotic distribution function of $\varphi(n)/n$, so that for each $c \in [0,1]$, $f(c)$ is the natural density of ${n : \varphi(n) < cn}$. Is it true that there is no $x$ such that the derivative $f'(x)$ exists and is positive?

@[category research open, AMS 11] theorem erdos_50 : answer(sorry) ∀ᵉ (f : ) (hf : IsDistributionOfPhiRatio f), ¬ x Icc (0 : ) 1, y > 0, HasDerivWithinAt f y (Icc 0 1) x := True (f : ), IsDistributionOfPhiRatio f ¬ x Icc 0 1, y > 0, HasDerivWithinAt f y (Icc 0 1) x All goals completed! 🐙end Erdos50