AFTD Auto-Formalizing Theoretical Domains

op309_cubic_u45_54_edges_boundary_clean

theoremverified

In a 126-vertex cubic graph, a totally edge-dominating 54-edge set leaving 45 vertices uncovered has every nonselected edge incident to an uncovered vertex.

Statement

theorem op309_cubic_u45_54_edges_boundary_clean
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (hreg : ∀ v, G.degree v = 3) (hn : Fintype.card V = 126)
    (R : Finset G.edgeSet) (hR : R.card = 54)
    (hdom : ∀ e : G.edgeSet, ∃ f ∈ R, G.lineGraph.Adj e f)
    (hU : ((Finset.univ : Finset V).filter fun u => ∀ e ∈ R, u ∉ e.1).card = 45) :
    ∀ e : G.edgeSet, e ∉ R → ∃ u : V, u ∈ e.1 ∧ ∀ f ∈ R, u ∉ f.1
Source
Cubic equality boundary count for the OP-309 canonical port obstruction.
Verified
29 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1

The proof, explained

To show that every edge outside the totally edge-dominating set R meets an uncovered vertex, the proof first establishes that the 45 uncovered vertices form an independent set U: any edge between two uncovered vertices would have to be dominated by an edge in R, forcing one of its endpoints to be covered. By Euler's handshaking lemma, the 126-vertex 3-regular graph has exactly 189 edges, which matches the boundary saturation count |R| + ∑_{u ∈ U} deg(u) = 54 + 45 × 3 = 189. Applying the independent boundary saturation theorem then guarantees that every edge outside R is incident to an uncovered vertex.

  1. Let U be the set of vertices uncovered by R, and S be the set of underlying unordered pairs of edges in R; then S is a subset of the graph's edges.

    We define U to consist of all vertices belonging to no edge of R, and S to be the image of R under the map sending each edge subtype to its underlying unordered pair of vertices. By definition of the image and the subtype, every element of S is an edge of G.

    lines 8–14

    uses Finset.mem_image.mp, SimpleGraph.mem_edgeFinset.mpr

        ∀ e : G.edgeSet, e ∉ R → ∃ u : V, u ∈ e.1 ∧ ∀ f ∈ R, u ∉ f.1 := by  classical
      let U := (Finset.univ : Finset V).filter fun u => ∀ e ∈ R, u ∉ e.1
      let S := R.image Subtype.val
      have hS : S ⊆ G.edgeFinset := by
        intro e he
        obtain ⟨f,hf,rfl⟩ := Finset.mem_image.mp he
        exact SimpleGraph.mem_edgeFinset.mpr f.2
  2. The set U of uncovered vertices is an independent set in G.

    Suppose for contradiction that two vertices u, v ∈ U were adjacent. Then the edge e = {u, v} must be dominated in the line graph by some edge f ∈ R. Being adjacent in the line graph means e and f are distinct and share an endpoint w. Since the endpoints of e are u and v, w must equal u or v. In either case, a vertex in U is incident to an edge in R, contradicting the definition of U.

    lines 15–23

    uses SimpleGraph.lineGraph_adj_iff_exists.mp, Sym2.mem_iff, Finset.mem_filter.mp

      have hind : ∀ u ∈ U, ∀ v ∈ U, ¬ G.Adj u v := by
        intro u hu v hv huv
        let e : G.edgeSet := ⟨s(u,v), (G.mem_edgeSet).mpr huv⟩
        obtain ⟨f,hf,hef⟩ := hdom e
        obtain ⟨w,hw,hwf⟩ := (SimpleGraph.lineGraph_adj_iff_exists.mp hef).2
        have hw' : w = u ∨ w = v := by simpa [e, Sym2.mem_iff] using hw
        rcases hw' with rfl | rfl
        · exact (Finset.mem_filter.mp hu).2 f hf hwf
        · exact (Finset.mem_filter.mp hv).2 f hf hwf
  3. No edge in S contains an uncovered vertex, and |S| = |R| = 54.

    By definition of U, no vertex in U belongs to any edge in R, so no edge in S contains a vertex of U. Moreover, because distinct edge subtypes have distinct underlying vertex pairs, the projection from G.edgeSet to Sym2 V is injective, hence |S| = |R| = 54.

    lines 24–29

    uses Finset.mem_image.mp, Finset.mem_filter.mp, Finset.card_image_iff.mpr, Subtype.ext

      have hclean : ∀ e ∈ S, ∀ u ∈ U, u ∉ e := by
        intro e he u hu
        obtain ⟨f,hf,rfl⟩ := Finset.mem_image.mp he
        exact (Finset.mem_filter.mp hu).2 f hf
      have hcS : S.card = R.card := by
        exact Finset.card_image_iff.mpr (fun _ _ _ _ h => Subtype.ext h)
  4. The graph G has exactly 189 edges.

    By the handshaking lemma, the sum of all vertex degrees equals twice the number of edges. Since G is 3-regular on 126 vertices, the sum of degrees is 126 × 3 = 378, which yields |E(G)| = 189.

    lines 30–35

    uses G.sum_degrees_eq_twice_card_edges, Finset.sum_const_zero, Finset.sum_const, Finset.card_univ, nsmul_eq_mul

      have hecount : G.edgeFinset.card = 189 := by
        have h := G.sum_degrees_eq_twice_card_edges
        simp_rw [hreg] at h
        simp only [Finset.sum_const_zero, Finset.sum_const, Finset.card_univ, hn,
          nsmul_eq_mul] at h
        omega
  5. The total edge count satisfies the boundary saturation identity |E(G)| = |S| + ∑_{u ∈ U} deg(u).

    We have |E(G)| = 189, |S| = 54, and |U| = 45. Since every vertex in U has degree 3, the sum of degrees over U is 45 × 3 = 135. The identity holds because 54 + 135 = 189.

    lines 36–38

      have hsum : G.edgeFinset.card = S.card + ∑ u ∈ U, G.degree u := by
        have hUcard : U.card = 45 := hU
        simp [hecount, hcS, hR, hreg, hUcard]
  6. For any edge e ∉ R, its underlying unordered pair does not belong to S.

    Suppose, for contradiction, that the underlying pair of e were in S. Then it would equal the underlying pair of some edge f ∈ R. But edges in a simple graph are uniquely determined by their endpoints, so e = f ∈ R, contradicting e ∉ R.

    lines 39–43

    uses Finset.mem_image.mp, Subtype.ext

      intro e he
      have heS : e.1 ∉ S := by
        intro heS
        obtain ⟨f,hf,hfe⟩ := Finset.mem_image.mp heS
        exact he (Subtype.ext hfe ▸ hf)
  7. The edge e has an endpoint in U that is incident to no edge of R.

    We apply the boundary saturation theorem (op309_independent_boundary_saturation): since U is independent, S is disjoint from U, and |E(G)| = |S| + ∑_{u ∈ U} deg(u), every edge outside S must have an endpoint in U. Since e.1 ∉ S, e contains some vertex u ∈ U, which by definition of U is incident to no edge in R.

    lines 44–46

    uses op309_independent_boundary_saturation, SimpleGraph.mem_edgeFinset.mpr, Finset.mem_filter.mp

      obtain ⟨u,hu,hue⟩ := op309_independent_boundary_saturation G U S hS hind hclean hsum e.1
        (SimpleGraph.mem_edgeFinset.mpr e.2) heS
      exact ⟨u,hue,(Finset.mem_filter.mp hu).2⟩
