AFTD Auto-Formalizing Theoretical Domains

four_block_forbidden_shore_separator_bound

theoremverified

In a 2L-vertex graph with the stated L-vertex separator property, disjoint blocks A, B, D, anticomplete A and B of total size L, and a nonempty Q∩A anticomplete to W∩D, the sizes of Q∩A and W∩D sum to at most |A|.

Statement

theorem four_block_forbidden_shore_separator_bound
    (L : ℕ) (G : SimpleGraph (Fin (2*L))) [DecidableRel G.Adj]
    (A B D Q W : Finset (Fin (2*L)))
    (hAB : Disjoint A B) (hAD : Disjoint A D) (hBD : Disjoint B D)
    (hsize : A.card+B.card=L) (hB : B.Nonempty)
    (hnoAB : ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b)
    (hcross : ∀ a ∈ Q ∩ A, ∀ d ∈ W ∩ D, ¬ G.Adj a d)
    (hsep : ∀ X U V : Finset (Fin (2*L)), U.Nonempty → V.Nonempty →
      Disjoint X U → Disjoint X V → Disjoint U V → X ∪ U ∪ V = Finset.univ →
      (∀ u ∈ U, ∀ v ∈ V, ¬ G.Adj u v) → L ≤ X.card)
    (hne : (Q ∩ A).Nonempty) :
    (Q ∩ A).card + (W ∩ D).card ≤ A.card
Source
OP-1957: a forbidden-block shore cut found from the zero-defect relaxations.
Verified
24 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 2

The proof, explained

