AFTD Auto-Formalizing Theoretical Domains

op874_eight_vertex_square_suppression_always_loops

theoremverified

The displayed eight-vertex graph is connected, simple, bridgeless and cubic, and contains a four-cycle. For every four-cycle whose four vertices have outside neighbors, one opposite pair of outside neighbors is equal. Thus the standard opposite-pair square suppression necessarily creates a loop, even if parallel edges are allowed.

Statement

theorem op874_eight_vertex_square_suppression_always_loops :
  let E : Finset (Sym2 (Fin 8)) :=
    {s(0,3),s(0,5),s(0,6),s(1,4),s(1,6),s(1,7),
     s(2,4),s(2,6),s(2,7),s(3,5),s(3,7),s(4,5)}
  let G : SimpleGraph (Fin 8) := SimpleGraph.fromEdgeSet (↑E : Set (Sym2 (Fin 8)))
  G.Connected ∧ G.IsRegularOfDegree 3 ∧ (∀ e : Sym2 (Fin 8), ¬ G.IsBridge e) ∧
  G.Adj 1 4 ∧ G.Adj 4 2 ∧ G.Adj 2 6 ∧ G.Adj 6 1 ∧
  (∀ c t : Fin 4 → Fin 8, Function.Injective c →
    (∀ i, G.Adj (c i) (c (i+1))) →
    (∀ i, G.Adj (c i) (t i) ∧ ∀ j, t i ≠ c j) →
    t 0 = t 2 ∨ t 1 = t 3)
Source
Square-reduction obstruction for OP-874; experiment 43691.
Verified
28 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • cFor a group $G$ and an element $s \in G$, the local count $c_G(s)$ is the cardinality of the set of elements $g \in G$ such that…

The proof, explained

