Repository navigation
feat(Combinatorics/Quiver/Path): simple paths, cycles and acyclic quivers - #45034
mkaratarakis wants to merge 3 commits into
Conversation
PR summary cbd682d415Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| Current number | Change | Type (weak) |
|---|---|---|
| 5102 | 1 | exposed public sections |
Current commit cbd682d415
Reference commit bdece672cb
This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
2fe3010 to
d667636
Compare
YaelDillies
left a comment
There was a problem hiding this comment.
@Jun2M, would your work cover quivers by any chance? Does that mean we don't need the content of this PR?
| `Quiver.cycleLengths` (in `Mathlib/Combinatorics/Quiver/Cyclic.lean`) records lengths of positive | ||
| loops without a simplicity hypothesis. | ||
|
|
||
| For cardinality bounds use `p.vertices.toFinset` (see `List.toFinset_card_of_nodup`). |
There was a problem hiding this comment.
| For cardinality bounds use `p.vertices.toFinset` (see `List.toFinset_card_of_nodup`). | |
| For cardinality bounds, use `p.vertices.toFinset` (see `List.toFinset_card_of_nodup`). |
| variable {V : Type*} [Quiver V] | ||
|
|
||
| /-- A path with no repeated vertices (cf. `SimpleGraph.Walk.IsPath`). -/ | ||
| @[reducible] def IsPath {a b : V} (p : Path a b) : Prop := |
There was a problem hiding this comment.
Why not
| @[reducible] def IsPath {a b : V} (p : Path a b) : Prop := | |
| abbrev IsPath {a b : V} (p : Path a b) : Prop := |
? Same below
|
-awaiting-author |
|
@YaelDillies, HypergraphLike should be able to cover Quiver. There is a bit of an inconvience due to the fact that Quiver hides the edge type(s) inside the field so until you have the Quiver instance, you don't know what edge type you are working with. HypergraphLike expects you to know the edge type before you know what graph you are working with. Here is a Lean formalization. The Quiver.Path def is equivalent to my walk def on HypergraphLike. If something like this is fine, then HypergraphLike can handle Quiver.: /- The edge type of a quiver. Only known after the quiver instance is available. -/
abbrev Arrow (V : Type*) [Quiver V] := Σ a b : V, a ⟶ b
/- Associate each instance of `Quiver V` with a singlton type. -/
structure AsGraphLike (V : Type*) [Quiver V] : Type where
instance {V : Type*} [Quiver V] : HyperGraphLike V (Arrow V × Bool) (Arrow V) (AsGraphLike V) where
verts _ := Set.univ
edges _ := Set.univ
incs _ := Set.univ
edgeMap' _ i := ⟨i.val.1, Set.mem_univ _⟩
attach' _ i := ⟨if i.val.2 then i.val.1.2.1 else i.val.1.1, Set.mem_univ _⟩
IsSource _ i := i.2 = false
IsTarget _ i := i.2 = true
mem_incs_iff := by simp
/-- The canonical graph-like object attached to a quiver. -/
def graphOf (V : Type*) [Quiver V] : AsGraphLike V := ⟨⟩
def pathEquivWalk {V : Type*} [Quiver V] (a b : V) : Path a b ≃ Walk (graphOf V) a b := by
sorry |
|
IMO |
Quiver.Path.IsSimpleandQuiver.Path.IsCycle, plusQuiver.IsAcyclic, modelled on what we already have forSimpleGraph.Walk.The main result is that a path revisiting a vertex can be shortened by cutting out the loop. In particular, a shortest nontrivial loop is a cycle.
Split from #39916.