To bound |Q ∩ A| + |W ∩ D|, we partition the graph into two disconnected shores, U = B ∪ (W ∩ D) and V = Q ∩ A, and their complement separator X = V(G) \ (U ∪ V). The disjointness and anticompleteness assumptions between A, B, and D ensure that U and V are nonempty, disjoint, and have no cross-edges. By the graph separator property, X must have size at least L. Since the entire graph has 2L vertices and |A| + |B| = L, an exact vertex count shows that |X| + |B| + |W ∩ D| + |Q ∩ A| = 2L, which immediately implies the desired upper bound |A|.

  1. Define shores U and V and separator candidate X.

    We set U := B ∪ (W ∩ D), V := Q ∩ A, and define X := Finset.univ \ (U ∪ V) to be the complement of their union in the entire vertex set.

    lines 13–16

      classical
      let U := B ∪ (W ∩ D)
      let V := Q ∩ A
      let X := Finset.univ \ (U ∪ V)
  2. Both U and V are nonempty.

    Since B is nonempty, any vertex b ∈ B belongs to U = B ∪ (W ∩ D) by Finset.mem_union_left, so U is nonempty. The set V = Q ∩ A is nonempty directly by hypothesis hne.

    lines 17–20

    uses Finset.mem_union_left

      have hUne : U.Nonempty := by
        obtain ⟨b,hb⟩ := hB
        exact ⟨b, Finset.mem_union_left _ hb⟩
      have hVne : V.Nonempty := hne
  3. The shores U and V are disjoint.

    By Finset.disjoint_left.mpr, we check that no vertex z lies in both U and V. Any z ∈ V = Q ∩ A is in A. If z were in U = B ∪ (W ∩ D), it would have to be in B (contradicting the disjointness of A and B via Finset.disjoint_left.mp) or in D (contradicting the disjointness of A and D). Thus U and V are disjoint.

    lines 21–27

    uses Finset.disjoint_left.mpr, Finset.mem_union, Finset.mem_inter, Finset.disjoint_left.mp

      have hUV : Disjoint U V := by
        apply Finset.disjoint_left.mpr
        intro z hzU hzV
        simp only [U,V,Finset.mem_union,Finset.mem_inter] at hzU hzV
        rcases hzU with hzB | ⟨hzW,hzD⟩
        · exact Finset.disjoint_left.mp hAB hzV.2 hzB
        · exact Finset.disjoint_left.mp hAD hzV.2 hzD
  4. The candidate separator X is disjoint from both U and V.

    Because X is defined as the set difference univ \ (U ∪ V), any element in X cannot belong to U ∪ V by Finset.mem_sdiff.mp. Consequently, it belongs neither to U (via Finset.mem_union_left) nor to V (via Finset.mem_union_right), proving X is disjoint from both sets by Finset.disjoint_left.mpr.

    lines 28–35

    uses Finset.disjoint_left.mpr, Finset.mem_sdiff.mp, Finset.mem_union_left, Finset.mem_union_right

      have hXU : Disjoint X U := by
        apply Finset.disjoint_left.mpr
        intro z hzX hzU
        exact (Finset.mem_sdiff.mp hzX).2 (Finset.mem_union_left _ hzU)
      have hXV : Disjoint X V := by
        apply Finset.disjoint_left.mpr
        intro z hzX hzV
        exact (Finset.mem_sdiff.mp hzX).2 (Finset.mem_union_right _ hzV)
  5. The sets X, U, and V partition the vertex set, covering Finset.univ.

    Since X is the complement of U ∪ V in Finset.univ, the union X ∪ U ∪ V reconstructs the entire universal set of 2L vertices.

    lines 36–38

      have hcover : X ∪ U ∪ V = Finset.univ := by
        ext z
        simp [X]
  6. There are no edges in G between U and V.

    Suppose some u ∈ U and v ∈ V = Q ∩ A are adjacent. Since v ∈ A, if u ∈ B, this contradicts the hypothesis hnoAB that A and B have no edges. If instead u ∈ W ∩ D, this contradicts the hypothesis hcross that Q ∩ A and W ∩ D have no edges. Hence U and V are anticomplete.

    lines 39–44

    uses Finset.mem_union, Finset.mem_inter, Finset.mem_inter.mpr

      have hanti : ∀ u ∈ U, ∀ v ∈ V, ¬ G.Adj u v := by
        intro u hu v hv huv
        simp only [U,V,Finset.mem_union,Finset.mem_inter] at hu hv
        rcases hu with huB | ⟨huW,huD⟩
        · exact hnoAB v hv.2 u huB huv.symm
        · exact hcross v (Finset.mem_inter.mpr hv) u (Finset.mem_inter.mpr ⟨huW,huD⟩) huv.symm
  7. The separator size satisfies |X| ≥ L.

    The triple (X, U, V) satisfies all conditions of the separator hypothesis hsep: U and V are nonempty, mutually disjoint, anticomplete in G, and together with X cover all 2L vertices. Thus hsep yields |X| ≥ L.

    line 45

      have hcut := hsep X U V hUne hVne hXU hXV hUV hcover hanti
  8. The total vertex count decomposes as |X| + |B| + |W ∩ D| + |Q ∩ A| = 2L.

    Because B and D are disjoint, B is disjoint from W ∩ D by Finset.disjoint_of_subset_right and Finset.inter_subset_right, giving |U| = |B| + |W ∩ D| by Finset.card_union_of_disjoint. Since U and V are disjoint, |U ∪ V| = |U| + |V| = |B| + |W ∩ D| + |Q ∩ A|. Finally, by Finset.card_sdiff_add_card_inter, |X| + |U ∪ V| equals the total number of vertices, which simplifies to 2L using Finset.univ_inter, Finset.card_univ, and Fintype.card_fin.

    lines 46–54

    uses Finset.disjoint_of_subset_right, Finset.inter_subset_right, Finset.card_union_of_disjoint, Finset.card_sdiff_add_card_inter, Finset.univ_inter, Finset.card_univ, Fintype.card_fin

      have hdis : Disjoint B (W ∩ D) :=
        Finset.disjoint_of_subset_right Finset.inter_subset_right hBD
      have hUcard : U.card = B.card + (W ∩ D).card := Finset.card_union_of_disjoint hdis
      have hUVcard : (U ∪ V).card = U.card + V.card := Finset.card_union_of_disjoint hUV
      have htotal := Finset.card_sdiff_add_card_inter (Finset.univ : Finset (Fin (2*L))) (U ∪ V)
      simp only [Finset.univ_inter, Finset.card_univ, Fintype.card_fin] at htotal
      change X.card + (U ∪ V).card = 2*L at htotal
      rw [hUVcard,hUcard] at htotal
      change X.card + (B.card + (W ∩ D).card + (Q ∩ A).card) = 2*L at htotal
  9. |Q ∩ A| + |W ∩ D| ≤ |A|. automation

    Combining |X| + |B| + |W ∩ D| + |Q ∩ A| = 2L with the separator lower bound |X| ≥ L and the hypothesis |A| + |B| = L gives |Q ∩ A| + |W ∩ D| = 2L - |X| - |B| ≤ 2L - L - |B| = L - |B| = |A|. The omega tactic completes this linear integer arithmetic deduction.

    line 55

      omega
