AFTD Auto-Formalizing Theoretical Domains

three_subset_sum_ten_or_eleven_pair_balanced

theoremverifiedformalization

Let s be a 3-element subset of Fin 6. If the sum over x in s of (x.val + 1) is 10 or 11, then s contains exactly one element from {0, 1}, exactly one element from {2, 3}, and exactly one element from {4, 5}.

Statement

theorem three_subset_sum_ten_or_eleven_pair_balanced (s : Finset (Fin 6))
    (hs_card : s.card = 3)
    (h_sum : s.sum (fun (x : Fin 6) => x.val + 1) = 10 ∨ s.sum (fun (x : Fin 6) => x.val + 1) = 11) :
    (s ∩ {0, 1}).card = 1 ∧ (s ∩ {2, 3}).card = 1 ∧ (s ∩ {4, 5}).card = 1
Formalizes
arXiv:2610.27956, proof of Theorem 10
Verified
22 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 1

Read back from the Lean

For every finite subset $s$ of $\mathrm{Fin}(6)$, if $s$ has cardinality 3 and the sum $\sum_{x \in s} (x.\mathrm{val} + 1)$ is equal to 10 or 11, then $s$ contains exactly one element from $\{0, 1\}$, exactly one element from $\{2, 3\}$, and exactly one element from $\{4, 5\}$ (that is, $|s \cap \{0, 1\}| = 1$, $|s \cap \{2, 3\}| = 1$, and $|s \cap \{4, 5\}| = 1$).

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 asserts that every 3-element subset of $\{1, \dots, 6\}$ summing to 10 or 11 contains exactly one element from each of the pairs $\{1, 2\}$, $\{3, 4\}$, and $\{5, 6\}$. Because the domain $\mathrm{Fin}(6)$ is finite, the statement is a decidable finite search. The proof reverts the arbitrary subset $s$ into a universal quantifier and finishes by direct computation with the `decide` tactic.

  1. The claim is rephrased as a universal proposition over all subsets of $\mathrm{Fin}(6)$.

    Reverting $s$ (along with the hypotheses on its cardinality and sum) turns the goal into a single statement quantified over all $s \subseteq \mathrm{Fin}(6)$: for every such $s$, if $|s| = 3$ and the sum of $x.val + 1$ is 10 or 11, then $s$ intersects each pair $\{0, 1\}$, $\{2, 3\}$, and $\{4, 5\}$ in exactly one element.

    line 6

      revert s
  2. The theorem holds for all subsets. automation

    Because $\mathrm{Fin}(6)$ is a finite type, quantifying over its subsets is decidable. The `decide` tactic evaluates the boolean truth value of the universal statement by exhaustive case enumeration over all subsets of $\mathrm{Fin}(6)$ and confirms it is true.

    line 7

      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

/-- Any 3-element subset of {1..6} summing to 10 or 11 has exactly one element in each of {1,2}, {3,4}, and {5,6}. -/theorem three_subset_sum_ten_or_eleven_pair_balanced (s : Finset (Fin 6))    (hs_card : s.card = 3)    (h_sum : s.sum (fun (x : Fin 6) => x.val + 1) = 10 ∨ s.sum (fun (x : Fin 6) => x.val + 1) = 11) :    (s ∩ {0, 1}).card = 1 ∧ (s ∩ {2, 3}).card = 1 ∧ (s ∩ {4, 5}).card = 1 := by  revert s  decide
See it in the graphDiscuss this resultChallenge it