AFTD Auto-Formalizing Theoretical Domains

three_token_cycle_five_indep_num

theoremverifiedformalization

The independence number of the 3-token graph of the cycle graph C_5 on 5 vertices equals 5.

Statement

theorem three_token_cycle_five_indep_num :
    (token_graph (SimpleGraph.cycleGraph 5) 3).indepNum = 5
Formalizes
arXiv:2611.22830 Section 5 -- Independent sets in the 2-token graph of a cycle and kings on the torus
Verified
19 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • token_graphThe k-token graph F_k(G) of a simple graph G has as vertices the k-subsets of V(G), with two k-subsets adjacent whenever their symmetric…

Read back from the Lean

The independence number of the 3-token graph of the 5-cycle graph SimpleGraph.cycleGraph 5 is equal to 5.

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

To show that the independence number of the 3-token graph of $C_5$ is 5, we exhibit an explicit independent set of size 5 and prove that no independent set can have larger cardinality. The lower bound is provided by the five consecutive triples of the 5-cycle, which are pairwise non-adjacent in the 3-token graph. For the upper bound, the ten 3-subsets of vertices are partitioned into five disjoint pairs such that the two subsets in each pair are adjacent in the token graph. Since an independent set can contain at most one vertex from each of these five edges, any independent set has size at most 5.

  1. The five candidate triples of the 5-cycle all have cardinality 3, defining valid vertices of the 3-token graph.

    Each of the five subsets {0, 1, 2}, {1, 2, 3}, {2, 3, 4}, {0, 3, 4}, and {0, 1, 4} is verified by finite evaluation (`decide`) to have cardinality 3, ensuring they form well-typed vertices of the 3-token graph.

    lines 18–19

      {⟨{0,1,2}, by decide⟩, ⟨{1,2,3}, by decide⟩, ⟨{2,3,4}, by decide⟩,
       ⟨{0,3,4}, by decide⟩, ⟨{0,1,4}, by decide⟩}
  2. Any function into `Fin n` whose fibers are cliques is injective when restricted to an independent set.

    Let $t$ be an independent set and suppose $f(x) = f(y)$ for $x, y \in t$. If $x \ne y$, the hypothesis on $f$ implies that $x$ and $y$ are adjacent. But elements of the independent set $t$ cannot be adjacent, which is a contradiction. Hence $x = y$.

    lines 27–30

      have hinj : Set.InjOn f ↑t := by
        intro x hx y hy hxy
        by_contra hne
        exact ht x hx y hy hne (h x y hne hxy)
  3. An independent set has cardinality at most $n$ if its vertices map into `Fin n` with adjacent fibers.

    Because $f$ is injective on $t$, the image $f(t)$ has the same cardinality as $t$ (`Finset.card_image_of_injOn`). Since $f(t)$ is a subset of the $n$-element type `Fin n`, its cardinality is at most $n$ (`Finset.card_le_univ`, `Fintype.card_fin`). Linear integer arithmetic (`omega`) concludes $|t| \le n$.

    lines 31–34

    uses Finset.card_image_of_injOn, Finset.card_le_univ, Fintype.card_fin

      have h1 : (t.image f).card = t.card := Finset.card_image_of_injOn hinj
      have h2 : (t.image f).card ≤ Fintype.card (Fin n) := Finset.card_le_univ _
      rw [Fintype.card_fin] at h2
      omega
  4. The five consecutive triples form an independent set in the 3-token graph of $C_5$.

    By `SimpleGraph.isIndepSet_iff`, independence is equivalent to pairwise non-adjacency of all distinct elements in the set. For the explicit set of five triples, non-adjacency in the 3-token graph is checked by finite case exhaustion (`decide`).

    lines 39–40

    uses SimpleGraph.isIndepSet_iff

      rw [SimpleGraph.isIndepSet_iff]
      decide
  5. The explicit candidate independent set has size 5.

    The cardinality of the set of five consecutive triples is evaluated to be 5 by computational reduction (`decide`).

    line 44

        three_token_cycle_five_indep_num_set.card = 5 := by decide
  6. Every independent set in the 3-token graph consists of pairwise non-adjacent vertices.

    Applying `SimpleGraph.isIndepSet_iff` to the assumed independent set $t$ shows that the vertices are pairwise non-adjacent (`Set.Pairwise`), which simplifies to the condition that any distinct $x, y \in t$ satisfy $\neg G.\text{Adj } x\ y$.

    lines 50–53

    uses SimpleGraph.isIndepSet_iff, Set.Pairwise

      have hp : ∀ x ∈ t, ∀ y ∈ t, x ≠ y → ¬ (token_graph (SimpleGraph.cycleGraph 5) 3).Adj x y := by
        have h1 := (SimpleGraph.isIndepSet_iff (G := token_graph (SimpleGraph.cycleGraph 5) 3)
          (s := ↑t)).mp ht
        simpa [Set.Pairwise] using h1
  7. Any two distinct 3-subsets assigned the same index are adjacent in the 3-token graph.

    The indexing function partitions the ten 3-subsets into 5 pairs. For each pair, the symmetric difference of the two subsets is an edge of $C_5$, so the subsets are adjacent in the 3-token graph. This is verified by finite evaluation (`decide`).

    lines 54–56

      have hkey : ∀ x y : {s : Finset (Fin 5) // s.card = 3}, x ≠ y →
          three_token_cycle_five_indep_num_idx x.val = three_token_cycle_five_indep_num_idx y.val →
          (token_graph (SimpleGraph.cycleGraph 5) 3).Adj x y := by decide
  8. Every independent set in the 3-token graph of $C_5$ has size at most 5.

    Applying `three_token_cycle_five_indep_num_card_le` with the indexing function into `Fin 5`, using fiber adjacency (`hkey`) and independence (`hp`), gives $|t| \le 5$. Rewriting 5 as the cardinality of the candidate set using `three_token_cycle_five_indep_num_set_card` completes the upper bound.

    lines 57–61

    uses three_token_cycle_five_indep_num_card_le, three_token_cycle_five_indep_num_set_card

      have h := three_token_cycle_five_indep_num_card_le (token_graph (SimpleGraph.cycleGraph 5) 3)
        (fun x : {s : Finset (Fin 5) // s.card = 3} => three_token_cycle_five_indep_num_idx x.val)
        hkey hp
      rw [three_token_cycle_five_indep_num_set_card]
      exact h
  9. The independence number of the 3-token graph of $C_5$ equals 5.

    The candidate set of five triples is independent (`three_token_cycle_five_indep_num_indep`) and of maximum size (`three_token_cycle_five_indep_num_max`), so it is a maximum independent set. By `SimpleGraph.maximumIndepSet_card_eq_indepNum`, its cardinality equals the independence number. Substituting its size 5 (`three_token_cycle_five_indep_num_set_card`) shows the independence number is 5.

    lines 66–70

    uses SimpleGraph.maximumIndepSet_card_eq_indepNum, three_token_cycle_five_indep_num_indep, three_token_cycle_five_indep_num_max, three_token_cycle_five_indep_num_set_card

      have h := SimpleGraph.maximumIndepSet_card_eq_indepNum (G := token_graph (SimpleGraph.cycleGraph 5) 3)
        three_token_cycle_five_indep_num_set
        ⟨three_token_cycle_five_indep_num_indep, three_token_cycle_five_indep_num_max⟩
      rw [three_token_cycle_five_indep_num_set_card] at h
      exact h.symm
Finset.card_image_of_injOn
An injective map on a finite set preserves its cardinality under image.
Finset.card_le_univ
The cardinality of any finite subset of a finite type is at most the cardinality of the type itself.
Fintype.card_fin
The finite type `Fin n` has cardinality `n`.
SimpleGraph.isIndepSet_iff
A set of vertices is an independent set if and only if no two distinct vertices in the set are adjacent in the graph.
Set.Pairwise
A relation holds pairwise on a set if it holds for all pairs of distinct elements in the set.
three_token_cycle_five_indep_num_card_le
If a function into a set of size `n` maps distinct non-adjacent vertices to distinct values (i.e., its fibers are cliques), then any independent set has size at most `n`.
three_token_cycle_five_indep_num_set_card
The explicit candidate independent set consisting of the five consecutive triples of the 5-cycle has cardinality 5.
three_token_cycle_five_indep_num_indep
The five consecutive triples form an independent set in the 3-token graph of the 5-cycle.
three_token_cycle_five_indep_num_max
Every independent set in the 3-token graph of the 5-cycle has cardinality at most that of the five consecutive triples (at most 5).
SimpleGraph.maximumIndepSet_card_eq_indepNum
The cardinality of any maximum independent set in a finite graph equals the independence number of the graph.

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

private instance three_token_cycle_five_indep_num_inst :    DecidableRel (token_graph (SimpleGraph.cycleGraph 5) 3).Adj :=  fun x y => decidable_of_iff (∃ u v : Fin 5, (SimpleGraph.cycleGraph 5).Adj u v ∧      symmDiff (x.val : Finset (Fin 5)) (y.val : Finset (Fin 5)) = {u, v}) Iff.rfl/-- Index of the matched edge (of a fixed perfect matching of the ten 3-subsets of `Fin 5`)containing a 3-subset. -/private def three_token_cycle_five_indep_num_idx (s : Finset (Fin 5)) : Fin 5 :=  if s = {0,1,2} ∨ s = {0,1,3} then 0  else if s = {0,1,4} ∨ s = {0,2,4} then 1  else if s = {1,2,3} ∨ s = {1,2,4} then 2  else if s = {0,2,3} ∨ s = {2,3,4} then 3  else if s = {0,3,4} ∨ s = {1,3,4} then 4  else 0/-- The five consecutive triples of the 5-cycle, an independent set in `F_3(C_5)`. -/private def three_token_cycle_five_indep_num_set : Finset {s : Finset (Fin 5) // s.card = 3} :=  {⟨{0,1,2}, by decide⟩, ⟨{1,2,3}, by decide⟩, ⟨{2,3,4}, by decide⟩,   ⟨{0,3,4}, by decide⟩, ⟨{0,1,4}, by decide⟩}/-- If `f` is constant on the edges of a matching covering all vertices, an independent setinjects into `Fin n` along `f`, hence has at most `n` vertices. -/private lemma three_token_cycle_five_indep_num_card_le {α : Type*} [Fintype α] [DecidableEq α]    (G : SimpleGraph α) {n : ℕ} (f : α → Fin n)    (h : ∀ x y, x ≠ y → f x = f y → G.Adj x y)    {t : Finset α} (ht : ∀ x ∈ t, ∀ y ∈ t, x ≠ y → ¬ G.Adj x y) : t.card ≤ n := by  have hinj : Set.InjOn f ↑t := by    intro x hx y hy hxy    by_contra hne    exact ht x hx y hy hne (h x y hne hxy)  have h1 : (t.image f).card = t.card := Finset.card_image_of_injOn hinj  have h2 : (t.image f).card ≤ Fintype.card (Fin n) := Finset.card_le_univ _  rw [Fintype.card_fin] at h2  omega/-- The five consecutive triples form an independent set in the 3-token graph of `C_5`. -/private lemma three_token_cycle_five_indep_num_indep :    (token_graph (SimpleGraph.cycleGraph 5) 3).IsIndepSet ↑three_token_cycle_five_indep_num_set := by  rw [SimpleGraph.isIndepSet_iff]  decide/-- The explicit independent set has five elements. -/private lemma three_token_cycle_five_indep_num_set_card :    three_token_cycle_five_indep_num_set.card = 5 := by decide/-- No independent set of the 3-token graph of `C_5` is larger than the five consecutive triples. -/private lemma three_token_cycle_five_indep_num_max (t : Finset {s : Finset (Fin 5) // s.card = 3})    (ht : (token_graph (SimpleGraph.cycleGraph 5) 3).IsIndepSet ↑t) :    t.card ≤ three_token_cycle_five_indep_num_set.card := by  have hp : ∀ x ∈ t, ∀ y ∈ t, x ≠ y → ¬ (token_graph (SimpleGraph.cycleGraph 5) 3).Adj x y := by    have h1 := (SimpleGraph.isIndepSet_iff (G := token_graph (SimpleGraph.cycleGraph 5) 3)      (s := ↑t)).mp ht    simpa [Set.Pairwise] using h1  have hkey : ∀ x y : {s : Finset (Fin 5) // s.card = 3}, x ≠ y →      three_token_cycle_five_indep_num_idx x.val = three_token_cycle_five_indep_num_idx y.val →      (token_graph (SimpleGraph.cycleGraph 5) 3).Adj x y := by decide  have h := three_token_cycle_five_indep_num_card_le (token_graph (SimpleGraph.cycleGraph 5) 3)    (fun x : {s : Finset (Fin 5) // s.card = 3} => three_token_cycle_five_indep_num_idx x.val)    hkey hp  rw [three_token_cycle_five_indep_num_set_card]  exact h/-- The independence number of the 3-token graph of the 5-cycle is 5. -/theorem three_token_cycle_five_indep_num :    (token_graph (SimpleGraph.cycleGraph 5) 3).indepNum = 5 := by  have h := SimpleGraph.maximumIndepSet_card_eq_indepNum (G := token_graph (SimpleGraph.cycleGraph 5) 3)    three_token_cycle_five_indep_num_set    ⟨three_token_cycle_five_indep_num_indep, three_token_cycle_five_indep_num_max⟩  rw [three_token_cycle_five_indep_num_set_card] at h  exact h.symm
See it in the graphDiscuss this resultChallenge it