While this submission is a draft, it cannot be used by other submissions.

Chordal graphs

Lax560391.ChordalGraphs · concepts/Lax560391/ChordalGraphs.lean · lax-560391

definition

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Definition

    A graph is chordal if it has no induced cycle of length at least four. Empty and disconnected graphs are allowed.

    Concept map
    1 concept; 5 descendants hidden
    100%
    DefinitionThis conceptRelated conceptA → B: B builds on A

    Lean source view on GitHub

    1import Mathlib.Combinatorics.SimpleGraph.Basic
    2
    3/-!
    4---
    5title: Chordal graphs
    6type: definition
    7---
    8A graph is chordal if it has no induced cycle of length at least four.
    9Empty and disconnected graphs are allowed.
    10-/
    11
    12namespace Lax560391.ChordalGraphs
    13
    14/-- The next vertex index, wrapping from the last index to zero. -/
    15def cyclicSucc (n : ℕ) (hn : 0 < n) (i : Fin n) : Fin n :=
    16 ⟨(i.val + 1) % n, Nat.mod_lt _ hn⟩
    17
    18/-- A chordless cycle of length at least four. -/
    19def HasInducedLongCycle {V : Type} (G : SimpleGraph V) : Prop :=
    20 ∃ n : ℕ, ∃ hn : 4 ≤ n,
    21 let next := cyclicSucc n (lt_of_lt_of_le (by decide : 0 < 4) hn)
    22 ∃ f : Fin n ↪ V,
    23 (∀ i : Fin n, G.Adj (f i) (f (next i))) ∧
    24 (∀ i j : Fin n, i ≠ j → j ≠ next i → i ≠ next j →
    25 ¬ G.Adj (f i) (f j))
    26
    27/-- No induced cycle of length at least four. -/
    28def IsChordal {V : Type} (G : SimpleGraph V) : Prop :=
    29 ¬ HasInducedLongCycle G
    30
    31end Lax560391.ChordalGraphs
    32

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…