AFTD Auto-Formalizing Theoretical Domains

k9_affine_triangle_card

theoremverified

For every colour c : Fin 4 and line j : ZMod 3, the monochromatic triangle k9_affine_triangle c j has cardinality 3.

Statement

theorem k9_affine_triangle_card (c : Fin 4) (j : ZMod 3) : (k9_affine_triangle c j).card = 3
Source
arXiv:2611.06362 Section 2.1
Verified
09 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • k9_affine_triangleThe monochromatic triangle k9_affine_triangle indexed by color : Fin 4 and line : ZMod 3, defined as the finite set of vertices…

Read back from the Lean

For every c : Fin 4 and every j : ZMod 3, the cardinality of the finset k9_affine_triangle c j is 3.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

The theorem states that each of the monochromatic triangles in the affine-plane four-colouring of $K_9$ has exactly 3 vertices. Since there are only 4 colours and 3 parallel lines per colour, the goal is reduced to a universal quantification over $4 \times 3 = 12$ cases and verified by exhaustive computation.

  1. It suffices to verify the cardinality equality universally for all colours $c$ and lines $j$.

    Reverting the arbitrary elements $c$ and $j$ turns the goal into a universally quantified statement over the finite types $\mathrm{Fin}\ 4$ and $\mathbb{Z}/3\mathbb{Z}$, putting it into a form that can be evaluated as a decidable proposition.

    line 3

      revert c j
  2. Every monochromatic triangle has cardinality 3. automation

    Because $\mathrm{Fin}\ 4$ and $\mathbb{Z}/3\mathbb{Z}$ are finite, the universal quantification is decidable. The `decide` tactic closes the goal by evaluating all $4 \times 3 = 12$ instances directly: for each colour and line, it filters the 9 vertices in $\mathbb{Z}/3\mathbb{Z} \times \mathbb{Z}/3\mathbb{Z}$ by the defining equation and counts the 3 surviving points.

    line 4

      decide

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

/-- Each monochromatic triangle in the affine-plane four-colouring of K9 has three vertices. -/theorem k9_affine_triangle_card (c : Fin 4) (j : ZMod 3) : (k9_affine_triangle c j).card = 3 := by  revert c j  decide
See it in the graphDiscuss this resultChallenge it