feat(Combinatorics): define HasAdj for capturing the common structure of different kinds of (simple) graphs#35776
feat(Combinatorics): define HasAdj for capturing the common structure of different kinds of (simple) graphs#35776IvanRenison wants to merge 4 commits intoleanprover-community:masterfrom
HasAdj for capturing the common structure of different kinds of (simple) graphs#35776Conversation
PR summary 9b809f3970Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
There was a problem hiding this comment.
Maybe Combinatorics.Graph.Adj, even though it's not restricted to Graph? Combinatorics as a folder is definitely too generic for this!
There was a problem hiding this comment.
Can you merge this with Digraph.Basic? Same for SimpleGraph
| @[expose] public section | ||
|
|
||
| /-- Typeclass for (simple) graphs. -/ | ||
| class HasAdj (α : outParam Type*) (Gr : Type*) where |
There was a problem hiding this comment.
| class HasAdj (α : outParam Type*) (Gr : Type*) where | |
| class HasAdj (V : outParam Type*) (E : Type*) where |
no?
| /-- There is no edge of the graph outside of it vertices. -/ | ||
| left_mem_verts_of_adj {G : Gr} {v w : α} (h : Adj G v w) : v ∈ verts G | ||
| /-- There is no edge of the graph outside of it vertices. -/ |
There was a problem hiding this comment.
| /-- There is no edge of the graph outside of it vertices. -/ | |
| left_mem_verts_of_adj {G : Gr} {v w : α} (h : Adj G v w) : v ∈ verts G | |
| /-- There is no edge of the graph outside of it vertices. -/ | |
| /-- There is no edge of the graph outside of its vertices. -/ | |
| left_mem_verts_of_adj {G : Gr} {v w : α} (h : Adj G v w) : v ∈ verts G | |
| /-- There is no edge of the graph outside of its vertices. -/ |
|
Do you have more code depending on this somewhere, so that we can tell whether this is a viable approach? eg have you tried refactoring the |
|
#36743 is replacing this pr |
We add a vertex set considering that we want to refactor
SimpleGraphto also use oneThis pr replaces #4127
Zulip discussion: https://leanprover.zulipchat.com/#narrow/channel/252551-graph-theory/topic/HasAdj/with/575843445