AFTD Auto-Formalizing Theoretical Domains

pairwise_intersecting_edges_have_center

theoremverified

A finite graph with at least four vertices, no isolated vertex and pairwise intersecting edges has a common endpoint for all edges.

Statement

theorem pairwise_intersecting_edges_have_center
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (F : Finset V)
    (hcard : 4 ≤ F.card)
    (hnoniso : ∀ u ∈ F, ∃ v ∈ F, G.Adj u v)
    (hnodis : ∀ a ∈ F, ∀ b ∈ F, ∀ c ∈ F, ∀ d ∈ F,
      G.Adj a b → G.Adj c d → a=c ∨ a=d ∨ b=c ∨ b=d) :
    ∃ z ∈ F, ∀ u ∈ F, ∀ v ∈ F, G.Adj u v → u=z ∨ v=z
Source
Balanced-cut k=7 reduction for OP-1957; https://arxiv.org/abs/2611.22690.
Verified
28 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • is_k_extendableFor a finite vertex type V (with [Fintype V]), a simple graph G : SimpleGraph V and k : ℕ, is_k_extendable G k is the Prop that is the…
Used by 1

The proof, explained

The proof picks an edge a ~ b in F, which exists because |F| ≥ 4 and F has no isolated vertices. If a is incident to every edge in F, the claim holds with center a; otherwise, an edge avoiding a must intersect ab at b, giving a second edge b ~ c with c ≠ a. Since |F| ≥ 4, there is a fourth vertex d ∉ {a, b, c}, and an edge incident to d must intersect both ab and bc at b, showing b ~ d. Finally, b must be incident to every edge in F: any edge avoiding b would have to intersect ab, bc, and bd at a, c, and d respectively, forcing a single two-element edge to contain three distinct vertices, a contradiction.

  1. F contains an edge between two distinct vertices a, b ∈ F.

    Because |F| ≥ 4 > 0, the set F is nonempty (by Finset.card_pos.mp). Picking any a ∈ F, the hypothesis hnoniso provides a neighbor b ∈ F. Since simple graphs have no self-loops, a ≠ b (by G.ne_of_adj).

    lines 8–13

    uses Finset.card_pos.mp, G.ne_of_adj

      set_option maxHeartbeats 4000000 in
        classical
        have hnF : F.Nonempty := Finset.card_pos.mp (by omega)
        obtain ⟨a,ha⟩ := hnF
        obtain ⟨b,hb,hab⟩ := hnoniso a ha
        have habne : a ≠ b := G.ne_of_adj hab
  2. The theorem holds if a is incident to every edge in F.

    We split into cases on whether every edge in F is incident to a. If so, a is the desired center witness.

    lines 14–15

        by_cases haall : ∀ u ∈ F, ∀ v ∈ F, G.Adj u v → u=a ∨ v=a
        · exact ⟨a,ha,haall⟩
  3. If a is not the center, there is a vertex c ∈ F distinct from both a and b such that b is adjacent to c.

    Negating the previous case yields an edge cd in F with c ≠ a and d ≠ a. By the pairwise intersecting condition hnodis, ab must intersect cd. Since neither endpoint of cd is a, the intersection must be at b, so b = c or b = d. Relabeling the other endpoint as c, we obtain an edge b ~ c in F with c ≠ a, and c ≠ b because simple graphs have no loops (G.ne_of_adj).

    lines 16–28

    uses False.elim, G.ne_of_adj

        · push Not at haall
          obtain ⟨c,hc,d,hd,hcd,hca,hda⟩ := haall
          have hmeet := hnodis a ha b hb c hc d hd hab hcd
          have hbc : ∃ c ∈ F, G.Adj b c ∧ c ≠ a := by
            rcases hmeet with hac | had | hbc | hbd
            · exact False.elim (hca hac.symm)
            · exact False.elim (hda had.symm)
            · refine ⟨d,hd,?_,hda⟩
              simpa [hbc] using hcd
            · refine ⟨c,hc,?_,hca⟩
              simpa [hbd] using hcd.symm
          obtain ⟨c,hc,hbc,hca⟩ := hbc
          have hcb : c ≠ b := (G.ne_of_adj hbc).symm
  4. There exists a fourth vertex d ∈ F distinct from a, b, and c.

    The set {a, b, c} has cardinality at most 3 (Finset.card_le_three). Since |F| ≥ 4, F cannot be a subset of {a, b, c} (Finset.card_le_card). Thus there is an element d ∈ F not in {a, b, c} (Finset.not_subset.mp), giving d ≠ a, d ≠ b, and d ≠ c.

    lines 29–37

    uses Finset.card_le_card, Finset.card_le_three, Finset.not_subset.mp

          have hnot : ¬ F ⊆ ({a,b,c} : Finset V) := by
            intro hh
            have h1 := Finset.card_le_card hh
            have h2 : ({a,b,c} : Finset V).card ≤ 3 := Finset.card_le_three
            omega
          obtain ⟨d,hd,hdnot⟩ := Finset.not_subset.mp hnot
          have hda : d ≠ a := by intro he; apply hdnot; simp [he]
          have hdb : d ≠ b := by intro he; apply hdnot; simp [he]
          have hdc : d ≠ c := by intro he; apply hdnot; simp [he]
  5. The vertex b is adjacent to d, so b connects to all three vertices a, c, and d.

    By the non-isolation hypothesis, d has some neighbor e ∈ F. Since the edge de must intersect ab, and d is distinct from a and b, the common endpoint must be e, so e = a or e = b. Similarly, de must intersect bc, which forces e = b or e = c. Since a ≠ c, these two conditions imply e = b, so b is adjacent to d.

    lines 38–59

    uses False.elim, Or.inl, Or.inr

          obtain ⟨e,he,hde⟩ := hnoniso d hd
          have heq : e=b := by
            have h1 := hnodis a ha b hb d hd e he hab hde
            have h2 := hnodis b hb c hc d hd e he hbc hde
            have h1' : a=e ∨ b=e := by
              rcases h1 with h | h | h | h
              · exact False.elim (hda h.symm)
              · exact Or.inl h
              · exact False.elim (hdb h.symm)
              · exact Or.inr h
            have h2' : b=e ∨ c=e := by
              rcases h2 with h | h | h | h
              · exact False.elim (hdb h.symm)
              · exact Or.inl h
              · exact False.elim (hdc h.symm)
              · exact Or.inr h
            rcases h1' with hae | hbe
            · rcases h2' with hbe | hce
              · exact hbe.symm
              · exact False.elim (hca (hce.trans hae.symm))
            · exact hbe.symm
          have hbd : G.Adj b d := by simpa [heq] using hde.symm
  6. Any edge uv in F that avoids b must contain all three vertices a, d, and c among its endpoints.

    We test b as the center. Suppose for contradiction that some edge u ~ v in F does not contain b (so u ≠ b and v ≠ b). By hnodis, uv must intersect each of ab, bd, and bc. Since neither u nor v can equal b, uv must meet these edges at their other endpoints, forcing a ∈ {u, v}, d ∈ {u, v}, and c ∈ {u, v}.

    lines 60–84

    uses False.elim, Or.inl, Or.inr

          refine ⟨b,hb,?_⟩
          intro u hu v hv huv
          by_contra hn
          push Not at hn
          have h1 := hnodis a ha b hb u hu v hv hab huv
          have h2 := hnodis b hb d hd u hu v hv hbd huv
          have h3 := hnodis b hb c hc u hu v hv hbc huv
          have h1' : a=u ∨ a=v := by
            rcases h1 with h | h | h | h
            · exact Or.inl h
            · exact Or.inr h
            · exact False.elim (hn.1 h.symm)
            · exact False.elim (hn.2 h.symm)
          have h2' : d=u ∨ d=v := by
            rcases h2 with h | h | h | h
            · exact False.elim (hn.1 h.symm)
            · exact False.elim (hn.2 h.symm)
            · exact Or.inl h
            · exact Or.inr h
          have h3' : c=u ∨ c=v := by
            rcases h3 with h | h | h | h
            · exact False.elim (hn.1 h.symm)
            · exact False.elim (hn.2 h.symm)
            · exact Or.inl h
            · exact Or.inr h
  7. No edge can avoid b, completing the proof that b is a center.

    The edge {u, v} has only two endpoints, so it cannot contain the three pairwise distinct vertices a, c, d. Case exhaustion over all eight assignments of {a, d, c} to {u, v} forces two distinct vertices to coincide (or equates an endpoint to b), yielding a contradiction in every branch.

    line 85

          rcases h1' with h1 | h1 <;> rcases h2' with h2 | h2 <;> rcases h3' with h3 | h3 <;> subst_vars <;> simp_all
