Skip to content

feat(Combinatorics/Quiver/Path): vertex sets and length bounds for simple paths - #45035

Open
mkaratarakis wants to merge 7 commits into
leanprover-community:masterfrom
mkaratarakis:quiver-path-simple
Open

mkaratarakis wants to merge 7 commits into
leanprover-community:masterfrom
mkaratarakis:quiver-path-simple

Conversation

@mkaratarakis

@mkaratarakis mkaratarakis commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

The vertices a path visits, as a Set and as a Finset, and the facts that a shortest path has no repeated vertex and that a path with no repeated vertex has length at most card V - 1.


Split from #39916.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

PR summary ed68a237e7

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Combinatorics.Quiver.Path.Cycle (new file) 524
Mathlib.Combinatorics.Quiver.Path.Simple (new file) 596

Declarations diff (regex)

+ IsAcyclic
+ IsAcyclic.eq_nil
+ IsAcyclic.not_isCycle
+ IsCycle
+ IsCycle.of_minimal_length
+ IsSimple
+ IsSimple.nil
+ activeVertices
+ activeVertices_cons
+ activeVertices_nil
+ card_vertexFinset_of_isSimple
+ exists_length_add_eq_of_getElem_eq
+ exists_length_lt_of_not_isCycle
+ exists_length_lt_of_not_isSimple
+ isCycle_def
+ isSimple_cons
+ isSimple_def
+ isSimple_of_shortest
+ length_le_card_minus_one_of_isSimple
+ mem_activeVertices
+ mem_vertices_to_active
+ path_decomposition_first_edge
+ path_decomposition_last_edge
+ vertexFinset

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit ed68a23).

  • +35 new declarations
  • −0 removed declarations
+Quiver.IsAcyclic
+Quiver.IsAcyclic.eq_nil
+Quiver.IsAcyclic.not_isCycle
+Quiver.Path.IsCycle
+Quiver.Path.IsCycle.casesOn
+Quiver.Path.IsCycle.length_ne_zero
+Quiver.Path.IsCycle.mk
+Quiver.Path.IsCycle.of_minimal_length
+Quiver.Path.IsCycle.rec
+Quiver.Path.IsCycle.recOn
+Quiver.Path.IsCycle.vertices_dropLast_nodup
+Quiver.Path.IsSimple
+Quiver.Path.IsSimple.casesOn
+Quiver.Path.IsSimple.mk
+Quiver.Path.IsSimple.nil
+Quiver.Path.IsSimple.rec
+Quiver.Path.IsSimple.recOn
+Quiver.Path.IsSimple.vertices_nodup
+Quiver.Path.activeVertices
+Quiver.Path.activeVertices_cons
+Quiver.Path.activeVertices_nil
+Quiver.Path.card_vertexFinset_of_isSimple
+Quiver.Path.exists_length_add_eq_of_getElem_eq
+Quiver.Path.exists_length_lt_of_not_isCycle
+Quiver.Path.exists_length_lt_of_not_isSimple
+Quiver.Path.isCycle_def
+Quiver.Path.isSimple_cons
+Quiver.Path.isSimple_def
+Quiver.Path.isSimple_of_shortest
+Quiver.Path.length_le_card_minus_one_of_isSimple
+Quiver.Path.mem_activeVertices
+Quiver.Path.mem_vertices_to_active
+Quiver.Path.path_decomposition_first_edge
+Quiver.Path.path_decomposition_last_edge
+Quiver.Path.vertexFinset

No changes to strong technical debt.

Increase in weak tech debt: (relative, absolute) = (2.00, 0.00)
Current number Change Type (weak)
5103 2 exposed public sections

Current commit ed68a237e7
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 relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions Bot added the t-combinatorics Combinatorics label Oct 19, 2026
@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Oct 19, 2026
@mathlib-dependent-issues

Copy link
Copy Markdown

This PR/issue depends on:

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) t-combinatorics Combinatorics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant