AFTD Auto-Formalizing Theoretical Domains

op874_bridgeless_local_cut_parity_obstruction

theoremverified

There is a connected bridgeless simple cubic graph on eight vertices with the displayed perfect matching and locally maximal matching cut, whose two displayed factor cycles are mixed, yet no three nonzero two-bit labels differ across every matching and same-bit factor edge while having xor zero on the displayed five-cycle.

Statement

theorem op874_bridgeless_local_cut_parity_obstruction :
    let M : Finset (Sym2 (Fin 8)) := {s(0,5), s(1,4), s(2,7), s(3,6)}
    let F : Finset (Sym2 (Fin 8)) := {s(0,3), s(3,7), s(7,0), s(1,5), s(5,4), s(4,2), s(2,6), s(6,1)}
    let b : Fin 8 → Bool := ![false,false,true,true,false,false,true,true]
    let mate : Fin 8 → Fin 8 := ![5,4,7,6,1,0,3,2]
    let same := fun v : Fin 8 => (Finset.univ.filter fun w : Fin 8 => s(v,w) ∈ F ∧ b v = b w).card
    let lab := fun d : Fin 3 => d.val + 1
    let xor5 := fun a b c d e : Fin 3 => Nat.xor (Nat.xor (Nat.xor (Nat.xor (lab a) (lab b)) (lab c)) (lab d)) (lab e)
    ∃ G : SimpleGraph (Fin 8),
      G.Connected ∧ (∀ e : Sym2 (Fin 8), ¬ G.IsBridge e) ∧
      (∀ u v, G.Adj u v ↔ u ≠ v ∧ s(u,v) ∈ M ∪ F) ∧
      (M.card = 4 ∧ F.card = 8 ∧ Disjoint M F ∧
        (∀ v : Fin 8, (M.filter fun e => v ∈ e).card = 1) ∧
        (∀ v : Fin 8, (F.filter fun e => v ∈ e).card = 2) ∧
        (∀ v : Fin 8, mate (mate v) = v ∧ mate v ≠ v ∧ s(v,mate v) ∈ M ∧ b v = b (mate v) ∧ same v + same (mate v) ≤ 2) ∧
        (¬ (b 0 = b 3 ∧ b 3 = b 7)) ∧
        (¬ (b 1 = b 5 ∧ b 5 = b 4 ∧ b 4 = b 2 ∧ b 2 = b 6))) ∧
      ¬ ∃ d : Fin 8 → Fin 3,
        (∀ u v, (s(u,v) ∈ M ∨ (s(u,v) ∈ F ∧ b u = b v)) → d u ≠ d v) ∧
        xor5 (d 1) (d 5) (d 4) (d 2) (d 6) = 0
Source
OP-874: eight-vertex obstruction to the distinct high-difference parity route; experiments 37120 and 37124
Verified
22 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

The proof, explained

