AFTD Auto-Formalizing Theoretical Domains

edge_max_clique_order_ge_two

theoremverified

For every edge e in the edge finset of a finite simple graph G, the maximum order of a clique containing e is at least two.

Statement

theorem edge_max_clique_order_ge_two {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] {e : Sym2 V} (he : e ∈ G.edgeFinset) :
    2 ≤ edge_max_clique_order G e
Source
scout/2611-30029-an-exact-vertex-localization-of-zykov-s-theorem.md:211
Verified
25 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • edge_max_clique_orderFor a finite simple graph G and an edge e represented as an unordered pair in Sym2 V, edge_max_clique_order G e is the maximum cardinality…
Used by 1

Read back from the Lean

For any finite type V with decidable equality, any simple graph G on V with decidable adjacency relation, and any unordered pair of vertices e : Sym2 V that is an edge of G (e ∈ G.edgeFinset), the value of edge_max_clique_order G e is at least 2.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

To show that every edge e in a graph is contained in a clique of size at least two, the proof observes that the two endpoints of e themselves form a clique of size 2. By definition, the maximum clique order containing e is the supremum of the sizes of all cliques containing e. Since the two-vertex clique formed by e is one such clique, the maximum clique order is at least 2.

  1. The endpoints of an edge e form a clique in G

    We represent the edge e as an unordered pair of vertices s(u, v) and rewrite the clique condition for {u, v}, which states that u and v must be adjacent if they are distinct. This holds directly from the assumption that e is an edge.

    lines 4–9

    uses Sym2.inductionOn, Sym2.toFinset_mk_eq, Finset.coe_pair, SimpleGraph.isClique_pair

      have hclique : G.IsClique (e.toFinset : Set V) := by
        induction e using Sym2.inductionOn
        rename_i u v
        rw [Sym2.toFinset_mk_eq, Finset.coe_pair, SimpleGraph.isClique_pair]
        intro _
        exact he
  2. The set of endpoints of e has cardinality 2

    Because e is an edge of a simple graph, it has no self-loops and thus cannot be diagonal. Since e is not diagonal, its set of endpoints has exactly two elements.

    lines 10–12

    uses Sym2.card_toFinset_of_not_isDiag

      have hcard : e.toFinset.card = 2 := by
        have hdiag : ¬ e.IsDiag := G.not_isDiag_of_mem_edgeSet he
        exact Sym2.card_toFinset_of_not_isDiag e hdiag
  3. The maximum clique order containing e is at least 2

    We replace 2 with the cardinality of the endpoint set of e and unfold the definition of the maximum clique order containing e as the supremum over all cliques containing e. Since the endpoint set of e is itself a clique containing e, the supremum is at least its cardinality.

    lines 13–18

    uses Finset.le_sup, Finset.mem_filter, Finset.mem_univ, subset_rfl

      rw [← hcard]
      unfold edge_max_clique_order
      classical
      refine Finset.le_sup (f := Finset.card) ?_
      rw [Finset.mem_filter]
      exact ⟨Finset.mem_univ _, hclique, subset_rfl⟩
  4. Every edge in the edge finset is contained in a clique of order at least 2

    We convert membership in the edge finset of G to membership in the edge set and apply the previous lemma.

    lines 21–23

    uses edge_max_clique_order_ge_two_of_mem_edgeSet, SimpleGraph.mem_edgeFinset.mp

    theorem edge_max_clique_order_ge_two {V : Type*} [Fintype V] [DecidableEq V]
        (G : SimpleGraph V) [DecidableRel G.Adj] {e : Sym2 V} (he : e ∈ G.edgeFinset) :
        2 ≤ edge_max_clique_order G e := edge_max_clique_order_ge_two_of_mem_edgeSet G (SimpleGraph.mem_edgeFinset.mp he)
Sym2.inductionOn
every unordered pair is of the form s(x, y)
Sym2.toFinset_mk_eq
the vertex set of an unordered pair s(x, y) is {x, y}
Finset.coe_pair
coercion of the finset pair {a, b} to a set is the pair {a, b}
SimpleGraph.isClique_pair
a pair {a, b} is a clique if and only if distinct vertices are adjacent
Sym2.card_toFinset_of_not_isDiag
a non-diagonal unordered pair has cardinality 2
Finset.le_sup
an element of a finset is at most the supremum over that finset
Finset.mem_filter
an element belongs to a filtered finset iff it belongs to the base set and satisfies the predicate
Finset.mem_univ
every element belongs to the universal finset of a finite type
subset_rfl
subset inclusion is reflexive
edge_max_clique_order_ge_two_of_mem_edgeSet
every edge in the edge set of G is contained in a clique of order at least 2
SimpleGraph.mem_edgeFinset.mp
membership in the edge finset implies membership in the edge set

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

lemma edge_max_clique_order_ge_two_of_mem_edgeSet {V : Type*} [Fintype V] [DecidableEq V]    (G : SimpleGraph V) {e : Sym2 V} (he : e ∈ G.edgeSet) :    2 ≤ edge_max_clique_order G e := by  have hclique : G.IsClique (e.toFinset : Set V) := by    induction e using Sym2.inductionOn    rename_i u v    rw [Sym2.toFinset_mk_eq, Finset.coe_pair, SimpleGraph.isClique_pair]    intro _    exact he  have hcard : e.toFinset.card = 2 := by    have hdiag : ¬ e.IsDiag := G.not_isDiag_of_mem_edgeSet he    exact Sym2.card_toFinset_of_not_isDiag e hdiag  rw [← hcard]  unfold edge_max_clique_order  classical  refine Finset.le_sup (f := Finset.card) ?_  rw [Finset.mem_filter]  exact ⟨Finset.mem_univ _, hclique, subset_rfl⟩/-- Every edge of a graph is contained in a clique of size at least two. -/theorem edge_max_clique_order_ge_two {V : Type*} [Fintype V] [DecidableEq V]    (G : SimpleGraph V) [DecidableRel G.Adj] {e : Sym2 V} (he : e ∈ G.edgeFinset) :    2 ≤ edge_max_clique_order G e := edge_max_clique_order_ge_two_of_mem_edgeSet G (SimpleGraph.mem_edgeFinset.mp he)
See it in the graphDiscuss this resultChallenge it