Finset.card_univ
The cardinality of the universal finset of a finite type equals the cardinality of the type.
Finset.card_image_iff.mpr
The image of a finite set under an injective function has the same cardinality as the original set.
Finset.mem_filter.mp
An element belongs to a filtered finite set if and only if it belongs to the base set and satisfies the filter predicate.
Finset.mem_image.mp
An element belongs to the image of a finite set under a function if and only if it is the image of some element in that set.
Finset.sum_const
The sum of a constant value over a finite set equals the cardinality of the set times the constant.
Finset.sum_const_zero
The sum of zeros over a finite set equals zero.
G.sum_degrees_eq_twice_card_edges
In a finite graph, the sum of the degrees of all vertices equals twice the total number of edges (Euler's handshaking lemma).
nsmul_eq_mul
Scalar multiplication by a natural number in a non-associative semiring coincides with multiplication.
op309_independent_boundary_saturation
If an independent set U and an edge set S disjoint from U satisfy |E(G)| = |S| + ∑_{u ∈ U} deg(u), then every edge outside S contains at least one vertex of U.
SimpleGraph.mem_edgeFinset.mpr
An edge belongs to the graph's finite edge set if and only if it belongs to the graph's edge set.
SimpleGraph.lineGraph_adj_iff_exists.mp
Two edges are adjacent in the line graph if and only if they are distinct and share an endpoint.
Subtype.ext
Two elements of a subtype are equal if their underlying values are equal.
Sym2.mem_iff
A vertex belongs to the unordered pair s(u, v) if and only if it equals u or v.

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 op309_cubic_u45_54_edges_boundary_clean    {V : Type*} [Fintype V] [DecidableEq V]    (G : SimpleGraph V) [DecidableRel G.Adj]    (hreg : ∀ v, G.degree v = 3) (hn : Fintype.card V = 126)    (R : Finset G.edgeSet) (hR : R.card = 54)    (hdom : ∀ e : G.edgeSet, ∃ f ∈ R, G.lineGraph.Adj e f)    (hU : ((Finset.univ : Finset V).filter fun u => ∀ e ∈ R, u ∉ e.1).card = 45) :    ∀ e : G.edgeSet, e ∉ R → ∃ u : V, u ∈ e.1 ∧ ∀ f ∈ R, u ∉ f.1 := by  classical  let U := (Finset.univ : Finset V).filter fun u => ∀ e ∈ R, u ∉ e.1  let S := R.image Subtype.val  have hS : S ⊆ G.edgeFinset := by    intro e he    obtain ⟨f,hf,rfl⟩ := Finset.mem_image.mp he    exact SimpleGraph.mem_edgeFinset.mpr f.2  have hind : ∀ u ∈ U, ∀ v ∈ U, ¬ G.Adj u v := by    intro u hu v hv huv    let e : G.edgeSet := ⟨s(u,v), (G.mem_edgeSet).mpr huv⟩    obtain ⟨f,hf,hef⟩ := hdom e    obtain ⟨w,hw,hwf⟩ := (SimpleGraph.lineGraph_adj_iff_exists.mp hef).2    have hw' : w = u ∨ w = v := by simpa [e, Sym2.mem_iff] using hw    rcases hw' with rfl | rfl    · exact (Finset.mem_filter.mp hu).2 f hf hwf    · exact (Finset.mem_filter.mp hv).2 f hf hwf  have hclean : ∀ e ∈ S, ∀ u ∈ U, u ∉ e := by    intro e he u hu    obtain ⟨f,hf,rfl⟩ := Finset.mem_image.mp he    exact (Finset.mem_filter.mp hu).2 f hf  have hcS : S.card = R.card := by    exact Finset.card_image_iff.mpr (fun _ _ _ _ h => Subtype.ext h)  have hecount : G.edgeFinset.card = 189 := by    have h := G.sum_degrees_eq_twice_card_edges    simp_rw [hreg] at h    simp only [Finset.sum_const_zero, Finset.sum_const, Finset.card_univ, hn,      nsmul_eq_mul] at h    omega  have hsum : G.edgeFinset.card = S.card + ∑ u ∈ U, G.degree u := by    have hUcard : U.card = 45 := hU    simp [hecount, hcS, hR, hreg, hUcard]  intro e he  have heS : e.1 ∉ S := by    intro heS    obtain ⟨f,hf,hfe⟩ := Finset.mem_image.mp heS    exact he (Subtype.ext hfe ▸ hf)  obtain ⟨u,hu,hue⟩ := op309_independent_boundary_saturation G U S hS hind hclean hsum e.1    (SimpleGraph.mem_edgeFinset.mpr e.2) heS  exact ⟨u,hue,(Finset.mem_filter.mp hu).2⟩
See it in the graphDiscuss this resultChallenge it