AFTD Auto-Formalizing Theoretical Domains

simple_graph_sunflower_packing_witness

def

A witness vertex for a packed petal q: a vertex x outside q such that q \ {r} together with x is a triangle meeting the packed edge union in exactly one edge; defaults to r if no such x exists.

Statement

noncomputable def simple_graph_sunflower_packing_witness (n : ℕ) (G : SimpleGraph (Fin n)) (P : Finset (Finset (Fin n))) (r : Fin n) (q : Finset (Fin n)) : Fin n
Source
step towards simple_graph_good_sunflower_forced_base_subpacking_kernel_packed
Verified
09 Nov 2026
Axioms
none listed
Built on 1
Used by 2

Lean source view module on GitHub

/-- The chosen extra vertex completing q \ {r} to a triangle that meets the packed edge union in exactly one edge; falls back to r when no such vertex exists. -/
noncomputable def simple_graph_sunflower_packing_witness (n : ℕ) (G : SimpleGraph (Fin n)) (P : Finset (Finset (Fin n))) (r : Fin n) (q : Finset (Fin n)) : Fin n := by
  classical
  exact if h : ∃ x : Fin n, x ∉ q ∧ G.IsNClique 3 (insert x (q.erase r)) ∧
      (finite_vertex_set_edge_encoding (insert x (q.erase r)) ∩
        P.biUnion finite_vertex_set_edge_encoding).card = 1
  then Classical.choose h else r
See it in the graphDiscuss this resultChallenge it