FormalConjecturesForMathlib/Combinatorics/Hypergraph/Basic.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

10 declarations, 0 contain sorry, 0 declared as axioms

Uniformity and weak colorings of hypergraphs

This file extends Mathlib's Hypergraph with finite-edge constructors, uniformity, and weak proper colorings. Uniformity uses extended cardinality, so every edge is finite, including at uniformity zero. Empty and singleton edges admit no weak proper coloring.

Imports (1)
Imported by 2 files
  1. def Hypergraph.IsUniform Every edge has exactly k vertices line 33 source

    Source documentation

    Every edge has exactly k vertices.

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

    Statement uses: Hypergraph, Nat

    Proof uses: Set, Membership.mem, Hypergraph.edgeSet, Eq, ENat, Set.encard

    3 instances, coercions and auxiliary constants left out.

    def IsUniform {V : Type*} (H : Hypergraph V) (k : ℕ) : Prop :=
    …
  2. def Hypergraph.IsProperColoring A weak proper coloring gives two vertices different colors in every edge line 37 source

    Source documentation

    A weak proper coloring gives two vertices different colors in every edge.

    no axioms what this means

    Statement uses: Hypergraph

    Proof uses: Set, Membership.mem, Hypergraph.edgeSet, Exists, And, Ne

    1 instances, coercions and auxiliary constants left out.

    def IsProperColoring {V C : Type*} (H : Hypergraph V) (f : V → C) : Prop :=
    …
  3. def Hypergraph.IsNColorable A weak proper coloring using at most n colors line 41 source

    Source documentation

    A weak proper coloring using at most n colors.

    no axioms what this means

    Statement uses: Hypergraph, Nat

    Proof uses: Exists, Fin, Hypergraph.IsProperColoring

    def IsNColorable {V : Type*} (H : Hypergraph V) (n : ℕ) : Prop :=
    …
  4. def Hypergraph.ofEdgeFamily A family of finite edges on an explicit vertex set, retaining isolated vertices line 45 source

    Source documentation

    A family of finite edges on an explicit vertex set, retaining isolated vertices.

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

    Statement uses: Set, Finset, Membership.mem, LE.le, Hypergraph

    Proof uses: Hypergraph.mk, Set.ofPred, Exists, And, Eq

    9 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

    def ofEdgeFamily {V : Type*} (F : Set (Finset V)) (S : Set V)
        (h : ∀ e ∈ F, (e : Set V) ⊆ S) : Hypergraph V where
    …
  5. theorem Hypergraph.mem_edgeSet_ofEdgeFamily line 54 source

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

    Statement uses: Set, Finset, Membership.mem, LE.le, Iff, Hypergraph.edgeSet, Hypergraph.ofEdgeFamily

    Proof uses: of_eq_true, Eq.trans, True, congrFun', congrArg, Exists, And, Eq, funext, iff_self

    10 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  6. theorem Hypergraph.isUniform_ofEdgeFamily_iff line 60 source

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

    Statement uses: Set, Finset, Membership.mem, LE.le, Nat, Iff, Hypergraph.IsUniform, Hypergraph.ofEdgeFamily, Eq, Finset.card

    Proof uses: of_eq_true, Eq.trans, True, congrFun', congrArg, Exists, And, ENat, Set.encard, forall_congr, implies_congr, Eq.refl, Set.encard_coe_eq_coe_finsetCard, iff_self

    16 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  7. theorem Hypergraph.isProperColoring_ofEdgeFamily_iff line 66 source

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

    Statement uses: Set, Finset, Membership.mem, LE.le, Iff, Hypergraph.IsProperColoring, Hypergraph.ofEdgeFamily, Exists, And, Ne

    Proof uses: of_eq_true, Not, Eq, Eq.trans, True, congrFun', congrArg, forall_congr, implies_congr, Eq.refl, funext, congr, iff_self

    14 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  8. theorem Hypergraph.IsUniform.finite_edge Every edge of a uniform hypergraph is finite line 73 source

    Source documentation

    Every edge of a uniform hypergraph is finite.

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

    Statement uses: Hypergraph, Nat, Hypergraph.IsUniform, Set, Membership.mem, Hypergraph.edgeSet, Set.Finite

    Proof uses: Set.finite_of_encard_eq_coe

    2 instances, coercions and auxiliary constants left out.

    theorem IsUniform.finite_edge {V : Type*} {H : Hypergraph V} {k : ℕ}
        (hH : H.IsUniform k) {e : Set V} (he : e ∈ H.edgeSet) : e.Finite :=
    …
  9. theorem Hypergraph.isProperColoring_of_injective An injective coloring is proper when every edge has at least two vertices line 78 source

    Source documentation

    An injective coloring is proper when every edge has at least two vertices.

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

    Statement uses: Hypergraph, Set, Membership.mem, Hypergraph.edgeSet, LE.le, ENat, OfNat.ofNat, Nat, Set.encard, Function.Injective, Hypergraph.IsProperColoring

    Proof uses: Exists, And, Ne, Iff.mp, LT.lt, Set.one_lt_encard_iff, lt_of_lt_of_le, of_decide_eq_true, id, Eq, Bool, Decidable.decide, Bool.true, Eq.refl, Exists.intro, And.intro

    23 instances, coercions and auxiliary constants left out.

    Tactic trace: 4 steps

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

    theorem isProperColoring_of_injective {V C : Type*} {H : Hypergraph V}
        (hH : ∀ e ∈ H.edgeSet, 2 ≤ e.encard) {f : V → C}
        (hf : Function.Injective f) : H.IsProperColoring f := by
    …
  10. theorem Hypergraph.IsUniform.isProperColoring_of_injective An injective coloring is proper when uniformity is at least two line 87 source

    Source documentation

    An injective coloring is proper when uniformity is at least two.

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

    Statement uses: Hypergraph, Nat, Hypergraph.IsUniform, LE.le, OfNat.ofNat, Function.Injective, Hypergraph.IsProperColoring

    Proof uses: Hypergraph.isProperColoring_of_injective, Set, Membership.mem, Hypergraph.edgeSet, Eq.mpr, ENat, Set.encard, id, Eq, congrArg, cast, Eq.symm

    30 instances, coercions and auxiliary constants left out.

    Tactic trace: 4 steps

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

    theorem IsUniform.isProperColoring_of_injective {V C : Type*} {H : Hypergraph V}
        {k : ℕ} (hH : H.IsUniform k) (hk : 2 ≤ k) {f : V → C}
        (hf : Function.Injective f) : H.IsProperColoring f := by
    …