AFTD Auto-Formalizing Theoretical Domains

op309_locally_injective_fourdeg_lift

theoremverified

A graph admitting a locally injective adjacency-preserving map to a four-degenerate graph is itself four-degenerate.

Statement

theorem op309_locally_injective_fourdeg_lift
    {X Y : Type*} [DecidableEq X] [DecidableEq Y]
    (Q : SimpleGraph X) (H : SimpleGraph Y) (f : X → Y)
    (hom : ∀ a b, Q.Adj a b → H.Adj (f a) (f b))
    (locinj : ∀ v a b, Q.Adj v a → Q.Adj v b → f a = f b → a = b)
    (hH : op309_graph_four_degenerate H) : op309_graph_four_degenerate Q
Source
Quotient-cover lifting for the maximum-forest repair construction in OP-309; experiment 43519.
Verified
28 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1

The proof, explained

To prove that Q is four-degenerate, we take any nonempty finite subset S of vertices in Q and map it to H under f. Because H is four-degenerate, the nonempty image f(S) contains a vertex f(v) (with v ∈ S) whose neighborhood in f(S) is covered by a set T of size at most 4. Since f is locally injective at v, the restricted neighborhood of v in S injects into T, implying that v has at most 4 neighbors in S.

  1. For any nonempty finite subset S of vertices in Q, there exists v ∈ S such that the neighbors of f(v) in f(S) are covered by a set T of at most 4 vertices.

    We enable classical logic and consider an arbitrary nonempty finite set of vertices S ⊆ X. Its image f(S) is a nonempty finite set of vertices in Y. Since H is 4-degenerate, there exists a vertex w ∈ f(S) and a subset T ⊆ Y with |T| ≤ 4 containing all neighbors of w in f(S). Because w ∈ f(S), we obtain a preimage v ∈ S with f(v) = w.

    lines 7–10

    uses Finset.mem_image.mp

      classical
      intro S hS
      obtain ⟨w,hw,T,hT,hcover⟩ := hH (S.image f) (hS.image f)
      obtain ⟨v,hv,rfl⟩ := Finset.mem_image.mp hw
  2. The map f is injective when restricted to N, the set of neighbors of v in S.

    Let N = {u ∈ S | Q.Adj v u} be the neighborhood of v restricted to S. Suppose a, b ∈ N satisfy f(a) = f(b). By definition of N, both a and b are adjacent to v in Q. By the local injectivity hypothesis on f at v, this implies a = b.

    lines 11–14

    uses Finset.mem_filter.mp

      let N := S.filter fun u => Q.Adj v u
      have hNinj : Set.InjOn f (↑N : Set X) := by
        intro a ha b hb hab
        exact locinj v a b (Finset.mem_filter.mp ha).2 (Finset.mem_filter.mp hb).2 hab
  3. The image f(N) is contained in T.

    Consider any z ∈ f(N), so z = f(u) for some u ∈ N. By definition of N, u ∈ S and Q.Adj v u. Because f preserves adjacency, H.Adj (f(v)) (f(u)). Furthermore, f(u) ∈ f(S). By the covering property of T for the neighbors of f(v) in f(S), it follows that f(u) ∈ T.

    lines 15–19

    uses Finset.mem_image.mp, Finset.mem_filter.mp, Finset.mem_image.mpr

      have hNsub : N.image f ⊆ T := by
        intro z hz
        obtain ⟨u,hu,rfl⟩ := Finset.mem_image.mp hz
        have hu' := Finset.mem_filter.mp hu
        exact hcover (f u) (Finset.mem_image.mpr ⟨u,hu'.1,rfl⟩) (hom v u hu'.2)
  4. The vertex v and candidate neighborhood N satisfy |N| ≤ 4.

    We supply v as the low-degree vertex in S and N as the covering subset. Since f is injective on N, |N| = |f(N)|. Since f(N) ⊆ T, |f(N)| ≤ |T| ≤ 4, which establishes |N| ≤ 4.

    lines 20–24

    uses Finset.card_image_of_injOn, Finset.card_le_card

      refine ⟨v,hv,N,?_,?_⟩
      · calc
          N.card = (N.image f).card := (Finset.card_image_of_injOn hNinj).symm
          _ ≤ T.card := Finset.card_le_card hNsub
          _ ≤ 4 := hT
  5. Every neighbor of v in S belongs to N.

    Given any vertex u ∈ S adjacent to v in Q, u satisfies the defining condition of N = {u ∈ S | Q.Adj v u}, so u ∈ N.

    lines 25–26

    uses Finset.mem_filter.mpr

      · intro u hu hadj
        exact Finset.mem_filter.mpr ⟨hu,hadj⟩
Finset.card_image_of_injOn
If a function is injective on a finite set s, then the image f(s) has the same cardinality as s.
Finset.card_le_card
If s ⊆ t for finite sets s and t, then |s| ≤ |t|.
Finset.mem_filter.mp
An element belongs to {x ∈ s | P(x)} only if it belongs to s and satisfies P.
Finset.mem_filter.mpr
If an element belongs to s and satisfies P, then it belongs to {x ∈ s | P(x)}.
Finset.mem_image.mp
An element belongs to the image f(s) only if it equals f(a) for some a ∈ s.
Finset.mem_image.mpr
If a ∈ s and f(a) = b, then b belongs to the image f(s).

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 op309_locally_injective_fourdeg_lift    {X Y : Type*} [DecidableEq X] [DecidableEq Y]    (Q : SimpleGraph X) (H : SimpleGraph Y) (f : X → Y)    (hom : ∀ a b, Q.Adj a b → H.Adj (f a) (f b))    (locinj : ∀ v a b, Q.Adj v a → Q.Adj v b → f a = f b → a = b)    (hH : op309_graph_four_degenerate H) : op309_graph_four_degenerate Q := by  classical  intro S hS  obtain ⟨w,hw,T,hT,hcover⟩ := hH (S.image f) (hS.image f)  obtain ⟨v,hv,rfl⟩ := Finset.mem_image.mp hw  let N := S.filter fun u => Q.Adj v u  have hNinj : Set.InjOn f (↑N : Set X) := by    intro a ha b hb hab    exact locinj v a b (Finset.mem_filter.mp ha).2 (Finset.mem_filter.mp hb).2 hab  have hNsub : N.image f ⊆ T := by    intro z hz    obtain ⟨u,hu,rfl⟩ := Finset.mem_image.mp hz    have hu' := Finset.mem_filter.mp hu    exact hcover (f u) (Finset.mem_image.mpr ⟨u,hu'.1,rfl⟩) (hom v u hu'.2)  refine ⟨v,hv,N,?_,?_⟩  · calc      N.card = (N.image f).card := (Finset.card_image_of_injOn hNinj).symm      _ ≤ T.card := Finset.card_le_card hNsub      _ ≤ 4 := hT  · intro u hu hadj    exact Finset.mem_filter.mpr ⟨hu,hadj⟩
See it in the graphDiscuss this resultChallenge it