The theorem proves that an explicit 8-vertex cubic graph is connected, 3-regular, bridgeless, and contains a 4-cycle (1-4-2-6-1). The core structural property—that every 4-cycle has an opposite pair of equal outside neighbors—is established by exhaustive finite verification across all 4-cycles and candidate outside neighbors. The main proof then combines these precomputed properties: connectivity, bridgelessness, and the cycle edges are verified directly, 3-regularity is deduced from neighbor set cardinalities, and the square suppression property follows by applying the exhaustive 4-cycle lemma to any given cycle and its outside neighbors.

  1. Adjacency in in1288_G is decidable.

    We unfold in1288_G to its definition as a graph constructed from the explicit edge set in1288_E, allowing typeclass inference to synthesize decidability of adjacency.

    line 8

    private instance : DecidableRel in1288_G.Adj := fun _ _ => by unfold in1288_G; infer_instance
  2. The graph in1288_G is connected. automation

    Connectivity of the finite 8-vertex graph is established by direct computation (decide).

    line 9

    private theorem in1288_conn : in1288_G.Connected := by decide
  3. Every vertex in in1288_G has degree 3. automation

    By performing exhaustive case analysis over all 8 vertices in Fin 8 (fin_cases), the degree of each vertex is computed directly to be 3 (decide).

    line 10

    private theorem in1288_deg (v : Fin 8) : in1288_G.degree v = 3 := by fin_cases v <;> decide
  4. The neighbor set of every vertex in in1288_G has cardinality 3.

    We rewrite the set cardinality of the neighbor set to the finset cardinality using SimpleGraph.coe_neighborFinset and Set.ncard_coe_finset, and then identify that with vertex degree using SimpleGraph.card_neighborFinset_eq_degree. The claim then follows from in1288_deg.

    lines 12–13

    uses SimpleGraph.coe_neighborFinset, Set.ncard_coe_finset, SimpleGraph.card_neighborFinset_eq_degree, in1288_deg

      rw [← SimpleGraph.coe_neighborFinset, Set.ncard_coe_finset, SimpleGraph.card_neighborFinset_eq_degree]
      exact in1288_deg v
  5. Deleting the edge between any two vertices leaves them mutually reachable. automation

    We introduce u and check all 8 cases for u using fin_cases, deciding reachability to any v after deleting the edge between u and v by computation (decide).

    lines 15–16

      intro u
      fin_cases u <;> decide
  6. The graph in1288_G contains no bridges.

    For an arbitrary edge e, we induct on e as an unordered pair s(u, v) using Sym2.ind. By SimpleGraph.isBridge_iff and double negation elimination (not_not), e is not a bridge if and only if u and v remain reachable after removing e, which is provided by in1288_avoid.

    lines 18–22

    uses Sym2.ind, SimpleGraph.isBridge_iff, not_not, in1288_avoid

      intro e
      induction e using Sym2.ind with
      | _ u v =>
        rw [SimpleGraph.isBridge_iff, not_not]
        exact in1288_avoid u v
  7. For any 4-cycle in in1288_G, any choice of outside neighbors has at least one equal opposite pair. automation

    Given a 4-cycle and outside neighbors adjacent to each cycle vertex, we case-split on the initial vertex a across all 8 vertices (fin_cases) and verify by exhaustive finite computation (decide) that either the first and third or the second and fourth outside neighbors coincide.

    lines 31–32

      intro a
      fin_cases a <;> decide
  8. The main theorem statement is reformulated in terms of the pre-defined graph in1288_G.

    We simplify the local definitions of the edge set E and graph G, identifying them with in1288_E and in1288_G.

    lines 45–48

      dsimp only
      change in1288_G.Connected ∧ in1288_G.IsRegularOfDegree 3 ∧
        (∀ e, ¬ in1288_G.IsBridge e) ∧
        in1288_G.Adj 1 4 ∧ in1288_G.Adj 4 2 ∧ in1288_G.Adj 2 6 ∧ in1288_G.Adj 6 1 ∧ _
  9. The theorem is decomposed into proving connectivity, regularity, bridgelessness, the existence of the specific 4-cycle 1-4-2-6-1, and the outside-neighbor property for all 4-cycles.

    We instantiate the conjunction: connectivity is provided by in1288_conn, bridgelessness by in1288_nobridge, and the four edges forming the cycle 1-4-2-6-1 are verified by computation (decide). This leaves regularity and the general 4-cycle property as open subgoals.

    line 49

    uses in1288_conn, in1288_nobridge

      refine ⟨in1288_conn, ?_, in1288_nobridge, by decide, by decide, by decide, by decide, ?_⟩
  10. The graph in1288_G is 3-regular.

    For an arbitrary vertex v, in1288_ncard gives that its neighbor set has cardinality 3. We rewrite the cardinality of the neighbor set as the degree of v using SimpleGraph.coe_neighborFinset, Set.ncard_coe_finset, and SimpleGraph.card_neighborFinset_eq_degree to conclude degree v = 3.

    lines 50–54

    uses in1288_ncard, SimpleGraph.coe_neighborFinset, Set.ncard_coe_finset, SimpleGraph.card_neighborFinset_eq_degree

      · intro v
        have h := in1288_ncard v
        rw [← SimpleGraph.coe_neighborFinset, Set.ncard_coe_finset,
          SimpleGraph.card_neighborFinset_eq_degree] at h
        exact h
  11. For every 4-cycle in the graph, opposite-pair square suppression produces a loop.

    Given an injective cycle map c : Fin 4 → Fin 8 and outside neighbors t : Fin 4 → Fin 8, we extract the cycle edges hadj and exterior disjointness conditions hout. We then apply in1288_squares to the cycle vertices c 0, c 1, c 2, c 3 and outside neighbors t 0, t 1, t 2, t 3, establishing the distinctness of cycle vertices c 2 ≠ c 0 and c 3 ≠ c 1 from injectivity of c. The lemma concludes that t 0 = t 2 ∨ t 1 = t 3.

    lines 55–65

    uses in1288_squares

      · intro c t hinj hcycle ht
        have hadj (i : Fin 4) : in1288_G.Adj (c i) (c (i+1)) := hcycle i
        have hout (i j : Fin 4) : t i ≠ c j := (ht i).2 j
        apply in1288_squares (c 0) (c 1) (by simpa using hadj 0)
          (c 2) (by simpa using hadj 1) (by intro h; exact (by decide : (2 : Fin 4) ≠ 0) (hinj h))
          (c 3) (by simpa using hadj 2) (by intro h; exact (by decide : (3 : Fin 4) ≠ 1) (hinj h))
          (by simpa using hadj 3)
          (t 0) (ht 0).1 (hout 0 0) (hout 0 1) (hout 0 2) (hout 0 3)
          (t 1) (ht 1).1 (hout 1 0) (hout 1 1) (hout 1 2) (hout 1 3)
          (t 2) (ht 2).1 (hout 2 0) (hout 2 1) (hout 2 2) (hout 2 3)
          (t 3) (ht 3).1 (hout 3 0) (hout 3 1) (hout 3 2) (hout 3 3)