Finset.card_pos.mp
A finite set with strictly positive cardinality is nonempty.
G.ne_of_adj
Two adjacent vertices in a simple graph cannot be equal (no self-loops).
False.elim
From a contradiction (falsehood), any proposition can be deduced.
Finset.card_le_card
If a finite set s is a subset of a finite set t, then |s| ≤ |t|.
Finset.card_le_three
A finite set {a, b, c} has cardinality at most 3.
Finset.not_subset.mp
If a finite set s is not a subset of t, then there is an element of s not in t.
Or.inl
Infers a disjunction A ∨ B from a proof of the left disjunct A.
Or.inr
Infers a disjunction A ∨ B from a proof of the right disjunct B.

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 pairwise_intersecting_edges_have_center    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (F : Finset V)    (hcard : 4 ≤ F.card)    (hnoniso : ∀ u ∈ F, ∃ v ∈ F, G.Adj u v)    (hnodis : ∀ a ∈ F, ∀ b ∈ F, ∀ c ∈ F, ∀ d ∈ F,      G.Adj a b → G.Adj c d → a=c ∨ a=d ∨ b=c ∨ b=d) :    ∃ z ∈ F, ∀ u ∈ F, ∀ v ∈ F, G.Adj u v → u=z ∨ v=z := by  set_option maxHeartbeats 4000000 in    classical    have hnF : F.Nonempty := Finset.card_pos.mp (by omega)    obtain ⟨a,ha⟩ := hnF    obtain ⟨b,hb,hab⟩ := hnoniso a ha    have habne : a ≠ b := G.ne_of_adj hab    by_cases haall : ∀ u ∈ F, ∀ v ∈ F, G.Adj u v → u=a ∨ v=a    · exact ⟨a,ha,haall⟩    · push Not at haall      obtain ⟨c,hc,d,hd,hcd,hca,hda⟩ := haall      have hmeet := hnodis a ha b hb c hc d hd hab hcd      have hbc : ∃ c ∈ F, G.Adj b c ∧ c ≠ a := by        rcases hmeet with hac | had | hbc | hbd        · exact False.elim (hca hac.symm)        · exact False.elim (hda had.symm)        · refine ⟨d,hd,?_,hda⟩          simpa [hbc] using hcd        · refine ⟨c,hc,?_,hca⟩          simpa [hbd] using hcd.symm      obtain ⟨c,hc,hbc,hca⟩ := hbc      have hcb : c ≠ b := (G.ne_of_adj hbc).symm      have hnot : ¬ F ⊆ ({a,b,c} : Finset V) := by        intro hh        have h1 := Finset.card_le_card hh        have h2 : ({a,b,c} : Finset V).card ≤ 3 := Finset.card_le_three        omega      obtain ⟨d,hd,hdnot⟩ := Finset.not_subset.mp hnot      have hda : d ≠ a := by intro he; apply hdnot; simp [he]      have hdb : d ≠ b := by intro he; apply hdnot; simp [he]      have hdc : d ≠ c := by intro he; apply hdnot; simp [he]      obtain ⟨e,he,hde⟩ := hnoniso d hd      have heq : e=b := by        have h1 := hnodis a ha b hb d hd e he hab hde        have h2 := hnodis b hb c hc d hd e he hbc hde        have h1' : a=e ∨ b=e := by          rcases h1 with h | h | h | h          · exact False.elim (hda h.symm)          · exact Or.inl h          · exact False.elim (hdb h.symm)          · exact Or.inr h        have h2' : b=e ∨ c=e := by          rcases h2 with h | h | h | h          · exact False.elim (hdb h.symm)          · exact Or.inl h          · exact False.elim (hdc h.symm)          · exact Or.inr h        rcases h1' with hae | hbe        · rcases h2' with hbe | hce          · exact hbe.symm          · exact False.elim (hca (hce.trans hae.symm))        · exact hbe.symm      have hbd : G.Adj b d := by simpa [heq] using hde.symm      refine ⟨b,hb,?_⟩      intro u hu v hv huv      by_contra hn      push Not at hn      have h1 := hnodis a ha b hb u hu v hv hab huv      have h2 := hnodis b hb d hd u hu v hv hbd huv      have h3 := hnodis b hb c hc u hu v hv hbc huv      have h1' : a=u ∨ a=v := by        rcases h1 with h | h | h | h        · exact Or.inl h        · exact Or.inr h        · exact False.elim (hn.1 h.symm)        · exact False.elim (hn.2 h.symm)      have h2' : d=u ∨ d=v := by        rcases h2 with h | h | h | h        · exact False.elim (hn.1 h.symm)        · exact False.elim (hn.2 h.symm)        · exact Or.inl h        · exact Or.inr h      have h3' : c=u ∨ c=v := by        rcases h3 with h | h | h | h        · exact False.elim (hn.1 h.symm)        · exact False.elim (hn.2 h.symm)        · exact Or.inl h        · exact Or.inr h      rcases h1' with h1 | h1 <;> rcases h2' with h2 | h2 <;> rcases h3' with h3 | h3 <;> subst_vars <;> simp_all
See it in the graphDiscuss this resultChallenge it