AFTD Auto-Formalizing Theoretical Domains

op1957_factorcritical_block_two_family_count

theoremverified

Factorcritical block two family count.

Statement

theorem op1957_factorcritical_block_two_family_count
    {V I J : Type*} [Fintype V] [DecidableEq V] [DecidableEq I] [DecidableEq J]
    (G : SimpleGraph V) [DecidableRel G.Adj] (B R : Finset V)
    (hcrit : is_k_factor_critical (G.induce {v | v ∈ B}) 1)
    (hconn : (G.induce {v | v ∈ B}).Connected)
    (K : Finset I) (T : Finset J) (F : I → Finset V) (Q : J → Finset V)
    (hFsub : ∀ i ∈ K, F i ⊆ B ∩ R) (hQsub : ∀ j ∈ T, Q j ⊆ B ∩ R)
    (hQne : ∀ j ∈ T, (Q j).Nonempty) (hQodd : ∀ j ∈ T, Odd (Q j).card)
    (hFdis : ∀ i ∈ K, ∀ l ∈ K, i ≠ l → Disjoint (F i) (F l))
    (hQdis : ∀ i ∈ T, ∀ l ∈ T, i ≠ l → Disjoint (Q i) (Q l))
    (hFQdis : ∀ i ∈ K, ∀ j ∈ T, Disjoint (F i) (Q j))
    (hFanti : ∀ i ∈ K, ∀ l ∈ K, i ≠ l → ∀ u ∈ F i, ∀ v ∈ F l, ¬ G.Adj u v)
    (hQanti : ∀ i ∈ T, ∀ l ∈ T, i ≠ l → ∀ u ∈ Q i, ∀ v ∈ Q l, ¬ G.Adj u v)
    (hFQanti : ∀ i ∈ K, ∀ j ∈ T, ∀ u ∈ F i, ∀ v ∈ Q j, ¬ G.Adj u v)
    (hcover : K.biUnion F ∪ T.biUnion Q = B ∩ R) :
    ((B ∩ R).card < B.card → T.card+(B ∩ R).card+1 ≤ B.card) ∧
    ((B ∩ R).card = B.card → T.card ≤ 1 ∧
      (K.filter (fun i => (F i).Nonempty)).card+T.card ≤ 1)
Source
OP-1957; positive-separator graph-to-count transfer.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
Used by 1

The proof, explained

