FormalConjectures/Paper/DegreeSequencesTriangleFree.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

18 declarations, 6 contain sorry, 0 declared as axioms

Title: Degree sequences in triangle-free graphs Authors: P. Erdős, S. Fajtlowicz and W. Staton, Published in Discrete Mathematics 92 (1991) 85–88.

Imports (1)
Imported by 1 file
  1. def DegreeSequencesTriangleFree.IsCompactSequenceOn A sequence of natural numbers is compact on a set S if consecutive terms at distance 2 differ by 1 for all k ∈ S line 35 source

    Source documentation

    A sequence of natural numbers is compact on a set S if consecutive terms at distance 2 differ by 1 for all k ∈ S.

    no axioms what this means

    Statement uses: Nat, Set

    Proof uses: Membership.mem, Eq, HAdd.hAdd, OfNat.ofNat

    4 instances, coercions and auxiliary constants left out.

    def IsCompactSequenceOn (d : ℕ → ℕ) (S : Set ℕ) : Prop :=
    …
  2. def SimpleGraph.degreeFreq The number of vertices of G having degree d line 45 source

    Source documentation

    The number of vertices of G having degree d.

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

    Statement uses: Fintype, SimpleGraph, Nat

    Proof uses: Finset.card, Finset.filter, Eq, SimpleGraph.degree, Membership.mem, Set, SimpleGraph.neighborSet, Classical.propDecidable, SimpleGraph.Adj, Finset.univ

    4 instances, coercions and auxiliary constants left out.

    noncomputable def degreeFreq (G : SimpleGraph α) (d : ℕ) : ℕ :=
    …
  3. lemma DegreeSequencesTriangleFree.lemma1_a Lemma 1 (a) If a sequence d is nondecreasing and no three terms are equal, then terms at distance 2 differ by at least 1 line 58 source

    Source documentation

    Lemma 1 (a) If a sequence d is nondecreasing and no three terms are equal, then terms at distance 2 differ by at least 1.

    standard axioms: Quot.sound, propext what this means

    Statement uses: Nat, Monotone, Ne, HAdd.hAdd, OfNat.ofNat, LE.le, HSub.hSub

    Proof uses: Decidable.byContradiction, Not

    18 instances, coercions and auxiliary constants left out.

    Tactic trace: 4 steps

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

    lemma lemma1_a
        (h_mono : Monotone d)
        (h_no_three : ∀ k, d (k + 2) ≠ d k) :
        1 ≤ d (k + 2) - d k := by
    …
  4. lemma DegreeSequencesTriangleFree.lemma1_b Lemma 1 (b) If a sequence d is nondecreasing and no three terms are equal, then terms at distance 2 * r differ by at least r line 69 source

    Source documentation

    Lemma 1 (b) If a sequence d is nondecreasing and no three terms are equal, then terms at distance 2 * r differ by at least r.

    standard axioms: Quot.sound, propext what this means

    Statement uses: Nat, Monotone, Ne, HAdd.hAdd, OfNat.ofNat, LE.le, HSub.hSub, HMul.hMul

    Proof uses: Nat.recAux, of_eq_true, Eq.trans, True, congrArg, congrFun', MulZeroClass.mul_zero, add_zero, tsub_self, Eq, Mathlib.Tactic.Ring.of_eq, Nat.rawCast, HPow.hPow, Mathlib.Tactic.Ring.Common.add_congr, Mathlib.Tactic.Ring.Common.atom_pf, rfl, Eq.mpr, id, Eq.symm, Eq.refl and 18 more

    51 instances, coercions and auxiliary constants left out.

    Tactic trace: 11 steps

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

    lemma lemma1_b
        (h_mono : Monotone d)
        (h_no_three : ∀ i, d (i + 2) ≠ d i) :
        r ≤ d (k + 2 * r) - d k := by
    …
  5. lemma DegreeSequencesTriangleFree.lemma2_helper_short Helper: additive form of Lemma 2(a)'s estimate, used by lemma2_a–lemma2_d line 86 source

    Source documentation

    Helper: additive form of Lemma 2(a)'s estimate, used by lemma2_a–lemma2_d. The upper sum (after reindexing) exceeds the lower sum by at least 2 * n * n.

    private lemma lemma2_helper_short
        (h_mono : Monotone d)
        (h_no_three : ∀ i, d (i + 2) ≠ d i) :
        ∑ i ∈ Finset.Icc 1 (2 * n), d i + 2 * n * n ≤
          ∑ i ∈ Finset.Icc (2 * n + 1) (4 * n), d i := by
    …
  6. lemma DegreeSequencesTriangleFree.lemma2_a Lemma 2 (a) Inequality involving sums of terms of a nondecreasing sequence with no three terms equal line 112 source

    Source documentation

    Lemma 2 (a) Inequality involving sums of terms of a nondecreasing sequence with no three terms equal.

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

    Statement uses: Nat, Monotone, LT.lt, OfNat.ofNat, Ne, HAdd.hAdd, LE.le, HMul.hMul, HSub.hSub, Finset.sum, Finset.Icc

    Proof uses: Decidable.byContradiction, Not

    27 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

    lemma lemma2_a
        (h_mono : Monotone d)
        (_h_pos : ∀ k, 0 < d k)
        (h_no_three : ∀ i, d (i + 2) ≠ d i) :
        2 * n * n ≤
          ∑ i ∈ .Icc (2 * n + 1) (4 * n), d i -
            ∑ i ∈ .Icc 1 (2 * n), d i := by
    …
  7. lemma DegreeSequencesTriangleFree.lemma2_b Lemma 2 (b) Inequality involving sums of terms of a nondecreasing sequence with no three terms equal line 125 source

    Source documentation

    Lemma 2 (b) Inequality involving sums of terms of a nondecreasing sequence with no three terms equal.

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

    Statement uses: Nat, Monotone, LT.lt, OfNat.ofNat, Ne, HAdd.hAdd, LE.le, HMul.hMul, HSub.hSub, Finset.sum, Finset.Icc

    Proof uses: Eq, Eq.mpr, Insert.insert, Finset, id, congrArg, Finset.ext, Iff, Membership.mem, And, Or, congr, Eq.trans, congrFun', Decidable.byContradiction, Not, Finset.sum_insert, of_eq_true, False, True and 31 more

    98 instances, coercions and auxiliary constants left out.

    Tactic trace: 25 steps

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

    lemma lemma2_b
        (h_mono : Monotone d)
        (h_pos : ∀ k, 0 < d k)
        (h_no_three : ∀ i, d (i + 2) ≠ d i) :
        2 * n * n + 2 * n + 1 ≤
          ∑ i ∈ .Icc (2 * n + 1) (4 * n + 1), d i -
            ∑ i ∈ .Icc 1 (2 * n), d i := by
    …
  8. lemma DegreeSequencesTriangleFree.lemma2_helper_shift Documented declaration: lemma2_helper_shift line 158 source

    Source documentation

    Helper for lemma2_c and lemma2_d: shifting the index by 2 * (n + 1) raises each term by at least n + 1, so a block of m terms starting at 2 * n + 3 exceeds the block d 1, …, d m by at least m * (n + 1).

    private lemma lemma2_helper_shift (m : ℕ)
        (h_mono : Monotone d)
        (h_no_three : ∀ i, d (i + 2) ≠ d i) :
        ∑ i ∈ Finset.Icc 1 m, d i + m * (n + 1) ≤
          ∑ i ∈ Finset.Icc (2 * n + 3) (2 * n + 2 + m), d i := by
    …
  9. lemma DegreeSequencesTriangleFree.lemma2_c Lemma 2 (c) Inequality involving sums of terms of a nondecreasing sequence with no three terms equal line 183 source

    Source documentation

    Lemma 2 (c) Inequality involving sums of terms of a nondecreasing sequence with no three terms equal.

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

    Statement uses: Nat, Monotone, LT.lt, OfNat.ofNat, Ne, HAdd.hAdd, LE.le, HMul.hMul, HSub.hSub, Finset.sum, Finset.Icc

    Proof uses: Eq, Eq.mpr, Insert.insert, Finset, id, congrArg, Finset.ext, Iff, Membership.mem, And, Or, congr, Eq.trans, Decidable.byContradiction, Not, Finset.sum_insert, of_eq_true, False, True, eq_false_of_decide and 32 more

    96 instances, coercions and auxiliary constants left out.

    Tactic trace: 21 steps

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

    lemma lemma2_c
        (h_mono : Monotone d)
        (_h_pos : ∀ k, 0 < d k)
        (h_no_three : ∀ i, d (i + 2) ≠ d i) :
        2 * n * n + 2 * n ≤
          (∑ i ∈ .Icc (2 * n + 2) (4 * n + 2), d i) -
            ∑ i ∈ .Icc 1 (2 * n + 1), d i := by
    …
  10. lemma DegreeSequencesTriangleFree.lemma2_d Lemma 2 (d) Inequality involving sums of terms of a nondecreasing sequence with no three terms equal line 212 source

    Source documentation

    Lemma 2 (d) Inequality involving sums of terms of a nondecreasing sequence with no three terms equal.

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

    Statement uses: Nat, Monotone, LT.lt, OfNat.ofNat, Ne, HAdd.hAdd, LE.le, HMul.hMul, HSub.hSub, Finset.sum, Finset.Icc

    Proof uses: Eq, Eq.mpr, Insert.insert, Finset, id, congrArg, Finset.ext, Iff, Membership.mem, And, Or, congr, Eq.trans, Decidable.byContradiction, Not, Finset.sum_insert, of_eq_true, False, True, eq_false_of_decide and 34 more

    76 instances, coercions and auxiliary constants left out.

    Tactic trace: 20 steps

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

    lemma lemma2_d
        (h_mono : Monotone d)
        (h_pos : ∀ k, 0 < d k)
        (h_no_three : ∀ i, d (i + 2) ≠ d i) :
        2 * n * n + 4 * n + 2 ≤
          (∑ i ∈ .Icc (2 * n + 2) (4 * n + 3), d i) -
            ∑ i ∈ .Icc 1 (2 * n + 1), d i := by
    …
  11. def SimpleGraph.HasCompactdegreeSequence The degree sequence of G is compact if it satisfies IsCompactSequenceOn for all valid indices k such that k + 2 < Fintype.card α line 247 source

    Source documentation

    The degree sequence of G is compact if it satisfies IsCompactSequenceOn for all valid indices k such that k + 2 < Fintype.card α.

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

    Statement uses: Fintype, SimpleGraph, DecidableRel, SimpleGraph.Adj

    Proof uses: DegreeSequencesTriangleFree.IsCompactSequenceOn, Nat, List.getD, SimpleGraph.degreeSequence, OfNat.ofNat, Set.ofPred, LT.lt, HAdd.hAdd, Fintype.card

    4 instances, coercions and auxiliary constants left out.

    def HasCompactdegreeSequence (G : SimpleGraph α) [DecidableRel G.Adj] : Prop :=
    …
  12. theorem SimpleGraph.theorem1 Theorem 1 sorry line 254 source

    Source documentation

    Theorem 1. If a triangle-free graph has f = 2, then it is bipartite, has minimum degree 1, and its degree sequence is compact.

    depends on sorry what this means

    Statement uses: Fintype, DecidableEq, SimpleGraph, SimpleGraph.Connected, DecidableRel, SimpleGraph.Adj, SimpleGraph.CliqueFree, OfNat.ofNat, Nat, Eq, SimpleGraph.degreeSequenceMultiplicity, And, SimpleGraph.IsBipartite, SimpleGraph.minDegree, SimpleGraph.HasCompactdegreeSequence

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    2 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem theorem1 (G : SimpleGraph α) (h_conn: G.Connected) [DecidableRel G.Adj]
        (h₁ : G.CliqueFree 3) (h₂ : degreeSequenceMultiplicity G = 2) :
        G.IsBipartite ∧ G.minDegree = 1 ∧ HasCompactdegreeSequence G := by
    …

    Mentions: SimpleGraph.degreeSequenceMultiplicity, SimpleGraph.HasCompactdegreeSequence

  13. lemma SimpleGraph.lemma3 Lemma 3 sorry line 262 source

    Source documentation

    Lemma 3. For every n there exists a bipartite graph with 8 n vertices, minimum degree n + 1, and f = 3.

    depends on sorry what this means

    Statement uses: Nat, LT.lt, OfNat.ofNat, Exists, SimpleGraph, Fin, HMul.hMul, DecidableRel, SimpleGraph.Adj, And, SimpleGraph.IsBipartite, Eq, SimpleGraph.minDegree, HAdd.hAdd, SimpleGraph.degreeSequenceMultiplicity

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    14 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    lemma lemma3 (n : ℕ) (hn : 0 < n) :
        ∃ (G : SimpleGraph (Fin (8 * n))) (_ : DecidableRel G.Adj),
          G.IsBipartite ∧ G.minDegree = n + 1 ∧ degreeSequenceMultiplicity G = 3 := by
    …

    Mentions: SimpleGraph.degreeSequenceMultiplicity

  14. lemma SimpleGraph.lemma4 Lemma 4 sorry line 274 source

    Source documentation

    Lemma 4. Let G be a triangle-free graph with n vertices and let v be a vertex of G. There exists a triangle-free graph H containing G as an induced subgraph such that: (i) the degree of v in H is one more than its degree in G; (ii) for every vertex w of G other than v the degree of w in H is the same as its degree in G; (iii) if J is the subgraph of H induced by the vertices not in G, then f(J)=3 and δ(J) ≥ 2n.

    depends on sorry what this means

    Statement uses: Fintype, DecidableEq, SimpleGraph, DecidableRel, SimpleGraph.Adj, SimpleGraph.Connected, SimpleGraph.CliqueFree, OfNat.ofNat, Nat, Exists, SimpleGraph.Embedding, And, Eq, SimpleGraph.degree, Membership.mem, Set, SimpleGraph.neighborSet, HAdd.hAdd, Ne, Set.compl and 11 more

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    28 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    lemma lemma4 (G : SimpleGraph α) [DecidableRel G.Adj] (h_conn: G.Connected)
        (h₁ : G.CliqueFree 3) (v : α) :
        ∃ (β : Type*) (_ : Fintype β) (H : SimpleGraph β) (_ : DecidableRel H.Adj) (i : G ↪g H),
          H.CliqueFree 3 ∧
          H.degree (i v) = G.degree v + 1 ∧
          (∀ w ≠ v, H.degree (i w) = G.degree w) ∧
          let J := H.induce (Set.compl (Set.range i))
    …
  15. theorem SimpleGraph.theorem2 Theorem 2 sorry line 287 source

    Source documentation

    Theorem 2. Every triangle-free graph is an induced subgraph of one with f = 3.

    depends on sorry what this means

    Statement uses: Fintype, DecidableEq, SimpleGraph, DecidableRel, SimpleGraph.Adj, SimpleGraph.Connected, SimpleGraph.CliqueFree, OfNat.ofNat, Nat, Exists, SimpleGraph.Embedding, And, Eq, SimpleGraph.degreeSequenceMultiplicity

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    2 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem theorem2 (G : SimpleGraph α) [DecidableRel G.Adj] (h_conn: G.Connected)
        (h : G.CliqueFree 3) :
        ∃ (β : Type*) (_ : Fintype β) (H : SimpleGraph β) (_ : DecidableRel H.Adj) (i : G ↪g H),
          H.CliqueFree 3 ∧ degreeSequenceMultiplicity H = 3 := by
    …

    Mentions: SimpleGraph.degreeSequenceMultiplicity

  16. def SimpleGraph.F F n is the smallest number of vertices of a triangle-free graph with chromatic number n and f = 3 line 296 source

    Source documentation

    F n is the smallest number of vertices of a triangle-free graph with chromatic number n and f = 3.

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

    Statement uses: Nat

    Proof uses: InfSet.sInf, Set.ofPred, Exists, SimpleGraph, Fin, DecidableRel, SimpleGraph.Adj, And, SimpleGraph.CliqueFree, OfNat.ofNat, Eq, ENat, SimpleGraph.chromaticNumber, SimpleGraph.degreeSequenceMultiplicity

    5 instances, coercions and auxiliary constants left out.

    noncomputable def F (n : ℕ) : ℕ :=
    …
  17. theorem SimpleGraph.F_three The smallest number of vertices of a triangle-free graph with chromatic number 3 and f=3 is 7 sorry line 302 source

    Source documentation

    The smallest number of vertices of a triangle-free graph with chromatic number 3 and f=3 is 7.

    depends on sorry what this means

    Statement uses: Eq, Nat, SimpleGraph.F, OfNat.ofNat

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    2 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem F_three : F 3 = 7 := by
    …

    Mentions: SimpleGraph.F

  18. theorem SimpleGraph.F_four_le The smallest number of vertices of a triangle-free graph with chromatic number 4 and f=3 is at most 19 sorry line 307 source

    Source documentation

    The smallest number of vertices of a triangle-free graph with chromatic number 4 and f=3 is at most 19.

    depends on sorry what this means

    Statement uses: LE.le, Nat, SimpleGraph.F, OfNat.ofNat

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    4 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem F_four_le : F 4 ≤ 19 := by
    …

    Mentions: SimpleGraph.F