AFTD Auto-Formalizing Theoretical Domains

op1957_connected_block_anticomplete_groups_at_most_one

theoremverified

Connected block anticomplete groups at most one.

Statement

theorem op1957_connected_block_anticomplete_groups_at_most_one
    {V I : Type*} [Fintype V] [DecidableEq V] [DecidableEq I]
    (G : SimpleGraph V) (B : Finset V)
    (hconn : (G.induce {v | v ∈ B}).Connected)
    (J : Finset I) (F : I → Finset V)
    (hsub : ∀ i ∈ J, F i ⊆ B)
    (hne : ∀ i ∈ J, (F i).Nonempty)
    (hdis : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → Disjoint (F i) (F j))
    (hanti : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → ∀ u ∈ F i, ∀ v ∈ F j, ¬ G.Adj u v)
    (hcover : J.biUnion F = B) : J.card ≤ 1
Source
OP-1957; positive-separator graph-to-count transfer.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
Used by 1

The proof, explained

The theorem is proved by reducing it to op1957_connected_anticomplete_partition_card, which states that a connected graph cannot be partitioned into two or more nonempty, mutually anticomplete sets. The induced subgraph H = G[B] is connected by assumption. By lifting each subset F_i ⊆ B to a subset Q_i of the vertex subtype {v // v ∈ B}, the family (Q_i)_{i ∈ J} inherits nonemptiness, pairwise disjointness, mutual anticompleteness, and covers all vertices of H, immediately yielding |J| ≤ 1.

  1. Define the induced subgraph H = G[B] and the subtype-restricted subsets Q i for each index i.

    We work classically. We define H to be the subgraph of G induced by the vertex set B, and define Q(i) as the subset of the subtype {v // v ∈ B} corresponding to F(i).

    lines 13–15

      classical
      let H := G.induce {v | v ∈ B}
      let Q : I → Finset {v // v ∈ B} := fun i => (F i).subtype (· ∈ B)
  2. Each set Q i is nonempty for i ∈ J.

    For any i ∈ J, F(i) is nonempty by assumption, so it contains some vertex u. Since F(i) ⊆ B, u ∈ B, giving a subtype element ⟨u, _⟩ in Q(i).

    lines 16–20

      have hQne : ∀ i ∈ J, (Q i).Nonempty := by
        intro i hi
        obtain ⟨u,hu⟩ := hne i hi
        refine ⟨⟨u,hsub i hi hu⟩,?_⟩
        simpa [Q] using hu
  3. The sets Q i and Q j are pairwise disjoint for distinct indices i ≠ j in J.

    If a subtype element u belonged to both Q(i) and Q(j), its underlying vertex in V would belong to both F(i) and F(j), contradicting the pairwise disjointness of the original family F.

    lines 21–27

    uses Finset.disjoint_left.mpr, Finset.disjoint_left.mp

      have hQdis : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → Disjoint (Q i) (Q j) := by
        intro i hi j hj hij
        apply Finset.disjoint_left.mpr
        intro u hui huj
        have hui' : u.val ∈ F i := by simpa [Q] using hui
        have huj' : u.val ∈ F j := by simpa [Q] using huj
        exact Finset.disjoint_left.mp (hdis i hi j hj hij) hui' huj'
  4. The sets Q i and Q j are anticomplete in H for distinct indices i ≠ j in J.

    If u ∈ Q(i) and v ∈ Q(j) were adjacent in the induced subgraph H, their underlying vertices would be adjacent in G, contradicting the hypothesis that F(i) and F(j) are anticomplete.

    lines 28–32

      have hQanti : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → ∀ u ∈ Q i, ∀ v ∈ Q j, ¬ H.Adj u v := by
        intro i hi j hj hij u hu v hv hadj
        have hu' : u.val ∈ F i := by simpa [Q] using hu
        have hv' : v.val ∈ F j := by simpa [Q] using hv
        exact hanti i hi j hj hij u.val hu' v.val hv' hadj
  5. The union ⋃_{i ∈ J} Q i covers the entire vertex set of the induced subgraph H.

    For any vertex v in the subtype {v // v ∈ B}, its underlying vertex belongs to B = ⋃_{i ∈ J} F(i). Thus v belongs to F(i) for some i ∈ J, which means v ∈ Q(i). Hence the union over J is the universal set of the subtype.

    lines 33–38

    uses Finset.mem_univ, iff_true, Finset.mem_biUnion.mp, Finset.mem_biUnion.mpr

      have hQcover : J.biUnion Q = Finset.univ := by
        ext v
        simp only [Finset.mem_univ,iff_true]
        have hv : v.val ∈ J.biUnion F := by rw [hcover]; exact v.property
        obtain ⟨i,hi,hvi⟩ := Finset.mem_biUnion.mp hv
        exact Finset.mem_biUnion.mpr ⟨i,hi,by simpa [Q] using hvi⟩
  6. The index set J has cardinality at most 1 (|J| ≤ 1).

    The induced subgraph H is connected and the family (Q i)_{i ∈ J} forms a partition of its vertices into nonempty, pairwise disjoint, mutually anticomplete sets. The existing theorem op1957_connected_anticomplete_partition_card applies directly to conclude |J| ≤ 1.

    line 39

    uses op1957_connected_anticomplete_partition_card

      exact op1957_connected_anticomplete_partition_card H hconn J Q hQne hQdis hQanti hQcover
Finset.disjoint_left.mpr
A pair of finsets is disjoint if no element of the first belongs to the second.
Finset.disjoint_left.mp
If two finsets are disjoint, then no element of the first belongs to the second.
Finset.mem_univ
Every element of a finite type belongs to the universal finset Finset.univ.
iff_true
For any proposition p, the equivalence p ↔ True reduces to p.
Finset.mem_biUnion.mp
If an element belongs to a union of finsets ⋃_{a ∈ s} t(a), then it belongs to t(a) for some a ∈ s.
Finset.mem_biUnion.mpr
If an element belongs to t(a) for some a ∈ s, then it belongs to the union ⋃_{a ∈ s} t(a).
op1957_connected_anticomplete_partition_card
In a connected finite graph, any partition into nonempty, pairwise disjoint, mutually anticomplete vertex sets has an index set of cardinality at most 1.

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 maxHeartbeats 2000000theorem op1957_connected_block_anticomplete_groups_at_most_one    {V I : Type*} [Fintype V] [DecidableEq V] [DecidableEq I]    (G : SimpleGraph V) (B : Finset V)    (hconn : (G.induce {v | v ∈ B}).Connected)    (J : Finset I) (F : I → Finset V)    (hsub : ∀ i ∈ J, F i ⊆ B)    (hne : ∀ i ∈ J, (F i).Nonempty)    (hdis : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → Disjoint (F i) (F j))    (hanti : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → ∀ u ∈ F i, ∀ v ∈ F j, ¬ G.Adj u v)    (hcover : J.biUnion F = B) : J.card ≤ 1 := by  classical  let H := G.induce {v | v ∈ B}  let Q : I → Finset {v // v ∈ B} := fun i => (F i).subtype (· ∈ B)  have hQne : ∀ i ∈ J, (Q i).Nonempty := by    intro i hi    obtain ⟨u,hu⟩ := hne i hi    refine ⟨⟨u,hsub i hi hu⟩,?_⟩    simpa [Q] using hu  have hQdis : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → Disjoint (Q i) (Q j) := by    intro i hi j hj hij    apply Finset.disjoint_left.mpr    intro u hui huj    have hui' : u.val ∈ F i := by simpa [Q] using hui    have huj' : u.val ∈ F j := by simpa [Q] using huj    exact Finset.disjoint_left.mp (hdis i hi j hj hij) hui' huj'  have hQanti : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → ∀ u ∈ Q i, ∀ v ∈ Q j, ¬ H.Adj u v := by    intro i hi j hj hij u hu v hv hadj    have hu' : u.val ∈ F i := by simpa [Q] using hu    have hv' : v.val ∈ F j := by simpa [Q] using hv    exact hanti i hi j hj hij u.val hu' v.val hv' hadj  have hQcover : J.biUnion Q = Finset.univ := by    ext v    simp only [Finset.mem_univ,iff_true]    have hv : v.val ∈ J.biUnion F := by rw [hcover]; exact v.property    obtain ⟨i,hi,hvi⟩ := Finset.mem_biUnion.mp hv    exact Finset.mem_biUnion.mpr ⟨i,hi,by simpa [Q] using hvi⟩  exact op1957_connected_anticomplete_partition_card H hconn J Q hQne hQdis hQanti hQcover
See it in the graphDiscuss this resultChallenge it