The proof splits into two cases based on whether |B ∩ R| < |B| or |B ∩ R| = |B|. When |B ∩ R| < |B|, the difference B \\ R contains a vertex z, and because no edges connect any Q j to the rest of B ∩ R, the lemma op1957_factorcritical_block_odd_groups_outside_bound yields |T| + 1 ≤ |B \\ R|, which rearranges to |T| + |B ∩ R| + 1 ≤ |B|. When |B ∩ R| = |B|, the families cover the entire connected subgraph G[B] with no cross-edges, so op1957_connected_block_two_families_at_most_one limits the total number of nonempty parts to at most 1.

  1. Assuming |B ∩ R| < |B|, the set difference B \\ R is nonempty, so there exists a vertex z ∈ B with z ∉ R.

    We split the conjunction into two independent implications. For the first case, we assume |B ∩ R| < |B|. From the identity |B \\ R| + |B ∩ R| = |B|, the cardinality of B \\ R is strictly positive, hence B \\ R is nonempty. We choose a witness z ∈ B \\ R, providing z ∈ B and z ∉ R.

    lines 21–30

    uses Finset.card_pos.mp, Finset.card_sdiff_add_card_inter, Finset.mem_sdiff.mp

      classical
      constructor
      · intro hless
        have hdiff : (B \ R).Nonempty := by
          apply Finset.card_pos.mp
          have hh := Finset.card_sdiff_add_card_inter B R
          omega
        obtain ⟨z,hz⟩ := hdiff
        have hzB := (Finset.mem_sdiff.mp hz).1
        have hzR := (Finset.mem_sdiff.mp hz).2
  2. For each i ∈ T and u ∈ Q i, no vertex v ∈ B ∩ R outside Q i is adjacent to u.

    Given i ∈ T, u ∈ Q i, and v ∈ B ∩ R with v ∉ Q i, the cover hypothesis B ∩ R = ⋃ F ∪ ⋃ Q implies v belongs to some F l or some Q l. If v ∈ F l, adjacency is ruled out by the hypothesis that no edges join F l and Q i. If v ∈ Q l, then since v ∉ Q i we have l ≠ i, so adjacency is ruled out by the hypothesis that no edges join distinct sets Q i and Q l.

    lines 31–39

    uses Finset.mem_union.mp, Finset.mem_biUnion.mp

        have hanti : ∀ i ∈ T, ∀ u ∈ Q i, ∀ v ∈ B ∩ R, v ∉ Q i → ¬ G.Adj u v := by
          intro i hi u hu v hv hvQ hadj
          have hv' : v ∈ K.biUnion F ∪ T.biUnion Q := by rw [hcover]; exact hv
          rcases Finset.mem_union.mp hv' with hvF | hvUnionQ
          · obtain ⟨l,hl,hvl⟩ := Finset.mem_biUnion.mp hvF
            exact hFQanti l hl i hi v hvl u hu hadj.symm
          · obtain ⟨l,hl,hvl⟩ := Finset.mem_biUnion.mp hvUnionQ
            have hil : i ≠ l := fun h => hvQ (h.symm ▸ hvl)
            exact hQanti i hi l hl hil u hu v hvl hadj
  3. If |B ∩ R| < |B|, then |T| + |B ∩ R| + 1 ≤ |B|.

    Because G[B] is 1-factor-critical, each Q j has odd size, the sets Q j are pairwise disjoint with no edges to (B ∩ R) \\ Q j, and z ∈ B \\ R, op1957_factorcritical_block_odd_groups_outside_bound gives |T| + 1 ≤ |B \\ R|. Combining this with |B \\ R| + |B ∩ R| = |B| yields |T| + |B ∩ R| + 1 ≤ |B| by linear arithmetic.

    lines 40–43

    uses op1957_factorcritical_block_odd_groups_outside_bound, Finset.card_sdiff_add_card_inter

        have hh := op1957_factorcritical_block_odd_groups_outside_bound G B R hcrit T Q
          hQsub hQodd hQdis hanti z hzB hzR
        have hc := Finset.card_sdiff_add_card_inter B R
        omega
  4. In the case |B ∩ R| = |B|, the intersection B ∩ R equals B, and each set in both families is a subset of B.

    Since B ∩ R ⊆ B and |B ∩ R| = |B|, the sets B ∩ R and B coincide. Substituting this into the covering hypothesis gives ⋃ F ∪ ⋃ Q = B. Furthermore, since each F i and Q j is a subset of B ∩ R, each is in particular a subset of B.

    lines 44–54

    uses Finset.eq_of_subset_of_card_le, Finset.inter_subset_left, Finset.mem_inter.mp

      · intro heq
        have hBR : B ∩ R = B := by
          apply Finset.eq_of_subset_of_card_le Finset.inter_subset_left
          omega
        have hcov : K.biUnion F ∪ T.biUnion Q = B := by rw [hcover,hBR]
        have hFs : ∀ i ∈ K, F i ⊆ B := by
          intro i hi v hv
          exact (Finset.mem_inter.mp (hFsub i hi hv)).1
        have hQs : ∀ i ∈ T, Q i ⊆ B := by
          intro i hi v hv
          exact (Finset.mem_inter.mp (hQsub i hi hv)).1
  5. If |B ∩ R| = |B|, then |T| ≤ 1 and the total number of nonempty parts in both families is at most 1.

    Because G[B] is connected and partitioned into disjoint sets with no edges between distinct parts, and each Q j is nonempty, op1957_connected_block_two_families_at_most_one implies |{i ∈ K | (F i).Nonempty}| + |T| ≤ 1. Since cardinalities are non-negative, this also entails |T| ≤ 1, completing the proof.

    lines 55–57

    uses op1957_connected_block_two_families_at_most_one

        have hh := op1957_connected_block_two_families_at_most_one G B hconn K T F Q
          hFs hQs hQne hFdis hQdis hFQdis hFanti hQanti hFQanti hcov
        exact ⟨by omega,hh⟩
