AFTD Auto-Formalizing Theoretical Domains

op309_girth9_disjoint_p3_leaf_hosts_unique

theoremverified

In a graph of girth at least nine, two vertex-disjoint three-vertex paths cannot both have leaves adjacent to each of two distinct outside vertices.

Statement

theorem op309_girth9_disjoint_p3_leaf_hosts_unique
    {V : Type*} (G : SimpleGraph V) (hgirth : (9 : ℕ∞) ≤ G.egirth)
    (a b c d e f u v : V) (hvertices : [a,b,c,d,e,f,u,v].Nodup)
    (hab : G.Adj a b) (hbc : G.Adj b c) (hde : G.Adj d e) (hef : G.Adj e f)
    (huP : G.Adj u a ∨ G.Adj u c) (hvP : G.Adj v a ∨ G.Adj v c)
    (huQ : G.Adj u d ∨ G.Adj u f) (hvQ : G.Adj v d ∨ G.Adj v f) : False
Source
High-girth shared-host obstruction for OP-309.
Verified
29 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2

The proof, explained

Let P = a-b-c and Q = d-e-f be two vertex-disjoint 3-vertex paths, and let u, v be distinct outside vertices each adjacent to a leaf of P and a leaf of Q. Case splitting on the leaves that u and v attach to yields 16 subcases. In every subcase, connecting u and v through their leaf attachments (and possibly through the paths P and Q) closes a cycle of length 4, 6, or 8, each of which is impossible in a graph of girth at least 9.

  1. Given the six edges of a 6-cycle, construct a non-empty closed walk w of length 6 on vertices a, b, c, d, e, f.

    We extract the six edge adjacency hypotheses from the conjunction hedges and define the closed walk w starting and ending at a via the successive edges a-b, b-c, c-d, d-e, e-f, and f-a. By definition, a walk constructed with cons is not nil (empty).

    lines 4–8

      rcases hedges with ⟨hab,hbc,hcd,hde,hef,hfa⟩
      let w : G.Walk a a := SimpleGraph.Walk.cons hab (SimpleGraph.Walk.cons hbc
        (SimpleGraph.Walk.cons hcd (SimpleGraph.Walk.cons hde (SimpleGraph.Walk.cons hef
          (SimpleGraph.Walk.cons hfa SimpleGraph.Walk.nil)))))
      have hnotnil : ¬ w.Nil := by dsimp [w]; intro h; cases h
  2. The closed walk w is a simple cycle.

    By `SimpleGraph.Walk.isCycle_iff_isPath_tail_and_le_length`, a closed walk is a cycle if its length is at least 3 and the tail of the walk is a path. The length is 6, which norm_num verifies is ≥ 3. By `SimpleGraph.Walk.isPath_def` and `SimpleGraph.Walk.support_tail_of_not_nil`, the tail is a path if the vertex list [b, c, d, e, f, a] has no duplicates. This list is a 1-step cyclic rotation of [a, b, c, d, e, f], which has no duplicates by hypothesis `hvertices`; rotation preserves duplicate-freedom by `List.nodup_rotate`.

    lines 9–18

    uses SimpleGraph.Walk.isCycle_iff_isPath_tail_and_le_length, SimpleGraph.Walk.isPath_def, SimpleGraph.Walk.support_tail_of_not_nil, List.rotate_cons_succ, List.rotate_zero, List.nodup_rotate

      have hw : w.IsCycle := by
        rw [SimpleGraph.Walk.isCycle_iff_isPath_tail_and_le_length]
        refine ⟨?_, by norm_num [w]⟩
        rw [SimpleGraph.Walk.isPath_def, SimpleGraph.Walk.support_tail_of_not_nil _ hnotnil]
        have hrot : [b,c,d,e,f,a] = [a,b,c,d,e,f].rotate 1 := by
          rw [List.rotate_cons_succ, List.rotate_zero]
          rfl
        change [b,c,d,e,f,a].Nodup
        rw [hrot]
        rwa [List.nodup_rotate]
  3. A 6-cycle cannot exist in a graph of girth at least 9, completing the proof of in1254_no_six_cycle. automation

    The existence of the 6-cycle w implies that the girth G.egirth is at most 6. Combining this with 9 ≤ G.egirth yields 9 ≤ 6, which `decide` shows is false.

    lines 19–22

      have hle : G.egirth ≤ (6 : ℕ∞) := G.egirth_le_length hw
      have hcontra : (9 : ℕ∞) ≤ (6 : ℕ∞) := hgirth.trans hle
      revert hcontra
      decide
  4. Expand pairwise distinctness of the eight vertices and branch into 16 adjacency cases.

    We simplify the Nodup condition on [a, b, c, d, e, f, u, v] into pairwise inequalities. We then split into 16 cases according to the four binary choices: whether u attaches to a or c in P, whether v attaches to a or c in P, whether u attaches to d or f in Q, and whether v attaches to d or f in Q.

    lines 30–34

    uses List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true

      have hpairs := hvertices
      simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true,
        not_false_eq_true] at hpairs
      rcases huP with huP | huP <;> rcases hvP with hvP | hvP <;>
        rcases huQ with huQ | huQ <;> rcases hvQ with hvQ | hvQ
  5. Derive a contradiction in the four subcases where both u and v attach to leaf a.

    When u and v both attach to a, their attachments to Q determine the cycle: if both attach to d, the vertices u, a, v, d form a 4-cycle, ruled out by `op309_girth_nine_no_four_cycle`; if u attaches to d and v attaches to f, the vertices u, a, v, f, e, d form a 6-cycle traversing Q's path d-e-f, ruled out by `in1254_no_six_cycle`; symmetrically if u attaches to f and v to d, we obtain a 6-cycle on u, a, v, d, e, f; if both attach to f, they form a 4-cycle on u, a, v, f. In each case, distinctness of the cycle vertices follows from the pairwise inequalities.

    lines 35–50

    uses op309_girth_nine_no_four_cycle, in1254_no_six_cycle

      · apply op309_girth_nine_no_four_cycle G hgirth u a v d
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hvP.symm, hvQ, huQ.symm⟩
      · apply in1254_no_six_cycle G hgirth u a v f e d
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hvP.symm, hvQ, hef.symm, hde.symm, huQ.symm⟩
      · apply in1254_no_six_cycle G hgirth u a v d e f
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hvP.symm, hvQ, hde, hef, huQ.symm⟩
      · apply op309_girth_nine_no_four_cycle G hgirth u a v f
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hvP.symm, hvQ, huQ.symm⟩
  6. Derive a contradiction in the four subcases where u attaches to a and v attaches to c.

    Since u and v attach to opposite ends of P, the path a-b-c connects them. If u and v attach to the same leaf of Q (both to d or both to f), traversing a-b-c gives a 6-cycle (u-a-b-c-v-d-u or u-a-b-c-v-f-u), ruled out by `in1254_no_six_cycle`. If they attach to opposite leaves of Q, the cycle traverses both the path a-b-c and the path d-e-f, producing an 8-cycle (u-a-b-c-v-f-e-d-u or u-a-b-c-v-d-e-f-u), which contradicts girth ≥ 9 via `op309_girth_nine_no_eight_cycle`.

    lines 51–66

    uses in1254_no_six_cycle, op309_girth_nine_no_eight_cycle

      · apply in1254_no_six_cycle G hgirth u a b c v d
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hab, hbc, hvP.symm, hvQ, huQ.symm⟩
      · apply op309_girth_nine_no_eight_cycle G hgirth u a b c v f e d
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hab, hbc, hvP.symm, hvQ, hef.symm, hde.symm, huQ.symm⟩
      · apply op309_girth_nine_no_eight_cycle G hgirth u a b c v d e f
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hab, hbc, hvP.symm, hvQ, hde, hef, huQ.symm⟩
      · apply in1254_no_six_cycle G hgirth u a b c v f
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hab, hbc, hvP.symm, hvQ, huQ.symm⟩
  7. Derive a contradiction in the four subcases where u attaches to c and v attaches to a.

    Symmetric to the previous block, u and v attach to opposite ends of P in reverse order. Connecting to the same leaf of Q (d or f) creates a 6-cycle via c-b-a, eliminated by `in1254_no_six_cycle`. Connecting to opposite leaves of Q traverses both paths c-b-a and d-e-f, creating an 8-cycle ruled out by `op309_girth_nine_no_eight_cycle`.

    lines 67–82

    uses in1254_no_six_cycle, op309_girth_nine_no_eight_cycle

      · apply in1254_no_six_cycle G hgirth u c b a v d
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hbc.symm, hab.symm, hvP.symm, hvQ, huQ.symm⟩
      · apply op309_girth_nine_no_eight_cycle G hgirth u c b a v f e d
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hbc.symm, hab.symm, hvP.symm, hvQ, hef.symm, hde.symm, huQ.symm⟩
      · apply op309_girth_nine_no_eight_cycle G hgirth u c b a v d e f
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hbc.symm, hab.symm, hvP.symm, hvQ, hde, hef, huQ.symm⟩
      · apply in1254_no_six_cycle G hgirth u c b a v f
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hbc.symm, hab.symm, hvP.symm, hvQ, huQ.symm⟩
  8. Derive a contradiction in the four subcases where both u and v attach to leaf c.

    Symmetric to the first block, both u and v attach to leaf c of P. Attaching to the same leaf of Q (both to d or both to f) forms a 4-cycle (u-c-v-d-u or u-c-v-f-u), eliminated by `op309_girth_nine_no_four_cycle`. Attaching to opposite leaves of Q creates a 6-cycle using path d-e-f (u-c-v-f-e-d-u or u-c-v-d-e-f-u), eliminated by `in1254_no_six_cycle`. This exhausts all 16 cases and concludes the theorem.

    lines 83–98

    uses op309_girth_nine_no_four_cycle, in1254_no_six_cycle

      · apply op309_girth_nine_no_four_cycle G hgirth u c v d
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hvP.symm, hvQ, huQ.symm⟩
      · apply in1254_no_six_cycle G hgirth u c v f e d
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hvP.symm, hvQ, hef.symm, hde.symm, huQ.symm⟩
      · apply in1254_no_six_cycle G hgirth u c v d e f
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hvP.symm, hvQ, hde, hef, huQ.symm⟩
      · apply op309_girth_nine_no_four_cycle G hgirth u c v f
        · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]
          tauto
        · exact ⟨huP, hvP.symm, hvQ, huQ.symm⟩
