File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 1- import Mathlib.Algebra.Order.Ring.Unbundled .Rat
1+ import Mathlib.Algebra.Field .Rat
22import Mathlib.Combinatorics.SimpleGraph.Subgraph
33
4+ /-!
5+ # TODO
6+
7+ Rename `edgeDensity` to `edgeDensityBtw`
8+ -/
9+
410open Finset
511open scoped Classical
612
713namespace SimpleGraph
814variable {α : Type *} [Fintype α] (G : SimpleGraph α) [Fintype G.edgeSet]
915
10- def fullEdgeDensity : ℚ := #G.edgeFinset / Fintype.card α
16+ /-- The edge density of a simple graph is its number of edges divided by its number of vertices.
17+
18+ In other words, it is half of its average degree. -/
19+ def edgeDensity' : ℚ≥0 := #G.edgeFinset / Fintype.card α
1120
12- noncomputable def maxEdgeSubdensity : ℚ :=
13- Finset.univ.sup' Finset.univ_nonempty fun G' : G.Subgraph ↦ G'.coe.fullEdgeDensity
21+ /-- The maximum edge density of a subgraph of a graph. -/
22+ noncomputable def maxEdgeSubdensity : ℚ≥0 :=
23+ Finset.univ.sup' Finset.univ_nonempty fun G' : G.Subgraph ↦ G'.coe.edgeDensity'
1424
1525end SimpleGraph
You can’t perform that action at this time.
0 commit comments