AFTD Auto-Formalizing Theoretical Domains

boundary_seven_block_example_cross_edge_essential

theoremverified

In the explicitly defined 28-vertex four-block graph, the edge from 0 to 14 is present, and deleting it leaves a graph that is not 7-extendible.

Statement

theorem boundary_seven_block_example_cross_edge_essential :
    in1122_boundary_graph28.Adj 0 14 ∧
    ¬ is_k_extendable (in1122_boundary_graph28.deleteEdges {s(0,14)}) 7
Source
OP-1957: explicit odd-shore obstruction; experiments 37010 and 37011.
Verified
22 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
Used by 1

The proof, explained

The theorem proves that {0, 14} is an edge of the defined 28-vertex graph G and that deleting it yields a graph Z that is not 7-extendible. The presence of the edge {0, 14} is verified by finite computation. To show Z is not 7-extendible, the proof applies a parity obstruction theorem stating that in a k-extendible graph, the 2k-element complement of two disjoint, odd-sized, mutually anticomplete vertex subsets cannot have a perfect matching. In Z, two such subsets of sizes 3 and 11 leave a 14-element complement on which an explicit fixed-point-free involution induces a perfect matching, producing the desired contradiction.

  1. Adjacency between any two vertices is decidable. automation

    Unfolding the definitions of the edge relation and block membership expresses adjacency as a combination of finite inequality tests and list membership checks on Fin 28, which typeclass inference automatically decides.

    lines 14–15

      unfold in1122_edge28 in1122_block28
      infer_instance
  2. The adjacency relation is symmetric.

    Given an edge between u and v, inequality u ≠ v is symmetric by Ne.symm. The block condition is symmetric because equality of blocks is symmetric (using Or.inl) and lying on opposite sides of 14 is symmetric (using Or.inr with Ne.symm). The condition of not being an excluded pair is symmetric because min and max commute (min_comm and max_comm).

    lines 20–27

    uses Or.inl, Or.inr, Ne.symm, min_comm, max_comm

        constructor
        intro u v h
        rcases h with ⟨hne, hs, he⟩
        refine ⟨hne.symm, ?_, ?_⟩
        · rcases hs with h | h
          · exact Or.inl h.symm
          · exact Or.inr (Ne.symm h)
        · simpa [min_comm, max_comm] using he
  3. The adjacency relation is irreflexive (no self-loops).

    A self-loop would require u ≠ u by definition of in1122_edge28, which directly contradicts reflexivity of equality.

    line 28

      loopless := by constructor; intro u h; exact h.1 rfl
  4. The vertices 0 and 14 are adjacent in the boundary graph. automation

    Splitting the main goal into its two conjuncts, the first conjunct asserts that 0 and 14 are adjacent. Vertex 0 is in block 0 (< 14) and 14 is in block 2 (≥ 14), and the pair (0, 14) is not in the excluded list, so Lean verifies adjacency by direct finite computation (decide).

    lines 42–44

      classical
      constructor
      · decide
  5. Assume Z is 7-extendible, and define the candidate matching map fC on the complement C.

    Assume for contradiction that Z = G \ {{0, 14}} is 7-extendible. Let C be the set of vertices outside T = {0, 3, 4} and N = {5, ..., 14, 21}. Define a map fC on C using the permutation in1122_mate28, checking by finite exhaustion (decide) that it maps C into C.

    lines 45–50

      · intro hExt
        let Z := in1122_boundary_graph28.deleteEdges {s(0,14)}
        let C : Finset (Fin 28) := Finset.univ.filter
          (fun v => v ∉ in1122_left28 ∧ v ∉ in1122_right28)
        let fC (v : {v : Fin 28 // v ∈ C}) : {v : Fin 28 // v ∈ C} :=
          ⟨in1122_mate28 v.val, by revert v; decide⟩
  6. fC is an involution on C that pairs each vertex with an adjacent vertex in Z[C]. automation

    By finite exhaustion (decide), fC(fC(v)) = v for every v in C, and every vertex v in C is adjacent to fC(v) in the induced subgraph Z[C].

    lines 51–55

        have fC_inv (v : {v : Fin 28 // v ∈ C}) : fC (fC v) = v := by
          revert v; decide
        have fC_adj (v : {v : Fin 28 // v ∈ C}) :
            (Z.induce {x | x ∈ C}).Adj v (fC v) := by
          revert v; decide
  7. The sets T and N are disjoint, have odd cardinalities, and are anticomplete in Z. automation

    Exhaustive computation (decide) confirms that |T| = 3 is odd, |N| = 11 is odd, T and N are disjoint, and there are no edges in Z between T and N (the only possible cross-edge {0, 14} having been deleted).

    lines 56–60

        have hT : in1122_left28.card % 2 = 1 := by decide
        have hN : in1122_right28.card % 2 = 1 := by decide
        have hdisj : Disjoint in1122_left28 in1122_right28 := by decide
        have hcross : ∀ a ∈ in1122_left28, ∀ b ∈ in1122_right28, ¬ Z.Adj a b := by
          decide
  8. The complement V \ (T ∪ N) has cardinality 2 * 7 = 14.

    The complement of T ∪ N is identical to the finset C. Rewriting via Set.ncard_coe_finset converts set cardinality to finset cardinality, which evaluates to 28 - (3 + 11) = 14 = 2 * 7.

    lines 61–66

    uses Set.ncard_coe_finset

        have hsize : ({v : Fin 28 | v ∉ in1122_left28 ∧ v ∉ in1122_right28} : Set (Fin 28)).ncard = 2*7 := by
          have heq : ({v : Fin 28 | v ∉ in1122_left28 ∧ v ∉ in1122_right28} : Set (Fin 28)) = (C : Set (Fin 28)) := by
            ext x
            simp [C]
          rw [heq, Set.ncard_coe_finset]
          decide
  9. The induced subgraph Z[C] has a perfect matching.

    Applying perfect_matching_of_adjacency_involution to the involution fC, which pairs each vertex of C with an adjacent neighbour in Z[C], produces a perfect matching of the induced subgraph Z[C].

    lines 67–72

    uses perfect_matching_of_adjacency_involution

        have hPM : ∃ P : (Z.induce {v | v ∉ in1122_left28 ∧ v ∉ in1122_right28}).Subgraph, P.IsPerfectMatching := by
          have heq : {v : Fin 28 | v ∉ in1122_left28 ∧ v ∉ in1122_right28} = {v | v ∈ C} := by
            ext x
            simp [C]
          rw [heq]
          exact perfect_matching_of_adjacency_involution _ fC fC_inv fC_adj
  10. Contradiction: Z is not 7-extendible.

    The obstruction theorem extendible_two_odd_anticomplete_shores_complement_unmatchable establishes that in any 7-extendible graph, the 14-vertex complement of two disjoint, odd-sized, anticomplete vertex sets cannot have a perfect matching. This directly contradicts the perfect matching just constructed on Z[C], proving that Z is not 7-extendible.

    lines 73–74

    uses extendible_two_odd_anticomplete_shores_complement_unmatchable

        exact extendible_two_odd_anticomplete_shores_complement_unmatchable Z 7
          hExt in1122_left28 in1122_right28 hT hN hdisj hcross hsize hPM
Or.inl
Given a proof of P, produces a proof of the disjunction P ∨ Q.
Or.inr
Given a proof of Q, produces a proof of the disjunction P ∨ Q.
Ne.symm
Inequality is symmetric: if a ≠ b, then b ≠ a.
min_comm
The minimum operation is commutative: min a b = min b a.
max_comm
The maximum operation is commutative: max a b = max b a.
Set.ncard_coe_finset
The set cardinality (ncard) of a finite set viewed as a set equals its finset cardinality.
perfect_matching_of_adjacency_involution
An involution on the vertices of a graph that maps every vertex to an adjacent vertex induces a perfect matching.
extendible_two_odd_anticomplete_shores_complement_unmatchable
In a k-extendible graph, the complement of two disjoint, odd-sized, mutually anticomplete vertex subsets cannot admit a perfect matching if its size is 2k.

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 100000set_option maxHeartbeats 4000000def in1122_block28 (v : Fin 28) : ℕ :=  if v.val < 5 then 0 else if v.val < 14 then 1 else if v.val < 19 then 2 else 3def in1122_edge28 (u v : Fin 28) : Prop :=  u ≠ v ∧  (in1122_block28 u = in1122_block28 v ∨ ((u.val < 14) ≠ (v.val < 14))) ∧  (min u.val v.val, max u.val v.val) ∉    ([(0,21),(3,14),(3,21),(4,14),(4,21)] : List (ℕ × ℕ))instance : DecidableRel in1122_edge28 := fun _ _ => by  unfold in1122_edge28 in1122_block28  infer_instancedef in1122_boundary_graph28 : SimpleGraph (Fin 28) where  Adj := in1122_edge28  symm := by    constructor    intro u v h    rcases h with ⟨hne, hs, he⟩    refine ⟨hne.symm, ?_, ?_⟩    · rcases hs with h | h      · exact Or.inl h.symm      · exact Or.inr (Ne.symm h)    · simpa [min_comm, max_comm] using he  loopless := by constructor; intro u h; exact h.1 rflinstance : DecidableRel in1122_boundary_graph28.Adj :=  inferInstanceAs (DecidableRel in1122_edge28)def in1122_left28 : Finset (Fin 28) := {0,3,4}def in1122_right28 : Finset (Fin 28) := {5,6,7,8,9,10,11,12,13,14,21}def in1122_mate28 : Fin 28 → Fin 28 :=  ![0,2,1,3,4,5,6,7,8,9,10,11,12,13,14,16,15,18,17,20,19,21,23,22,25,24,27,26]theorem boundary_seven_block_example_cross_edge_essential :    in1122_boundary_graph28.Adj 0 14 ∧    ¬ is_k_extendable (in1122_boundary_graph28.deleteEdges {s(0,14)}) 7 := by  classical  constructor  · decide  · intro hExt    let Z := in1122_boundary_graph28.deleteEdges {s(0,14)}    let C : Finset (Fin 28) := Finset.univ.filter      (fun v => v ∉ in1122_left28 ∧ v ∉ in1122_right28)    let fC (v : {v : Fin 28 // v ∈ C}) : {v : Fin 28 // v ∈ C} :=      ⟨in1122_mate28 v.val, by revert v; decide⟩    have fC_inv (v : {v : Fin 28 // v ∈ C}) : fC (fC v) = v := by      revert v; decide    have fC_adj (v : {v : Fin 28 // v ∈ C}) :        (Z.induce {x | x ∈ C}).Adj v (fC v) := by      revert v; decide    have hT : in1122_left28.card % 2 = 1 := by decide    have hN : in1122_right28.card % 2 = 1 := by decide    have hdisj : Disjoint in1122_left28 in1122_right28 := by decide    have hcross : ∀ a ∈ in1122_left28, ∀ b ∈ in1122_right28, ¬ Z.Adj a b := by      decide    have hsize : ({v : Fin 28 | v ∉ in1122_left28 ∧ v ∉ in1122_right28} : Set (Fin 28)).ncard = 2*7 := by      have heq : ({v : Fin 28 | v ∉ in1122_left28 ∧ v ∉ in1122_right28} : Set (Fin 28)) = (C : Set (Fin 28)) := by        ext x        simp [C]      rw [heq, Set.ncard_coe_finset]      decide    have hPM : ∃ P : (Z.induce {v | v ∉ in1122_left28 ∧ v ∉ in1122_right28}).Subgraph, P.IsPerfectMatching := by      have heq : {v : Fin 28 | v ∉ in1122_left28 ∧ v ∉ in1122_right28} = {v | v ∈ C} := by        ext x        simp [C]      rw [heq]      exact perfect_matching_of_adjacency_involution _ fC fC_inv fC_adj    exact extendible_two_odd_anticomplete_shores_complement_unmatchable Z 7      hExt in1122_left28 in1122_right28 hT hN hdisj hcross hsize hPM
See it in the graphDiscuss this resultChallenge it