AFTD Auto-Formalizing Theoretical Domains

cube11_cyclic_coloring_has_no_box

theoremverified

The explicit cyclic eleven-cube coloring contains no monochromatic axis-parallel box.

Statement

theorem cube11_cyclic_coloring_has_no_box : cube11_monochromatic_box_count cube11_cyclic_boxfree_coloring = 0
Source
Finite additive certificate for the cyclic construction in experiments 44054, 44056, and 44058, related to OP-1866.
Verified
28 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 6
Used by 3

The proof, explained

To prove that the cyclic coloring of the eleven-cube contains no monochromatic axis-parallel box, we suppose for contradiction that such a box exists with opposite corners (z₀, y₀, x₀) and (z₁, y₁, x₁). Because the color of a point depends only on the sum of its coordinates modulo 11, the eight vertices of the box evaluate to an affine cube {t + ε₁ a + ε₂ b + ε₃ c : εᵢ ∈ {0, 1}} in ℤ/11ℤ with base sum t = z₀ + y₀ + x₀ and step sizes a = z₁ - z₀, b = y₁ - y₀, c = x₁ - x₀. The coordinate strict inequalities guarantee that a, b, c are non-zero modulo 11 by injectivity of the projection from Fin 11 to ℤ/11ℤ. Monochromaticity of the box would then make this affine cube monochromatic under the residue coloring, which directly contradicts the theorem `cube11_cyclic_sumset_no_monochromatic_cube`.

  1. The canonical map from Fin 11 to ℤ/11ℤ is injective.

    Given two indices i, j in Fin 11 whose images in ℤ/11ℤ are equal, it suffices by `Fin.ext` to show their underlying natural values are equal. Applying `ZMod.val` to both sides yields an equality between their canonical representatives in ℕ. By `ZMod.val_natCast`, these representatives are i.val % 11 and j.val % 11. Since i.val < 11 and j.val < 11, `Nat.mod_eq_of_lt` simplifies these remainders to i.val and j.val, showing i = j.

    lines 6–9

    uses Fin.ext, congrArg, ZMod.val, ZMod.val_natCast, Nat.mod_eq_of_lt

      intro i j h
      apply Fin.ext
      have hh := congrArg ZMod.val h
      simpa only [ZMod.val_natCast, Nat.mod_eq_of_lt i.isLt, Nat.mod_eq_of_lt j.isLt] using hh
  2. To show that the count of monochromatic boxes is zero, it suffices to derive a contradiction from the existence of a monochromatic box with corners (z₀, y₀, x₀) and (z₁, y₁, x₁) satisfying z₀ < z₁, y₀ < y₁, and x₀ < x₁.

    Unfolding `cube11_monochromatic_box_count`, the count is the cardinality of the filtered set of boxes. By `Finset.card_eq_zero.mpr` and `Finset.eq_empty_iff_forall_notMem.mpr`, this cardinality is zero provided the set is empty. We assume for contradiction that there exists an element in this set, unpack the filter condition using `Finset.mem_filter`, `Finset.mem_univ`, and `true_and`, and decompose it into the three coordinate strict inequalities and seven color equality hypotheses asserting that all eight vertices share the color of (z₀, y₀, x₀).

    lines 12–18

    uses cube11_monochromatic_box_count, Finset.card_eq_zero.mpr, Finset.eq_empty_iff_forall_notMem.mpr, Finset.mem_filter, Finset.mem_univ, true_and

      classical
      unfold cube11_monochromatic_box_count
      apply Finset.card_eq_zero.mpr
      apply Finset.eq_empty_iff_forall_notMem.mpr
      rintro ⟨⟨z₀,y₀,x₀⟩,⟨z₁,y₁,x₁⟩⟩ hp
      simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hp
      rcases hp with ⟨hz,hy,hx,hx1,hy1,hyx,hz1,hzx,hzy,hzyx⟩
  3. Define the coordinates Z₀, Z₁, Y₀, Y₁, X₀, X₁ in ℤ/11ℤ, the base point coordinate sum t = Z₀ + Y₀ + X₀, and the coordinate step sizes a = Z₁ - Z₀, b = Y₁ - Y₀, and c = X₁ - X₀.

    We map each coordinate from Fin 11 to ℤ/11ℤ by coercing its value, define t as the sum of the coordinates of the lower corner vertex, and define the differences along the three axes as a, b, and c in ℤ/11ℤ.

    lines 19–28

      let Z₀ : ZMod 11 := z₀.val
      let Z₁ : ZMod 11 := z₁.val
      let Y₀ : ZMod 11 := y₀.val
      let Y₁ : ZMod 11 := y₁.val
      let X₀ : ZMod 11 := x₀.val
      let X₁ : ZMod 11 := x₁.val
      let t := Z₀ + Y₀ + X₀
      let a := Z₁ - Z₀
      let b := Y₁ - Y₀
      let c := X₁ - X₀
  4. The step sizes a, b, and c are all non-zero in ℤ/11ℤ.

    By `sub_ne_zero.mpr`, a = Z₁ - Z₀ ≠ 0 is equivalent to Z₁ ≠ Z₀. If Z₁ were equal to Z₀, the injectivity lemma `in1294_cube11_cast_inj` would imply z₁ = z₀, contradicting z₀ < z₁ by `ne_of_lt`. The identical argument establishes b ≠ 0 from y₀ < y₁ and c ≠ 0 from x₀ < x₁.

    lines 29–40

    uses sub_ne_zero.mpr, ne_of_lt, in1294_cube11_cast_inj

      have ha : a ≠ 0 := by
        apply sub_ne_zero.mpr
        intro he
        exact (ne_of_lt hz) (in1294_cube11_cast_inj he.symm)
      have hb : b ≠ 0 := by
        apply sub_ne_zero.mpr
        intro he
        exact (ne_of_lt hy) (in1294_cube11_cast_inj he.symm)
      have hc : c ≠ 0 := by
        apply sub_ne_zero.mpr
        intro he
        exact (ne_of_lt hx) (in1294_cube11_cast_inj he.symm)
  5. The sum of coordinates at each of the other seven vertices of the box in ℤ/11ℤ equals t plus a corresponding subset sum of {a, b, c}. automation

    Expanding the definitions of t, a, b, c and applying abelian group arithmetic (`abel`) establishes the identities: t + a = Z₁ + Y₀ + X₀, t + b = Z₀ + Y₁ + X₀, t + c = Z₀ + Y₀ + X₁, t + a + b = Z₁ + Y₁ + X₀, t + a + c = Z₁ + Y₀ + X₁, t + b + c = Z₀ + Y₁ + X₁, and t + a + b + c = Z₁ + Y₁ + X₁.

    lines 41–47

      have eA : t+a = Z₁+Y₀+X₀ := by dsimp [t,a]; abel
      have eB : t+b = Z₀+Y₁+X₀ := by dsimp [t,b]; abel
      have eC : t+c = Z₀+Y₀+X₁ := by dsimp [t,c]; abel
      have eAB : t+a+b = Z₁+Y₁+X₀ := by dsimp [t,a,b]; abel
      have eAC : t+a+c = Z₁+Y₀+X₁ := by dsimp [t,a,c]; abel
      have eBC : t+b+c = Z₀+Y₁+X₁ := by dsimp [t,b,c]; abel
      have eABC : t+a+b+c = Z₁+Y₁+X₁ := by dsimp [t,a,b,c]; abel
  6. The existence of the monochromatic box contradicts `cube11_cyclic_sumset_no_monochromatic_cube`, completing the proof.

    We invoke `cube11_cyclic_sumset_no_monochromatic_cube`, which asserts that no 3-dimensional affine cube in ℤ/11ℤ with non-zero step sizes can be monochromatic under `cube11_cyclic_residue_color`. The seven required hypotheses are discharged by rewriting each color equality using the definition of `cube11_cyclic_boxfree_coloring` and the algebraic identity for that vertex from the previous step, which shows that all eight vertices of the affine cube have the same residue color.

    lines 48–56

    uses cube11_cyclic_sumset_no_monochromatic_cube, cube11_cyclic_boxfree_coloring

      apply cube11_cyclic_sumset_no_monochromatic_cube t a b c ha hb hc
      refine ⟨?_,?_,?_,?_,?_,?_,?_⟩
      · simpa only [cube11_cyclic_boxfree_coloring, eA] using hz1
      · simpa only [cube11_cyclic_boxfree_coloring, eB] using hy1
      · simpa only [cube11_cyclic_boxfree_coloring, eC] using hx1
      · simpa only [cube11_cyclic_boxfree_coloring, eAB] using hzy
      · simpa only [cube11_cyclic_boxfree_coloring, eAC] using hzx
      · simpa only [cube11_cyclic_boxfree_coloring, eBC] using hyx
      · simpa only [cube11_cyclic_boxfree_coloring, eABC] using hzyx