Finset.card_pos.mp
A finite set is nonempty if and only if its cardinality is strictly positive.
Finset.card_sdiff_add_card_inter
For any finite sets s and t, the cardinality of s \\ t plus the cardinality of s ∩ t equals the cardinality of s.
Finset.mem_sdiff.mp
If an element belongs to the set difference s \\ t, then it belongs to s and does not belong to t.
Finset.mem_union.mp
If an element belongs to the union s ∪ t, then it belongs to s or to t.
Finset.mem_biUnion.mp
If an element belongs to a union of indexed sets, then it belongs to at least one set in the family.
op1957_factorcritical_block_odd_groups_outside_bound
In a graph whose induced subgraph on B is 1-factor-critical, any family of pairwise disjoint, odd-cardinality subsets of B ∩ R with no edges to the rest of B ∩ R satisfies |J| + 1 ≤ |B \\ R| whenever there exists a vertex in B \\ R.
Finset.eq_of_subset_of_card_le
If s is a subset of t and |t| ≤ |s|, then s = t.
Finset.inter_subset_left
The intersection of two sets is a subset of the first set.
Finset.mem_inter.mp
If an element belongs to the intersection of two sets, then it belongs to both sets.
op1957_connected_block_two_families_at_most_one
In a connected induced subgraph on B covered by two families of pairwise disjoint sets with no edges between distinct parts, where each part in the second family is nonempty, the total number of nonempty parts is 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_factorcritical_block_two_family_count    {V I J : Type*} [Fintype V] [DecidableEq V] [DecidableEq I] [DecidableEq J]    (G : SimpleGraph V) [DecidableRel G.Adj] (B R : Finset V)    (hcrit : is_k_factor_critical (G.induce {v | v ∈ B}) 1)    (hconn : (G.induce {v | v ∈ B}).Connected)    (K : Finset I) (T : Finset J) (F : I → Finset V) (Q : J → Finset V)    (hFsub : ∀ i ∈ K, F i ⊆ B ∩ R) (hQsub : ∀ j ∈ T, Q j ⊆ B ∩ R)    (hQne : ∀ j ∈ T, (Q j).Nonempty) (hQodd : ∀ j ∈ T, Odd (Q j).card)    (hFdis : ∀ i ∈ K, ∀ l ∈ K, i ≠ l → Disjoint (F i) (F l))    (hQdis : ∀ i ∈ T, ∀ l ∈ T, i ≠ l → Disjoint (Q i) (Q l))    (hFQdis : ∀ i ∈ K, ∀ j ∈ T, Disjoint (F i) (Q j))    (hFanti : ∀ i ∈ K, ∀ l ∈ K, i ≠ l → ∀ u ∈ F i, ∀ v ∈ F l, ¬ G.Adj u v)    (hQanti : ∀ i ∈ T, ∀ l ∈ T, i ≠ l → ∀ u ∈ Q i, ∀ v ∈ Q l, ¬ G.Adj u v)    (hFQanti : ∀ i ∈ K, ∀ j ∈ T, ∀ u ∈ F i, ∀ v ∈ Q j, ¬ G.Adj u v)    (hcover : K.biUnion F ∪ T.biUnion Q = B ∩ R) :    ((B ∩ R).card < B.card → T.card+(B ∩ R).card+1 ≤ B.card) ∧    ((B ∩ R).card = B.card → T.card ≤ 1 ∧      (K.filter (fun i => (F i).Nonempty)).card+T.card ≤ 1) := by  classical  constructor  · intro hless    have hdiff : (B \ R).Nonempty := by      apply Finset.card_pos.mp      have hh := Finset.card_sdiff_add_card_inter B R      omega    obtain ⟨z,hz⟩ := hdiff    have hzB := (Finset.mem_sdiff.mp hz).1    have hzR := (Finset.mem_sdiff.mp hz).2    have hanti : ∀ i ∈ T, ∀ u ∈ Q i, ∀ v ∈ B ∩ R, v ∉ Q i → ¬ G.Adj u v := by      intro i hi u hu v hv hvQ hadj      have hv' : v ∈ K.biUnion F ∪ T.biUnion Q := by rw [hcover]; exact hv      rcases Finset.mem_union.mp hv' with hvF | hvUnionQ      · obtain ⟨l,hl,hvl⟩ := Finset.mem_biUnion.mp hvF        exact hFQanti l hl i hi v hvl u hu hadj.symm      · obtain ⟨l,hl,hvl⟩ := Finset.mem_biUnion.mp hvUnionQ        have hil : i ≠ l := fun h => hvQ (h.symm ▸ hvl)        exact hQanti i hi l hl hil u hu v hvl hadj    have hh := op1957_factorcritical_block_odd_groups_outside_bound G B R hcrit T Q      hQsub hQodd hQdis hanti z hzB hzR    have hc := Finset.card_sdiff_add_card_inter B R    omega  · intro heq    have hBR : B ∩ R = B := by      apply Finset.eq_of_subset_of_card_le Finset.inter_subset_left      omega    have hcov : K.biUnion F ∪ T.biUnion Q = B := by rw [hcover,hBR]    have hFs : ∀ i ∈ K, F i ⊆ B := by      intro i hi v hv      exact (Finset.mem_inter.mp (hFsub i hi hv)).1    have hQs : ∀ i ∈ T, Q i ⊆ B := by      intro i hi v hv      exact (Finset.mem_inter.mp (hQsub i hi hv)).1    have hh := op1957_connected_block_two_families_at_most_one G B hconn K T F Q      hFs hQs hQne hFdis hQdis hFQdis hFanti hQanti hFQanti hcov    exact ⟨by omega,hh⟩
See it in the graphDiscuss this resultChallenge it