and_true
A conjunction with True simplifies to the proposition itself: (p ∧ True) = p.
in1254_no_six_cycle
A simple graph of girth at least 9 contains no 6-cycle on pairwise distinct vertices.
List.mem_cons
An element belongs to a cons list b :: l if and only if it equals b or belongs to l.
List.nodup_rotate
A list has no duplicate elements if and only if any cyclic rotation of it has no duplicate elements.
List.nodup_cons
A cons list a :: l has no duplicates if and only if a is not in l and l has no duplicates.
List.not_mem_nil
The empty list contains no elements.
List.rotate_cons_succ
Rotating a list (a :: l) by n + 1 positions equals rotating (l ++ [a]) by n positions.
List.rotate_zero
Rotating a list by 0 positions leaves the list unchanged.
not_false_eq_true
The negation of False is True.
not_or
A negated disjunction ¬(p ∨ q) is equivalent to ¬p ∧ ¬q.
op309_girth_nine_no_eight_cycle
A simple graph of girth at least 9 contains no 8-cycle on pairwise distinct vertices.
op309_girth_nine_no_four_cycle
A simple graph of girth at least 9 contains no 4-cycle on pairwise distinct vertices.
SimpleGraph.Walk.isCycle_iff_isPath_tail_and_le_length
A closed walk is a cycle if and only if its tail is a path and its length is at least 3.
SimpleGraph.Walk.isPath_def
A walk is a path if and only if its vertex support contains no duplicate vertices.
SimpleGraph.Walk.support_tail_of_not_nil
For any non-nil walk, the vertex support of its tail is the tail of its vertex support.

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