Fin.ext
Two elements of Fin n are equal if and only if their underlying natural values are equal.
congrArg
Applying a function to equal inputs produces equal outputs: a₁ = a₂ implies f(a₁) = f(a₂).
ZMod.val
The canonical injection mapping an element of ℤ/nℤ to its standard representative in {0, …, n - 1} ⊂ ℕ.
ZMod.val_natCast
The canonical representative in ℕ of a natural number coerced to ℤ/nℤ equals the number modulo n.
Nat.mod_eq_of_lt
For natural numbers a and b, if a < b, then a % b = a.
cube11_monochromatic_box_count
The number of monochromatic axis-parallel boxes in (Fin 11)³ under a given coloring function.
Finset.card_eq_zero.mpr
A finite set has cardinality 0 if and only if it is the empty set.
Finset.eq_empty_iff_forall_notMem.mpr
A finite set is empty if and only if every element does not belong to it.
Finset.mem_filter
An element belongs to a filtered finset if and only if it belongs to the base set and satisfies the filtering condition.
Finset.mem_univ
Every element of a finite type belongs to the universal finset `Finset.univ`.
true_and
In propositional logic, `True ∧ p` is equivalent to `p`.
sub_ne_zero.mpr
In a group or additive group, x - y ≠ 0 if and only if x ≠ y.
ne_of_lt
In a preorder, if x < y then x ≠ y.
in1294_cube11_cast_inj
The map casting an index i : Fin 11 to its value in ℤ/11ℤ is injective.
cube11_cyclic_sumset_no_monochromatic_cube
No 3-dimensional affine cube {t + ε₁ a + ε₂ b + ε₃ c : εᵢ ∈ {0, 1}} in ℤ/11ℤ with non-zero steps a, b, c is monochromatic under the Paley residue coloring.
cube11_cyclic_boxfree_coloring
The coloring of (Fin 11)³ assigning to (z, y, x) the residue color of (z + y + x) in ℤ/11ℤ.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