SimpleGraph.coe_neighborFinset
Coercing the finite set of neighbors of a vertex to an ordinary set yields its neighbor set.
Set.ncard_coe_finset
The number of elements of a finite set coerced to a set equals the cardinality of the finite set.
SimpleGraph.card_neighborFinset_eq_degree
The cardinality of the neighbor finset of a vertex equals its degree.
in1288_deg
Every vertex in the graph in1288_G has degree 3.
in1288_avoid
Deleting the edge between any two vertices in in1288_G leaves those vertices reachable from each other.
Sym2.ind
To prove a property for all elements of Sym2 α, it suffices to prove it for all unordered pairs of the form s(x, y).
SimpleGraph.isBridge_iff
An edge s(u, v) is a bridge in a graph if and only if u and v are not reachable from each other after deleting that edge.
not_not
Double negation equivalence: not not P is equivalent to P.
in1288_conn
The graph in1288_G is connected.
in1288_nobridge
No edge in the graph in1288_G is a bridge.
in1288_ncard
For every vertex in in1288_G, its neighbor set has cardinality 3.
in1288_squares
For every 4-cycle in in1288_G, any choice of outside neighbors at the four vertices contains at least one equal opposite pair.

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 maxRecDepth 8192set_option maxHeartbeats 4000000set_option synthInstance.maxSize 200000set_option synthInstance.maxHeartbeats 800000private def in1288_E : Finset (Sym2 (Fin 8)) :=  {s(0,3),s(0,5),s(0,6),s(1,4),s(1,6),s(1,7),s(2,4),s(2,6),s(2,7),s(3,5),s(3,7),s(4,5)}private def in1288_G : SimpleGraph (Fin 8) := SimpleGraph.fromEdgeSet (↑in1288_E : Set (Sym2 (Fin 8)))private instance : DecidableRel in1288_G.Adj := fun _ _ => by unfold in1288_G; infer_instanceprivate theorem in1288_conn : in1288_G.Connected := by decideprivate theorem in1288_deg (v : Fin 8) : in1288_G.degree v = 3 := by fin_cases v <;> decideprivate theorem in1288_ncard (v : Fin 8) : (in1288_G.neighborSet v).ncard = 3 := by  rw [← SimpleGraph.coe_neighborFinset, Set.ncard_coe_finset, SimpleGraph.card_neighborFinset_eq_degree]  exact in1288_deg vprivate theorem in1288_avoid : ∀ u v : Fin 8, (in1288_G.deleteEdges {s(u,v)}).Reachable u v := by  intro u  fin_cases u <;> decideprivate theorem in1288_nobridge : ∀ e : Sym2 (Fin 8), ¬ in1288_G.IsBridge e := by  intro e  induction e using Sym2.ind with  | _ u v =>    rw [SimpleGraph.isBridge_iff, not_not]    exact in1288_avoid u vprivate theorem in1288_squares : ∀ (a b : Fin 8), in1288_G.Adj a b →    ∀ c, in1288_G.Adj b c → c ≠ a →    ∀ d, in1288_G.Adj c d → d ≠ b → in1288_G.Adj d a →    ∀ x, in1288_G.Adj a x → x ≠ a → x ≠ b → x ≠ c → x ≠ d →    ∀ y, in1288_G.Adj b y → y ≠ a → y ≠ b → y ≠ c → y ≠ d →    ∀ z, in1288_G.Adj c z → z ≠ a → z ≠ b → z ≠ c → z ≠ d →    ∀ w, in1288_G.Adj d w → w ≠ a → w ≠ b → w ≠ c → w ≠ d →    x = z ∨ y = w := by  intro a  fin_cases a <;> decidetheorem op874_eight_vertex_square_suppression_always_loops :  let E : Finset (Sym2 (Fin 8)) :=    {s(0,3),s(0,5),s(0,6),s(1,4),s(1,6),s(1,7),     s(2,4),s(2,6),s(2,7),s(3,5),s(3,7),s(4,5)}  let G : SimpleGraph (Fin 8) := SimpleGraph.fromEdgeSet (↑E : Set (Sym2 (Fin 8)))  G.Connected ∧ G.IsRegularOfDegree 3 ∧ (∀ e : Sym2 (Fin 8), ¬ G.IsBridge e) ∧  G.Adj 1 4 ∧ G.Adj 4 2 ∧ G.Adj 2 6 ∧ G.Adj 6 1 ∧  (∀ c t : Fin 4 → Fin 8, Function.Injective c →    (∀ i, G.Adj (c i) (c (i+1))) →    (∀ i, G.Adj (c i) (t i) ∧ ∀ j, t i ≠ c j) →    t 0 = t 2 ∨ t 1 = t 3) := by  dsimp only  change in1288_G.Connected ∧ in1288_G.IsRegularOfDegree 3 ∧    (∀ e, ¬ in1288_G.IsBridge e) ∧    in1288_G.Adj 1 4 ∧ in1288_G.Adj 4 2 ∧ in1288_G.Adj 2 6 ∧ in1288_G.Adj 6 1 ∧ _  refine ⟨in1288_conn, ?_, in1288_nobridge, by decide, by decide, by decide, by decide, ?_⟩  · intro v    have h := in1288_ncard v    rw [← SimpleGraph.coe_neighborFinset, Set.ncard_coe_finset,      SimpleGraph.card_neighborFinset_eq_degree] at h    exact h  · intro c t hinj hcycle ht    have hadj (i : Fin 4) : in1288_G.Adj (c i) (c (i+1)) := hcycle i    have hout (i j : Fin 4) : t i ≠ c j := (ht i).2 j    apply in1288_squares (c 0) (c 1) (by simpa using hadj 0)      (c 2) (by simpa using hadj 1) (by intro h; exact (by decide : (2 : Fin 4) ≠ 0) (hinj h))      (c 3) (by simpa using hadj 2) (by intro h; exact (by decide : (3 : Fin 4) ≠ 1) (hinj h))      (by simpa using hadj 3)      (t 0) (ht 0).1 (hout 0 0) (hout 0 1) (hout 0 2) (hout 0 3)      (t 1) (ht 1).1 (hout 1 0) (hout 1 1) (hout 1 2) (hout 1 3)      (t 2) (ht 2).1 (hout 2 0) (hout 2 1) (hout 2 2) (hout 2 3)      (t 3) (ht 3).1 (hout 3 0) (hout 3 1) (hout 3 2) (hout 3 3)
See it in the graphDiscuss this resultChallenge it