Fintype.card_fin
The cardinality of the finite type Fin n is n.
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.card_union_of_disjoint
The cardinality of the union of two disjoint finite sets is the sum of their cardinalities.
Finset.card_univ
The cardinality of the universal finset on a finite type is the cardinality of the type.
Finset.disjoint_left.mp
If two finite sets are disjoint, no element of the first belongs to the second.
Finset.disjoint_left.mpr
If no element of the first finite set belongs to the second, the two sets are disjoint.
Finset.disjoint_of_subset_right
If a finite set s is disjoint from u, and t ⊆ u, then s is disjoint from t.
Finset.inter_subset_right
The intersection of two finite sets is a subset of the second set.
Finset.mem_inter
An element belongs to the intersection of two finite sets if and only if it belongs to both.
Finset.mem_inter.mpr
If an element belongs to both finite sets, it belongs to their intersection.
Finset.mem_sdiff.mp
If an element belongs to the difference s \ t, it belongs to s and not to t.
Finset.mem_union
An element belongs to the union of two finite sets if and only if it belongs to at least one of them.
Finset.mem_union_left
An element belonging to a finite set s belongs to s ∪ t for any finite set t.
Finset.mem_union_right
An element belonging to a finite set t belongs to s ∪ t for any finite set s.
Finset.univ_inter
The intersection of the universal finset with any finite set s is s.

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

theorem four_block_forbidden_shore_separator_bound    (L : ℕ) (G : SimpleGraph (Fin (2*L))) [DecidableRel G.Adj]    (A B D Q W : Finset (Fin (2*L)))    (hAB : Disjoint A B) (hAD : Disjoint A D) (hBD : Disjoint B D)    (hsize : A.card+B.card=L) (hB : B.Nonempty)    (hnoAB : ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b)    (hcross : ∀ a ∈ Q ∩ A, ∀ d ∈ W ∩ D, ¬ G.Adj a d)    (hsep : ∀ X U V : Finset (Fin (2*L)), U.Nonempty → V.Nonempty →      Disjoint X U → Disjoint X V → Disjoint U V → X ∪ U ∪ V = Finset.univ →      (∀ u ∈ U, ∀ v ∈ V, ¬ G.Adj u v) → L ≤ X.card)    (hne : (Q ∩ A).Nonempty) :    (Q ∩ A).card + (W ∩ D).card ≤ A.card := by  classical  let U := B ∪ (W ∩ D)  let V := Q ∩ A  let X := Finset.univ \ (U ∪ V)  have hUne : U.Nonempty := by    obtain ⟨b,hb⟩ := hB    exact ⟨b, Finset.mem_union_left _ hb⟩  have hVne : V.Nonempty := hne  have hUV : Disjoint U V := by    apply Finset.disjoint_left.mpr    intro z hzU hzV    simp only [U,V,Finset.mem_union,Finset.mem_inter] at hzU hzV    rcases hzU with hzB | ⟨hzW,hzD⟩    · exact Finset.disjoint_left.mp hAB hzV.2 hzB    · exact Finset.disjoint_left.mp hAD hzV.2 hzD  have hXU : Disjoint X U := by    apply Finset.disjoint_left.mpr    intro z hzX hzU    exact (Finset.mem_sdiff.mp hzX).2 (Finset.mem_union_left _ hzU)  have hXV : Disjoint X V := by    apply Finset.disjoint_left.mpr    intro z hzX hzV    exact (Finset.mem_sdiff.mp hzX).2 (Finset.mem_union_right _ hzV)  have hcover : X ∪ U ∪ V = Finset.univ := by    ext z    simp [X]  have hanti : ∀ u ∈ U, ∀ v ∈ V, ¬ G.Adj u v := by    intro u hu v hv huv    simp only [U,V,Finset.mem_union,Finset.mem_inter] at hu hv    rcases hu with huB | ⟨huW,huD⟩    · exact hnoAB v hv.2 u huB huv.symm    · exact hcross v (Finset.mem_inter.mpr hv) u (Finset.mem_inter.mpr ⟨huW,huD⟩) huv.symm  have hcut := hsep X U V hUne hVne hXU hXV hUV hcover hanti  have hdis : Disjoint B (W ∩ D) :=    Finset.disjoint_of_subset_right Finset.inter_subset_right hBD  have hUcard : U.card = B.card + (W ∩ D).card := Finset.card_union_of_disjoint hdis  have hUVcard : (U ∪ V).card = U.card + V.card := Finset.card_union_of_disjoint hUV  have htotal := Finset.card_sdiff_add_card_inter (Finset.univ : Finset (Fin (2*L))) (U ∪ V)  simp only [Finset.univ_inter, Finset.card_univ, Fintype.card_fin] at htotal  change X.card + (U ∪ V).card = 2*L at htotal  rw [hUVcard,hUcard] at htotal  change X.card + (B.card + (W ∩ D).card + (Q ∩ A).card) = 2*L at htotal  omega
See it in the graphDiscuss this resultChallenge it