FormalConjecturesForMathlib/Combinatorics/SimpleGraph/CompleteGraphEdgeCount.lean

GitHub source file

Explanation legend Lean4 Domain Explanation Language (L4DEL)

L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.

L4DEL
Lean4 Domain Explanation Language

Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.

Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1

2 declarations, 0 contain sorry, 0 declared as axioms

Imports (1)
Imported by 1 file
  1. lemma SimpleGraph.card_edgeFinset_completeGraph The number of edges of the complete graph on a finite vertex type V is #V choose 2 line 32 source

    Source documentation

    The number of edges of the complete graph on a finite vertex type V is #V choose 2.

    This is a thin completeGraph-flavoured restatement of Mathlib's SimpleGraph.card_edgeFinset_top_eq_card_choose_two, useful when a downstream definition is stated using the completeGraph V abbreviation rather than the ⊤ form. (Because completeGraph V reduces to ⊤, the two are definitionally equal.)

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Fintype, DecidableEq, Eq, Nat, Finset.card, Sym2, SimpleGraph.edgeFinset, SimpleGraph.completeGraph, Nat.choose, Fintype.card, OfNat.ofNat

    Proof uses: SimpleGraph.card_edgeFinset_top_eq_card_choose_two

    4 instances, coercions and auxiliary constants left out.

    lemma card_edgeFinset_completeGraph (V : Type*) [Fintype V] [DecidableEq V] :
        ((completeGraph V).edgeFinset).card = (Fintype.card V).choose 2 :=
    …
  2. lemma SimpleGraph.card_edgeFinset_completeGraph_fin Specialisation of card_edgeFinset_completeGraph to Fin n line 37 source

    Source documentation

    Specialisation of card_edgeFinset_completeGraph to Fin n.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Eq, Finset.card, Sym2, Fin, SimpleGraph.edgeFinset, SimpleGraph.completeGraph, Nat.choose, OfNat.ofNat

    Proof uses: Eq.mpr, Compl.compl, Finset, Set.toFinset, Sym2.diagSet, Membership.mem, Set, id, congrFun', congrArg, Eq.trans, Top.top, SimpleGraph, SimpleGraph.edgeFinset_top, Set.toFinset_compl, Eq.mp, Fintype.card, congr, Fintype.card_fin, SimpleGraph.card_edgeFinset_completeGraph

    24 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    lemma card_edgeFinset_completeGraph_fin (n : ℕ) :
        ((completeGraph (Fin n)).edgeFinset).card = n.choose 2 := by
    …