/- 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 782 *References:* - [erdosproblems.com/782](https://www.erdosproblems.com/782) - [BEF90] Brown, T. C. and Erdős, P. and Freedman, A. R., _Quasi-progressions and descending waves_. J. Combin. Theory Ser. A 53 (1990), 81-95. - [BFS03] Brown, T. C., Freedman, A. R. and Shiue, P. J.-S., _Progressions of squares_. Australas. J. Combin. 27 (2003), 187-192. - [BEU26] Bremner, A., Elsholtz, C. and Ulas, M., _There are infinitely many Hilbert cubes of dimension 3 in the set of squares_. [arXiv:2604.05459](https://arxiv.org/abs/2604.05459) (2026). - [CiGr07] Cilleruelo, J. and Granville, A., _Lattice points on circles, squares in arithmetic progressions and sumsets of squares_. Additive combinatorics (2007), 241-262. - [DiEl12] Dietmann, R. and Elsholtz, C., _Hilbert cubes in progression-free sets and in the set of squares II_. [arXiv:1207.1461](https://arxiv.org/abs/1207.1461) (2012). - [So07] Solymosi, J., _Elementary additive combinatorics_. Additive combinatorics (2007), 29-38. -/ @[expose] public section namespace Erdos782 /-- `ContainsQuasiProgression S C k` says that `S` contains a $k$-term quasi-progression of diameter $C$: terms $x_1,\ldots,x_k\in S$ and a difference $d\geq 1$ with $x_i+d\leq x_{i+1}\leq x_i+d+C$ for all $1\leq i0$ such that, for any $k$, the squares contain a sequence $x_1,\ldots,x_k$ where, for some $d$ and all $1\leq i