AFTD Auto-Formalizing Theoretical Domains

simple_graph_pair_stable_nu_le_five_excludes_eight_saturated_seed

theoremverified

A two-edge-stable graph with triangle-packing number at most five cannot contain the specified twenty-edge graph on eight vertices as a subgraph.

Statement

theorem simple_graph_pair_stable_nu_le_five_excludes_eight_saturated_seed (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (f : Fin 8 → Fin n) (hinj : Function.Injective f) (hcontains : ∀ i j : Fin 8, (i,j) ∈ ({(0,1),(0,2),(0,3),(0,4),(1,2),(1,3),(1,6),(2,3),(2,4),(2,5),(2,6),(2,7),(3,4),(3,5),(3,6),(3,7),(4,5),(4,7),(5,6),(6,7)} : Finset (Fin 8 × Fin 8)) → G.Adj (f i) (f j)) (hbound : simple_graph_triangle_packing_number G ≤ 5) (hstable : ∀ e g : Sym2 (Fin n), e ∈ G.edgeSet → g ∈ G.edgeSet → e ≠ g → simple_graph_triangle_packing_number (G.deleteEdges {e,g}) = simple_graph_triangle_packing_number G) : False
Source
Two-private-vertex five-packing branch of the triangle-packing campaign; compare https://arxiv.org/abs/2001.00257, Section 3.
Verified
29 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 4
  • simple_graph_triangle_packing_numberν(G): the maximum number of pairwise edge-disjoint triangles of G (two triangles are edge-disjoint when they share at most one vertex).
  • simple_graph_triangle_cover_numberτ(G): the minimum number of edges of G such that every triangle of G contains one of them.
  • g$g(S,M) = \dim_{\mathbb{F}_p}(S^{\perp}_M) - \dim_{\mathbb{F}_p}(S_M)$.
  • cFor a group $G$ and an element $s \in G$, the local count $c_G(s)$ is the cardinality of the set of elements $g \in G$ such that…

The proof, explained

The theorem is proved by contradiction. The 8-vertex seed graph E8 contains an edge-disjoint packing of 5 triangles (P5), so ν(G) = 5, and no additional edge can connect vertices of the seed without producing a 6-triangle packing. By 2-edge stability, deleting two disjoint seed edges e1 = {f(0), f(1)} and e2 = {f(2), f(3)} leaves a punctured graph G' with ν(G') = 5, which admits a maximum packing P of 5 triangles. Any triangle in P containing a vertex outside the seed would combine with either P5 or a certificate packing avoiding a chord to produce a 6-triangle packing in G, so all 5 triangles in P must be supported entirely on the seed vertices. Finally, by an exhaustive finite check (cov_spec), every seed triangle avoiding e1 and e2 contains at least one of four specific 2-element subsets; since triangles in P are edge-disjoint, they must contain distinct subsets, forcing |P| ≤ 4, which contradicts |P| = 5.

  1. The 8-vertex seed graph E8 satisfies the combinatorial certificate properties verified by kernel evaluation. automation

    Exhaustive finite case analysis over the 8 vertices using Lean's kernel decision procedure (`decide +kernel`) verifies four structural properties: P5 is an edge-disjoint packing of 5 triangles in E8 (`P5_spec`); adding any non-edge to E8 creates a packing of 6 edge-disjoint triangles (`cert2_spec`); deleting any edge from E8 leaves a packing of 5 edge-disjoint triangles (`cert3_spec`); and every triangle in E8 avoiding both {0, 1} and {2, 3} contains at least one of four 2-element subsets {2, 4}, {2, 6}, {3, 4}, or {3, 6} (`cov_spec`).

    lines 1–75

    namespace In1192
    def E8 : Finset (Fin 8 × Fin 8) := {(0,1),(0,2),(0,3),(0,4),(1,2),(1,3),(1,6),(2,3),(2,4),(2,5),(2,6),(2,7),(3,4),(3,5),(3,6),(3,7),(4,5),(4,7),(5,6),(6,7)}
    
    def cert2 (a b : Fin 8) : Finset (Finset (Fin 8)) :=
      if (a = 0 ∧ b = 5) ∨ (a = 5 ∧ b = 0) then {{0, 1, 2}, {0, 3, 5}, {1, 3, 6}, {2, 4, 5}, {2, 6, 7}, {3, 4, 7}} else
      if (a = 0 ∧ b = 6) ∨ (a = 6 ∧ b = 0) then {{0, 1, 6}, {0, 2, 3}, {2, 4, 5}, {2, 6, 7}, {3, 4, 7}, {3, 5, 6}} else
      if (a = 0 ∧ b = 7) ∨ (a = 7 ∧ b = 0) then {{0, 1, 2}, {0, 3, 7}, {1, 3, 6}, {2, 4, 7}, {2, 5, 6}, {3, 4, 5}} else
      if (a = 1 ∧ b = 4) ∨ (a = 4 ∧ b = 1) then {{0, 1, 4}, {0, 2, 3}, {1, 2, 6}, {2, 4, 5}, {3, 4, 7}, {3, 5, 6}} else
      if (a = 1 ∧ b = 5) ∨ (a = 5 ∧ b = 1) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 5}, {2, 4, 7}, {2, 5, 6}, {3, 6, 7}} else
      if (a = 1 ∧ b = 7) ∨ (a = 7 ∧ b = 1) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 7}, {2, 4, 5}, {2, 6, 7}, {3, 5, 6}} else
      if (a = 4 ∧ b = 6) ∨ (a = 6 ∧ b = 4) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}, {4, 5, 6}} else
      if (a = 5 ∧ b = 7) ∨ (a = 7 ∧ b = 5) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}, {5, 6, 7}} else
      ∅
    
    def cert3 (a b : Fin 8) : Finset (Finset (Fin 8)) :=
      if (a = 0 ∧ b = 1) ∨ (a = 1 ∧ b = 0) then {{0, 2, 3}, {1, 2, 6}, {2, 4, 5}, {3, 4, 7}, {3, 5, 6}} else
      if (a = 0 ∧ b = 2) ∨ (a = 2 ∧ b = 0) then {{0, 1, 3}, {1, 2, 6}, {2, 3, 5}, {2, 4, 7}, {3, 6, 7}} else
      if (a = 0 ∧ b = 3) ∨ (a = 3 ∧ b = 0) then {{0, 1, 2}, {1, 3, 6}, {2, 3, 5}, {2, 6, 7}, {3, 4, 7}} else
      if (a = 0 ∧ b = 4) ∨ (a = 4 ∧ b = 0) then {{0, 1, 2}, {1, 3, 6}, {2, 3, 5}, {2, 6, 7}, {3, 4, 7}} else
      if (a = 1 ∧ b = 2) ∨ (a = 2 ∧ b = 1) then {{0, 1, 3}, {0, 2, 4}, {2, 3, 5}, {2, 6, 7}, {3, 4, 7}} else
      if (a = 1 ∧ b = 3) ∨ (a = 3 ∧ b = 1) then {{0, 1, 2}, {0, 3, 4}, {2, 3, 5}, {2, 4, 7}, {3, 6, 7}} else
      if (a = 1 ∧ b = 6) ∨ (a = 6 ∧ b = 1) then {{0, 1, 2}, {0, 3, 4}, {2, 3, 5}, {2, 4, 7}, {3, 6, 7}} else
      if (a = 2 ∧ b = 3) ∨ (a = 3 ∧ b = 2) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 4, 5}, {2, 6, 7}} else
      if (a = 2 ∧ b = 4) ∨ (a = 4 ∧ b = 2) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 6, 7}} else
      if (a = 2 ∧ b = 5) ∨ (a = 5 ∧ b = 2) then {{0, 1, 3}, {0, 2, 4}, {1, 2, 6}, {2, 3, 7}, {3, 4, 5}} else
      if (a = 2 ∧ b = 6) ∨ (a = 6 ∧ b = 2) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}} else
      if (a = 2 ∧ b = 7) ∨ (a = 7 ∧ b = 2) then {{0, 1, 3}, {0, 2, 4}, {1, 2, 6}, {2, 3, 5}, {3, 4, 7}} else
      if (a = 3 ∧ b = 4) ∨ (a = 4 ∧ b = 3) then {{0, 1, 3}, {0, 2, 4}, {1, 2, 6}, {2, 3, 5}, {3, 6, 7}} else
      if (a = 3 ∧ b = 5) ∨ (a = 5 ∧ b = 3) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 7}, {2, 4, 5}} else
      if (a = 3 ∧ b = 6) ∨ (a = 6 ∧ b = 3) then {{0, 1, 3}, {0, 2, 4}, {1, 2, 6}, {2, 3, 5}, {3, 4, 7}} else
      if (a = 3 ∧ b = 7) ∨ (a = 7 ∧ b = 3) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}} else
      if (a = 4 ∧ b = 5) ∨ (a = 5 ∧ b = 4) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}} else
      if (a = 4 ∧ b = 7) ∨ (a = 7 ∧ b = 4) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 6, 7}} else
      if (a = 5 ∧ b = 6) ∨ (a = 6 ∧ b = 5) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}} else
      if (a = 6 ∧ b = 7) ∨ (a = 7 ∧ b = 6) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}} else
      ∅
    
    def P5 : Finset (Finset (Fin 8)) := {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}}
    
    def sd (i j : Fin 8) : Bool := decide ((i, j) ∈ E8 ∨ (j, i) ∈ E8)
    
    def cov (t : Finset (Fin 8)) : Fin 4 :=
      if ({2, 4} : Finset (Fin 8)) ⊆ t then 0 else if ({2, 6} : Finset (Fin 8)) ⊆ t then 1
      else if ({3, 4} : Finset (Fin 8)) ⊆ t then 2 else 3
    
    def covE : Fin 4 → Finset (Fin 8) := ![{2, 4}, {2, 6}, {3, 4}, {3, 6}]
    
    set_option maxRecDepth 100000 in
    set_option synthInstance.maxSize 4000 in
    set_option synthInstance.maxHeartbeats 400000 in
    theorem cov_spec : ∀ t : Finset (Fin 8), t.card = 3 → (∀ i ∈ t, ∀ j ∈ t, i ≠ j → sd i j = true) →
        ¬ ((0 : Fin 8) ∈ t ∧ (1 : Fin 8) ∈ t) → ¬ ((2 : Fin 8) ∈ t ∧ (3 : Fin 8) ∈ t) →
        covE (cov t) ⊆ t := by decide +kernel
    
    set_option maxRecDepth 100000 in
    set_option synthInstance.maxSize 4000 in
    set_option synthInstance.maxHeartbeats 400000 in
    theorem cert2_spec : ∀ a b : Fin 8, a ≠ b → sd a b = false → (cert2 a b).card = 6 ∧
        (∀ t ∈ cert2 a b, t.card = 3 ∧ ∀ i ∈ t, ∀ j ∈ t, i ≠ j →
          (sd i j = true ∨ (i = a ∧ j = b) ∨ (i = b ∧ j = a))) ∧
        (∀ s ∈ cert2 a b, ∀ t ∈ cert2 a b, s ≠ t → (s ∩ t).card ≤ 1) := by decide +kernel
    
    set_option maxRecDepth 100000 in
    set_option synthInstance.maxSize 4000 in
    set_option synthInstance.maxHeartbeats 400000 in
    theorem cert3_spec : ∀ a b : Fin 8, a ≠ b → sd a b = true → (cert3 a b).card = 5 ∧
        (∀ t ∈ cert3 a b, t.card = 3 ∧ (∀ i ∈ t, ∀ j ∈ t, i ≠ j → sd i j = true) ∧ ¬ (a ∈ t ∧ b ∈ t)) ∧
        (∀ s ∈ cert3 a b, ∀ t ∈ cert3 a b, s ≠ t → (s ∩ t).card ≤ 1) := by decide +kernel
    
    set_option maxRecDepth 100000 in
    set_option synthInstance.maxSize 4000 in
    set_option synthInstance.maxHeartbeats 400000 in
    theorem P5_spec : P5.card = 5 ∧ (∀ t ∈ P5, t.card = 3 ∧ ∀ i ∈ t, ∀ j ∈ t, i ≠ j → sd i j = true) ∧
        (∀ s ∈ P5, ∀ t ∈ P5, s ≠ t → (s ∩ t).card ≤ 1) := by decide +kernel
    
  2. The triangle-packing number ν(G) is well-defined and attained by some maximum packing.

    Because the graph has finitely many vertices, the size of any triangle packing is bounded above by the total number of vertex subsets (`nu_bdd`, using `Finset.card_le_univ`). A nonempty bounded subset of natural numbers contains its supremum (`Nat.sSup_mem`), so there exists a maximum triangle packing T whose size equals ν(G) (`exists_max`), and any triangle packing has cardinality at most ν(G) (`le_nu`).

    lines 76–97

    uses Finset.card_le_univ, Nat.sSup_mem

    section
    variable {n : ℕ} (G : SimpleGraph (Fin n))
    
    def Pk (T : Finset (Finset (Fin n))) : Prop :=
      (∀ t ∈ T, G.IsNClique 3 t) ∧ (T : Set (Finset (Fin n))).Pairwise (fun s t => (s ∩ t).card ≤ 1)
    
    theorem nu_bdd : BddAbove {k | ∃ T : Finset (Finset (Fin n)), (∀ t ∈ T, G.IsNClique 3 t) ∧
        (T : Set (Finset (Fin n))).Pairwise (fun s t => (s ∩ t).card ≤ 1) ∧ T.card = k} :=
      ⟨Fintype.card (Finset (Fin n)), by rintro k ⟨T, -, -, rfl⟩; exact Finset.card_le_univ T⟩
    
    theorem le_nu (T : Finset (Finset (Fin n))) (h : Pk G T) :
        T.card ≤ simple_graph_triangle_packing_number G :=
      le_csSup (nu_bdd G) ⟨T, h.1, h.2, rfl⟩
    
    theorem exists_max : ∃ T : Finset (Finset (Fin n)), Pk G T ∧
        T.card = simple_graph_triangle_packing_number G := by
      obtain ⟨T, h1, h2, h3⟩ := Nat.sSup_mem (s := {k | ∃ T : Finset (Finset (Fin n)),
        (∀ t ∈ T, G.IsNClique 3 t) ∧
        (T : Set (Finset (Fin n))).Pairwise (fun s t => (s ∩ t).card ≤ 1) ∧ T.card = k})
        ⟨0, ∅, by simp, by simp, rfl⟩ (nu_bdd G)
      exact ⟨T, ⟨h1, h2⟩, h3⟩
    
  3. An injective vertex map pushes forward any triangle packing on 8 vertices to an edge-disjoint triangle packing of the same size in G.

    Because f is injective, it preserves subset cardinalities (`Finset.card_image_of_injective`) and commutes with intersections (`Finset.image_inter`). Hence 3-element cliques map to 3-element cliques, and pairwise intersections of size at most 1 are preserved under the image operation (`Finset.image_injective`).

    lines 98–120

    uses Finset.image_injective, Finset.card_image_of_injective, Finset.image_inter

    /-- Images of a Fin 8 packing. -/
    theorem img_pk (f : Fin 8 → Fin n) (hinj : Function.Injective f) (A8 : Fin 8 → Fin 8 → Prop)
        (hA : ∀ i j, A8 i j → G.Adj (f i) (f j)) (L : Finset (Finset (Fin 8)))
        (h1 : ∀ t ∈ L, t.card = 3 ∧ ∀ i ∈ t, ∀ j ∈ t, i ≠ j → A8 i j)
        (h2 : ∀ s ∈ L, ∀ t ∈ L, s ≠ t → (s ∩ t).card ≤ 1) :
        Pk G (L.image (Finset.image f)) ∧ (L.image (Finset.image f)).card = L.card := by
      have hI : Function.Injective (Finset.image f) := Finset.image_injective hinj
      refine ⟨⟨?_, ?_⟩, Finset.card_image_of_injective _ hI⟩
      · intro t' ht'
        obtain ⟨t, ht, rfl⟩ := Finset.mem_image.mp ht'
        refine ⟨?_, by rw [Finset.card_image_of_injective _ hinj, (h1 t ht).1]⟩
        intro x hx y hy hxy
        simp only [Finset.coe_image, Set.mem_image, Finset.mem_coe] at hx hy
        obtain ⟨i, hi, rfl⟩ := hx
        obtain ⟨j, hj, rfl⟩ := hy
        exact hA i j ((h1 t ht).2 i hi j hj (fun h => hxy (h ▸ rfl)))
      · intro s' hs' t' ht' hst
        obtain ⟨s, hs, rfl⟩ := Finset.mem_image.mp (Finset.mem_coe.mp hs')
        obtain ⟨t, ht, rfl⟩ := Finset.mem_image.mp (Finset.mem_coe.mp ht')
        rw [← Finset.image_inter _ _ hinj, Finset.card_image_of_injective _ hinj]
        exact h2 s hs t ht (fun h => hst (h ▸ rfl))
    end
    
  4. Any edge of G connecting vertices in the image of the seed must be an edge of the seed graph E8.

    Suppose for contradiction that G contains an edge between f(a) and f(b) for some non-edge {a, b} of E8. By `cert2_spec`, there is a packing of 6 edge-disjoint triangles using only edges of E8 and the edge {a, b}. Pushing this packing forward into G via `img_pk` yields an edge-disjoint triangle packing of size 6 in G, implying ν(G) ≥ 6 (`le_nu`), which contradicts ν(G) ≤ 5.

    lines 121–147

    uses cert2_spec, img_pk, le_nu

    theorem main1192 (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (f : Fin 8 → Fin n)
        (hinj : Function.Injective f)
        (hcontains : ∀ i j : Fin 8, (i,j) ∈ E8 → G.Adj (f i) (f j))
        (hbound : simple_graph_triangle_packing_number G ≤ 5)
        (hstable : ∀ e g : Sym2 (Fin n), e ∈ G.edgeSet → g ∈ G.edgeSet → e ≠ g →
          simple_graph_triangle_packing_number (G.deleteEdges {e,g}) =
            simple_graph_triangle_packing_number G) : False := by
      classical
      have hsd : ∀ i j, sd i j = true → G.Adj (f i) (f j) := by
        intro i j h
        simp only [sd, decide_eq_true_eq] at h
        rcases h with h | h
        · exact hcontains i j h
        · exact (hcontains j i h).symm
      -- (ii) edges of G inside the seed are seed edges
      have inside : ∀ a b : Fin 8, a ≠ b → G.Adj (f a) (f b) → sd a b = true := by
        intro a b hab hG
        by_contra hs
        obtain ⟨c1, c2, c3⟩ := cert2_spec a b hab (by simpa using hs)
        obtain ⟨hp, hc⟩ := img_pk G f hinj (fun i j => sd i j = true ∨ (i = a ∧ j = b) ∨ (i = b ∧ j = a))
          (by
            rintro i j (h | ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)
            · exact hsd i j h
            · exact hG
            · exact hG.symm) _ c2 c3
        have := le_nu G _ hp
        omega
  5. The triangle-packing number ν(G) is at least 5, and therefore exactly 5.

    The seed graph contains an edge-disjoint packing P5 of 5 triangles (`P5_spec`). Pushing P5 forward into G via `img_pk` produces an edge-disjoint triangle packing of size 5 in G, so ν(G) ≥ 5 (`le_nu`). Together with the hypothesis ν(G) ≤ 5, this forces ν(G) = 5.

    lines 148–152

    uses P5_spec, img_pk, le_nu

      obtain ⟨p1, p2, p3⟩ := P5_spec
      obtain ⟨hP5, hP5c⟩ := img_pk G f hinj (fun i j => sd i j = true) hsd P5 p2 p3
      have hnu5 : 5 ≤ simple_graph_triangle_packing_number G := by
        have := le_nu G _ hP5; omega
      -- a maximum packing of G minus the two edges
  6. Deleting two disjoint seed edges produces a punctured graph G' that admits a maximum packing P of 5 triangles.

    The seed contains two disjoint edges e1 = {f(0), f(1)} and e2 = {f(2), f(3)}. By 2-edge stability, removing both edges does not change the packing number: ν(G') = ν(G) = 5. By `exists_max`, G' contains an edge-disjoint packing P of triangles with |P| = 5. Because G' is a subgraph of G (`SimpleGraph.deleteEdges_le`), every triangle in P is also a triangle in G.

    lines 153–164

    uses exists_max, SimpleGraph.deleteEdges_le

      have e1 : s(f 0, f 1) ∈ G.edgeSet := hcontains 0 1 (by decide)
      have e2 : s(f 2, f 3) ∈ G.edgeSet := hcontains 2 3 (by decide)
      have e12 : s(f 0, f 1) ≠ s(f 2, f 3) := by
        intro h
        rcases Sym2.eq_iff.mp h with ⟨h1, -⟩ | ⟨h1, -⟩
        · exact absurd (hinj h1) (by decide)
        · exact absurd (hinj h1) (by decide)
      have hst := hstable _ _ e1 e2 e12
      set G' := G.deleteEdges {s(f 0, f 1), s(f 2, f 3)}
      obtain ⟨P, ⟨hPc, hPp⟩, hPcard⟩ := exists_max G'
      have hPG : ∀ D ∈ P, G.IsNClique 3 D := fun D hD =>
        (hPc D hD).mono (SimpleGraph.deleteEdges_le _)
  7. No triangle in P can contain a vertex outside the seed while meeting the seed in at most one vertex.

    Suppose some triangle D in P has a vertex w outside the range of f and meets the seed in at most one vertex (|D ∩ range(f)| ≤ 1). Then D shares at most one vertex with every triangle in the embedded packing f(P5) (`Finset.card_le_card`, `Finset.inter_comm`). Thus, adding D to f(P5) produces an edge-disjoint packing of size 5 + 1 = 6 in G (`Finset.card_insert_of_notMem`), contradicting ν(G) ≤ 5 (`le_nu`).

    lines 165–199

    uses Finset.card_le_card, Finset.inter_comm, le_nu, Finset.card_insert_of_notMem

      -- every triangle of P lies in the range of f
      have hrange : ∀ D ∈ P, ∀ x ∈ D, ∃ i, f i = x := by
        intro D hD w hw
        by_contra hwr
        simp only [not_exists] at hwr
        have hDc := hPG D hD
        set A := D.filter (fun x => ∃ i, f i = x)
        have hwA : ∀ t : Finset (Fin 8), D ∩ t.image f ⊆ A := by
          intro t x hx
          rw [Finset.mem_inter, Finset.mem_image] at hx
          obtain ⟨hxD, i, -, rfl⟩ := hx
          exact Finset.mem_filter.mpr ⟨hxD, i, rfl⟩
        have hDni : ∀ L : Finset (Finset (Fin 8)), D ∉ L.image (Finset.image f) := by
          intro L hL
          obtain ⟨t, -, ht⟩ := Finset.mem_image.mp hL
          rw [← ht] at hw
          obtain ⟨i, -, hi⟩ := Finset.mem_image.mp hw
          exact hwr i hi
        by_cases hA : A.card ≤ 1
        · -- D meets every seed triangle in at most one vertex
          have hT : Pk G (insert D (P5.image (Finset.image f))) := by
            refine ⟨?_, ?_⟩
            · intro t ht
              rcases Finset.mem_insert.mp ht with rfl | ht
              · exact hDc
              · exact hP5.1 t ht
            · rw [Finset.coe_insert]
              refine hP5.2.insert ?_
              intro t ht _
              obtain ⟨s, -, rfl⟩ := Finset.mem_image.mp (Finset.mem_coe.mp ht)
              exact ⟨(Finset.card_le_card (hwA s)).trans hA,
                by rw [Finset.inter_comm]; exact (Finset.card_le_card (hwA s)).trans hA⟩
          have := le_nu G _ hT
          rw [Finset.card_insert_of_notMem (hDni _), hP5c, p1] at this
          omega
  8. Every triangle in P is supported entirely on the seed vertices.

    If a triangle D in P contained a vertex w outside the range of f, it would have to meet the seed in at least two vertices by the previous step, so D = {w, f(u), f(v)} (`Finset.eq_of_subset_of_card_le`, `Finset.card_pair`). The edge {f(u), f(v)} is in G, hence {u, v} is an edge of E8. By `cert3_spec`, E8 has a 5-triangle packing avoiding {u, v}. Pushing this packing into G via `img_pk` gives a 5-packing with which D shares at most one vertex. Adding D would yield a packing of size 6 in G (`Finset.card_insert_of_notMem`), contradicting ν(G) ≤ 5 (`le_nu`). Thus all vertices of D belong to the range of f.

    lines 200–254

    uses cert3_spec, img_pk, Finset.eq_of_subset_of_card_le, Finset.card_pair, le_nu, Finset.card_insert_of_notMem

        · rw [not_le] at hA
          obtain ⟨x, hx, y, hy, hxy⟩ := Finset.one_lt_card.mp hA
          obtain ⟨hxD, u, rfl⟩ := Finset.mem_filter.mp hx
          obtain ⟨hyD, v, rfl⟩ := Finset.mem_filter.mp hy
          have huv : u ≠ v := fun h => hxy (h ▸ rfl)
          have hsuv := inside u v huv (hDc.1 hxD hyD hxy)
          obtain ⟨c1, c2, c3⟩ := cert3_spec u v huv hsuv
          obtain ⟨hp, hc⟩ := img_pk G f hinj (fun i j => sd i j = true) hsd _
            (fun t ht => ⟨(c2 t ht).1, (c2 t ht).2.1⟩) c3
          -- D = {w, f u, f v}
          have hDeq : D = {w, f u, f v} := by
            symm
            apply Finset.eq_of_subset_of_card_le
            · intro z hz
              simp only [Finset.mem_insert, Finset.mem_singleton] at hz
              rcases hz with rfl | rfl | rfl <;> assumption
            · rw [hDc.2, Finset.card_insert_of_notMem, Finset.card_pair hxy]
              simp only [Finset.mem_insert, Finset.mem_singleton, not_or]
              exact ⟨fun h => hwr u h.symm, fun h => hwr v h.symm⟩
          have hT : Pk G (insert D ((cert3 u v).image (Finset.image f))) := by
            refine ⟨?_, ?_⟩
            · intro t ht
              rcases Finset.mem_insert.mp ht with rfl | ht
              · exact hDc
              · exact hp.1 t ht
            · rw [Finset.coe_insert]
              refine hp.2.insert ?_
              intro t ht _
              obtain ⟨s, hs, rfl⟩ := Finset.mem_image.mp (Finset.mem_coe.mp ht)
              have key : (D ∩ s.image f).card ≤ 1 := by
                have hsub : D ∩ s.image f ⊆ (({u, v} : Finset (Fin 8)) ∩ s).image f := by
                  intro z hz
                  rw [Finset.mem_inter, Finset.mem_image] at hz
                  obtain ⟨hzD, i, his, rfl⟩ := hz
                  rw [hDeq] at hzD
                  simp only [Finset.mem_insert, Finset.mem_singleton] at hzD
                  refine Finset.mem_image.mpr ⟨i, ?_, rfl⟩
                  rcases hzD with h | h | h
                  · exact absurd h (hwr i)
                  · have := hinj h; subst this; exact Finset.mem_inter.mpr ⟨by simp, his⟩
                  · have := hinj h; subst this; exact Finset.mem_inter.mpr ⟨by simp, his⟩
                refine (Finset.card_le_card hsub).trans (Finset.card_image_le.trans ?_)
                have hnot := (c2 s hs).2.2
                by_contra hc2
                rw [not_le] at hc2
                have : ({u, v} : Finset (Fin 8)) ∩ s = {u, v} := by
                  apply Finset.eq_of_subset_of_card_le Finset.inter_subset_left
                  rw [Finset.card_pair huv]; omega
                have hsub2 : ({u, v} : Finset (Fin 8)) ⊆ s := by
                  rw [← this]; exact Finset.inter_subset_right
                exact hnot ⟨hsub2 (by simp), hsub2 (by simp)⟩
              exact ⟨key, by rw [Finset.inter_comm]; exact key⟩
          have := le_nu G _ hT
          rw [Finset.card_insert_of_notMem (hDni _), hc, c1] at this
          omega
  9. Each triangle in P pulls back to a seed triangle avoiding both {0, 1} and {2, 3}.

    Because every triangle D in P consists entirely of seed vertices, its pullback φ(D) = f⁻¹(D) is a 3-element clique in E8 (`Finset.card_image_of_injective`). Furthermore, because D is formed from edges in G' = G \ {e1, e2} (`SimpleGraph.deleteEdges_adj`), it does not contain the edge {f(0), f(1)} or the edge {f(2), f(3)}, so φ(D) cannot contain both 0 and 1, nor both 2 and 3.

    lines 255–286

    uses Finset.card_image_of_injective, SimpleGraph.deleteEdges_adj

      -- pull P back to the seed
      let φ : Finset (Fin n) → Finset (Fin 8) := fun D => Finset.univ.filter (fun i => f i ∈ D)
      have hφ : ∀ D ∈ P, (φ D).image f = D := by
        intro D hD
        ext x
        simp only [φ, Finset.mem_image, Finset.mem_filter, Finset.mem_univ, true_and]
        constructor
        · rintro ⟨i, hi, rfl⟩; exact hi
        · intro hx; obtain ⟨i, rfl⟩ := hrange D hD x hx; exact ⟨i, hx, rfl⟩
      have hφc : ∀ D ∈ P, (φ D).card = 3 := by
        intro D hD
        have := congrArg Finset.card (hφ D hD)
        rw [Finset.card_image_of_injective _ hinj, (hPc D hD).2] at this
        exact this
      have hφsd : ∀ D ∈ P, ∀ i ∈ φ D, ∀ j ∈ φ D, i ≠ j → sd i j := by
        intro D hD i hi j hj hij
        simp only [φ, Finset.mem_filter, Finset.mem_univ, true_and] at hi hj
        exact inside i j hij ((hPG D hD).1 hi hj (fun h => hij (hinj h)))
      have hdel : ∀ D ∈ P, ∀ a b : Fin 8, a ∈ φ D → b ∈ φ D → a ≠ b →
          s(f a, f b) ≠ s(f 0, f 1) ∧ s(f a, f b) ≠ s(f 2, f 3) := by
        intro D hD a b ha hb hab
        simp only [φ, Finset.mem_filter, Finset.mem_univ, true_and] at ha hb
        have := (hPc D hD).1 ha hb (fun h => hab (hinj h))
        rw [SimpleGraph.deleteEdges_adj] at this
        simp only [Set.mem_insert_iff, Set.mem_singleton_iff, not_or] at this
        exact this.2
      have h01 : ∀ D ∈ P, ¬ ((0 : Fin 8) ∈ φ D ∧ (1 : Fin 8) ∈ φ D) := by
        rintro D hD ⟨h0, h1⟩
        exact (hdel D hD 0 1 h0 h1 (by decide)).1 rfl
      have h23 : ∀ D ∈ P, ¬ ((2 : Fin 8) ∈ φ D ∧ (3 : Fin 8) ∈ φ D) := by
        rintro D hD ⟨h2, h3⟩
        exact (hdel D hD 2 3 h2 h3 (by decide)).2 rfl
  10. The map assigning each triangle in P to its covering pair is injective.

    By `cov_spec`, each seed triangle φ(D) contains at least one of four 2-element subsets covE(k). If two distinct triangles D, E in P had the same covering value k, both φ(D) and φ(E) would contain the 2-element set covE(k) (`Finset.subset_inter`). Hence |φ(D) ∩ φ(E)| ≥ 2, which implies |D ∩ E| ≥ 2 (`Finset.image_inter`, `Finset.card_image_of_injective`, `Finset.card_le_card`), contradicting the fact that distinct triangles in P share at most one vertex.

    lines 287–304

    uses cov_spec, Finset.subset_inter, Finset.image_inter, Finset.card_image_of_injective, Finset.card_le_card

      have hinjP : Set.InjOn (fun D => cov (φ D)) P := by
        intro D hD E hE hDE
        by_contra hne
        have hp := hPp hD hE hne
        have s1 := cov_spec (φ D) (hφc D hD) (hφsd D hD) (h01 D hD) (h23 D hD)
        have s2 := cov_spec (φ E) (hφc E hE) (hφsd E hE) (h01 E hE) (h23 E hE)
        simp only at hDE
        rw [hDE] at s1
        have hsub : covE (cov (φ E)) ⊆ φ D ∩ φ E := Finset.subset_inter s1 s2
        have hcard2 : (covE (cov (φ E))).card = 2 := by
          generalize cov (φ E) = k; fin_cases k <;> decide
        have hle : (φ D ∩ φ E).card ≤ (D ∩ E).card := by
          have : (φ D ∩ φ E).image f ⊆ D ∩ E := by
            rw [Finset.image_inter _ _ hinj, hφ D hD, hφ E hE]
          rw [← Finset.card_image_of_injective _ hinj]
          exact Finset.card_le_card this
        have := Finset.card_le_card hsub
        omega
  11. The packing P has cardinality at most 4, contradicting |P| = 5.

    Because cov ∘ φ maps P injectively into Fin 4, a set of size 4, we have |P| ≤ 4 (`Finset.card_le_card_of_injOn`). But P is a maximum packing in G', so |P| = ν(G') = 5. Linear arithmetic (`omega`) derives a contradiction from 5 ≤ 4.

    lines 305–309

    uses Finset.card_le_card_of_injOn

      have hle4 : P.card ≤ 4 := by
        have := Finset.card_le_card_of_injOn (fun D => cov (φ D)) (fun D _ => Finset.mem_univ _) hinjP
        simpa using this
      omega
    end In1192
  12. The main exclusion theorem holds by invoking `In1192.main1192`.

    The theorem `simple_graph_pair_stable_nu_le_five_excludes_eight_saturated_seed` directly applies `In1192.main1192`, which has shown that the assumed subgraph embedding leads to False.

    lines 310–312

    uses In1192.main1192

    theorem simple_graph_pair_stable_nu_le_five_excludes_eight_saturated_seed (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (f : Fin 8 → Fin n) (hinj : Function.Injective f) (hcontains : ∀ i j : Fin 8, (i,j) ∈ ({(0,1),(0,2),(0,3),(0,4),(1,2),(1,3),(1,6),(2,3),(2,4),(2,5),(2,6),(2,7),(3,4),(3,5),(3,6),(3,7),(4,5),(4,7),(5,6),(6,7)} : Finset (Fin 8 × Fin 8)) → G.Adj (f i) (f j)) (hbound : simple_graph_triangle_packing_number G ≤ 5) (hstable : ∀ e g : Sym2 (Fin n), e ∈ G.edgeSet → g ∈ G.edgeSet → e ≠ g → simple_graph_triangle_packing_number (G.deleteEdges {e,g}) = simple_graph_triangle_packing_number G) : False := by
      exact In1192.main1192 n G f hinj hcontains hbound hstable
Finset.card_le_univ
The cardinality of a finite subset of a finite type is at most the cardinality of the type.
Nat.sSup_mem
A nonempty, bounded-above set of natural numbers contains its supremum.
Finset.image_injective
The forward image operation on finite sets preserves injectivity of the underlying map.
Finset.card_image_of_injective
An injective function preserves the cardinality of a finite set under forward image.
Finset.image_inter
An injective function distributes over finite set intersections.
cert2_spec
For any distinct non-adjacent vertices a and b in E8, cert2 a b is an edge-disjoint packing of 6 triangles using edges of E8 plus the edge {a, b}.
img_pk
An injective vertex map pushes forward an 8-vertex triangle packing to an edge-disjoint triangle packing of the same cardinality in G.
le_nu
The cardinality of any edge-disjoint triangle packing in G is at most the triangle-packing number of G.
P5_spec
P5 is an edge-disjoint packing of 5 triangles in the seed graph E8.
exists_max
There exists an edge-disjoint triangle packing whose size attains the triangle-packing number of G.
SimpleGraph.deleteEdges_le
Deleting edges from a graph results in a subgraph.
Finset.card_le_card
If one finite set is a subset of another, its cardinality is less than or equal to the other's.
Finset.inter_comm
Intersection of finite sets is commutative.
Finset.card_insert_of_notMem
Inserting an element not already in a finite set increases its cardinality by 1.
cert3_spec
For any edge {a, b} in E8, cert3 a b is a packing of 5 edge-disjoint triangles in E8 none of which contains both a and b.
Finset.eq_of_subset_of_card_le
If s is a subset of t and the cardinality of t is at most that of s, then s equals t.
Finset.card_pair
A pair of two distinct elements has cardinality 2.
SimpleGraph.deleteEdges_adj
An edge is present in G minus a set of edges if and only if it is present in G and not in the removed set.
cov_spec
Every triangle in E8 that avoids both {0, 1} and {2, 3} contains at least one of the four pairs in covE.
Finset.subset_inter
A set that is a subset of two other sets is a subset of their intersection.
Finset.card_le_card_of_injOn
If a function maps a finite set injectively into another finite set, the cardinality of the domain set is at most that of the codomain set.
In1192.main1192
A 2-edge-stable graph with triangle-packing number at most 5 cannot contain the 20-edge graph on 8 vertices E8 as a subgraph.

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

namespace In1192def E8 : Finset (Fin 8 × Fin 8) := {(0,1),(0,2),(0,3),(0,4),(1,2),(1,3),(1,6),(2,3),(2,4),(2,5),(2,6),(2,7),(3,4),(3,5),(3,6),(3,7),(4,5),(4,7),(5,6),(6,7)}def cert2 (a b : Fin 8) : Finset (Finset (Fin 8)) :=  if (a = 0 ∧ b = 5) ∨ (a = 5 ∧ b = 0) then {{0, 1, 2}, {0, 3, 5}, {1, 3, 6}, {2, 4, 5}, {2, 6, 7}, {3, 4, 7}} else  if (a = 0 ∧ b = 6) ∨ (a = 6 ∧ b = 0) then {{0, 1, 6}, {0, 2, 3}, {2, 4, 5}, {2, 6, 7}, {3, 4, 7}, {3, 5, 6}} else  if (a = 0 ∧ b = 7) ∨ (a = 7 ∧ b = 0) then {{0, 1, 2}, {0, 3, 7}, {1, 3, 6}, {2, 4, 7}, {2, 5, 6}, {3, 4, 5}} else  if (a = 1 ∧ b = 4) ∨ (a = 4 ∧ b = 1) then {{0, 1, 4}, {0, 2, 3}, {1, 2, 6}, {2, 4, 5}, {3, 4, 7}, {3, 5, 6}} else  if (a = 1 ∧ b = 5) ∨ (a = 5 ∧ b = 1) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 5}, {2, 4, 7}, {2, 5, 6}, {3, 6, 7}} else  if (a = 1 ∧ b = 7) ∨ (a = 7 ∧ b = 1) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 7}, {2, 4, 5}, {2, 6, 7}, {3, 5, 6}} else  if (a = 4 ∧ b = 6) ∨ (a = 6 ∧ b = 4) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}, {4, 5, 6}} else  if (a = 5 ∧ b = 7) ∨ (a = 7 ∧ b = 5) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}, {5, 6, 7}} else  ∅def cert3 (a b : Fin 8) : Finset (Finset (Fin 8)) :=  if (a = 0 ∧ b = 1) ∨ (a = 1 ∧ b = 0) then {{0, 2, 3}, {1, 2, 6}, {2, 4, 5}, {3, 4, 7}, {3, 5, 6}} else  if (a = 0 ∧ b = 2) ∨ (a = 2 ∧ b = 0) then {{0, 1, 3}, {1, 2, 6}, {2, 3, 5}, {2, 4, 7}, {3, 6, 7}} else  if (a = 0 ∧ b = 3) ∨ (a = 3 ∧ b = 0) then {{0, 1, 2}, {1, 3, 6}, {2, 3, 5}, {2, 6, 7}, {3, 4, 7}} else  if (a = 0 ∧ b = 4) ∨ (a = 4 ∧ b = 0) then {{0, 1, 2}, {1, 3, 6}, {2, 3, 5}, {2, 6, 7}, {3, 4, 7}} else  if (a = 1 ∧ b = 2) ∨ (a = 2 ∧ b = 1) then {{0, 1, 3}, {0, 2, 4}, {2, 3, 5}, {2, 6, 7}, {3, 4, 7}} else  if (a = 1 ∧ b = 3) ∨ (a = 3 ∧ b = 1) then {{0, 1, 2}, {0, 3, 4}, {2, 3, 5}, {2, 4, 7}, {3, 6, 7}} else  if (a = 1 ∧ b = 6) ∨ (a = 6 ∧ b = 1) then {{0, 1, 2}, {0, 3, 4}, {2, 3, 5}, {2, 4, 7}, {3, 6, 7}} else  if (a = 2 ∧ b = 3) ∨ (a = 3 ∧ b = 2) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 4, 5}, {2, 6, 7}} else  if (a = 2 ∧ b = 4) ∨ (a = 4 ∧ b = 2) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 6, 7}} else  if (a = 2 ∧ b = 5) ∨ (a = 5 ∧ b = 2) then {{0, 1, 3}, {0, 2, 4}, {1, 2, 6}, {2, 3, 7}, {3, 4, 5}} else  if (a = 2 ∧ b = 6) ∨ (a = 6 ∧ b = 2) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}} else  if (a = 2 ∧ b = 7) ∨ (a = 7 ∧ b = 2) then {{0, 1, 3}, {0, 2, 4}, {1, 2, 6}, {2, 3, 5}, {3, 4, 7}} else  if (a = 3 ∧ b = 4) ∨ (a = 4 ∧ b = 3) then {{0, 1, 3}, {0, 2, 4}, {1, 2, 6}, {2, 3, 5}, {3, 6, 7}} else  if (a = 3 ∧ b = 5) ∨ (a = 5 ∧ b = 3) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 7}, {2, 4, 5}} else  if (a = 3 ∧ b = 6) ∨ (a = 6 ∧ b = 3) then {{0, 1, 3}, {0, 2, 4}, {1, 2, 6}, {2, 3, 5}, {3, 4, 7}} else  if (a = 3 ∧ b = 7) ∨ (a = 7 ∧ b = 3) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}} else  if (a = 4 ∧ b = 5) ∨ (a = 5 ∧ b = 4) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}} else  if (a = 4 ∧ b = 7) ∨ (a = 7 ∧ b = 4) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 6, 7}} else  if (a = 5 ∧ b = 6) ∨ (a = 6 ∧ b = 5) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}} else  if (a = 6 ∧ b = 7) ∨ (a = 7 ∧ b = 6) then {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}} else  ∅def P5 : Finset (Finset (Fin 8)) := {{0, 1, 2}, {0, 3, 4}, {1, 3, 6}, {2, 3, 5}, {2, 4, 7}}def sd (i j : Fin 8) : Bool := decide ((i, j) ∈ E8 ∨ (j, i) ∈ E8)def cov (t : Finset (Fin 8)) : Fin 4 :=  if ({2, 4} : Finset (Fin 8)) ⊆ t then 0 else if ({2, 6} : Finset (Fin 8)) ⊆ t then 1  else if ({3, 4} : Finset (Fin 8)) ⊆ t then 2 else 3def covE : Fin 4 → Finset (Fin 8) := ![{2, 4}, {2, 6}, {3, 4}, {3, 6}]set_option maxRecDepth 100000 inset_option synthInstance.maxSize 4000 inset_option synthInstance.maxHeartbeats 400000 intheorem cov_spec : ∀ t : Finset (Fin 8), t.card = 3 → (∀ i ∈ t, ∀ j ∈ t, i ≠ j → sd i j = true) →    ¬ ((0 : Fin 8) ∈ t ∧ (1 : Fin 8) ∈ t) → ¬ ((2 : Fin 8) ∈ t ∧ (3 : Fin 8) ∈ t) →    covE (cov t) ⊆ t := by decide +kernelset_option maxRecDepth 100000 inset_option synthInstance.maxSize 4000 inset_option synthInstance.maxHeartbeats 400000 intheorem cert2_spec : ∀ a b : Fin 8, a ≠ b → sd a b = false → (cert2 a b).card = 6 ∧    (∀ t ∈ cert2 a b, t.card = 3 ∧ ∀ i ∈ t, ∀ j ∈ t, i ≠ j →      (sd i j = true ∨ (i = a ∧ j = b) ∨ (i = b ∧ j = a))) ∧    (∀ s ∈ cert2 a b, ∀ t ∈ cert2 a b, s ≠ t → (s ∩ t).card ≤ 1) := by decide +kernelset_option maxRecDepth 100000 inset_option synthInstance.maxSize 4000 inset_option synthInstance.maxHeartbeats 400000 intheorem cert3_spec : ∀ a b : Fin 8, a ≠ b → sd a b = true → (cert3 a b).card = 5 ∧    (∀ t ∈ cert3 a b, t.card = 3 ∧ (∀ i ∈ t, ∀ j ∈ t, i ≠ j → sd i j = true) ∧ ¬ (a ∈ t ∧ b ∈ t)) ∧    (∀ s ∈ cert3 a b, ∀ t ∈ cert3 a b, s ≠ t → (s ∩ t).card ≤ 1) := by decide +kernelset_option maxRecDepth 100000 inset_option synthInstance.maxSize 4000 inset_option synthInstance.maxHeartbeats 400000 intheorem P5_spec : P5.card = 5 ∧ (∀ t ∈ P5, t.card = 3 ∧ ∀ i ∈ t, ∀ j ∈ t, i ≠ j → sd i j = true) ∧    (∀ s ∈ P5, ∀ t ∈ P5, s ≠ t → (s ∩ t).card ≤ 1) := by decide +kernelsectionvariable {n : ℕ} (G : SimpleGraph (Fin n))def Pk (T : Finset (Finset (Fin n))) : Prop :=  (∀ t ∈ T, G.IsNClique 3 t) ∧ (T : Set (Finset (Fin n))).Pairwise (fun s t => (s ∩ t).card ≤ 1)theorem nu_bdd : BddAbove {k | ∃ T : Finset (Finset (Fin n)), (∀ t ∈ T, G.IsNClique 3 t) ∧    (T : Set (Finset (Fin n))).Pairwise (fun s t => (s ∩ t).card ≤ 1) ∧ T.card = k} :=  ⟨Fintype.card (Finset (Fin n)), by rintro k ⟨T, -, -, rfl⟩; exact Finset.card_le_univ T⟩theorem le_nu (T : Finset (Finset (Fin n))) (h : Pk G T) :    T.card ≤ simple_graph_triangle_packing_number G :=  le_csSup (nu_bdd G) ⟨T, h.1, h.2, rfl⟩theorem exists_max : ∃ T : Finset (Finset (Fin n)), Pk G T ∧    T.card = simple_graph_triangle_packing_number G := by  obtain ⟨T, h1, h2, h3⟩ := Nat.sSup_mem (s := {k | ∃ T : Finset (Finset (Fin n)),    (∀ t ∈ T, G.IsNClique 3 t) ∧    (T : Set (Finset (Fin n))).Pairwise (fun s t => (s ∩ t).card ≤ 1) ∧ T.card = k})    ⟨0, ∅, by simp, by simp, rfl⟩ (nu_bdd G)  exact ⟨T, ⟨h1, h2⟩, h3⟩/-- Images of a Fin 8 packing. -/theorem img_pk (f : Fin 8 → Fin n) (hinj : Function.Injective f) (A8 : Fin 8 → Fin 8 → Prop)    (hA : ∀ i j, A8 i j → G.Adj (f i) (f j)) (L : Finset (Finset (Fin 8)))    (h1 : ∀ t ∈ L, t.card = 3 ∧ ∀ i ∈ t, ∀ j ∈ t, i ≠ j → A8 i j)    (h2 : ∀ s ∈ L, ∀ t ∈ L, s ≠ t → (s ∩ t).card ≤ 1) :    Pk G (L.image (Finset.image f)) ∧ (L.image (Finset.image f)).card = L.card := by  have hI : Function.Injective (Finset.image f) := Finset.image_injective hinj  refine ⟨⟨?_, ?_⟩, Finset.card_image_of_injective _ hI⟩  · intro t' ht'    obtain ⟨t, ht, rfl⟩ := Finset.mem_image.mp ht'    refine ⟨?_, by rw [Finset.card_image_of_injective _ hinj, (h1 t ht).1]⟩    intro x hx y hy hxy    simp only [Finset.coe_image, Set.mem_image, Finset.mem_coe] at hx hy    obtain ⟨i, hi, rfl⟩ := hx    obtain ⟨j, hj, rfl⟩ := hy    exact hA i j ((h1 t ht).2 i hi j hj (fun h => hxy (h ▸ rfl)))  · intro s' hs' t' ht' hst    obtain ⟨s, hs, rfl⟩ := Finset.mem_image.mp (Finset.mem_coe.mp hs')    obtain ⟨t, ht, rfl⟩ := Finset.mem_image.mp (Finset.mem_coe.mp ht')    rw [← Finset.image_inter _ _ hinj, Finset.card_image_of_injective _ hinj]    exact h2 s hs t ht (fun h => hst (h ▸ rfl))endtheorem main1192 (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (f : Fin 8 → Fin n)    (hinj : Function.Injective f)    (hcontains : ∀ i j : Fin 8, (i,j) ∈ E8 → G.Adj (f i) (f j))    (hbound : simple_graph_triangle_packing_number G ≤ 5)    (hstable : ∀ e g : Sym2 (Fin n), e ∈ G.edgeSet → g ∈ G.edgeSet → e ≠ g →      simple_graph_triangle_packing_number (G.deleteEdges {e,g}) =        simple_graph_triangle_packing_number G) : False := by  classical  have hsd : ∀ i j, sd i j = true → G.Adj (f i) (f j) := by    intro i j h    simp only [sd, decide_eq_true_eq] at h    rcases h with h | h    · exact hcontains i j h    · exact (hcontains j i h).symm  -- (ii) edges of G inside the seed are seed edges  have inside : ∀ a b : Fin 8, a ≠ b → G.Adj (f a) (f b) → sd a b = true := by    intro a b hab hG    by_contra hs    obtain ⟨c1, c2, c3⟩ := cert2_spec a b hab (by simpa using hs)    obtain ⟨hp, hc⟩ := img_pk G f hinj (fun i j => sd i j = true ∨ (i = a ∧ j = b) ∨ (i = b ∧ j = a))      (by        rintro i j (h | ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)        · exact hsd i j h        · exact hG        · exact hG.symm) _ c2 c3    have := le_nu G _ hp    omega  obtain ⟨p1, p2, p3⟩ := P5_spec  obtain ⟨hP5, hP5c⟩ := img_pk G f hinj (fun i j => sd i j = true) hsd P5 p2 p3  have hnu5 : 5 ≤ simple_graph_triangle_packing_number G := by    have := le_nu G _ hP5; omega  -- a maximum packing of G minus the two edges  have e1 : s(f 0, f 1) ∈ G.edgeSet := hcontains 0 1 (by decide)  have e2 : s(f 2, f 3) ∈ G.edgeSet := hcontains 2 3 (by decide)  have e12 : s(f 0, f 1) ≠ s(f 2, f 3) := by    intro h    rcases Sym2.eq_iff.mp h with ⟨h1, -⟩ | ⟨h1, -⟩    · exact absurd (hinj h1) (by decide)    · exact absurd (hinj h1) (by decide)  have hst := hstable _ _ e1 e2 e12  set G' := G.deleteEdges {s(f 0, f 1), s(f 2, f 3)}  obtain ⟨P, ⟨hPc, hPp⟩, hPcard⟩ := exists_max G'  have hPG : ∀ D ∈ P, G.IsNClique 3 D := fun D hD =>    (hPc D hD).mono (SimpleGraph.deleteEdges_le _)  -- every triangle of P lies in the range of f  have hrange : ∀ D ∈ P, ∀ x ∈ D, ∃ i, f i = x := by    intro D hD w hw    by_contra hwr    simp only [not_exists] at hwr    have hDc := hPG D hD    set A := D.filter (fun x => ∃ i, f i = x)    have hwA : ∀ t : Finset (Fin 8), D ∩ t.image f ⊆ A := by      intro t x hx      rw [Finset.mem_inter, Finset.mem_image] at hx      obtain ⟨hxD, i, -, rfl⟩ := hx      exact Finset.mem_filter.mpr ⟨hxD, i, rfl⟩    have hDni : ∀ L : Finset (Finset (Fin 8)), D ∉ L.image (Finset.image f) := by      intro L hL      obtain ⟨t, -, ht⟩ := Finset.mem_image.mp hL      rw [← ht] at hw      obtain ⟨i, -, hi⟩ := Finset.mem_image.mp hw      exact hwr i hi    by_cases hA : A.card ≤ 1    · -- D meets every seed triangle in at most one vertex      have hT : Pk G (insert D (P5.image (Finset.image f))) := by        refine ⟨?_, ?_⟩        · intro t ht          rcases Finset.mem_insert.mp ht with rfl | ht          · exact hDc          · exact hP5.1 t ht        · rw [Finset.coe_insert]          refine hP5.2.insert ?_          intro t ht _          obtain ⟨s, -, rfl⟩ := Finset.mem_image.mp (Finset.mem_coe.mp ht)          exact ⟨(Finset.card_le_card (hwA s)).trans hA,            by rw [Finset.inter_comm]; exact (Finset.card_le_card (hwA s)).trans hA⟩      have := le_nu G _ hT      rw [Finset.card_insert_of_notMem (hDni _), hP5c, p1] at this      omega    · rw [not_le] at hA      obtain ⟨x, hx, y, hy, hxy⟩ := Finset.one_lt_card.mp hA      obtain ⟨hxD, u, rfl⟩ := Finset.mem_filter.mp hx      obtain ⟨hyD, v, rfl⟩ := Finset.mem_filter.mp hy      have huv : u ≠ v := fun h => hxy (h ▸ rfl)      have hsuv := inside u v huv (hDc.1 hxD hyD hxy)      obtain ⟨c1, c2, c3⟩ := cert3_spec u v huv hsuv      obtain ⟨hp, hc⟩ := img_pk G f hinj (fun i j => sd i j = true) hsd _        (fun t ht => ⟨(c2 t ht).1, (c2 t ht).2.1⟩) c3      -- D = {w, f u, f v}      have hDeq : D = {w, f u, f v} := by        symm        apply Finset.eq_of_subset_of_card_le        · intro z hz          simp only [Finset.mem_insert, Finset.mem_singleton] at hz          rcases hz with rfl | rfl | rfl <;> assumption        · rw [hDc.2, Finset.card_insert_of_notMem, Finset.card_pair hxy]          simp only [Finset.mem_insert, Finset.mem_singleton, not_or]          exact ⟨fun h => hwr u h.symm, fun h => hwr v h.symm⟩      have hT : Pk G (insert D ((cert3 u v).image (Finset.image f))) := by        refine ⟨?_, ?_⟩        · intro t ht          rcases Finset.mem_insert.mp ht with rfl | ht          · exact hDc          · exact hp.1 t ht        · rw [Finset.coe_insert]          refine hp.2.insert ?_          intro t ht _          obtain ⟨s, hs, rfl⟩ := Finset.mem_image.mp (Finset.mem_coe.mp ht)          have key : (D ∩ s.image f).card ≤ 1 := by            have hsub : D ∩ s.image f ⊆ (({u, v} : Finset (Fin 8)) ∩ s).image f := by              intro z hz              rw [Finset.mem_inter, Finset.mem_image] at hz              obtain ⟨hzD, i, his, rfl⟩ := hz              rw [hDeq] at hzD              simp only [Finset.mem_insert, Finset.mem_singleton] at hzD              refine Finset.mem_image.mpr ⟨i, ?_, rfl⟩              rcases hzD with h | h | h              · exact absurd h (hwr i)              · have := hinj h; subst this; exact Finset.mem_inter.mpr ⟨by simp, his⟩              · have := hinj h; subst this; exact Finset.mem_inter.mpr ⟨by simp, his⟩            refine (Finset.card_le_card hsub).trans (Finset.card_image_le.trans ?_)            have hnot := (c2 s hs).2.2            by_contra hc2            rw [not_le] at hc2            have : ({u, v} : Finset (Fin 8)) ∩ s = {u, v} := by              apply Finset.eq_of_subset_of_card_le Finset.inter_subset_left              rw [Finset.card_pair huv]; omega            have hsub2 : ({u, v} : Finset (Fin 8)) ⊆ s := by              rw [← this]; exact Finset.inter_subset_right            exact hnot ⟨hsub2 (by simp), hsub2 (by simp)⟩          exact ⟨key, by rw [Finset.inter_comm]; exact key⟩      have := le_nu G _ hT      rw [Finset.card_insert_of_notMem (hDni _), hc, c1] at this      omega  -- pull P back to the seed  let φ : Finset (Fin n) → Finset (Fin 8) := fun D => Finset.univ.filter (fun i => f i ∈ D)  have hφ : ∀ D ∈ P, (φ D).image f = D := by    intro D hD    ext x    simp only [φ, Finset.mem_image, Finset.mem_filter, Finset.mem_univ, true_and]    constructor    · rintro ⟨i, hi, rfl⟩; exact hi    · intro hx; obtain ⟨i, rfl⟩ := hrange D hD x hx; exact ⟨i, hx, rfl⟩  have hφc : ∀ D ∈ P, (φ D).card = 3 := by    intro D hD    have := congrArg Finset.card (hφ D hD)    rw [Finset.card_image_of_injective _ hinj, (hPc D hD).2] at this    exact this  have hφsd : ∀ D ∈ P, ∀ i ∈ φ D, ∀ j ∈ φ D, i ≠ j → sd i j := by    intro D hD i hi j hj hij    simp only [φ, Finset.mem_filter, Finset.mem_univ, true_and] at hi hj    exact inside i j hij ((hPG D hD).1 hi hj (fun h => hij (hinj h)))  have hdel : ∀ D ∈ P, ∀ a b : Fin 8, a ∈ φ D → b ∈ φ D → a ≠ b →      s(f a, f b) ≠ s(f 0, f 1) ∧ s(f a, f b) ≠ s(f 2, f 3) := by    intro D hD a b ha hb hab    simp only [φ, Finset.mem_filter, Finset.mem_univ, true_and] at ha hb    have := (hPc D hD).1 ha hb (fun h => hab (hinj h))    rw [SimpleGraph.deleteEdges_adj] at this    simp only [Set.mem_insert_iff, Set.mem_singleton_iff, not_or] at this    exact this.2  have h01 : ∀ D ∈ P, ¬ ((0 : Fin 8) ∈ φ D ∧ (1 : Fin 8) ∈ φ D) := by    rintro D hD ⟨h0, h1⟩    exact (hdel D hD 0 1 h0 h1 (by decide)).1 rfl  have h23 : ∀ D ∈ P, ¬ ((2 : Fin 8) ∈ φ D ∧ (3 : Fin 8) ∈ φ D) := by    rintro D hD ⟨h2, h3⟩    exact (hdel D hD 2 3 h2 h3 (by decide)).2 rfl  have hinjP : Set.InjOn (fun D => cov (φ D)) P := by    intro D hD E hE hDE    by_contra hne    have hp := hPp hD hE hne    have s1 := cov_spec (φ D) (hφc D hD) (hφsd D hD) (h01 D hD) (h23 D hD)    have s2 := cov_spec (φ E) (hφc E hE) (hφsd E hE) (h01 E hE) (h23 E hE)    simp only at hDE    rw [hDE] at s1    have hsub : covE (cov (φ E)) ⊆ φ D ∩ φ E := Finset.subset_inter s1 s2    have hcard2 : (covE (cov (φ E))).card = 2 := by      generalize cov (φ E) = k; fin_cases k <;> decide    have hle : (φ D ∩ φ E).card ≤ (D ∩ E).card := by      have : (φ D ∩ φ E).image f ⊆ D ∩ E := by        rw [Finset.image_inter _ _ hinj, hφ D hD, hφ E hE]      rw [← Finset.card_image_of_injective _ hinj]      exact Finset.card_le_card this    have := Finset.card_le_card hsub    omega  have hle4 : P.card ≤ 4 := by    have := Finset.card_le_card_of_injOn (fun D => cov (φ D)) (fun D _ => Finset.mem_univ _) hinjP    simpa using this  omegaend In1192theorem simple_graph_pair_stable_nu_le_five_excludes_eight_saturated_seed (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (f : Fin 8 → Fin n) (hinj : Function.Injective f) (hcontains : ∀ i j : Fin 8, (i,j) ∈ ({(0,1),(0,2),(0,3),(0,4),(1,2),(1,3),(1,6),(2,3),(2,4),(2,5),(2,6),(2,7),(3,4),(3,5),(3,6),(3,7),(4,5),(4,7),(5,6),(6,7)} : Finset (Fin 8 × Fin 8)) → G.Adj (f i) (f j)) (hbound : simple_graph_triangle_packing_number G ≤ 5) (hstable : ∀ e g : Sym2 (Fin n), e ∈ G.edgeSet → g ∈ G.edgeSet → e ≠ g → simple_graph_triangle_packing_number (G.deleteEdges {e,g}) = simple_graph_triangle_packing_number G) : False := by  exact In1192.main1192 n G f hinj hcontains hbound hstable
See it in the graphDiscuss this resultChallenge it