AFTD Auto-Formalizing Theoretical Domains

pk_free_hole_tight_arc_has_both_endpoints

theoremverified

Suppose an induced d-vertex path is disjoint from an induced k-cycle in a graph without an induced k-vertex path, with d positive and d+1 less than k. Only the last path vertex touches the cycle. If its cycle neighbors all lie in the first d+2 consecutive sites, it is adjacent to both endpoints of this arc.

Statement

theorem pk_free_hole_tight_arc_has_both_endpoints {V : Type*} (G : SimpleGraph V) {k d : ℕ}
    (hd : 0<d) (hk : d+1<k) (hp : IsPkFree G k) (f : SimpleGraph.cycleGraph k ↪g G)
    (p : SimpleGraph.pathGraph d ↪g G) (apart : ∀ i j, p i ≠ f j)
    (e : Fin d) (he : e.val+1=d) (onlyEnd : ∀ i j, G.Adj (p i) (f j) → i=e)
    (touch : ∃ j, G.Adj (p e) (f j)) (arc : ∀ j, G.Adj (p e) (f j) → j.val ≤ d+1) :
    G.Adj (p e) (f ⟨0,by omega⟩) ∧ G.Adj (p e) (f ⟨d+1,hk⟩)
Source
OP-606, longest-hole campaign in arXiv:2610.36290. Experiments 44743, 44746, 44748 and 44749.
Verified
29 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
  • pk_free_hole_tail_attachment_outside_short_arcIn a graph with no induced path on k vertices, fix an induced k-cycle in cyclic order and an induced path on d vertices disjoint from it,…
  • IsPkFreeA simple graph G is P_k-free if it contains no induced subgraph isomorphic to the path on k vertices.

The proof, explained

