in1277_seven_block_0_factorcritical
The displayed seven-vertex block 0 in the explicit control graph is 1-factor-critical.
Statement
theorem in1277_seven_block_0_factorcritical : is_k_factor_critical (in1261_seven_graph.induce {v | v ∈ ({0,1,2,3,4,5,6} : Finset (Fin 28))}) 1- Source
- OP-1957 seven-block control, experiment 43349
- Verified
- 28 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 4
- 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.
- g$g(S,M) = \dim_{\mathbb{F}_p}(S^{\perp}_M) - \dim_{\mathbb{F}_p}(S_M)$.
- Used by 1
- in1261_seven_control_factorcritical_blocksEach of the four displayed seven-vertex induced blocks of the control graph is 1-factor-critical.
The proof, explained
To show that the 7-vertex block $A = \{0, 1, 2, 3, 4, 5, 6\}$ is 1-factor-critical, we must show that deleting any single vertex $r \in A$ leaves a subgraph with a perfect matching. First, a general lemma establishes that any fixed-point-free involution on a graph whose orbits are edges determines a perfect matching. A second lemma reduces 1-factor-criticality of an induced subgraph to providing a lookup table of matching partners for each pair $(r, x)$ with $x \neq r$. An explicit table (`table0`) pairing the 6 remaining vertices into three edges for each $r \in \{0, \dots, 6\}$ is defined and verified automatically by computational exhaustion (`decide`), completing the proof.
Adjacency in `in1261_seven_graph` is decidable. automation
Unfolding the definitions of the graph and its forbidden-pairs relation reveals that adjacency is a boolean combination of equalities and inequalities on the finite type `Fin 28`. Lean's typeclass synthesis (`infer_instance`) automatically synthesizes the `DecidableRel` instance from decidability of integer comparisons and boolean logic.
unfold in1261_seven_graph in1261_seven_forbidden_ordered infer_instance
An involution whose orbits are edges defines a spanning subgraph.
We construct a subgraph $P$ on vertex set $V$ (`Set.univ`) where $y$ is adjacent to $x$ if and only if $y = f(x)$. Every such edge is an edge of $G$ because each vertex is adjacent to its image under $f$ (`hadj`). Symmetry of the edge relation follows from $f$ being an involution (`hinv`): if $y = f(x)$, then $x = f(f(x)) = f(y)$.
uses
Set.mem_univclassical 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⟩
The spanning subgraph induced by the involution is a perfect matching.
By `SimpleGraph.Subgraph.isPerfectMatching_iff`, a subgraph is a perfect matching if and only if every vertex has a unique neighbor in the subgraph. For each vertex $x$, its unique neighbor in $P$ is $f(x)$, since by construction $y$ is adjacent to $x$ in $P$ if and only if $y = f(x)$.
uses
SimpleGraph.Subgraph.isPerfectMatching_iffrefine ⟨P, ?_⟩ rw [SimpleGraph.Subgraph.isPerfectMatching_iff] intro x exact ⟨f x, rfl, fun y h => h⟩
Proving 1-factor-criticality reduces to finding a perfect matching after deleting an arbitrary single vertex.
By definition, a graph is 1-factor-critical if removing any subset of vertices of cardinality 1 leaves a graph with a perfect matching. By `Finset.card_eq_one.mp`, any finite subset $S$ with $|S| = 1$ is of the form $\{r\}$ for a single vertex $r \in A$.
uses
Finset.card_eq_one.mpclassical intro S hS obtain ⟨r, rfl⟩ := Finset.card_eq_one.mp hS
Construct the vertex-deleted subgraph and the candidate matching involution from the lookup table.
We form the induced subgraph $H$ on $A \setminus \{r\}$ and define an endomap $g$ on its vertices by $g(x) = f(r, x)$. The table hypothesis $h$ guarantees that $f(r, x) \in A$ and $f(r, x) \neq r$, meaning $g(x)$ remains in $A \setminus \{r\}$. Subtype injectivity (`Subtype.ext`) and singleton set membership rules (`Finset.coe_singleton`, `Set.mem_singleton_iff`, `Set.mem_compl_iff`) verify that the subtype requirements are satisfied.
uses
Subtype.ext,congrArg,Finset.coe_singleton,Set.mem_singleton_iff,Set.mem_compl_ifflet H := (in1261_seven_graph.induce {v | v ∈ A}).induce ((↑({r} : Finset {v // v ∈ A}) : Set {v // v ∈ A})ᶜ) let g : {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⟩
The involution on the vertex-deleted subgraph produces a perfect matching, completing the reduction lemma.
We apply `in1277_perfect_matching_of_adjacency_involution` to $H$ and $g$. The table hypothesis $h$ directly provides that $g$ is an involution ($f(r, f(r, x)) = x$) and that $x$ is adjacent to $g(x)$ in `in1261_seven_graph`, with `Subtype.ext` translating equalities between subtype elements and underlying values.
uses
in1277_perfect_matching_of_adjacency_involution,Subtype.ext,Finset.coe_singleton,Set.mem_singleton_iffapply in1277_perfect_matching_of_adjacency_involution H g · 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
The explicit lookup table defines valid perfect matchings for each deleted vertex in block 0. automation
The lemma asserts that for all $r, x \in \{0, \dots, 6\}$ with $x \neq r$, the partner $\text{table0}(r, x)$ belongs to $\{0, \dots, 6\} \setminus \{r\}$, the map is an involution, and $x$ is adjacent to $\text{table0}(r, x)$ in `in1261_seven_graph`. Because the vertex domain $\mathrm{Fin}\ 28$ is finite and graph adjacency is decidable, the proposition is checked by exhaustive computational evaluation via `decide`.
decideBlock 0 of the control graph is 1-factor-critical.
Applying the reduction theorem `in1277_factor_block_from_table` with block $A = \{0, 1, 2, 3, 4, 5, 6\}$, candidate table `table0`, and certificate `table0_valid` concludes that the induced subgraph on block 0 is 1-factor-critical.
uses
in1277_factor_block_from_table,table0_validexact in1277_factor_block_from_table _ table0 table0_valid
Set.mem_univ- Every element of a type belongs to the universal set on that type.
SimpleGraph.Subgraph.isPerfectMatching_iff- A subgraph is a perfect matching if and only if every vertex of the ambient graph has a unique neighbor in the subgraph.
Finset.card_eq_one.mp- A finite set has cardinality 1 if and only if it consists of a single element.
Subtype.ext- Two elements of a subtype are equal if their underlying values are equal.
congrArg- Applying a function to equal arguments produces equal results.
Finset.coe_singleton- The set coercion of a singleton finite set is the singleton set containing that element.
Set.mem_singleton_iff- An element belongs to a singleton set if and only if it equals the element of that singleton.
Set.mem_compl_iff- An element belongs to the complement of a set if and only if it does not belong to the set.
in1277_perfect_matching_of_adjacency_involution- If a graph admits an involution on its vertices such that every vertex is adjacent to its image, then the graph contains a perfect matching.
in1277_factor_block_from_table- An induced subgraph on vertex set A is 1-factor-critical if there is a function pairing each vertex of A \ {r} to an adjacent vertex in A \ {r} via an involution, for every choice of deleted vertex r in A.
table0_valid- For every vertex r in block 0 and every distinct vertex x in block 0, table0 maps (r, x) to another distinct vertex in block 0, acts as an involution on the remaining vertices, and connects x to an adjacent vertex in the graph.
- The validity of the matching table `table0_valid` (line 77) is verified entirely by the `decide` tactic, which exhaustively checks all conditions across all candidate pairs by kernel computation.
- Lines 36, 37, 41, 47, and 50 contain subtype-management boilerplate (`Subtype.ext`, `congrArg`, and singleton set simplification) required to move between elements of `Fin 28`, elements of the subset block $A$, and elements of the vertex-deleted complement $A \setminus \{r\}$.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option maxHeartbeats 4000000set_option maxRecDepth 10000set_option linter.all falselocal instance aftdLocal_ce2a2ba91d51f219_0 : DecidableRel in1261_seven_graph.Adj := by unfold in1261_seven_graph in1261_seven_forbidden_ordered infer_instanceprivate theorem in1277_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_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 g : {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_perfect_matching_of_adjacency_involution H g · 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 table0 (r x : Fin 28) : Fin 28 := if r = 0 ∧ x = 1 then 2 else if r = 0 ∧ x = 2 then 1 else if r = 0 ∧ x = 3 then 4 else if r = 0 ∧ x = 4 then 3 else if r = 0 ∧ x = 5 then 6 else if r = 0 ∧ x = 6 then 5 else if r = 1 ∧ x = 0 then 4 else if r = 1 ∧ x = 4 then 0 else if r = 1 ∧ x = 2 then 3 else if r = 1 ∧ x = 3 then 2 else if r = 1 ∧ x = 5 then 6 else if r = 1 ∧ x = 6 then 5 else if r = 2 ∧ x = 0 then 4 else if r = 2 ∧ x = 4 then 0 else if r = 2 ∧ x = 1 then 3 else if r = 2 ∧ x = 3 then 1 else if r = 2 ∧ x = 5 then 6 else if r = 2 ∧ x = 6 then 5 else if r = 3 ∧ x = 0 then 4 else if r = 3 ∧ x = 4 then 0 else if r = 3 ∧ x = 1 then 2 else if r = 3 ∧ x = 2 then 1 else if r = 3 ∧ x = 5 then 6 else if r = 3 ∧ x = 6 then 5 else if r = 4 ∧ x = 0 then 5 else if r = 4 ∧ x = 5 then 0 else if r = 4 ∧ x = 1 then 2 else if r = 4 ∧ x = 2 then 1 else if r = 4 ∧ x = 3 then 6 else if r = 4 ∧ x = 6 then 3 else if r = 5 ∧ x = 0 then 4 else if r = 5 ∧ x = 4 then 0 else if r = 5 ∧ x = 1 then 2 else if r = 5 ∧ x = 2 then 1 else if r = 5 ∧ x = 3 then 6 else if r = 5 ∧ x = 6 then 3 else if r = 6 ∧ x = 0 then 4 else if r = 6 ∧ x = 4 then 0 else if r = 6 ∧ x = 1 then 2 else if r = 6 ∧ x = 2 then 1 else if r = 6 ∧ x = 3 then 5 else if r = 6 ∧ x = 5 then 3 else xprivate theorem table0_valid : ∀ r x : Fin 28, r ∈ ({0,1,2,3,4,5,6} : Finset (Fin 28)) → x ∈ ({0,1,2,3,4,5,6} : Finset (Fin 28)) → x ≠ r → table0 r x ∈ ({0,1,2,3,4,5,6} : Finset (Fin 28)) ∧ table0 r x ≠ r ∧ table0 r (table0 r x) = x ∧ in1261_seven_graph.Adj x (table0 r x) := by decidetheorem in1277_seven_block_0_factorcritical : is_k_factor_critical (in1261_seven_graph.induce {v | v ∈ ({0,1,2,3,4,5,6} : Finset (Fin 28))}) 1 := by exact in1277_factor_block_from_table _ table0 table0_valid