The theorem is established by exhibiting an explicit cubic graph on 8 vertices whose edge set decomposes into a 1-factor (a perfect matching of 4 edges) and a 2-factor (composed of a 3-cycle and a 5-cycle), equipped with a 2-coloring of vertices. Computational decision procedures verify that the graph is connected, bridgeless, and cubic, and that the 2-coloring defines a locally maximal matching cut where both factor cycles contain vertices of both colors. Finally, the nonexistence of a valid 3-labeling is proven algebraically: any such labeling would force vertices 1, 5, 4 to receive three distinct nonzero 2-bit values and vertices 2, 6 to receive distinct values, making the XOR sum of the five cycle labels equal to the XOR of two distinct labels, which is necessarily nonzero.

  1. The bitwise XOR sum of five labels in {1, 2, 3} is non-zero whenever three of the labels are pairwise distinct and the remaining two are distinct. automation

    Each element of {0, 1, 2} is mapped by x ↦ x + 1 to one of the three non-zero 2-bit labels {1, 2, 3}. Any three pairwise distinct elements must cover the entire set {1, 2, 3}, whose XOR sum is 1 ⊕ 2 ⊕ 3 = 0. Therefore, the XOR sum of all five labels simplifies to label(d) ⊕ label(e). Since the labeling is injective and d ≠ e, this XOR sum cannot be zero. Lean checks all finitely many cases via `decide`.

    lines 8–9

    private lemma op874p8_kernel : ∀ a b c d e : Fin 3,
        a ≠ b → b ≠ c → c ≠ a → d ≠ e → op874p8_xor5 a b c d e ≠ 0 := by decide
  2. No labeling d : Fin 8 → Fin 3 can satisfy d(1) ≠ d(5), d(5) ≠ d(4), d(4) ≠ d(1), and d(2) ≠ d(6) while having XOR sum zero on the 5-cycle vertices (1, 5, 4, 2, 6).

    Assume for contradiction that such a labeling d exists. The hypotheses provide that the values d(1), d(5), d(4) are pairwise distinct and that d(2) ≠ d(6). Applying `op874p8_kernel` to these five values shows that their XOR sum cannot be zero, directly contradicting the zero-sum hypothesis.

    lines 11–16

    uses op874p8_kernel

    private theorem op874p8_no_labels :
        ¬ ∃ d : Fin 8 → Fin 3,
          (d 1 ≠ d 5 ∧ d 5 ≠ d 4 ∧ d 4 ≠ d 1 ∧ d 2 ≠ d 6) ∧
          op874p8_xor5 (d 1) (d 5) (d 4) (d 2) (d 6) = 0 := by
      rintro ⟨d, ⟨h15, h54, h41, h26⟩, hz⟩
      exact op874p8_kernel (d 1) (d 5) (d 4) (d 2) (d 6) h15 h54 h41 h26 hz
  3. The matching M of size 4 and factor F of size 8 partition the edges of an 8-vertex cubic graph; the bit assignment b defines a locally maximal matching cut; and neither factor cycle is monochromatic under b. automation

    Lean verifies the structure by exhaustive finite evaluation (`decide`): M contains 4 edges, F contains 8 edges, and they are disjoint; every vertex has degree 1 in M and degree 2 in F; `mate` is a fixed-point-free involution matching each vertex v to a mate with b(v) = b(mate(v)); each matching pair has at most 2 same-bit factor edges in total (same(v) + same(mate(v)) ≤ 2); and neither the 3-cycle (0, 3, 7) nor the 5-cycle (1, 5, 4, 2, 6) is monochromatic in b.

    lines 28–39

    private theorem op874p8_data :
        op874p8_matching.card = 4 ∧ op874p8_factor.card = 8 ∧
        Disjoint op874p8_matching op874p8_factor ∧
        (∀ v : Fin 8, (op874p8_matching.filter fun e => v ∈ e).card = 1) ∧
        (∀ v : Fin 8, (op874p8_factor.filter fun e => v ∈ e).card = 2) ∧
        (∀ v : Fin 8, op874p8_mate (op874p8_mate v) = v ∧ op874p8_mate v ≠ v ∧
          s(v,op874p8_mate v) ∈ op874p8_matching ∧
          op874p8_bits v = op874p8_bits (op874p8_mate v) ∧
          op874p8_same v + op874p8_same (op874p8_mate v) ≤ 2) ∧
        (¬ (op874p8_bits 0 = op874p8_bits 3 ∧ op874p8_bits 3 = op874p8_bits 7)) ∧
        (¬ (op874p8_bits 1 = op874p8_bits 5 ∧ op874p8_bits 5 = op874p8_bits 4 ∧
           op874p8_bits 4 = op874p8_bits 2 ∧ op874p8_bits 2 = op874p8_bits 6)) := by decide
  4. No vertex 3-labeling can separate endpoints of all matching edges and same-bit factor edges while having XOR sum zero on the 5-cycle (1, 5, 4, 2, 6).

    Suppose such a labeling d exists. We evaluate the separation condition on specific edges: the factor edges s(1,5), s(5,4), and s(2,6) have endpoints of the same bit (b(1)=b(5)=b(4)=false and b(2)=b(6)=true), which forces d(1) ≠ d(5), d(5) ≠ d(4), and d(2) ≠ d(6); and s(1,4) is a matching edge, which forces d(4) ≠ d(1). Thus d(1), d(5), d(4) are pairwise distinct and d(2) ≠ d(6). By `op874p8_kernel`, the XOR sum of these five labels cannot be zero, contradicting the zero-sum condition.

    lines 41–51

    uses op874p8_kernel

    private theorem op874p8_constraint_refutation :
        ¬ ∃ d : Fin 8 → Fin 3,
          (∀ u v, (s(u,v) ∈ op874p8_matching ∨
            (s(u,v) ∈ op874p8_factor ∧ op874p8_bits u = op874p8_bits v)) → d u ≠ d v) ∧
          op874p8_xor5 (d 1) (d 5) (d 4) (d 2) (d 6) = 0 := by
      rintro ⟨d, hd, hz⟩
      have h15 : d 1 ≠ d 5 := hd 1 5 (by decide)
      have h54 : d 5 ≠ d 4 := hd 5 4 (by decide)
      have h41 : d 4 ≠ d 1 := hd 4 1 (by decide)
      have h26 : d 2 ≠ d 6 := hd 2 6 (by decide)
      exact op874p8_kernel (d 1) (d 5) (d 4) (d 2) (d 6) h15 h54 h41 h26 hz
  5. The graph op874p8_graph with edge set M ∪ F is a well-defined simple graph (symmetric and loopless).

    Symmetry of adjacency holds because unordered edge equality s(u, v) = s(v, u) is given by `Sym2.eq_swap`. The graph has no self-loops because adjacency explicitly requires u ≠ v, so an edge s(u, u) immediately contradicts irreflexivity.

    lines 54–59

    uses Sym2.eq_swap

    private def op874p8_graph : SimpleGraph (Fin 8) where
      Adj u v := u ≠ v ∧ s(u,v) ∈ (op874p8_matching ∪ op874p8_factor)
      symm := ⟨by
        intro u v h
        exact ⟨h.1.symm, by simpa [Sym2.eq_swap] using h.2⟩⟩
      loopless := ⟨by intro u h; exact h.1 rfl⟩
  6. Adjacency in op874p8_graph is decidable.

    Adjacency is defined as inequality u ≠ v combined with membership of the unordered pair s(u, v) in the finite set M ∪ F, both of which are decidable predicates on the finite type Fin 8.

    lines 61–63

    private instance : DecidableRel op874p8_graph.Adj := fun u v => by
      change Decidable (u ≠ v ∧ s(u,v) ∈ (op874p8_matching ∪ op874p8_factor))
      infer_instance
  7. The graph op874p8_graph is connected. automation

    Lean's `decide` tactic checks by finite graph search that every vertex in the 8-vertex graph can reach every other vertex.

    line 65

    private theorem op874p8_connected : op874p8_graph.Connected := by decide
  8. For any pair of vertices u and v, u can reach v after deleting the single edge s(u, v) from op874p8_graph. automation

    The proof considers each of the 8 possible values of u in turn using `fin_cases u`, and for each case verifies reachability to all vertices v in the edge-deleted subgraph using `decide`.

    lines 68–71

    private theorem op874p8_avoid_edge : ∀ u v : Fin 8,
        (op874p8_graph.deleteEdges {s(u,v)}).Reachable u v := by
      intro u
      fin_cases u <;> decide
  9. The graph op874p8_graph is bridgeless.

    Let e be an arbitrary edge, written as s(u, v) by unordered pair induction (`Sym2.ind`). By `SimpleGraph.isBridge_iff`, e is a bridge if and only if u and v are not reachable in the graph with s(u, v) removed. Double negation elimination (`not_not`) reduces the goal of non-bridgelessness to reachability of u and v after removing s(u, v), which was established by `op874p8_avoid_edge`.

    lines 73–78

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

    private theorem op874p8_bridgeless : ∀ e : Sym2 (Fin 8), ¬ op874p8_graph.IsBridge e := by
      intro e
      induction e using Sym2.ind with
      | _ u v =>
        rw [SimpleGraph.isBridge_iff, not_not]
        exact op874p8_avoid_edge u v
  10. There exists an 8-vertex connected bridgeless cubic graph with matching M, factor F, and 2-coloring b satisfying all stated structural constraints, having no valid zero-sum 3-labeling on the 5-cycle.

    The graph op874p8_graph provides the required witness. The proof provides each required conjunction component from the previously proven theorems: connectivity from `op874p8_connected`, bridgelessness from `op874p8_bridgeless`, matching and factor combinatorial properties from `op874p8_data`, and the obstruction to labelings from `op874p8_constraint_refutation`. The equivalence between graph adjacency and membership in M ∪ F is verified by reflexivity (`rfl`).

    lines 80–102

    uses op874p8_bridgeless, op874p8_connected, op874p8_constraint_refutation, op874p8_data

    theorem op874_bridgeless_local_cut_parity_obstruction :
        let M : Finset (Sym2 (Fin 8)) := {s(0,5), s(1,4), s(2,7), s(3,6)}
        let F : Finset (Sym2 (Fin 8)) := {s(0,3), s(3,7), s(7,0), s(1,5), s(5,4), s(4,2), s(2,6), s(6,1)}
        let b : Fin 8 → Bool := ![false,false,true,true,false,false,true,true]
        let mate : Fin 8 → Fin 8 := ![5,4,7,6,1,0,3,2]
        let same := fun v : Fin 8 => (Finset.univ.filter fun w : Fin 8 => s(v,w) ∈ F ∧ b v = b w).card
        let lab := fun d : Fin 3 => d.val + 1
        let xor5 := fun a b c d e : Fin 3 => Nat.xor (Nat.xor (Nat.xor (Nat.xor (lab a) (lab b)) (lab c)) (lab d)) (lab e)
        ∃ G : SimpleGraph (Fin 8),
          G.Connected ∧ (∀ e : Sym2 (Fin 8), ¬ G.IsBridge e) ∧
          (∀ u v, G.Adj u v ↔ u ≠ v ∧ s(u,v) ∈ M ∪ F) ∧
          (M.card = 4 ∧ F.card = 8 ∧ Disjoint M F ∧
            (∀ v : Fin 8, (M.filter fun e => v ∈ e).card = 1) ∧
            (∀ v : Fin 8, (F.filter fun e => v ∈ e).card = 2) ∧
            (∀ v : Fin 8, mate (mate v) = v ∧ mate v ≠ v ∧ s(v,mate v) ∈ M ∧ b v = b (mate v) ∧ same v + same (mate v) ≤ 2) ∧
            (¬ (b 0 = b 3 ∧ b 3 = b 7)) ∧
            (¬ (b 1 = b 5 ∧ b 5 = b 4 ∧ b 4 = b 2 ∧ b 2 = b 6))) ∧
          ¬ ∃ d : Fin 8 → Fin 3,
            (∀ u v, (s(u,v) ∈ M ∨ (s(u,v) ∈ F ∧ b u = b v)) → d u ≠ d v) ∧
            xor5 (d 1) (d 5) (d 4) (d 2) (d 6) = 0 := by
      refine ⟨op874p8_graph, op874p8_connected, op874p8_bridgeless, ?_, op874p8_data, op874p8_constraint_refutation⟩
      intro u v
      rfl
