AFTD Auto-Formalizing Theoretical Domains

even_linked_double_star_smaller_arm_subgraph

theoremverified

For any natural p, n and m≤M, the linked double star with m leaves on the smaller arm is a subgraph of the one with M leaves on that arm. The other arm size n and the path order 2p are unchanged.

Statement

theorem even_linked_double_star_smaller_arm_subgraph (p n m M : ℕ) (hm : m ≤ M) :
    (even_linked_double_star p n m).IsContained (even_linked_double_star p n M)
Source
https://arxiv.org/abs/2611.19632; subgraph relation for the tree in OP-1853.
Verified
29 Nov 2026
Axioms
Quot.soundpropext
Built on 1
  • even_linked_double_starFor natural numbers p, n, and m, the even-linked double star S_{2p}(n, m) is the simple graph on vertex set Fin(2p) ⊕ Fin(n) ⊕ Fin(m)…
Used by 1

The proof, explained

The linked double star with m leaves on its smaller arm embeds into the one with M leaves (m ≤ M) by fixing the central path of order 2p and the left arm of n leaves, while embedding the m right leaves into the M right leaves via the canonical inclusion Fin m ↪ Fin M. The proof reduces graph containment to verifying local array conditions using the auxiliary lemma `ds_copy_of_arrays`. Injectivity of the combined mapping is established by `ds_sum_inj`, and adjacency preservation is verified separately for path edges, left arm leaves, and right arm leaves.

  1. Defining the candidate vertex map f as the combination of the path, left arm, and right arm maps, establishing an embedding of the linked double star into G reduces to showing that f preserves adjacency.

    We combine the vertex maps `path`, `left`, and `right` into a single map f : Fin (2*p) ⊕ Fin n ⊕ Fin m → V via `Sum.elim`. Because f is injective by hypothesis `hinj`, constructing a graph embedding (`IsContained`) requires only showing that f maps every adjacent pair in the linked double star to an adjacent pair in G.

    lines 11–12

      let f := Sum.elim path (Sum.elim left right)
      refine ⟨⟨⟨f,?_⟩,hinj⟩⟩
  2. For any adjacent pair of vertices x, y in the linked double star, the edge can be decomposed into six cases according to whether it is a path edge, a left leaf edge, or a right leaf edge, oriented in either direction.

    By the definition of `even_linked_double_star`, an edge between x and y is either a path edge between consecutive indices, an edge between root vertex 0 and a left leaf, or an edge between vertex 2p - 1 and a right leaf, in either orientation. We perform a case split on these disjunctions.

    lines 13–15

      intro x y h
      rcases h.2 with h | h <;>
        rcases h with ⟨i,j,rfl,rfl,h|h⟩ | ⟨i,j,h,⟨rfl,rfl⟩|⟨rfl,rfl⟩⟩ | ⟨i,j,h,⟨rfl,rfl⟩|⟨rfl,rfl⟩⟩
  3. In every case, the map f preserves adjacency in G.

    Simplifying f on the sum components reveals that each case matches one of the adjacency hypotheses: `hp` for consecutive path vertices, `hl` for root vertex 0 and left leaves, `hr` for vertex 2p - 1 and right leaves, or their symmetric counterparts (via `.symm`). This completes the proof of `ds_copy_of_arrays`.

    lines 16–23

      all_goals dsimp [f]
      all_goals first
        | exact hp _ _ (by assumption)
        | exact (hp _ _ (by assumption)).symm
        | exact hl _ (by assumption) _
        | exact (hl _ (by assumption) _).symm
        | exact hr _ (by assumption) _
        | exact (hr _ (by assumption) _).symm
  4. The combination Sum.elim f g of two injective functions f and g with disjoint images is injective.

    Given Sum.elim f g x = Sum.elim f g y, we inspect which summands x and y belong to. If both are in the left summand, injectivity of f and `congrArg Sum.inl` yield equality. If both are in the right summand, injectivity of g and `congrArg Sum.inr` yield equality. If they lie in different summands, their equality contradicts the disjointness hypothesis h.

    lines 28–32

    uses congrArg, Sum.inl, Sum.inr

      rintro (x|x) (y|y) he
      · exact congrArg Sum.inl (hf he)
      · exact (h x y he).elim
      · exact (h y x he.symm).elim
      · exact congrArg Sum.inr (hg he)
  5. To embed the linked double star with m leaves into the one with M leaves (m ≤ M), it suffices to define the natural vertex maps and check their injectivity and edge preservation.

    We define the path vertices and left leaves via the identity mappings into the larger graph, and embed the m right leaves into the M right leaves using `Fin.castLE hm`. Applying the auxiliary lemma `ds_copy_of_arrays` reduces the existence of the subgraph embedding to verifying that these combined vertex maps are injective and preserve all edges.

    lines 36–39

    uses ds_copy_of_arrays

      let path (i : Fin (2*p)) : Fin (2*p) ⊕ Fin n ⊕ Fin M := .inl i
      let left (i : Fin n) : Fin (2*p) ⊕ Fin n ⊕ Fin M := .inr (.inl i)
      let right (i : Fin m) : Fin (2*p) ⊕ Fin n ⊕ Fin M := .inr (.inr (i.castLE hm))
      apply ds_copy_of_arrays path left right
  6. The combined vertex mapping into the larger graph is injective.

    We apply `ds_sum_inj` twice: first to separate the path vertices from the arm leaves (which have disjoint sum constructors), and second to separate the left leaves from the right leaves. The left inclusion is injective by `Sum.inl.inj`, while the right inclusion is injective because `i.castLE hm = j.castLE hm` implies i = j via `Fin.ext`. Cross-component equalities are impossible by constructor disjointness.

    lines 40–47

    uses ds_sum_inj, Sum.inl_injective, Sum.inl.inj, Sum.inr.inj, Fin.ext, congrArg

      · apply ds_sum_inj Sum.inl_injective
        · apply ds_sum_inj (f := left) (g := right)
          · intro i j h; exact Sum.inl.inj (Sum.inr.inj h)
          · intro i j h
            have hh : i.castLE hm = j.castLE hm := Sum.inr.inj (Sum.inr.inj h)
            exact Fin.ext (congrArg (fun a : Fin M => a.val) hh)
          · intro i j h; cases h
        · rintro i (j|j) h <;> cases h
  7. Consecutive path vertices remain adjacent in the target graph. automation

    Consecutive path vertices i and j with i.val + 1 = j.val map to the identical path vertices in the target graph. They are distinct because i.val + 1 = j.val implies i ≠ j by linear arithmetic (`omega`), and the target graph adjacency condition is fulfilled using `Or.inl`.

    lines 48–50

    uses Or.inl, congrArg, Fin.val, Sum.inl.inj

      · intro i j h
        refine ⟨?_,Or.inl (Or.inl ⟨i,j,rfl,rfl,Or.inl h⟩)⟩
        intro he; have := congrArg Fin.val (Sum.inl.inj he); omega
  8. Edges between the root vertex 0 and the left arm leaves are preserved. automation

    The root vertex 0 and left leaf l map directly to the root vertex and left leaf l in the target graph. They are distinct by constructor inequality (`simp`), and satisfy the left arm adjacency relation in the target graph.

    lines 51–52

    uses Or.inl, Or.inr

      · intro i hi l
        exact ⟨by simp [path,left],Or.inl (Or.inr (.inl ⟨i,l,hi,.inl ⟨rfl,rfl⟩⟩))⟩
  9. Edges between the endpoint 2p - 1 and the right arm leaves are preserved under the inclusion m ≤ M. automation

    The endpoint 2p - 1 and right leaf l map to the endpoint and the embedded leaf l.castLE hm in the target graph. They are distinct (`simp`), and satisfy the right arm adjacency relation in the target graph.

    lines 53–54

    uses Or.inl, Or.inr

      · intro i hi l
        exact ⟨by simp [path,right],Or.inl (Or.inr (.inr ⟨i,l.castLE hm,hi,.inl ⟨rfl,rfl⟩⟩))⟩
