AFTD Auto-Formalizing Theoretical Domains

saturated_other_shores_opposite_block_card_le_three

theoremverified

For disjoint shores with only the displayed crossing edge, saturation at x limits the total number of C vertices on the other three shores to three.

Statement

theorem saturated_other_shores_opposite_block_card_le_three
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (F : Fin 4 → Finset V) (C : Finset V) (x y p q : V)
    (hdis : ∀ i j, i ≠ j → Disjoint (F i) (F j))
    (hx : x ∈ F 0)
    (hcross : ∀ i j : Fin 4, i ≠ j → ∀ a ∈ F i, ∀ b ∈ F j, G.Adj a b →
      (i=0 ∧ j=1 ∧ a=x ∧ b=y) ∨ (i=1 ∧ j=0 ∧ a=y ∧ b=x))
    (hfull : ∀ z ∈ C, z ≠ p → z ≠ q → G.Adj x z) :
    (F 1 ∩ C).card+(F 2 ∩ C).card+(F 3 ∩ C).card ≤ 3
Source
OP-1957; saturated positive-barrier graph-to-count transfer.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 2

The proof, explained

The theorem bounds the total number of vertices in C on the shores F 1, F 2, F 3 other than F 0 to at most three. Every vertex z in these shores that belongs to C must either be p or q, or else be adjacent to x by the saturation condition; because the only crossing edge involving F 0 is between x and y, any such adjacent vertex must be y, restricting all three intersections to {p, q, y}. Since the three shores are mutually disjoint, the sum of their individual intersections with C is the cardinality of their disjoint union, which is at most |{p, q, y}| ≤ 3.

  1. For each non-zero shore index i ≠ 0, the intersection F i ∩ C is contained in {p, q, y}.

    Let i ≠ 0 and let z ∈ F i ∩ C. If z = p or z = q, then z ∈ {p, q, y} immediately. Otherwise, z ≠ p and z ≠ q, so by the saturation hypothesis (hfull), x is adjacent to z. Since x ∈ F 0 and z ∈ F i with i ≠ 0, the edge between x and z crosses between distinct shores. By the crossing edge hypothesis (hcross), any crossing edge with an endpoint in F 0 must connect x ∈ F 0 and y ∈ F 1, forcing z = y. Thus in all cases, z belongs to {p, q, y}.

    lines 12–26

    uses Finset.mem_inter.mp, Ne.symm

      classical
      have hallowed : ∀ i : Fin 4, i ≠ 0 → F i ∩ C ⊆ ({p,q,y} : Finset V) := by
        intro i hi z hz
        obtain ⟨hzF,hzC⟩ := Finset.mem_inter.mp hz
        by_cases hp : z=p
        · simp [hp]
        · by_cases hq : z=q
          · simp [hq]
          · have hh := hcross 0 i (Ne.symm hi) x hx z hzF (hfull z hzC hp hq)
            have he : z=y := by
              rcases hh with h | h
              · exact h.2.2.2
              · have : (0 : Fin 4) = 1 := h.1
                exact ((by decide : (0 : Fin 4) ≠ 1) this).elim
            simp [he]
  2. The intersections P = F 1 ∩ C, Q = F 2 ∩ C, and R = F 3 ∩ C are pairwise disjoint, and (P ∪ Q) is disjoint from R.

    We abbreviate P = F 1 ∩ C, Q = F 2 ∩ C, and R = F 3 ∩ C. Since the shores F 1, F 2, F 3 are pairwise disjoint by hdis, and each intersection is a subset of its respective shore, the sets P, Q, and R are pairwise disjoint. Consequently, the union P ∪ Q is disjoint from R.

    lines 27–36

    uses Finset.disjoint_of_subset_left, Finset.inter_subset_left, Finset.disjoint_of_subset_right, Finset.disjoint_union_left.mpr

      let P := F 1 ∩ C
      let Q := F 2 ∩ C
      let R := F 3 ∩ C
      have hPQ : Disjoint P Q := Finset.disjoint_of_subset_left Finset.inter_subset_left
        (Finset.disjoint_of_subset_right Finset.inter_subset_left (hdis 1 2 (by decide)))
      have hPR : Disjoint P R := Finset.disjoint_of_subset_left Finset.inter_subset_left
        (Finset.disjoint_of_subset_right Finset.inter_subset_left (hdis 1 3 (by decide)))
      have hQR : Disjoint Q R := Finset.disjoint_of_subset_left Finset.inter_subset_left
        (Finset.disjoint_of_subset_right Finset.inter_subset_left (hdis 2 3 (by decide)))
      have hPQR : Disjoint (P ∪ Q) R := Finset.disjoint_union_left.mpr ⟨hPR,hQR⟩
  3. The union P ∪ Q ∪ R is a subset of {p, q, y}.

    Applying the earlier inclusion hallowed to indices 1, 2, and 3 shows that each of P, Q, and R is a subset of {p, q, y}. Therefore, their union P ∪ Q ∪ R is also contained in {p, q, y}.

    lines 37–39

    uses Finset.union_subset

      have hsub : P ∪ Q ∪ R ⊆ ({p,q,y} : Finset V) := by
        exact Finset.union_subset (Finset.union_subset (hallowed 1 (by decide)) (hallowed 2 (by decide)))
          (hallowed 3 (by decide))
  4. The sum of cardinalities |F 1 ∩ C| + |F 2 ∩ C| + |F 3 ∩ C| is at most 3.

    Because P ∪ Q ∪ R ⊆ {p, q, y}, the cardinality of the union is bounded by |{p, q, y}|. Since P, Q, and R are pairwise disjoint, the cardinality of their union equals |P| + |Q| + |R|. Finally, |{p, q, y}| ≤ 3, so linear arithmetic (omega) yields the desired bound |F 1 ∩ C| + |F 2 ∩ C| + |F 3 ∩ C| ≤ 3.

    lines 40–44

    uses Finset.card_le_card, Finset.card_union_of_disjoint, Finset.card_le_three

      have hh := Finset.card_le_card hsub
      rw [Finset.card_union_of_disjoint hPQR,Finset.card_union_of_disjoint hPQ] at hh
      have hs : ({p,q,y} : Finset V).card ≤ 3 := Finset.card_le_three
      dsimp [P,Q,R] at hh
      omega
