FormalConjectures/ErdosProblems/231.lean

GitHub source file

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:

Imports (1)
  1. def Erdos231.ContainsAbelianSquare A string S contains an abelian square if it has two consecutive nonempty blocks x and y such that y is a permutation of x line 40 source

    Source documentation

    A string S contains an abelian square if it has two consecutive nonempty blocks x and y such that y is a permutation of x.

    def ContainsAbelianSquare {α : Type*} (S : List α) : Prop :=
    …
  2. theorem Erdos231.containsAbelianSquare_iff S contains an abelian square iff two consecutive blocks of some positive length L of S are permutations of each other line 46 source

    Source documentation

    S contains an abelian square iff two consecutive blocks of some positive length L of S are 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

  3. instance Erdos231.(instance at line 75) line 75 source
  4. theorem Erdos231.not_containsAbelianSquare_example The string $1213121412132124$ of length $2^4$ over four characters contains no abelian square line 81 source

    Source 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

  5. theorem Erdos231.containsAbelianSquare_of_length_four Every string of length $4$ over two characters contains an abelian square line 87 source

    Source 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

  6. theorem Erdos231.containsAbelianSquare_of_length_eight Every string of length $8$ over three characters contains an abelian square line 95 source

    Source 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

  7. theorem Erdos231.erdos_231 sorry line 121 source
  8. theorem Erdos231.erdos_231.variants.two_pow Perhaps Erdős meant line 132 source

    Source 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

  9. theorem Erdos231.erdos_231.variants.two_pow_small Every string of length $2^k$ over $k$ characters contains an abelian square for $k = 2, 3$ line 141 source

    Source 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