congrArg
equality is preserved under function application: a₁ = a₂ → f a₁ = f a₂
Sum.inl
the left injection into a direct sum α ⊕ β
Sum.inr
the right injection into a direct sum α ⊕ β
ds_copy_of_arrays
a graph contains the linked double star if there exist injective vertex maps for the path and both arms that preserve the required edge adjacencies
ds_sum_inj
the combined map Sum.elim f g is injective provided f and g are injective and have disjoint images
Sum.inl_injective
the canonical left injection Sum.inl is injective
Sum.inl.inj
equality of left injections implies equality of their arguments: Sum.inl x = Sum.inl y → x = y
Sum.inr.inj
equality of right injections implies equality of their arguments: Sum.inr x = Sum.inr y → x = y
Fin.ext
two elements of Fin n are equal if and only if their underlying natural values are equal
Fin.val
the projection of an element of Fin n to its underlying natural number value
Or.inl
proof of a disjunction a ∨ b from a proof of the left disjunct a
Or.inr
proof of a disjunction a ∨ b from a proof of the right disjunct b

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

open SimpleGraph Classicalopen scoped BigOperatorsprivate theorem ds_copy_of_arrays {V : Type*} {G : SimpleGraph V} {p n m : ℕ}    (path : Fin (2*p) → V) (left : Fin n → V) (right : Fin m → V)    (hinj : Function.Injective (Sum.elim path (Sum.elim left right)))    (hp : ∀ i j : Fin (2*p), i.val+1=j.val → G.Adj (path i) (path j))    (hl : ∀ i : Fin (2*p), i.val=0 → ∀ l, G.Adj (path i) (left l))    (hr : ∀ i : Fin (2*p), i.val+1=2*p → ∀ l, G.Adj (path i) (right l)) :    (even_linked_double_star p n m).IsContained G := by  let f := Sum.elim path (Sum.elim left right)  refine ⟨⟨⟨f,?_⟩,hinj⟩⟩  intro x y h  rcases h.2 with h | h <;>    rcases h with ⟨i,j,rfl,rfl,h|h⟩ | ⟨i,j,h,⟨rfl,rfl⟩|⟨rfl,rfl⟩⟩ | ⟨i,j,h,⟨rfl,rfl⟩|⟨rfl,rfl⟩⟩  all_goals dsimp [f]  all_goals first    | exact hp _ _ (by assumption)    | exact (hp _ _ (by assumption)).symm    | exact hl _ (by assumption) _    | exact (hl _ (by assumption) _).symm    | exact hr _ (by assumption) _    | exact (hr _ (by assumption) _).symmprivate theorem ds_sum_inj {α β γ : Type*} {f : α → γ} {g : β → γ}    (hf : Function.Injective f) (hg : Function.Injective g) (h : ∀ i j, f i ≠ g j) :    Function.Injective (Sum.elim f g) := by  rintro (x|x) (y|y) he  · exact congrArg Sum.inl (hf he)  · exact (h x y he).elim  · exact (h y x he.symm).elim  · exact congrArg Sum.inr (hg he)theorem even_linked_double_star_smaller_arm_subgraph (p n m M : ℕ) (hm : m ≤ M) :    (even_linked_double_star p n m).IsContained (even_linked_double_star p n M) := by  let path (i : Fin (2*p)) : Fin (2*p) ⊕ Fin n ⊕ Fin M := .inl i  let left (i : Fin n) : Fin (2*p) ⊕ Fin n ⊕ Fin M := .inr (.inl i)  let right (i : Fin m) : Fin (2*p) ⊕ Fin n ⊕ Fin M := .inr (.inr (i.castLE hm))  apply ds_copy_of_arrays path left right  · apply ds_sum_inj Sum.inl_injective    · apply ds_sum_inj (f := left) (g := right)      · intro i j h; exact Sum.inl.inj (Sum.inr.inj h)      · intro i j h        have hh : i.castLE hm = j.castLE hm := Sum.inr.inj (Sum.inr.inj h)        exact Fin.ext (congrArg (fun a : Fin M => a.val) hh)      · intro i j h; cases h    · rintro i (j|j) h <;> cases h  · intro i j h    refine ⟨?_,Or.inl (Or.inl ⟨i,j,rfl,rfl,Or.inl h⟩)⟩    intro he; have := congrArg Fin.val (Sum.inl.inj he); omega  · intro i hi l    exact ⟨by simp [path,left],Or.inl (Or.inr (.inl ⟨i,l,hi,.inl ⟨rfl,rfl⟩⟩))⟩  · intro i hi l    exact ⟨by simp [path,right],Or.inl (Or.inr (.inr ⟨i,l.castLE hm,hi,.inl ⟨rfl,rfl⟩⟩))⟩
See it in the graphDiscuss this resultChallenge it