Finset.mem_inter.mp
an element belongs to the intersection of two sets only if it belongs to both sets (the forward direction)
Ne.symm
inequality is symmetric: if a ≠ b, then b ≠ a
Finset.disjoint_of_subset_left
if u is disjoint from t and s ⊆ u, then s is disjoint from t
Finset.inter_subset_left
the intersection of two sets is contained in the first set: s₁ ∩ s₂ ⊆ s₁
Finset.disjoint_of_subset_right
if s is disjoint from u and t ⊆ u, then s is disjoint from t
Finset.disjoint_union_left.mpr
if two sets s and t are both disjoint from u, then their union s ∪ t is disjoint from u
Finset.union_subset
if s ⊆ u and t ⊆ u, then s ∪ t ⊆ u
Finset.card_le_card
if s ⊆ t, then |s| ≤ |t|
Finset.card_union_of_disjoint
the cardinality of the union of two disjoint sets is the sum of their cardinalities: |s ∪ t| = |s| + |t|
Finset.card_le_three
the cardinality of a set of three elements {a, b, c} is at most 3

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 saturated_other_shores_opposite_block_card_le_three    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)    (F : Fin 4 → Finset V) (C : Finset V) (x y p q : V)    (hdis : ∀ i j, i ≠ j → Disjoint (F i) (F j))    (hx : x ∈ F 0)    (hcross : ∀ i j : Fin 4, i ≠ j → ∀ a ∈ F i, ∀ b ∈ F j, G.Adj a b →      (i=0 ∧ j=1 ∧ a=x ∧ b=y) ∨ (i=1 ∧ j=0 ∧ a=y ∧ b=x))    (hfull : ∀ z ∈ C, z ≠ p → z ≠ q → G.Adj x z) :    (F 1 ∩ C).card+(F 2 ∩ C).card+(F 3 ∩ C).card ≤ 3 := by  classical  have hallowed : ∀ i : Fin 4, i ≠ 0 → F i ∩ C ⊆ ({p,q,y} : Finset V) := by    intro i hi z hz    obtain ⟨hzF,hzC⟩ := Finset.mem_inter.mp hz    by_cases hp : z=p    · simp [hp]    · by_cases hq : z=q      · simp [hq]      · have hh := hcross 0 i (Ne.symm hi) x hx z hzF (hfull z hzC hp hq)        have he : z=y := by          rcases hh with h | h          · exact h.2.2.2          · have : (0 : Fin 4) = 1 := h.1            exact ((by decide : (0 : Fin 4) ≠ 1) this).elim        simp [he]  let P := F 1 ∩ C  let Q := F 2 ∩ C  let R := F 3 ∩ C  have hPQ : Disjoint P Q := Finset.disjoint_of_subset_left Finset.inter_subset_left    (Finset.disjoint_of_subset_right Finset.inter_subset_left (hdis 1 2 (by decide)))  have hPR : Disjoint P R := Finset.disjoint_of_subset_left Finset.inter_subset_left    (Finset.disjoint_of_subset_right Finset.inter_subset_left (hdis 1 3 (by decide)))  have hQR : Disjoint Q R := Finset.disjoint_of_subset_left Finset.inter_subset_left    (Finset.disjoint_of_subset_right Finset.inter_subset_left (hdis 2 3 (by decide)))  have hPQR : Disjoint (P ∪ Q) R := Finset.disjoint_union_left.mpr ⟨hPR,hQR⟩  have hsub : P ∪ Q ∪ R ⊆ ({p,q,y} : Finset V) := by    exact Finset.union_subset (Finset.union_subset (hallowed 1 (by decide)) (hallowed 2 (by decide)))      (hallowed 3 (by decide))  have hh := Finset.card_le_card hsub  rw [Finset.card_union_of_disjoint hPQR,Finset.card_union_of_disjoint hPQ] at hh  have hs : ({p,q,y} : Finset V).card ≤ 3 := Finset.card_le_three  dsimp [P,Q,R] at hh  omega
See it in the graphDiscuss this resultChallenge it