set_option maxRecDepth 8192set_option maxHeartbeats 5000000set_option linter.constructorNameAsVariable falseprivate theorem in1294_cube11_cast_inj : Function.Injective (fun i : Fin 11 => (i.val : ZMod 11)) := by  intro i j h  apply Fin.ext  have hh := congrArg ZMod.val h  simpa only [ZMod.val_natCast, Nat.mod_eq_of_lt i.isLt, Nat.mod_eq_of_lt j.isLt] using hhtheorem cube11_cyclic_coloring_has_no_box : cube11_monochromatic_box_count cube11_cyclic_boxfree_coloring = 0 := by  classical  unfold cube11_monochromatic_box_count  apply Finset.card_eq_zero.mpr  apply Finset.eq_empty_iff_forall_notMem.mpr  rintro ⟨⟨z₀,y₀,x₀⟩,⟨z₁,y₁,x₁⟩⟩ hp  simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hp  rcases hp with ⟨hz,hy,hx,hx1,hy1,hyx,hz1,hzx,hzy,hzyx⟩  let Z₀ : ZMod 11 := z₀.val  let Z₁ : ZMod 11 := z₁.val  let Y₀ : ZMod 11 := y₀.val  let Y₁ : ZMod 11 := y₁.val  let X₀ : ZMod 11 := x₀.val  let X₁ : ZMod 11 := x₁.val  let t := Z₀ + Y₀ + X₀  let a := Z₁ - Z₀  let b := Y₁ - Y₀  let c := X₁ - X₀  have ha : a ≠ 0 := by    apply sub_ne_zero.mpr    intro he    exact (ne_of_lt hz) (in1294_cube11_cast_inj he.symm)  have hb : b ≠ 0 := by    apply sub_ne_zero.mpr    intro he    exact (ne_of_lt hy) (in1294_cube11_cast_inj he.symm)  have hc : c ≠ 0 := by    apply sub_ne_zero.mpr    intro he    exact (ne_of_lt hx) (in1294_cube11_cast_inj he.symm)  have eA : t+a = Z₁+Y₀+X₀ := by dsimp [t,a]; abel  have eB : t+b = Z₀+Y₁+X₀ := by dsimp [t,b]; abel  have eC : t+c = Z₀+Y₀+X₁ := by dsimp [t,c]; abel  have eAB : t+a+b = Z₁+Y₁+X₀ := by dsimp [t,a,b]; abel  have eAC : t+a+c = Z₁+Y₀+X₁ := by dsimp [t,a,c]; abel  have eBC : t+b+c = Z₀+Y₁+X₁ := by dsimp [t,b,c]; abel  have eABC : t+a+b+c = Z₁+Y₁+X₁ := by dsimp [t,a,b,c]; abel  apply cube11_cyclic_sumset_no_monochromatic_cube t a b c ha hb hc  refine ⟨?_,?_,?_,?_,?_,?_,?_⟩  · simpa only [cube11_cyclic_boxfree_coloring, eA] using hz1  · simpa only [cube11_cyclic_boxfree_coloring, eB] using hy1  · simpa only [cube11_cyclic_boxfree_coloring, eC] using hx1  · simpa only [cube11_cyclic_boxfree_coloring, eAB] using hzy  · simpa only [cube11_cyclic_boxfree_coloring, eAC] using hzx  · simpa only [cube11_cyclic_boxfree_coloring, eBC] using hyx  · simpa only [cube11_cyclic_boxfree_coloring, eABC] using hzyx
See it in the graphDiscuss this resultChallenge it