The areas / V30. Combinatorics
Mathlib.Combinatorics.SimpleGraph.Acyclic
89 declarations and 4 deprecated aliases. Mathlib docs · Source
Acyclic graphs and trees
This module introduces acyclic graphs (a.k.a. forests) and trees.
Main definitions
SimpleGraph.IsAcyclicis a predicate for a graph having no cyclic walks.SimpleGraph.IsTreeis a predicate for a graph being a tree (a connected acyclic graph).
Main statements
SimpleGraph.isAcyclic_iff_path_uniquecharacterizes acyclicity in terms of uniqueness of paths between pairs of vertices.SimpleGraph.isAcyclic_iff_forall_edge_isBridgecharacterizes acyclicity in terms of every edge being a bridge edge.SimpleGraph.isTree_iff_existsUnique_pathcharacterizes trees in terms of existence and uniqueness of paths between pairs of vertices from a nonempty vertex type.
References
The structure of the proofs for SimpleGraph.IsAcyclic and SimpleGraph.IsTree, including
supporting lemmas about SimpleGraph.IsBridge, generally follows the high-level description
for these theorems for multigraphs from [Chou1994].
Tags
acyclic graphs, trees
theorem SimpleGraph.Path.singleton.congr_simp E1 #
∀ {V : Type u} {G : SimpleGraph V} {u v : V} (h : G.Adj u v),
SimpleGraph.Path.singleton h = SimpleGraph.Path.singleton h
def SimpleGraph.IsAcyclic E3 #
{V : Type u_1} → SimpleGraph V → Prop
A graph is acyclic (or a forest) if it has no cycles.
structure SimpleGraph.IsTree E3 #
{V : Type u_1} → SimpleGraph V → Prop
A tree is a connected acyclic graph.
theorem SimpleGraph.isTree_iff E0 #
∀ {V : Type u_1} (G : SimpleGraph V), G.IsTree ↔ G.Connected ∧ G.IsAcyclic
theorem SimpleGraph.IsTree.connected E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsTree → G.Connected
ctor SimpleGraph.IsTree.mk E0 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.Connected → G.IsAcyclic → G.IsTree
theorem SimpleGraph.IsTree.isAcyclic E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsTree → G.IsAcyclic
A tree is acyclic.
theorem SimpleGraph.isAcyclic_iff_forall_not_isCycle E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic ↔ ∀ ⦃v : V⦄ (c : G.Walk v v), ¬c.IsCycle
theorem SimpleGraph.not_isAcyclic_iff_exists_isCycle E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, ¬G.IsAcyclic ↔ ∃ v c, c.IsCycle
theorem SimpleGraph.isAcyclic_bot E0 #
∀ {V : Type u_1}, ⊥.IsAcyclic
theorem SimpleGraph.IsAcyclic.comap E1 #
∀ {V : Type u_1} {V' : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G →g G'),
Function.Injective ⇑f → G'.IsAcyclic → G.IsAcyclic
A graph that has an injective homomorphism to an acyclic graph is acyclic.
theorem SimpleGraph.IsAcyclic.embedding E1 #
∀ {V : Type u_1} {V' : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G ↪g G'), G'.IsAcyclic → G.IsAcyclic
theorem SimpleGraph.Iso.isAcyclic_iff E0 #
∀ {V : Type u_1} {V' : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G ≃g G'), G.IsAcyclic ↔ G'.IsAcyclic
Isomorphic graphs are acyclic together.
theorem SimpleGraph.Iso.isTree_iff E0 #
∀ {V : Type u_1} {V' : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G ≃g G'), G.IsTree ↔ G'.IsTree
Isomorphic graphs are trees together.
theorem SimpleGraph.IsAcyclic.of_map E1 #
∀ {V : Type u_1} {V' : Type u_2} {G : SimpleGraph V} (f : V ↪ V'), (SimpleGraph.map (⇑f) G).IsAcyclic → G.IsAcyclic
theorem SimpleGraph.IsAcyclic.of_comap E1 #
∀ {V : Type u_1} {V' : Type u_2} {G : SimpleGraph V} (f : V' ↪ V), G.IsAcyclic → (SimpleGraph.comap (⇑f) G).IsAcyclic
theorem SimpleGraph.IsAcyclic.induce E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic → ∀ (s : Set V), (SimpleGraph.induce s G).IsAcyclic
A graph induced from an acyclic graph is acyclic.
theorem SimpleGraph.IsAcyclic.subgraph E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic → ∀ (H : G.Subgraph), H.coe.IsAcyclic
A subgraph of an acyclic graph is acyclic.
theorem SimpleGraph.IsAcyclic.anti E1 #
∀ {V : Type u_1} {G G' : SimpleGraph V}, G ≤ G' → G'.IsAcyclic → G.IsAcyclic
A spanning subgraph of an acyclic graph is acyclic.
theorem SimpleGraph.isAcyclic_sSup_of_isAcyclic_directedOn E1 #
∀ {V : Type u_1} (Hs : Set (SimpleGraph V)),
(∀ H ∈ Hs, H.IsAcyclic) → DirectedOn (fun x1 x2 ↦ x1 ≤ x2) Hs → (sSup Hs).IsAcyclic
The directed supremum of acyclic graphs is acyclic.
theorem SimpleGraph.exists_maximal_isAcyclic_of_le_isAcyclic E1 #
∀ {V : Type u_1} {G H : SimpleGraph V}, H ≤ G → H.IsAcyclic → ∃ H', H ≤ H' ∧ Maximal (fun H ↦ H ≤ G ∧ H.IsAcyclic) H'
Every acyclic subgraph H ≤ G is contained in a maximal such subgraph.
theorem SimpleGraph.IsAcyclic.isTree_connectedComponent E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic → ∀ (c : G.ConnectedComponent), c.toSimpleGraph.IsTree
A connected component of an acyclic graph is a tree.
theorem SimpleGraph.IsAcyclic.of_card_le_two E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, ENat.card V ≤ 2 → G.IsAcyclic
theorem SimpleGraph.IsAcyclic.of_subsingleton E1 #
∀ {V : Type u_1} [Subsingleton V] {G : SimpleGraph V}, G.IsAcyclic
theorem SimpleGraph.Subgraph.isAcyclic_coe_bot E1 #
∀ {V : Type u_1} (G : SimpleGraph V), ⊥.coe.IsAcyclic
theorem SimpleGraph.IsTree.of_subsingleton E1 #
∀ {V : Type u_1} [Nonempty V] [Subsingleton V] {G : SimpleGraph V}, G.IsTree
theorem SimpleGraph.IsTree.coe_singletonSubgraph E0 #
∀ {V : Type u_1} (G : SimpleGraph V) (v : V), (G.singletonSubgraph v).coe.IsTree
theorem SimpleGraph.IsTree.coe_subgraphOfAdj E0 #
∀ {V : Type u_1} {G : SimpleGraph V} {u v : V} (h : G.Adj u v), (G.subgraphOfAdj h).coe.IsTree
theorem SimpleGraph.isAcyclic_iff_forall_isBridge E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic ↔ ∀ ⦃e : Sym2 V⦄, e ∈ G.edgeSet → G.IsBridge e
theorem SimpleGraph.isAcyclic_iff_forall_adj_isBridge E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic ↔ ∀ ⦃v w : V⦄, G.Adj v w → G.IsBridge s(v, w)
theorem SimpleGraph.isAcyclic_iff_subsingleton_path E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic ↔ ∀ (u v : V), Subsingleton (G.Path u v)
theorem SimpleGraph.IsAcyclic.subsingleton_path E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic → ∀ (u v : V), Subsingleton (G.Path u v)
Alias of the forward direction of SimpleGraph.isAcyclic_iff_subsingleton_path.
theorem SimpleGraph.IsAcyclic.mem_support_of_ne_mem_support_of_adj_of_isPath E0 #
∀ {V : Type u_1} {G : SimpleGraph V},
G.IsAcyclic →
∀ {u v w : V} {p : G.Walk u v} {q : G.Walk u w}, p.IsPath → q.IsPath → G.Adj v w → v ∉ q.support → w ∈ p.support
theorem SimpleGraph.IsAcyclic.ne_mem_support_of_support_of_adj_of_isPath E1 #
∀ {V : Type u_1} {G : SimpleGraph V},
G.IsAcyclic →
∀ {u v w : V} {p : G.Walk u v} {q : G.Walk u w}, p.IsPath → q.IsPath → G.Adj v w → w ∈ p.support → v ∉ q.support
theorem SimpleGraph.IsAcyclic.path_concat E1 #
∀ {V : Type u_1} {G : SimpleGraph V},
G.IsAcyclic →
∀ {u v w : V} {p : G.Walk u v} {q : G.Walk u w},
p.IsPath → q.IsPath → ∀ (hadj : G.Adj v w), v ∈ q.support → q = p.concat hadj
theorem SimpleGraph.isTree_iff_existsUnique_path E3 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsTree ↔ Nonempty V ∧ ∀ (v w : V), ∃! p, p.IsPath
theorem SimpleGraph.IsTree.existsUnique_path E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsTree → ∀ (v w : V), ∃! p, p.IsPath
theorem SimpleGraph.IsAcyclic.isPath_iff_isChain E1 #
∀ {V : Type u_1} {G : SimpleGraph V},
G.IsAcyclic → ∀ {v w : V} (p : G.Walk v w), p.IsPath ↔ List.IsChain (fun x1 x2 ↦ x1 ≠ x2) p.edges
theorem SimpleGraph.IsAcyclic.isPath_iff_isTrail E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic → ∀ {v w : V} (p : G.Walk v w), p.IsPath ↔ p.IsTrail
theorem SimpleGraph.IsTree.card_edgeFinset E1 #
∀ {V : Type u_1} {G : SimpleGraph V} [inst : Fintype V] [inst_1 : Fintype ↑G.edgeSet],
G.IsTree → G.edgeFinset.card + 1 = Fintype.card V
theorem SimpleGraph.IsTree.ncard_edgeSet_add_one E1 #
∀ {V : Type u_1} {G : SimpleGraph V} [Finite V], G.IsTree → G.edgeSet.ncard + 1 = Nat.card V
theorem SimpleGraph.isTree_of_minimal_connected E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, Minimal SimpleGraph.Connected G → G.IsTree
A minimally connected graph is a tree.
theorem SimpleGraph.isTree_iff_minimal_connected E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsTree ↔ Minimal SimpleGraph.Connected G
theorem SimpleGraph.IsAcyclic.sup_edge_of_not_reachable E1 #
∀ {V : Type u_1} {G : SimpleGraph V} {u v : V}, ¬G.Reachable u v → G.IsAcyclic → (G ⊔ SimpleGraph.edge u v).IsAcyclic
Connecting two unreachable vertices by an edge preserves acyclicity.
theorem SimpleGraph.isAcyclic_add_edge_iff_of_not_reachable E1 #
∀ {V : Type u_1} {G : SimpleGraph V} (x y : V), ¬G.Reachable x y → ((G ⊔ SimpleGraph.edge x y).IsAcyclic ↔ G.IsAcyclic)
theorem SimpleGraph.isAcyclic_sup_fromEdgeSet_iff E0 #
∀ {V : Type u_1} {G : SimpleGraph V} {u v : V},
(G ⊔ SimpleGraph.edge u v).IsAcyclic ↔ G.IsAcyclic ∧ (G.Reachable u v → u = v ∨ G.Adj u v)
Adding an edge results in an acyclic graph iff the original graph was acyclic and the edge connects vertices that previously had no path between them.
theorem SimpleGraph.reachable_eq_of_maximal_isAcyclic E1 #
∀ {V : Type u_1} {G : SimpleGraph V} (F : SimpleGraph V),
Maximal (fun H ↦ H ≤ G ∧ H.IsAcyclic) F → F.Reachable = G.Reachable
The reachability relation of a maximal acyclic subgraph agrees with that of the larger graph.
theorem SimpleGraph.maximal_isAcyclic_iff_reachable_eq E0 #
∀ {V : Type u_1} {G F : SimpleGraph V},
F ≤ G → F.IsAcyclic → (Maximal (fun F ↦ F ≤ G ∧ F.IsAcyclic) F ↔ F.Reachable = G.Reachable)
A subgraph is maximal acyclic iff its reachability relation agrees with the larger graph.
theorem SimpleGraph.Connected.maximal_le_isAcyclic_iff_isTree E1 #
∀ {V : Type u_1} {G T : SimpleGraph V}, G.Connected → T ≤ G → (Maximal (fun H ↦ H ≤ G ∧ H.IsAcyclic) T ↔ T.IsTree)
A subgraph of a connected graph is maximal acyclic iff it is a tree.
theorem SimpleGraph.maximal_isAcyclic_iff_isTree E0 #
∀ {V : Type u_1} [Nonempty V] {T : SimpleGraph V}, Maximal SimpleGraph.IsAcyclic T ↔ T.IsTree
theorem SimpleGraph.isTree_iff_maximal_isAcyclic E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsTree ↔ Nonempty V ∧ Maximal SimpleGraph.IsAcyclic G
A maximally acyclic graph is a tree. This is similar to maximal_isAcyclic_iff_isTree except
with Nonempty V as part of the iff rather than an assumption.
theorem SimpleGraph.exists_isAcyclic_reachable_eq_le_of_le_of_isAcyclic E1 #
∀ {V : Type u_1} {G H : SimpleGraph V},
H ≤ G → H.IsAcyclic → ∃ F, H ≤ F ∧ F ≤ G ∧ F.IsAcyclic ∧ F.Reachable = G.Reachable
Every acyclic subgraph can be extended to a spanning forest.
theorem SimpleGraph.exists_isAcyclic_reachable_eq_le E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, ∃ F ≤ G, F.IsAcyclic ∧ F.Reachable = G.Reachable
Every graph has a spanning forest.
theorem SimpleGraph.Connected.exists_isTree_le_of_le_of_isAcyclic E1 #
∀ {V : Type u_1} {G H : SimpleGraph V}, G.Connected → H ≤ G → H.IsAcyclic → ∃ F, H ≤ F ∧ F ≤ G ∧ F.IsTree
Every acyclic subgraph of a connected graph can be extended to a spanning tree.
theorem SimpleGraph.Connected.exists_isTree_le E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.Connected → ∃ T ≤ G, T.IsTree
Every connected graph has a spanning tree.
theorem SimpleGraph.Connected.card_vert_le_card_edgeSet_add_one E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.Connected → Nat.card V ≤ Nat.card ↑G.edgeSet + 1
Every connected graph on n vertices has at least n-1 edges.
theorem SimpleGraph.isTree_iff_connected_and_card E1 #
∀ {V : Type u_1} {G : SimpleGraph V} [Finite V], G.IsTree ↔ G.Connected ∧ Nat.card ↑G.edgeSet + 1 = Nat.card V
theorem SimpleGraph.IsAcyclic.ncard_edgeSet_add_card_connectedComponent E1 #
∀ {V : Type u_1} {G : SimpleGraph V} [Finite V],
G.IsAcyclic → G.edgeSet.ncard + Nat.card G.ConnectedComponent = Nat.card V
An acyclic graph on n vertices with c connected components has exactly n - c edges.
theorem SimpleGraph.IsAcyclic.ncard_edgeSet_add_one_le_card E1 #
∀ {V : Type u_1} {G : SimpleGraph V} [Finite V] [Nonempty V], G.IsAcyclic → G.edgeSet.ncard + 1 ≤ Nat.card V
An acyclic graph on n vertices has at most n - 1 edges.
theorem SimpleGraph.exists_isCycle_of_card_le E1 #
∀ {V : Type u_1} {G : SimpleGraph V} [Finite V] [Nonempty V], Nat.card V ≤ G.edgeSet.ncard → ∃ v c, c.IsCycle
A graph on n vertices with at least n edges has a cycle.
theorem SimpleGraph.isTree_iff_isAcyclic_and_ncard_edgeSet_add_one_eq_card E1 #
∀ {V : Type u_1} {G : SimpleGraph V} [Finite V], G.IsTree ↔ G.IsAcyclic ∧ G.edgeSet.ncard + 1 = Nat.card V
A graph on n vertices is a tree iff it is acyclic and has exactly n - 1 edges.
theorem SimpleGraph.IsTree.minDegree_eq_one_of_nontrivial E1 #
∀ {V : Type u_1} {G : SimpleGraph V},
G.IsTree → ∀ [inst : Fintype V] [Nontrivial V] [inst_2 : DecidableRel G.Adj], G.minDegree = 1
The minimum degree of all vertices in a nontrivial tree is one.
theorem SimpleGraph.IsTree.exists_vert_degree_one_of_nontrivial E1 #
∀ {V : Type u_1} {G : SimpleGraph V} [inst : Fintype V] [Nontrivial V] [inst_2 : DecidableRel G.Adj],
G.IsTree → ∃ v, G.degree v = 1
A nontrivial tree has a vertex of degree one.
theorem SimpleGraph.IsTree.exists_ne_and_degree_eq_one E1 #
∀ {V : Type u_1} {G : SimpleGraph V} [Nontrivial V] [Finite ↑G.edgeSet] [inst : G.LocallyFinite],
G.IsTree → ∃ u v, u ≠ v ∧ G.degree u = 1 ∧ G.degree v = 1
A nontrivial finite tree has at least two leaves.
theorem SimpleGraph.Connected.exists_connected_induce_compl_singleton_of_finite_nontrivial E1 #
∀ {V : Type u_1} {G : SimpleGraph V} [Finite V] [Nontrivial V], G.Connected → ∃ v, (SimpleGraph.induce {v}ᶜ G).Connected
A finite nontrivial connected graph contains a vertex that leaves the graph connected if removed.
theorem SimpleGraph.Connected.exists_preconnected_induce_compl_singleton_of_finite E1 #
∀ {V : Type u_1} {G : SimpleGraph V} [Finite V], G.Connected → ∃ v, (SimpleGraph.induce {v}ᶜ G).Preconnected
A finite connected graph contains a vertex that leaves the graph preconnected if removed.
theorem SimpleGraph.IsAcyclic.dist_ne_of_adj E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic → ∀ {u v w : V}, G.Adj v w → G.Reachable u v → G.dist u v ≠ G.dist u w
theorem SimpleGraph.IsTree.dist_ne_of_adj E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsTree → ∀ (u : V) {v w : V}, G.Adj v w → G.dist u v ≠ G.dist u w
theorem SimpleGraph.IsAcyclic.dist_eq_dist_add_one_of_adj_of_reachable E1 #
∀ {V : Type u_1} {G : SimpleGraph V},
G.IsAcyclic →
∀ (u : V) {v w : V}, G.Adj v w → G.Reachable u v → G.dist u v = G.dist u w + 1 ∨ G.dist u w = G.dist u v + 1
theorem SimpleGraph.IsTree.dist_eq_dist_add_one_of_adj E1 #
∀ {V : Type u_1} {G : SimpleGraph V},
G.IsTree → ∀ (u : V) {v w : V}, G.Adj v w → G.dist u v = G.dist u w + 1 ∨ G.dist u w = G.dist u v + 1
def SimpleGraph.IsTree.coloringTwoOfVert E1 #
{V : Type u_1} → {G : SimpleGraph V} → G.IsTree → V → G.Coloring (Fin 2)
The unique two-coloring of a tree that colors the given vertex with zero
def SimpleGraph.IsTree.coloringTwo E1 #
{V : Type u_1} → {G : SimpleGraph V} → G.IsTree → G.Coloring (Fin 2)
Arbitrary coloring with two colors for a tree
theorem SimpleGraph.IsTree.isBipartite E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsTree → G.IsBipartite
def SimpleGraph.IsAcyclic.coloringTwoOfVerts E1 #
{V : Type u_1} →
{G : SimpleGraph V} →
G.IsAcyclic → (verts : G.ConnectedComponent → V) → (∀ (C : G.ConnectedComponent), verts C ∈ C) → G.Coloring (Fin 2)
The unique two-coloring of a forest that colors the given vertices with zero
def SimpleGraph.IsAcyclic.coloringTwo E1 #
{V : Type u_1} → {G : SimpleGraph V} → G.IsAcyclic → G.Coloring (Fin 2)
Arbitrary coloring with two colors for a forest
theorem SimpleGraph.IsAcyclic.isBipartite E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic → G.IsBipartite
theorem SimpleGraph.IsAcyclic.colorable_two E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic → G.Colorable 2
An acyclic graph (forest) is 2-colorable.
theorem SimpleGraph.IsTree.colorable_two E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsTree → G.Colorable 2
A tree is 2-colorable.
theorem SimpleGraph.IsAcyclic.chromaticNumber_le_two E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic → G.chromaticNumber ≤ 2
The chromatic number of an acyclic graph (forest) is at most 2.
theorem SimpleGraph.IsTree.chromaticNumber_le_two E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsTree → G.chromaticNumber ≤ 2
The chromatic number of a tree is at most 2.
theorem SimpleGraph.IsAcyclic.cliqueFree E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic → ∀ {n : ℕ}, 3 ≤ n → G.CliqueFree n
theorem SimpleGraph.IsAcyclic.cliqueFree_three E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic → G.CliqueFree 3
theorem SimpleGraph.exists_isCycle_of_two_le_isEdgeReachable E1 #
∀ {V : Type u_1} {G : SimpleGraph V} {u v : V}, u ≠ v → ∀ {n : ℕ∞}, 2 ≤ n → G.IsEdgeReachable n u v → ∃ w, w.IsCycle
theorem SimpleGraph.isAcyclic_iff_pairwise_not_isEdgeReachable_two E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic ↔ Pairwise fun x1 x2 ↦ ¬G.IsEdgeReachable 2 x1 x2
theorem SimpleGraph.isAcyclic_iff_free_cycleGraph E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.IsAcyclic ↔ ∀ n ≥ 3, (SimpleGraph.cycleGraph n).Free G
theorem SimpleGraph.isAcyclic_hasse_of_linearOrder E1 #
∀ (α : Type u_3) [inst : LinearOrder α], (SimpleGraph.hasse α).IsAcyclic
theorem SimpleGraph.isAcyclic_pathGraph E0 #
∀ (n : ℕ), (SimpleGraph.pathGraph n).IsAcyclic
theorem SimpleGraph.isTree_pathGraph_add_one E1 #
∀ (n : ℕ), (SimpleGraph.pathGraph (n + 1)).IsTree
theorem SimpleGraph.isTree_pathGraph E0 #
∀ {n : ℕ}, (SimpleGraph.pathGraph n).IsTree ↔ n ≠ 0
Deprecated aliases
| Name | New name | Since |
|---|---|---|
SimpleGraph.IsAcyclic.path_unique | SimpleGraph.IsAcyclic.subsingleton_path | 2026-06-30 |
SimpleGraph.isAcyclic_iff_forall_edge_isBridge | SimpleGraph.isAcyclic_iff_forall_isBridge | 2026-06-04 |
SimpleGraph.isAcyclic_iff_path_unique | SimpleGraph.isAcyclic_iff_subsingleton_path | 2026-06-30 |
SimpleGraph.isAcyclic_of_path_unique | SimpleGraph.isAcyclic_iff_subsingleton_path | 2026-06-30 |