FormalConjectures/ErdosProblems/231.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
9 declarations, 1 contain sorry, 0 declared as axioms
Erdős Problem 231
References:
- erdosproblems.com/231
- [Er57] Erdős, Paul, Some unsolved problems. Michigan Math. J. (1957), 291-300.
- [Er61] Erdős, Paul, Some unsolved problems. Magyar Tud. Akad. Mat. Kutató Int. Közl. (1961), 221-254.
- [Ke92] Keränen, Veikko, Abelian squares are avoidable on $4$ letters. Automata, languages and programming (Vienna, 1992) (1992), 41-52.
- [FiPu23] Fici, Gabriele and Puzynina, Svetlana, Abelian combinatorics on words: a survey. Comput. Sci. Rev. (2023), Paper No. 100532, 21.
Imports (1)
- def
Erdos231.ContainsAbelianSquareA stringScontains an abelian square if it has two consecutive nonempty blocksxandysuch thatyis a permutation ofxline 40 sourceSource documentation
A string
Scontains an abelian square if it has two consecutive nonempty blocksxandysuch thatyis a permutation ofx.def ContainsAbelianSquare {α : Type*} (S : List α) : Prop := … - theorem
Erdos231.containsAbelianSquare_iffScontains an abelian square iff two consecutive blocks of some positive lengthLofSare permutations of each other line 46 sourceSource documentation
Scontains an abelian square iff two consecutive blocks of some positive lengthLofSare permutations of each other.theorem containsAbelianSquare_iff {α : Type*} (S : List α) : ContainsAbelianSquare S ↔ ∃ i < S.length, ∃ L < S.length, 0 < L ∧ i + 2 * L ≤ S.length ∧ ((S.drop i).take L).Perm ((S.drop (i + L)).take L) := by …Mentions: Erdos231.ContainsAbelianSquare
- instance
Erdos231.(instance at line 75)line 75 source - theorem
Erdos231.not_containsAbelianSquare_exampleThe string $1213121412132124$ of length $2^4$ over four characters contains no abelian square line 81 sourceSource documentation
The string $1213121412132124$ of length $2^4$ over four characters contains no abelian square.
theorem not_containsAbelianSquare_example : ¬ ContainsAbelianSquare ([0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 1, 0, 1, 3] : List (Fin 4)) := by …Mentions: Erdos231.ContainsAbelianSquare
- theorem
Erdos231.containsAbelianSquare_of_length_fourEvery string of length $4$ over two characters contains an abelian square line 87 sourceSource documentation
Every string of length $4$ over two characters contains an abelian square.
theorem containsAbelianSquare_of_length_four (f : Fin 4 → Fin 2) : ContainsAbelianSquare (List.ofFn f) := by …Mentions: Erdos231.ContainsAbelianSquare
- theorem
Erdos231.containsAbelianSquare_of_length_eightEvery string of length $8$ over three characters contains an abelian square line 95 sourceSource documentation
Every string of length $8$ over three characters contains an abelian square.
theorem containsAbelianSquare_of_length_eight (f : Fin 8 → Fin 3) : ContainsAbelianSquare (List.ofFn f) := by …Mentions: Erdos231.ContainsAbelianSquare
- theorem
Erdos231.erdos_231sorry line 121 source - theorem
Erdos231.erdos_231.variants.two_powPerhaps Erdős meant line 132 sourceSource documentation
Perhaps Erdős meant $2^k$, where indeed there is an example for $k=4$: $$1213121412132124.$$ Every string of length $2^k$ over $k$ characters contains an abelian square for $k = 2, 3$, but not for $k \geq 4$.
theorem erdos_231.variants.two_pow : answer(False) ↔ ∀ k : ℕ, 2 ≤ k → ∀ S : List (Fin k), S.length = 2 ^ k → ContainsAbelianSquare S := by …Mentions: Erdos231.ContainsAbelianSquare
- theorem
Erdos231.erdos_231.variants.two_pow_smallEvery string of length $2^k$ over $k$ characters contains an abelian square for $k = 2, 3$ line 141 sourceSource documentation
Every string of length $2^k$ over $k$ characters contains an abelian square for $k = 2, 3$.
theorem erdos_231.variants.two_pow_small (k : ℕ) (hk : k = 2 ∨ k = 3) (S : List (Fin k)) (hS : S.length = 2 ^ k) : ContainsAbelianSquare S := by …Mentions: Erdos231.ContainsAbelianSquare