/-
Copyright 2025 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
module
public import Mathlib.Combinatorics.SimpleGraph.Diam
public import Mathlib.Combinatorics.SimpleGraph.Metric@[expose] public sectionassert_not_exists Fieldnamespace SimpleGraphvariable {α : Type*} {G G' : SimpleGraph α}
The diameter is the greatest distance between any two vertices. If the graph is disconnected,
this will be 0.
lemma diam_eq_zero_of_subsingleton [Subsingleton α] : G.diam = 0 := α:Type u_1G:SimpleGraph αinst✝:Subsingleton α⊢ G.diam = 0
All goals completed! 🐙proof_wanted diam_ne_zero [Nontrivial α] : G.diam ≠ 0lemma nontrivial_of_diam_ne_zero' (h : G.diam ≠ 0) : Nontrivial α := α:Type u_1G:SimpleGraph αh:G.diam ≠ 0⊢ Nontrivial α
α:Type u_1G:SimpleGraph αh:Subsingleton α⊢ G.diam = 0
All goals completed! 🐙section Pathopen Pathproof_wanted dist_le_diam_of_mem_path {G : SimpleGraph α} {u v : α} (p : G.Walk u v) (w : α)
(hw : w ∈ p.support) : G.dist w u ≤ G.diamend Pathend SimpleGraph