Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 45 additions & 15 deletions FormalConjectures/ErdosProblems/888.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/-
Copyright 2025 The Formal Conjectures Authors.
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.
Expand All @@ -19,37 +19,67 @@ import FormalConjectures.Util.ProblemImports
/-!
# Erdős Problem 888

*Reference:* [erdosproblems.com/888](https://www.erdosproblems.com/888)
*References:*
- [erdosproblems.com/888](https://www.erdosproblems.com/888)
- [Er98] Erdős, Paul, Some of my new and almost new problems and results in combinatorial number
theory. Number theory (Eger, 1996) (1998), 169-180.
-/

open Classical Filter

namespace Erdos888


/-- Condition on the sets `A` appearing in Erdős 888. Namely, let `A` be a subset
of `{1,...,n}` such that if `a ≤ b ≤ c ≤ d ∈ A` and `abcd` square then `ad=bc`. -/
/--
Condition on the sets $A$ appearing in Erdős 888. Namely, let $A$ be a subset
of ${1,...,n}$ such that if $a ≤ b ≤ c ≤ d ∈ A$ and $abcd$ square then $ad=bc$.
-/
def RequiredCondition (A : Finset ℕ) (n : ℕ) : Prop :=
A ⊆ Finset.Ioc 0 n ∧ ∀ᵉ (a ∈ A) (b ∈ A) (c ∈ A) (d ∈ A),
a ≤ b → b ≤ c → c ≤ d → IsSquare (a * b * c * d) → a * d = b * c

/-- Proposition that for a specific `n` an `A` with the above defined condition
and cardinality `k` exists. -/
/--
Proposition that for a specific $n$ an $A$ with the above defined condition and cardinality $k$
exists.
-/
def p (n : ℕ) (k : ℕ) : Prop := ∃ A : Finset ℕ, RequiredCondition A n ∧ A.card = k

/--
What is the size of the largest $A\subseteq \{1,\ldots,n\}$ such that if
$a\leq b\leq c\leq d\in A$ are such that $abcd$ is a square then $ad=bc$?

This was proved by GPT-5.5 Pro (prompted by Chojecki).
-/
@[category research solved, AMS 11]
theorem erdos_888 :
(fun n : ℕ ↦ (Nat.findGreatest (p n) n : ℝ)) =Θ[atTop]
(fun n : ℕ ↦ (n : ℝ) * Real.log (Real.log n) / Real.log n) := by
sorry

/-- What is the size of the largest subset `A` of `{1,...,n}` such that if
`a ≤ b ≤ c ≤ d ∈ A` and `abcd` square then `ad=bc` -/
@[category research open, AMS 11]
theorem erdos_888 : ∀ n, Nat.findGreatest (p n) n = (answer(sorry) : ℕ → ℕ) n := by
/--
Erdős claims that Sárközy proved that $\lvert A\rvert =o(n)$ (a proof of this
bound is provided by Tao in the comments).
-/
@[category research solved, AMS 11]
theorem erdos_888.variants.sarkozy :
(fun n ↦ (Nat.findGreatest (p n) n : ℝ)) =o[atTop] (Nat.cast : ℕ → ℝ) := by
sorry

/--`|A|=o(n)`. -/
/--
The primes show that $\lvert A\rvert \gg n/\log n$ is possible.
-/
@[category research solved, AMS 11]
theorem erdos_888.variants.sarkozy : (fun n ↦ (Nat.findGreatest (p n) n : ℝ)) =o[atTop] (Nat.cast : ℕ → ℝ) := by
theorem erdos_888.variants.primes :
(fun n : ℕ ↦ (Nat.findGreatest (p n) n : ℝ)) ≫ (fun n : ℕ ↦ (n : ℝ) / Real.log n) := by
sorry

/-- The primes show that `|A| ≫ n/log n` is possible. -/
/--
Cambie and Weisenberg have noted in the comments that the set of semiprimes
also works, showing $(1+o(1))\frac{\log\log n}{\log n}n \leq \lvert A\rvert$ is achievable.
-/
@[category research solved, AMS 11]
theorem erdos_888.variants.primes : (fun n : ℕ ↦ (Nat.findGreatest (p n) n : ℝ )) ≫ (fun n : ℕ ↦ n / (n : ℝ).log) := by
theorem erdos_888.variants.semiprimes :
(fun n : ℕ ↦ (Nat.findGreatest (p n) n : ℝ)) ≫
(fun n : ℕ ↦ (n : ℝ) * Real.log (Real.log n) / Real.log n) := by
sorry

end Erdos888
4 changes: 2 additions & 2 deletions FormalConjectures/Subsets/FC100OpenSet1.lean
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,6 @@ end Subsets.FC100OpenSet1

open Lean Meta ProblemAttributes in
#eval verifyCategoryCounts Subsets.FC100OpenSet1.problems [
("research open", 95),
("research solved", 5)
("research open", 94),
("research solved", 6)
]
Loading