The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V30. Combinatorics

Mathlib.Combinatorics.SimpleGraph.Hasse

25 declarations and 4 deprecated aliases. Mathlib docs · Source

def SimpleGraph.hasse E1 #

(α : Type u_1) → [Preorder α] → SimpleGraph α

The Hasse diagram of an order as a simple graph. The graph of the covering relation.

theorem SimpleGraph.hasse_adj E0 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, (SimpleGraph.hasse α).Adj a b ↔ a ⋖ b ∨ b ⋖ a

instance SimpleGraph.instDecidableRelAdjHasseOfFintypeOfDecidableLT E0 #

{α : Type u_1} → [inst : Preorder α] → [Fintype α] → [DecidableLT α] → DecidableRel (SimpleGraph.hasse α).Adj

def SimpleGraph.hasseDualIso E1 #

{α : Type u_1} → [inst : Preorder α] → SimpleGraph.hasse αᵒᵈ ≃g SimpleGraph.hasse α

αᵒᵈ and α have the same Hasse diagram.

theorem SimpleGraph.hasseDualIso_apply E0 #

∀ {α : Type u_1} [inst : Preorder α] (a : αᵒᵈ), SimpleGraph.hasseDualIso a = OrderDual.ofDual a

theorem SimpleGraph.hasseDualIso_symm_apply E0 #

∀ {α : Type u_1} [inst : Preorder α] (a : α), SimpleGraph.hasseDualIso.symm a = OrderDual.toDual a

theorem SimpleGraph.cliqueFree_hasse_three E1 #

∀ {α : Type u_1} [inst : Preorder α], (SimpleGraph.hasse α).CliqueFree 3

The Hasse diagram of a preorder is triangle-free. This is the graph-theoretic formulation of not_covBy_of_lt_of_lt: if a ⋖ b and b ⋖ c then ¬a ⋖ c.

theorem SimpleGraph.hasse_prod E0 #

∀ (α : Type u_1) (β : Type u_2) [inst : PartialOrder α] [inst_1 : PartialOrder β],
  SimpleGraph.hasse (α × β) = SimpleGraph.hasse α □ SimpleGraph.hasse β

theorem SimpleGraph.Walk.mem_support_hasse_of_ge_of_le E0 #

∀ (α : Type u_1) [inst : LinearOrder α] {u v : α} (w : (SimpleGraph.hasse α).Walk u v) {x : α},
  u ≤ x → x ≤ v → x ∈ w.support

A discrete form of the intermediate value theorem – a walk in a linear graph visits all of the vertices between its endpoints.

theorem SimpleGraph.Walk.mem_darts_hasse_of_ge_of_le_of_le E0 #

∀ (α : Type u_1) [inst : LinearOrder α] {u v : α} (w : (SimpleGraph.hasse α).Walk u v) {d : (SimpleGraph.hasse α).Dart},
  u ≤ d.toProd.1 → d.toProd.1 ≤ d.toProd.2 → d.toProd.2 ≤ v → d ∈ w.darts

A discrete form of the intermediate value theorem – a walk in a linear graph visits all of the darts between its endpoints, oriented from the walk's start to its end.

theorem SimpleGraph.preconnected_hasse_of_succOrder E1 #

∀ (α : Type u_1) [inst : LinearOrder α] [inst_1 : SuccOrder α] [IsSuccArchimedean α], (SimpleGraph.hasse α).Preconnected

theorem SimpleGraph.preconnected_hasse_of_predOrder E1 #

∀ (α : Type u_1) [inst : LinearOrder α] [inst_1 : PredOrder α] [IsPredArchimedean α], (SimpleGraph.hasse α).Preconnected

def SimpleGraph.pathGraph E1 #

(n : ℕ) → SimpleGraph (Fin n)

The path graph on n vertices.

theorem SimpleGraph.pathGraph_adj E1 #

∀ {n : ℕ} {u v : Fin n}, (SimpleGraph.pathGraph n).Adj u v ↔ ↑u + 1 = ↑v ∨ ↑v + 1 = ↑u

theorem SimpleGraph.preconnected_pathGraph E0 #

∀ (n : ℕ), (SimpleGraph.pathGraph n).Preconnected

theorem SimpleGraph.connected_pathGraph_add_one E1 #

∀ (n : ℕ), (SimpleGraph.pathGraph (n + 1)).Connected

theorem SimpleGraph.connected_pathGraph E0 #

∀ {n : ℕ}, (SimpleGraph.pathGraph n).Connected ↔ n ≠ 0

theorem SimpleGraph.pathGraph_two_eq_top E1 #

SimpleGraph.pathGraph 2 = ⊤

instance SimpleGraph.instDecidableRelFinAdjPathGraph E0 #

(n : ℕ) → DecidableRel (SimpleGraph.pathGraph n).Adj

theorem SimpleGraph.pathGraph_le_cycleGraph E1 #

∀ {n : ℕ}, SimpleGraph.pathGraph n ≤ SimpleGraph.cycleGraph n

def SimpleGraph.Walk.pathGraphHomToSubgraph E1 #

{V : Type u_3} →
  {G : SimpleGraph V} → {u v : V} → (w : G.Walk u v) → SimpleGraph.pathGraph (w.length + 1) →g w.toSubgraph.coe

The subgraph of a walk contains the path graph with the same number of vertices

def SimpleGraph.Walk.pathGraphHom E1 #

{V : Type u_3} → {G : SimpleGraph V} → {u v : V} → (w : G.Walk u v) → SimpleGraph.pathGraph (w.length + 1) →g G

A walk induces a homomorphism from a path graph to the graph

def SimpleGraph.Walk.IsPath.pathGraphIsoToSubgraph E1 #

{V : Type u_3} →
  [DecidableEq V] →
    {G : SimpleGraph V} →
      {u v : V} → {w : G.Walk u v} → w.IsPath → SimpleGraph.pathGraph (w.length + 1) ≃g w.toSubgraph.coe

The subgraph of a path is isomorphic to the path graph with the same number of vertices

def SimpleGraph.Walk.IsPath.pathGraphCopy E1 #

{V : Type u_3} →
  [DecidableEq V] →
    {G : SimpleGraph V} → {u v : V} → {w : G.Walk u v} → w.IsPath → (SimpleGraph.pathGraph (w.length + 1)).Copy G

A path induces an injective homomorphism from a path graph to the graph

theorem SimpleGraph.Walk.IsPath.isContained_pathGraph E1 #

∀ {V : Type u_3} {G : SimpleGraph V} {u v : V} {w : G.Walk u v},
  w.IsPath → (SimpleGraph.pathGraph (w.length + 1)).IsContained G

Deprecated aliases

NameNew nameSince
SimpleGraph.hasse_preconnected_of_predSimpleGraph.preconnected_hasse_of_predOrder2026-10-01
SimpleGraph.hasse_preconnected_of_succSimpleGraph.preconnected_hasse_of_succOrder2026-10-01
SimpleGraph.pathGraph_connectedSimpleGraph.connected_pathGraph_add_one2026-10-01
SimpleGraph.pathGraph_preconnectedSimpleGraph.preconnected_pathGraph2026-10-01