op874p8_kernel
For any five values a, b, c, d, e in {0, 1, 2}, if a, b, c are pairwise distinct and d ≠ e, then the bitwise XOR sum of the five corresponding non-zero 2-bit labels (x + 1) is non-zero.
Sym2.eq_swap
For any two elements a and b, the unordered pair s(a, b) equals the unordered pair s(b, a).
Sym2.ind
To prove a property for all unordered pairs in Sym²(α), it suffices to prove it for all pairs of the form s(x, y).
SimpleGraph.isBridge_iff
An edge s(u, v) in a graph G is a bridge if and only if u and v are not reachable from each other in the graph obtained by deleting that edge.
not_not
A proposition is logically equivalent to the negation of its negation (¬¬P ↔ P).
op874p8_avoid_edge
For any two vertices u, v in Fin 8, vertex u can reach vertex v in the graph op874p8_graph with the single edge s(u, v) removed.
op874p8_connected
The graph op874p8_graph is connected (every vertex can reach every other vertex).
op874p8_bridgeless
No edge of the graph op874p8_graph is a bridge.
op874p8_data
The matching M has size 4, the factor F has size 8, they are disjoint, every vertex has degree 1 in M and degree 2 in F, the involution mate generates M with matching vertices having the same bit, the sum of same-bit factor degrees of mate pairs is at most 2, and neither factor cycle is monochromatic.
op874p8_constraint_refutation
There is no labeling of the 8 vertices with three labels such that endpoints of every matching edge and every same-bit factor edge have different labels while the XOR sum of labels on the 5-cycle vertices (1, 5, 4, 2, 6) is zero.

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 2000000private def op874p8_label (d : Fin 3) : ℕ := d.val + 1private def op874p8_xor5 (a b c d e : Fin 3) : ℕ :=  Nat.xor (Nat.xor (Nat.xor (Nat.xor (op874p8_label a) (op874p8_label b))    (op874p8_label c)) (op874p8_label d)) (op874p8_label e)private lemma op874p8_kernel : ∀ a b c d e : Fin 3,    a ≠ b → b ≠ c → c ≠ a → d ≠ e → op874p8_xor5 a b c d e ≠ 0 := by decideprivate theorem op874p8_no_labels :    ¬ ∃ d : Fin 8 → Fin 3,      (d 1 ≠ d 5 ∧ d 5 ≠ d 4 ∧ d 4 ≠ d 1 ∧ d 2 ≠ d 6) ∧      op874p8_xor5 (d 1) (d 5) (d 4) (d 2) (d 6) = 0 := by  rintro ⟨d, ⟨h15, h54, h41, h26⟩, hz⟩  exact op874p8_kernel (d 1) (d 5) (d 4) (d 2) (d 6) h15 h54 h41 h26 hzprivate def op874p8_matching : Finset (Sym2 (Fin 8)) :=  {s(0,5), s(1,4), s(2,7), s(3,6)}private def op874p8_factor : Finset (Sym2 (Fin 8)) :=  {s(0,3), s(3,7), s(7,0), s(1,5), s(5,4), s(4,2), s(2,6), s(6,1)}private def op874p8_bits : Fin 8 → Bool := ![false,false,true,true,false,false,true,true]private def op874p8_mate : Fin 8 → Fin 8 := ![5,4,7,6,1,0,3,2]private def op874p8_same (v : Fin 8) : ℕ :=  (Finset.univ.filter fun w : Fin 8 => s(v,w) ∈ op874p8_factor ∧ op874p8_bits v = op874p8_bits w).cardprivate theorem op874p8_data :    op874p8_matching.card = 4 ∧ op874p8_factor.card = 8 ∧    Disjoint op874p8_matching op874p8_factor ∧    (∀ v : Fin 8, (op874p8_matching.filter fun e => v ∈ e).card = 1) ∧    (∀ v : Fin 8, (op874p8_factor.filter fun e => v ∈ e).card = 2) ∧    (∀ v : Fin 8, op874p8_mate (op874p8_mate v) = v ∧ op874p8_mate v ≠ v ∧      s(v,op874p8_mate v) ∈ op874p8_matching ∧      op874p8_bits v = op874p8_bits (op874p8_mate v) ∧      op874p8_same v + op874p8_same (op874p8_mate v) ≤ 2) ∧    (¬ (op874p8_bits 0 = op874p8_bits 3 ∧ op874p8_bits 3 = op874p8_bits 7)) ∧    (¬ (op874p8_bits 1 = op874p8_bits 5 ∧ op874p8_bits 5 = op874p8_bits 4 ∧       op874p8_bits 4 = op874p8_bits 2 ∧ op874p8_bits 2 = op874p8_bits 6)) := by decideprivate theorem op874p8_constraint_refutation :    ¬ ∃ d : Fin 8 → Fin 3,      (∀ u v, (s(u,v) ∈ op874p8_matching ∨        (s(u,v) ∈ op874p8_factor ∧ op874p8_bits u = op874p8_bits v)) → d u ≠ d v) ∧      op874p8_xor5 (d 1) (d 5) (d 4) (d 2) (d 6) = 0 := by  rintro ⟨d, hd, hz⟩  have h15 : d 1 ≠ d 5 := hd 1 5 (by decide)  have h54 : d 5 ≠ d 4 := hd 5 4 (by decide)  have h41 : d 4 ≠ d 1 := hd 4 1 (by decide)  have h26 : d 2 ≠ d 6 := hd 2 6 (by decide)  exact op874p8_kernel (d 1) (d 5) (d 4) (d 2) (d 6) h15 h54 h41 h26 hzprivate def op874p8_graph : SimpleGraph (Fin 8) where  Adj u v := u ≠ v ∧ s(u,v) ∈ (op874p8_matching ∪ op874p8_factor)  symm := ⟨by    intro u v h    exact ⟨h.1.symm, by simpa [Sym2.eq_swap] using h.2⟩⟩  loopless := ⟨by intro u h; exact h.1 rfl⟩private instance : DecidableRel op874p8_graph.Adj := fun u v => by  change Decidable (u ≠ v ∧ s(u,v) ∈ (op874p8_matching ∪ op874p8_factor))  infer_instanceprivate theorem op874p8_connected : op874p8_graph.Connected := by decideprivate theorem op874p8_avoid_edge : ∀ u v : Fin 8,    (op874p8_graph.deleteEdges {s(u,v)}).Reachable u v := by  intro u  fin_cases u <;> decideprivate theorem op874p8_bridgeless : ∀ e : Sym2 (Fin 8), ¬ op874p8_graph.IsBridge e := by  intro e  induction e using Sym2.ind with  | _ u v =>    rw [SimpleGraph.isBridge_iff, not_not]    exact op874p8_avoid_edge u vtheorem op874_bridgeless_local_cut_parity_obstruction :    let M : Finset (Sym2 (Fin 8)) := {s(0,5), s(1,4), s(2,7), s(3,6)}    let F : Finset (Sym2 (Fin 8)) := {s(0,3), s(3,7), s(7,0), s(1,5), s(5,4), s(4,2), s(2,6), s(6,1)}    let b : Fin 8 → Bool := ![false,false,true,true,false,false,true,true]    let mate : Fin 8 → Fin 8 := ![5,4,7,6,1,0,3,2]    let same := fun v : Fin 8 => (Finset.univ.filter fun w : Fin 8 => s(v,w) ∈ F ∧ b v = b w).card    let lab := fun d : Fin 3 => d.val + 1    let xor5 := fun a b c d e : Fin 3 => Nat.xor (Nat.xor (Nat.xor (Nat.xor (lab a) (lab b)) (lab c)) (lab d)) (lab e)    ∃ G : SimpleGraph (Fin 8),      G.Connected ∧ (∀ e : Sym2 (Fin 8), ¬ G.IsBridge e) ∧      (∀ u v, G.Adj u v ↔ u ≠ v ∧ s(u,v) ∈ M ∪ F) ∧      (M.card = 4 ∧ F.card = 8 ∧ Disjoint M F ∧        (∀ v : Fin 8, (M.filter fun e => v ∈ e).card = 1) ∧        (∀ v : Fin 8, (F.filter fun e => v ∈ e).card = 2) ∧        (∀ v : Fin 8, mate (mate v) = v ∧ mate v ≠ v ∧ s(v,mate v) ∈ M ∧ b v = b (mate v) ∧ same v + same (mate v) ≤ 2) ∧        (¬ (b 0 = b 3 ∧ b 3 = b 7)) ∧        (¬ (b 1 = b 5 ∧ b 5 = b 4 ∧ b 4 = b 2 ∧ b 2 = b 6))) ∧      ¬ ∃ d : Fin 8 → Fin 3,        (∀ u v, (s(u,v) ∈ M ∨ (s(u,v) ∈ F ∧ b u = b v)) → d u ≠ d v) ∧        xor5 (d 1) (d 5) (d 4) (d 2) (d 6) = 0 := by  refine ⟨op874p8_graph, op874p8_connected, op874p8_bridgeless, ?_, op874p8_data, op874p8_constraint_refutation⟩  intro u v  rfl
See it in the graphDiscuss this resultChallenge it