To prove that the endpoint of the path is adjacent to both ends of the arc, the proof uses a lemma (pk_free_hole_tail_attachment_outside_short_arc) guaranteeing that the endpoint must have a cycle neighbor at index at least d + 1. Applied to the original cycle, this neighbor must have index at least d + 1 while lying in the arc of vertices at most d + 1, forcing it to be exactly d + 1. Applying the same lemma to the cycle shifted by 1 produces a neighbor at index j ≥ d + 1 whose shifted index j + 1 also satisfies the arc bound; modular arithmetic on the cycle then forces j + 1 to wrap around to 0.

  1. Define a shifted cycle embedding shift sending vertex j to f(j + 1).

    Linear arithmetic (omega) verifies 0 < k and k ≠ 0 from 0 < d and d + 1 < k, ensuring 0 is a valid element of Fin k and allowing Fin arithmetic. We construct an induced subgraph embedding shift of the cycle into G by sending each vertex j to f(j + 1). Injectivity follows from injectivity of f and right cancellation of addition. Adjacency is preserved because cycle adjacency depends only on index differences, which are invariant under adding 1 to both indices.

    lines 6–15

    uses add_right_cancel, SimpleGraph.cycleGraph_adj', add_sub_add_right_eq_sub

        G.Adj (p e) (f ⟨0,by omega⟩) ∧ G.Adj (p e) (f ⟨d+1,hk⟩) := by
      letI : NeZero k := ⟨by omega⟩
      let shift : SimpleGraph.cycleGraph k ↪g G := {
        toFun := fun j => f (j+1)
        inj' := fun _ _ h => add_right_cancel (f.injective h)
        map_rel_iff' := by
          intro i j
          change G.Adj (f (i+1)) (f (j+1)) ↔ (SimpleGraph.cycleGraph k).Adj i j
          rw [f.map_rel_iff]
          simp only [SimpleGraph.cycleGraph_adj',add_sub_add_right_eq_sub] }
  2. The path endpoint p(e) is adjacent to f(d + 1).

    Applying pk_free_hole_tail_attachment_outside_short_arc to the cycle embedding f gives a cycle neighbor a of p(e) with index at least d + 1. But the hypothesis arc states that every cycle neighbor of p(e) has index at most d + 1. By antisymmetry of ≤, a must equal d + 1, establishing that p(e) is adjacent to f(d + 1).

    lines 16–17

    uses pk_free_hole_tail_attachment_outside_short_arc, Fin.ext, le_antisymm

      obtain ⟨a,ha,adjA⟩ := pk_free_hole_tail_attachment_outside_short_arc G hd hk hp f p apart e he onlyEnd touch
      have ha' : a=⟨d+1,hk⟩ := Fin.ext (le_antisymm (arc a adjA) ha)
  3. The path endpoint p(e) also has a neighbor on the shifted cycle.

    By hypothesis touch, p(e) is adjacent to some f(j). Choosing j - 1 on the shifted cycle gives shift(j - 1) = f(j - 1 + 1) = f(j), so p(e) is adjacent to shift(j - 1).

    lines 18–22

      have touch' : ∃ j, G.Adj (p e) (shift j) := by
        obtain ⟨j,hj⟩ := touch
        refine ⟨j-1,?_⟩
        change G.Adj (p e) (f (j-1+1))
        simpa using hj
  4. There is a cycle vertex j ≥ d + 1 such that p(e) is adjacent to f(j + 1), which implies (j + 1 : Fin k) ≤ d + 1.

    Applying pk_free_hole_tail_attachment_outside_short_arc to the shifted embedding shift yields a vertex j with d + 1 ≤ j such that p(e) is adjacent to shift(j) = f(j + 1). Since f(j + 1) is adjacent to p(e), the arc hypothesis guarantees that the index of j + 1 in Fin k is at most d + 1.

    lines 23–26

    uses pk_free_hole_tail_attachment_outside_short_arc

      obtain ⟨j,hj,hadj⟩ := pk_free_hole_tail_attachment_outside_short_arc G hd hk hp shift p
          (fun i j => apart i (j+1)) e he (fun i j => onlyEnd i (j+1)) touch'
      change G.Adj (p e) (f (j+1)) at hadj
      have bound := arc _ hadj
  5. The shifted index j + 1 in Fin k must equal 0.

    The value of j + 1 in Fin k is (j + 1) % k. Since j ≥ d + 1, we have j + 1 ≥ d + 2. If j + 1 < k, then (j + 1) % k = j + 1 ≥ d + 2, contradicting the bound (j + 1 : Fin k) ≤ d + 1. Thus j + 1 cannot be strictly less than k; since j < k, it follows that j + 1 = k, so (j + 1) % k = 0.

    lines 27–36

    uses Fin.val_add, Fin.val_one', Nat.mod_eq_of_lt, Nat.mod_self

      have hwrap : (j+1 : Fin k).val=0 := by
        have hjk := j.isLt
        have hv : (j+1 : Fin k).val=(j.val+1)%k := by
          rw [Fin.val_add,Fin.val_one']
          simp [Nat.mod_eq_of_lt (show 1<k by omega)]
        rw [hv] at bound ⊢
        by_cases h : j.val+1<k
        · rw [Nat.mod_eq_of_lt h] at bound
          omega
        · rw [show j.val+1=k by omega,Nat.mod_self]
  6. The endpoint p(e) is adjacent to both f(0) and f(d + 1).

    Rewriting with j + 1 = 0 in the adjacency with f(j + 1) gives adjacency to f(0), and rewriting with a = d + 1 gives adjacency to f(d + 1).

    line 37

    uses Fin.ext

      exact ⟨(Fin.ext hwrap : j+1=⟨0,by omega⟩) ▸ hadj,ha' ▸ adjA⟩
add_right_cancel
In an additive structure with right cancellation, if a + b = c + b, then a = c.
add_sub_add_right_eq_sub
In an additive group, (a + c) - (b + c) = a - b.
Fin.ext
Two elements of Fin n are equal if and only if their underlying natural number values are equal.
Fin.val_add
The value of the sum of two elements in Fin n is the sum of their values modulo n.
Fin.val_one'
In Fin n with n ≠ 0, the value of the element 1 is 1 % n.
le_antisymm
If a ≤ b and b ≤ a in a partial order, then a = b.
Nat.mod_eq_of_lt
If a < b, then a % b = a.
Nat.mod_self
For any natural number n, n % n = 0.
pk_free_hole_tail_attachment_outside_short_arc
Under the hypotheses that an induced path of length d touches an induced cycle of length k only at its last vertex and d + 1 < k in a P_k-free graph, the last path vertex must have a cycle neighbor with index at least d + 1.
SimpleGraph.cycleGraph_adj'
Two vertices in the cycle graph on n vertices are adjacent if and only if their difference in Fin n is 1 or -1.

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 pk_free_hole_tight_arc_has_both_endpoints {V : Type*} (G : SimpleGraph V) {k d : ℕ}    (hd : 0<d) (hk : d+1<k) (hp : IsPkFree G k) (f : SimpleGraph.cycleGraph k ↪g G)    (p : SimpleGraph.pathGraph d ↪g G) (apart : ∀ i j, p i ≠ f j)    (e : Fin d) (he : e.val+1=d) (onlyEnd : ∀ i j, G.Adj (p i) (f j) → i=e)    (touch : ∃ j, G.Adj (p e) (f j)) (arc : ∀ j, G.Adj (p e) (f j) → j.val ≤ d+1) :    G.Adj (p e) (f ⟨0,by omega⟩) ∧ G.Adj (p e) (f ⟨d+1,hk⟩) := by  letI : NeZero k := ⟨by omega⟩  let shift : SimpleGraph.cycleGraph k ↪g G := {    toFun := fun j => f (j+1)    inj' := fun _ _ h => add_right_cancel (f.injective h)    map_rel_iff' := by      intro i j      change G.Adj (f (i+1)) (f (j+1)) ↔ (SimpleGraph.cycleGraph k).Adj i j      rw [f.map_rel_iff]      simp only [SimpleGraph.cycleGraph_adj',add_sub_add_right_eq_sub] }  obtain ⟨a,ha,adjA⟩ := pk_free_hole_tail_attachment_outside_short_arc G hd hk hp f p apart e he onlyEnd touch  have ha' : a=⟨d+1,hk⟩ := Fin.ext (le_antisymm (arc a adjA) ha)  have touch' : ∃ j, G.Adj (p e) (shift j) := by    obtain ⟨j,hj⟩ := touch    refine ⟨j-1,?_⟩    change G.Adj (p e) (f (j-1+1))    simpa using hj  obtain ⟨j,hj,hadj⟩ := pk_free_hole_tail_attachment_outside_short_arc G hd hk hp shift p      (fun i j => apart i (j+1)) e he (fun i j => onlyEnd i (j+1)) touch'  change G.Adj (p e) (f (j+1)) at hadj  have bound := arc _ hadj  have hwrap : (j+1 : Fin k).val=0 := by    have hjk := j.isLt    have hv : (j+1 : Fin k).val=(j.val+1)%k := by      rw [Fin.val_add,Fin.val_one']      simp [Nat.mod_eq_of_lt (show 1<k by omega)]    rw [hv] at bound ⊢    by_cases h : j.val+1<k    · rw [Nat.mod_eq_of_lt h] at bound      omega    · rw [show j.val+1=k by omega,Nat.mod_self]  exact ⟨(Fin.ext hwrap : j+1=⟨0,by omega⟩) ▸ hadj,ha' ▸ adjA⟩
See it in the graphDiscuss this resultChallenge it