AFTD Auto-Formalizing Theoretical Domains

in1277_seven_block_2_factorcritical

theoremverified

The displayed seven-vertex block 2 in the explicit control graph is 1-factor-critical.

Statement

theorem in1277_seven_block_2_factorcritical : is_k_factor_critical (in1261_seven_graph.induce {v | v ∈ ({14,15,16,17,18,19,20} : Finset (Fin 28))}) 1
Source
OP-1957 seven-block control, experiment 43349
Verified
28 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
  • in1261_seven_graphThe symmetric graph on 28 vertices whose unequal ordered endpoints avoid the displayed forbidden pairs.
  • is_k_factor_criticalA simple graph G on a finite vertex type V is k-factor-critical if for every subset S of V with cardinality k, the induced subgraph on Sᶜ…
  • in1261_seven_forbidden_orderedOrdered forbidden pairs of the explicit seven-by-seven boundary control graph.
Used by 1

The proof, explained

A graph is 1-factor-critical if deleting any single vertex leaves a subgraph with a perfect matching. The proof first establishes that any fixed-point-free involution on vertices that pairs each vertex with an adjacent neighbor induces a perfect matching. To apply this to the 7-vertex block {14, 15, 16, 17, 18, 19, 20}, an explicit lookup table specifies the matching involution on the remaining 6 vertices whenever a vertex r is deleted. Finally, exhaustive computation via the decide tactic confirms that all 42 pairs in the table satisfy the required involution and adjacency conditions, completing the 1-factor-criticality proof.

  1. Adjacency in `in1261_seven_graph` is decidable. automation

    Unfolding the definitions of `in1261_seven_graph` and its forbidden pairs expresses the edge condition as a boolean combination of inequalities and equalities on `Fin 28`. Lean's typeclass synthesis then automatically derives the `DecidableRel` instance.

    lines 5–6

      unfold in1261_seven_graph in1261_seven_forbidden_ordered
      infer_instance
  2. A graph admitting an involution $f$ that pairs every vertex with an adjacent neighbor contains a spanning subgraph $P$ whose edges are the pairs $\{x, f(x)\}$.

    We define $P$ on all vertices (`Set.univ`) with edges given by $y = f(x)$. Every edge of $P$ belongs to $G$ because $x \sim f(x)$ (`hadj`), every vertex is in `Set.univ` by `Set.mem_univ`, and the edge relation is symmetric because $f$ is an involution ($y = f(x) \implies x = f(y)$).

    lines 11–20

    uses Set.mem_univ

      classical
      let P : G.Subgraph := ⟨Set.univ, fun x y => y = f x,
        by intro x y h; subst y; exact hadj x,
        by intro x y h; exact Set.mem_univ x,
        by
          constructor
          intro x y h
          subst y
          exact (hinv x).symm⟩
      refine ⟨P, ?_⟩
  3. The subgraph $P$ is a perfect matching of $G$, proving `in1277_block_2_perfect_matching_of_adjacency_involution`.

    By `SimpleGraph.Subgraph.isPerfectMatching_iff`, a subgraph is a perfect matching if and only if each vertex has degree 1 in the subgraph. For any vertex $x$, the unique vertex adjacent to $x$ in $P$ is $f(x)$ because $y = f(x)$ uniquely determines $y$.

    lines 21–23

    uses SimpleGraph.Subgraph.isPerfectMatching_iff

      rw [SimpleGraph.Subgraph.isPerfectMatching_iff]
      intro x
      exact ⟨f x, rfl, fun y h => h⟩
  4. To show that the induced subgraph on $A$ is 1-factor-critical, it suffices to find a perfect matching in the induced subgraph $H$ on $A \setminus \{r\}$ for an arbitrary single vertex $r \in A$.

    By definition, 1-factor-criticality requires that removing any subset $S$ of size 1 leaves a graph with a perfect matching. Using `Finset.card_eq_one.mp`, any such subset is a singleton $\{r\}$, so we form the subgraph $H$ induced on $A \setminus \{r\}$.

    lines 29–32

    uses Finset.card_eq_one.mp

      classical
      intro S hS
      obtain ⟨r, rfl⟩ := Finset.card_eq_one.mp hS
      let H := (in1261_seven_graph.induce {v | v ∈ A}).induce ((↑({r} : Finset {v // v ∈ A}) : Set {v // v ∈ A})ᶜ)
  5. The map `blockPartner` defined by $x \mapsto f(r, x)$ is a well-defined function from $A \setminus \{r\}$ to itself.

    For any $x \in A \setminus \{r\}$, hypothesis $h$ guarantees that $f(r, x) \in A$ and $f(r, x) \neq r$. Subtype extensionality (`Subtype.ext`) and set membership lemmas verify that $x \neq r$ holds, ensuring that $f(r, x)$ is a valid vertex of $H$.

    lines 33–41

    uses Finset.coe_singleton, Set.mem_singleton_iff, Subtype.ext, Set.mem_compl_iff, congrArg

      let blockPartner : {x : {v // v ∈ A} // x ∈ (↑({r} : Finset {v // v ∈ A}) : Set {v // v ∈ A})ᶜ} →
          {x : {v // v ∈ A} // x ∈ (↑({r} : Finset {v // v ∈ A}) : Set {v // v ∈ A})ᶜ} := fun x =>
        ⟨⟨f r.val x.val.val, (h r.val x.val.val r.property x.val.property (by
           intro e; apply x.property; simp only [Finset.coe_singleton, Set.mem_singleton_iff]; exact Subtype.ext e)).1⟩, by
           simp only [Finset.coe_singleton, Set.mem_compl_iff, Set.mem_singleton_iff]
           intro e
           have he := congrArg Subtype.val e
           exact (h r.val x.val.val r.property x.val.property (by
             intro ee; apply x.property; simp only [Finset.coe_singleton, Set.mem_singleton_iff]; exact Subtype.ext ee)).2.1 he⟩
  6. The induced subgraph $H$ on $A \setminus \{r\}$ has a perfect matching, establishing `in1277_block_2_factor_block_from_table`.

    We apply `in1277_block_2_perfect_matching_of_adjacency_involution` to $H$ and `blockPartner`. Hypothesis $h$ directly provides that `blockPartner` is an involution ($f(r, f(r, x)) = x$) and that every vertex $x$ is adjacent to $f(r, x)$ in $H$, satisfying the two requirements.

    lines 42–50

    uses in1277_block_2_perfect_matching_of_adjacency_involution, Subtype.ext, Finset.coe_singleton, Set.mem_singleton_iff

      apply in1277_block_2_perfect_matching_of_adjacency_involution H blockPartner
      · intro x
        apply Subtype.ext
        apply Subtype.ext
        exact (h r.val x.val.val r.property x.val.property (by
          intro e; apply x.property; simp only [Finset.coe_singleton, Set.mem_singleton_iff]; exact Subtype.ext e)).2.2.1
      · intro x
        exact (h r.val x.val.val r.property x.val.property (by
          intro e; apply x.property; simp only [Finset.coe_singleton, Set.mem_singleton_iff]; exact Subtype.ext e)).2.2.2
  7. The lookup table `in1277_block_2_table` satisfies the required involution and adjacency properties for the vertex set $\{14, 15, 16, 17, 18, 19, 20\}$. automation

    Because the vertex set is finite and all conditions (membership, distinctness, involution identity, and graph adjacency) are decidable, the `decide` tactic checks all 42 pairs $(r, x)$ with $r \neq x$ by exhaustive evaluation.

    line 77

      decide
  8. The induced subgraph on $\{14, 15, 16, 17, 18, 19, 20\}$ is 1-factor-critical.

    We specialize `in1277_block_2_factor_block_from_table` to $A = \{14, 15, 16, 17, 18, 19, 20\}$, using `in1277_block_2_table` as the pairing function and `in1277_block_2_table_valid` to discharge its premises.

    line 80

    uses in1277_block_2_factor_block_from_table, in1277_block_2_table_valid

      exact in1277_block_2_factor_block_from_table _ in1277_block_2_table in1277_block_2_table_valid
Set.mem_univ
Every element of a type belongs to the universal set.
SimpleGraph.Subgraph.isPerfectMatching_iff
A subgraph is a perfect matching if and only if every vertex in the ambient graph has exactly one neighbor in the subgraph.
Finset.card_eq_one.mp
A finite set has cardinality 1 if and only if it is a singleton set (forward implication: card = 1 implies it is a singleton).
Finset.coe_singleton
The coercion of a singleton finset to a set equals the singleton set.
Set.mem_singleton_iff
An element belongs to a singleton set if and only if it equals the single element.
Set.mem_compl_iff
An element belongs to the complement of a set if and only if it does not belong to the set.
Subtype.ext
Two subtype elements are equal if their underlying values are equal.
congrArg
Functions map equal arguments to equal values.
in1277_block_2_perfect_matching_of_adjacency_involution
A fixed-point-free involution on the vertices of a graph that pairs each vertex with an adjacent neighbor induces a perfect matching.
in1277_block_2_factor_block_from_table
If for every vertex r in a subset A there is a table defining an involution on A \ {r} that pairs each vertex with an adjacent neighbor, then the induced subgraph on A is 1-factor-critical.
in1277_block_2_table_valid
The explicit pairing table for the 7-vertex block {14, ..., 20} defines an involution pairing adjacent vertices whenever any single vertex r is removed.

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 maxHeartbeats 4000000set_option maxRecDepth 10000set_option linter.all falselocal instance  aftdLocal_3aaf1a4244be2b93_0 : DecidableRel in1261_seven_graph.Adj := by  unfold in1261_seven_graph in1261_seven_forbidden_ordered  infer_instanceprivate theorem in1277_block_2_perfect_matching_of_adjacency_involution {V : Type*} (G : SimpleGraph V) (f : V → V)    (hinv : Function.Involutive f) (hadj : ∀ x, G.Adj x (f x)) :    ∃ P : G.Subgraph, P.IsPerfectMatching := by  classical  let P : G.Subgraph := ⟨Set.univ, fun x y => y = f x,    by intro x y h; subst y; exact hadj x,    by intro x y h; exact Set.mem_univ x,    by      constructor      intro x y h      subst y      exact (hinv x).symm⟩  refine ⟨P, ?_⟩  rw [SimpleGraph.Subgraph.isPerfectMatching_iff]  intro x  exact ⟨f x, rfl, fun y h => h⟩private theorem in1277_block_2_factor_block_from_table (A : Finset (Fin 28)) (f : Fin 28 → Fin 28 → Fin 28) (h : ∀ r x, r ∈ A → x ∈ A → x ≠ r →   f r x ∈ A ∧ f r x ≠ r ∧ f r (f r x) = x ∧ in1261_seven_graph.Adj x (f r x)) : is_k_factor_critical (in1261_seven_graph.induce {v | v ∈ A}) 1 := by  classical  intro S hS  obtain ⟨r, rfl⟩ := Finset.card_eq_one.mp hS  let H := (in1261_seven_graph.induce {v | v ∈ A}).induce ((↑({r} : Finset {v // v ∈ A}) : Set {v // v ∈ A})ᶜ)  let blockPartner : {x : {v // v ∈ A} // x ∈ (↑({r} : Finset {v // v ∈ A}) : Set {v // v ∈ A})ᶜ} →      {x : {v // v ∈ A} // x ∈ (↑({r} : Finset {v // v ∈ A}) : Set {v // v ∈ A})ᶜ} := fun x =>    ⟨⟨f r.val x.val.val, (h r.val x.val.val r.property x.val.property (by       intro e; apply x.property; simp only [Finset.coe_singleton, Set.mem_singleton_iff]; exact Subtype.ext e)).1⟩, by       simp only [Finset.coe_singleton, Set.mem_compl_iff, Set.mem_singleton_iff]       intro e       have he := congrArg Subtype.val e       exact (h r.val x.val.val r.property x.val.property (by         intro ee; apply x.property; simp only [Finset.coe_singleton, Set.mem_singleton_iff]; exact Subtype.ext ee)).2.1 he⟩  apply in1277_block_2_perfect_matching_of_adjacency_involution H blockPartner  · intro x    apply Subtype.ext    apply Subtype.ext    exact (h r.val x.val.val r.property x.val.property (by      intro e; apply x.property; simp only [Finset.coe_singleton, Set.mem_singleton_iff]; exact Subtype.ext e)).2.2.1  · intro x    exact (h r.val x.val.val r.property x.val.property (by      intro e; apply x.property; simp only [Finset.coe_singleton, Set.mem_singleton_iff]; exact Subtype.ext e)).2.2.2private def in1277_block_2_table (r x : Fin 28) : Fin 28 :=  if r = 14 ∧ x = 15 then 16 else if r = 14 ∧ x = 16 then 15 else  if r = 14 ∧ x = 17 then 18 else if r = 14 ∧ x = 18 then 17 else  if r = 14 ∧ x = 19 then 20 else if r = 14 ∧ x = 20 then 19 else  if r = 15 ∧ x = 14 then 16 else if r = 15 ∧ x = 16 then 14 else  if r = 15 ∧ x = 17 then 18 else if r = 15 ∧ x = 18 then 17 else  if r = 15 ∧ x = 19 then 20 else if r = 15 ∧ x = 20 then 19 else  if r = 16 ∧ x = 14 then 15 else if r = 16 ∧ x = 15 then 14 else  if r = 16 ∧ x = 17 then 18 else if r = 16 ∧ x = 18 then 17 else  if r = 16 ∧ x = 19 then 20 else if r = 16 ∧ x = 20 then 19 else  if r = 17 ∧ x = 14 then 18 else if r = 17 ∧ x = 18 then 14 else  if r = 17 ∧ x = 15 then 16 else if r = 17 ∧ x = 16 then 15 else  if r = 17 ∧ x = 19 then 20 else if r = 17 ∧ x = 20 then 19 else  if r = 18 ∧ x = 14 then 17 else if r = 18 ∧ x = 17 then 14 else  if r = 18 ∧ x = 15 then 16 else if r = 18 ∧ x = 16 then 15 else  if r = 18 ∧ x = 19 then 20 else if r = 18 ∧ x = 20 then 19 else  if r = 19 ∧ x = 14 then 20 else if r = 19 ∧ x = 20 then 14 else  if r = 19 ∧ x = 15 then 16 else if r = 19 ∧ x = 16 then 15 else  if r = 19 ∧ x = 17 then 18 else if r = 19 ∧ x = 18 then 17 else  if r = 20 ∧ x = 14 then 19 else if r = 20 ∧ x = 19 then 14 else  if r = 20 ∧ x = 15 then 16 else if r = 20 ∧ x = 16 then 15 else  if r = 20 ∧ x = 17 then 18 else if r = 20 ∧ x = 18 then 17 else  xprivate theorem in1277_block_2_table_valid : ∀ r x : Fin 28, r ∈ ({14,15,16,17,18,19,20} : Finset (Fin 28)) → x ∈ ({14,15,16,17,18,19,20} : Finset (Fin 28)) → x ≠ r → in1277_block_2_table r x ∈ ({14,15,16,17,18,19,20} : Finset (Fin 28)) ∧ in1277_block_2_table r x ≠ r ∧ in1277_block_2_table r (in1277_block_2_table r x) = x ∧ in1261_seven_graph.Adj x (in1277_block_2_table r x) := by  decidetheorem in1277_seven_block_2_factorcritical : is_k_factor_critical (in1261_seven_graph.induce {v | v ∈ ({14,15,16,17,18,19,20} : Finset (Fin 28))}) 1 := by  exact in1277_block_2_factor_block_from_table _ in1277_block_2_table in1277_block_2_table_valid
See it in the graphDiscuss this resultChallenge it