private theorem in1254_no_six_cycle {V : Type*} (G : SimpleGraph V) (hgirth : (9 : ℕ∞) ≤ G.egirth)    (a b c d e f : V) (hvertices : [a,b,c,d,e,f].Nodup)    (hedges : G.Adj a b ∧ G.Adj b c ∧ G.Adj c d ∧ G.Adj d e ∧ G.Adj e f ∧ G.Adj f a) : False := by  rcases hedges with ⟨hab,hbc,hcd,hde,hef,hfa⟩  let w : G.Walk a a := SimpleGraph.Walk.cons hab (SimpleGraph.Walk.cons hbc    (SimpleGraph.Walk.cons hcd (SimpleGraph.Walk.cons hde (SimpleGraph.Walk.cons hef      (SimpleGraph.Walk.cons hfa SimpleGraph.Walk.nil)))))  have hnotnil : ¬ w.Nil := by dsimp [w]; intro h; cases h  have hw : w.IsCycle := by    rw [SimpleGraph.Walk.isCycle_iff_isPath_tail_and_le_length]    refine ⟨?_, by norm_num [w]⟩    rw [SimpleGraph.Walk.isPath_def, SimpleGraph.Walk.support_tail_of_not_nil _ hnotnil]    have hrot : [b,c,d,e,f,a] = [a,b,c,d,e,f].rotate 1 := by      rw [List.rotate_cons_succ, List.rotate_zero]      rfl    change [b,c,d,e,f,a].Nodup    rw [hrot]    rwa [List.nodup_rotate]  have hle : G.egirth ≤ (6 : ℕ∞) := G.egirth_le_length hw  have hcontra : (9 : ℕ∞) ≤ (6 : ℕ∞) := hgirth.trans hle  revert hcontra  decidetheorem op309_girth9_disjoint_p3_leaf_hosts_unique    {V : Type*} (G : SimpleGraph V) (hgirth : (9 : ℕ∞) ≤ G.egirth)    (a b c d e f u v : V) (hvertices : [a,b,c,d,e,f,u,v].Nodup)    (hab : G.Adj a b) (hbc : G.Adj b c) (hde : G.Adj d e) (hef : G.Adj e f)    (huP : G.Adj u a ∨ G.Adj u c) (hvP : G.Adj v a ∨ G.Adj v c)    (huQ : G.Adj u d ∨ G.Adj u f) (hvQ : G.Adj v d ∨ G.Adj v f) : False := by  have hpairs := hvertices  simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true,    not_false_eq_true] at hpairs  rcases huP with huP | huP <;> rcases hvP with hvP | hvP <;>    rcases huQ with huQ | huQ <;> rcases hvQ with hvQ | hvQ  · apply op309_girth_nine_no_four_cycle G hgirth u a v d    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hvP.symm, hvQ, huQ.symm⟩  · apply in1254_no_six_cycle G hgirth u a v f e d    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hvP.symm, hvQ, hef.symm, hde.symm, huQ.symm⟩  · apply in1254_no_six_cycle G hgirth u a v d e f    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hvP.symm, hvQ, hde, hef, huQ.symm⟩  · apply op309_girth_nine_no_four_cycle G hgirth u a v f    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hvP.symm, hvQ, huQ.symm⟩  · apply in1254_no_six_cycle G hgirth u a b c v d    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hab, hbc, hvP.symm, hvQ, huQ.symm⟩  · apply op309_girth_nine_no_eight_cycle G hgirth u a b c v f e d    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hab, hbc, hvP.symm, hvQ, hef.symm, hde.symm, huQ.symm⟩  · apply op309_girth_nine_no_eight_cycle G hgirth u a b c v d e f    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hab, hbc, hvP.symm, hvQ, hde, hef, huQ.symm⟩  · apply in1254_no_six_cycle G hgirth u a b c v f    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hab, hbc, hvP.symm, hvQ, huQ.symm⟩  · apply in1254_no_six_cycle G hgirth u c b a v d    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hbc.symm, hab.symm, hvP.symm, hvQ, huQ.symm⟩  · apply op309_girth_nine_no_eight_cycle G hgirth u c b a v f e d    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hbc.symm, hab.symm, hvP.symm, hvQ, hef.symm, hde.symm, huQ.symm⟩  · apply op309_girth_nine_no_eight_cycle G hgirth u c b a v d e f    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hbc.symm, hab.symm, hvP.symm, hvQ, hde, hef, huQ.symm⟩  · apply in1254_no_six_cycle G hgirth u c b a v f    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hbc.symm, hab.symm, hvP.symm, hvQ, huQ.symm⟩  · apply op309_girth_nine_no_four_cycle G hgirth u c v d    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hvP.symm, hvQ, huQ.symm⟩  · apply in1254_no_six_cycle G hgirth u c v f e d    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hvP.symm, hvQ, hef.symm, hde.symm, huQ.symm⟩  · apply in1254_no_six_cycle G hgirth u c v d e f    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hvP.symm, hvQ, hde, hef, huQ.symm⟩  · apply op309_girth_nine_no_four_cycle G hgirth u c v f    · simp only [List.nodup_cons, List.mem_cons, not_or, List.not_mem_nil, and_true, not_false_eq_true]      tauto    · exact ⟨huP, hvP.symm, hvQ, huQ.symm⟩
See it in the graphDiscuss this resultChallenge it