AFTD Auto-Formalizing Theoretical Domains

op874_exists_nonarticulation_successor

theoremverified

Every nonempty finite strongly connected loopless two-in/two-out directed multigraph has an arc to a vertex whose deletion leaves the underlying undirected graph connected.

Statement

theorem op874_exists_nonarticulation_successor {X : Type*} [Fintype X] [DecidableEq X] [Nonempty X]
    (p q : Equiv.Perm X) (hfixed : ∀ x, p x ≠ x ∧ q x ≠ x)
    (hstrong : ∀ u v, ∃ w : List Bool, w.foldl (fun x bit => if bit then p x else q x) u = v) :
    ∃ r x : X, (p r = x ∨ q r = x) ∧
      (∀ u v, u ≠ x → v ≠ x → Relation.ReflTransGen
        (fun a b => a ≠ x ∧ b ≠ x ∧ (p a = b ∨ q a = b ∨ p b = a ∨ q b = a)) u v)
Source
Finite connected undirected graph has a non-articulation vertex; choose a predecessor.
Verified
22 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 1

The proof, explained

The theorem is proved by passing from the directed multigraph to its underlying undirected simple graph $G$. Because the directed graph is strongly connected, $G$ is connected, and because the permutations have no fixed points on a nonempty set, $G$ has at least two vertices. By a standard theorem on finite graphs, every finite, connected, nontrivial simple graph contains a non-articulation vertex $x$ whose removal leaves the induced subgraph connected. Choosing $x$ as this vertex and $r = p^{-1}(x)$ as its in-neighbor via $p$, the directed arc $r \to x$ connects to $x$, and the connectivity of the induced subgraph on $X \setminus \{x\}$ lifts to the required walk between any two vertices distinct from $x$.

  1. The underlying undirected graph $G$ on $X$ is a well-defined loopless simple graph.

    We define an undirected simple graph $G$ on the vertex set $X$ whose edges are the undirected versions of the directed edges: $u$ and $v$ are adjacent if $p(u) = v$, $q(u) = v$, $p(v) = u$, or $q(v) = u$. Symmetry holds by swapping disjuncts, and looplessness holds because neither permutation has fixed points (`hfixed`).

    lines 7–12

      classical
      let G : SimpleGraph X := {
        Adj := fun u v => p u = v ∨ q u = v ∨ p v = u ∨ q v = u
        symm := ⟨by intro u v h; tauto⟩
        loopless := ⟨by intro u h; rcases h with h | h | h | h <;> exact (by first | exact (hfixed u).1 h | exact (hfixed u).2 h)⟩
      }
  2. Any sequence of directed steps along $p$ and $q$ defines an undirected walk in $G$.

    We prove by induction on the Boolean list $w$ that following the sequence of permutations from any vertex $u$ yields a path in $G$, represented as the reflexive-transitive closure of the adjacency relation. The empty list is the reflexive step (`Relation.ReflTransGen.refl`). For a non-empty list $b :: w$, the first step (applying $p$ if $b$ is true and $q$ if false) is an edge of $G$, and appending the path given by the induction hypothesis reaches the final vertex (`Relation.ReflTransGen.head`, using `List.foldl_cons`).

    lines 13–19

    uses Relation.ReflTransGen.refl, List.foldl_cons, Relation.ReflTransGen.head

      have walk (u : X) (w : List Bool) : Relation.ReflTransGen G.Adj u (w.foldl (fun x bit => if bit then p x else q x) u) := by
        induction w generalizing u with
        | nil => exact Relation.ReflTransGen.refl
        | cons b w ih =>
          simp only [List.foldl_cons]
          apply Relation.ReflTransGen.head _ (ih _)
          cases b <;> simp [G]
  3. The undirected graph $G$ is connected.

    To show $G$ is connected, it suffices by `SimpleGraph.connected_iff_exists_forall_reachable` to show that some vertex can reach all others. Picking an arbitrary vertex $u$ from the nonemptiness of $X$, strong connectivity (`hstrong`) provides a directed path to any other vertex $v$. By the previous lemma, this directed path gives an undirected walk in $G$, so $v$ is reachable from $u$ (`SimpleGraph.reachable_iff_reflTransGen`).

    lines 20–27

    uses SimpleGraph.connected_iff_exists_forall_reachable, SimpleGraph.reachable_iff_reflTransGen

      have hg : G.Connected := by
        apply (SimpleGraph.connected_iff_exists_forall_reachable G).mpr
        obtain ⟨u⟩ := ‹Nonempty X›
        refine ⟨u, ?_⟩
        intro v
        obtain ⟨w, hw⟩ := hstrong u v
        apply (SimpleGraph.reachable_iff_reflTransGen u v).mpr
        simpa [hw] using walk u w
  4. There exists a non-articulation vertex $x \in X$ with an incoming arc from $r = p^{-1}(x)$.

    Since $X$ is nonempty and $p$ has no fixed points, $u \neq p(u)$, showing that $X$ has at least two elements and is nontrivial. A connected, finite, nontrivial simple graph has a non-cut vertex $x$ such that the induced subgraph on $X \setminus \{x\}$ is connected. Taking $r = p^{-1}(x)$ provides an arc from $r$ to $x$ since $p(r) = x$, satisfying the first disjunct (`Or.inl`).

    lines 28–31

    uses Or.inl

      obtain ⟨u⟩ := ‹Nonempty X›
      letI : Nontrivial X := ⟨⟨p u, u, (hfixed u).1⟩⟩
      obtain ⟨x, hx⟩ := hg.exists_connected_induce_compl_singleton_of_finite_nontrivial
      refine ⟨p.symm x, x, Or.inl (p.apply_symm_apply x), ?_⟩
  5. Any two vertices distinct from $x$ are connected in the graph with $x$ removed.

    Given $a, b \neq x$, we regard them as vertices in the subtype of elements distinct from $x$. Because the induced subgraph on $X \setminus \{x\}$ is connected, there is a walk between them in the induced subgraph (`SimpleGraph.reachable_iff_reflTransGen`). Using `Relation.ReflTransGen.lift`, this walk lifts under the subtype inclusion to a walk in $X$. Every step along this walk connects vertices distinct from $x$ (verified using `Set.mem_singleton_iff.mpr`) that are adjacent in $G$.

    lines 32–43

    uses SimpleGraph.reachable_iff_reflTransGen, Relation.ReflTransGen.lift, Set.mem_singleton_iff.mpr

      intro a b ha hb
      let a' : {z // z ∈ ({x} : Set X)ᶜ} := ⟨a, by simpa using ha⟩
      let b' : {z // z ∈ ({x} : Set X)ᶜ} := ⟨b, by simpa using hb⟩
      have hwalk : Relation.ReflTransGen (G.induce ({x} : Set X)ᶜ).Adj a' b' :=
        (SimpleGraph.reachable_iff_reflTransGen a' b').mp (hx a' b')
      apply Relation.ReflTransGen.lift (fun z : {z // z ∈ ({x} : Set X)ᶜ} => z.val)
        (p := fun a b => a ≠ x ∧ b ≠ x ∧ (p a = b ∨ q a = b ∨ p b = a ∨ q b = a)) ?_ a' b' hwalk
      intro u v huv
      have hu : (u : X) ∉ ({x} : Set X) := u.property
      have hv : (v : X) ∉ ({x} : Set X) := v.property
      exact ⟨fun h => hu (Set.mem_singleton_iff.mpr h),
        fun h => hv (Set.mem_singleton_iff.mpr h), by simpa [G] using huv⟩
Relation.ReflTransGen.refl
The reflexive-transitive closure of any binary relation is reflexive (every element is related to itself).
List.foldl_cons
Folding over a non-empty list `b :: w` applies the function to the initial accumulator and head before continuing on the tail `w`.
Relation.ReflTransGen.head
If `a` is related to `b` by a base relation `r` and `b` is related to `c` by the reflexive-transitive closure of `r`, then `a` is related to `c` by the closure.
SimpleGraph.connected_iff_exists_forall_reachable
A simple graph is connected if and only if there exists a vertex that can reach every vertex in the graph.
SimpleGraph.reachable_iff_reflTransGen
Two vertices in a simple graph are reachable from one another if and only if they are related by the reflexive-transitive closure of the adjacency relation.
Or.inl
From a proof of `P`, proves the disjunction `P ∨ Q`.
Relation.ReflTransGen.lift
If a function maps edges in a relation `r` to edges in a relation `p`, it also maps walks in the reflexive-transitive closure of `r` to walks in the reflexive-transitive closure of `p`.
Set.mem_singleton_iff.mpr
If an element equals `x`, then it belongs to the singleton set `{x}`.

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

theorem op874_exists_nonarticulation_successor {X : Type*} [Fintype X] [DecidableEq X] [Nonempty X]    (p q : Equiv.Perm X) (hfixed : ∀ x, p x ≠ x ∧ q x ≠ x)    (hstrong : ∀ u v, ∃ w : List Bool, w.foldl (fun x bit => if bit then p x else q x) u = v) :    ∃ r x : X, (p r = x ∨ q r = x) ∧      (∀ u v, u ≠ x → v ≠ x → Relation.ReflTransGen        (fun a b => a ≠ x ∧ b ≠ x ∧ (p a = b ∨ q a = b ∨ p b = a ∨ q b = a)) u v) := by  classical  let G : SimpleGraph X := {    Adj := fun u v => p u = v ∨ q u = v ∨ p v = u ∨ q v = u    symm := ⟨by intro u v h; tauto⟩    loopless := ⟨by intro u h; rcases h with h | h | h | h <;> exact (by first | exact (hfixed u).1 h | exact (hfixed u).2 h)⟩  }  have walk (u : X) (w : List Bool) : Relation.ReflTransGen G.Adj u (w.foldl (fun x bit => if bit then p x else q x) u) := by    induction w generalizing u with    | nil => exact Relation.ReflTransGen.refl    | cons b w ih =>      simp only [List.foldl_cons]      apply Relation.ReflTransGen.head _ (ih _)      cases b <;> simp [G]  have hg : G.Connected := by    apply (SimpleGraph.connected_iff_exists_forall_reachable G).mpr    obtain ⟨u⟩ := ‹Nonempty X›    refine ⟨u, ?_⟩    intro v    obtain ⟨w, hw⟩ := hstrong u v    apply (SimpleGraph.reachable_iff_reflTransGen u v).mpr    simpa [hw] using walk u w  obtain ⟨u⟩ := ‹Nonempty X›  letI : Nontrivial X := ⟨⟨p u, u, (hfixed u).1⟩⟩  obtain ⟨x, hx⟩ := hg.exists_connected_induce_compl_singleton_of_finite_nontrivial  refine ⟨p.symm x, x, Or.inl (p.apply_symm_apply x), ?_⟩  intro a b ha hb  let a' : {z // z ∈ ({x} : Set X)ᶜ} := ⟨a, by simpa using ha⟩  let b' : {z // z ∈ ({x} : Set X)ᶜ} := ⟨b, by simpa using hb⟩  have hwalk : Relation.ReflTransGen (G.induce ({x} : Set X)ᶜ).Adj a' b' :=    (SimpleGraph.reachable_iff_reflTransGen a' b').mp (hx a' b')  apply Relation.ReflTransGen.lift (fun z : {z // z ∈ ({x} : Set X)ᶜ} => z.val)    (p := fun a b => a ≠ x ∧ b ≠ x ∧ (p a = b ∨ q a = b ∨ p b = a ∨ q b = a)) ?_ a' b' hwalk  intro u v huv  have hu : (u : X) ∉ ({x} : Set X) := u.property  have hv : (v : X) ∉ ({x} : Set X) := v.property  exact ⟨fun h => hu (Set.mem_singleton_iff.mpr h),    fun h => hv (Set.mem_singleton_iff.mpr h), by simpa [G] using huv⟩
See it in the graphDiscuss this resultChallenge it