Repository navigation
feat(Combinatorics/SimpleGraph/Degree): degrees for infinite graphs - #33501
SnirBroshi wants to merge 85 commits into
Conversation
PR summary 3a8e583834Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
This pull request has conflicts, please merge |
|
I'm not sure that this change is the right way to achieve degrees for infinite graphs. Instead, we should change degree v to ask that the neighbourhood of v is a fintype. I agree it's bad to ask for finiteness of the entire vertex set, but I don't think this is the right way to go about fixing it. |
Isn't that how degrees are currently defined? (they require I disagree that |
Oops, yes, the only way I could imagine infinite graphs being difficult was with a worse definition than this one!
Do you have examples of where this makes it hard to talk about infinite graphs? In my experience, infinite graphs work quite nicely with this setup. This is the general pattern in Lean combinatorics, more generally. Since the |
|
I'm pretty baffled at why "junk values are better than dragging hypotheses around" isn't a good reason for the change, I thought that's the conventional wisdom in Mathlib.
Take any statement from https://loogle.lean-lang.org/?q=SimpleGraph.degree and try to apply it to an infinite graph. There's no reason why statements such as Another random example I just thought of: "a graph is Hamiltonian 2-regular iff it's isomorphic to a cycle" is impossible to state for infinite graphs right now, even if we make theorem foo {V : Type*} [DecidableEq V] [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] :
G.IsHamiltonian ∧ G.IsRegularOfDegree 2 ↔ Nonempty (G ≃g SimpleGraph.cycleGraph (Nat.card V)) := by
sorryAnother user with a similar frustration: #graph theory > IsRegularOfDegree without DecidableRel @ 💬 But most importantly:
I don't understand how your fintypes don't have to be justified. Do you have such instances in your local context, or do you only use degrees on |
…o feature/simple-graph/edegree
|
This pull request has conflicts, please merge |
…o feature/simple-graph/edegree
Define
ENatversions ofdegree/minDegree/maxDegreecallededegree/minEDegree/maxEDegreerespectively.The
eprefix matches the existingedist/ediam/egirth.TODO (future work):
tsum G.edegree = 2 * G.edgeSet.encardand thenENat.card V * G.minEDegree ≤ 2 * G.edgeSet.encard ≤ ENat.card V * G.maxEDegree(can we avoid topology somehow?)IsSuccLimitandWithTop#38244singleton_iff_unique_memandFinite.encard_lt_card#38354maxDegreeis monotonic, andminDegreeis monotonic over a surjectiveCopy#38355sSup s ≠ ⊤in aCompleteLinearOrderfor a finite set without⊤#38356sSup s < xiff theorems when we know ifxis a successor pre-limit or not #38612sSup s = ⊤iff theorems forWithTop#40620neighborSetandIsIsolatedlemmas #38747Set.ncardofneighborSet#40624commonNeighborsis a strict subset ofneighborSetfor adjacent vertices #45130Note: this PR used to be a refactor of the existing
degree/maxDegree/minDegree, see the edits of this description.