Skip to content

[Merged by Bors] - feat(SimpleGraph): weaker condition for paths in acyclic graphs#25814

Closed
vlad902 wants to merge 10 commits intoleanprover-community:masterfrom
vlad902:vlad.tsyrklevich/cg4-istree
Closed

[Merged by Bors] - feat(SimpleGraph): weaker condition for paths in acyclic graphs#25814
vlad902 wants to merge 10 commits intoleanprover-community:masterfrom
vlad902:vlad.tsyrklevich/cg4-istree

Conversation

@vlad902
Copy link
Copy Markdown
Collaborator

@vlad902 vlad902 commented Jun 12, 2025

IsAcyclic.isPath_iff_chain' defines a weaker condition for proving that a walk is a path, in particular it shows that rather than proving that all vertices in the support of a walk are distinct, one must only show that consecutive edges are distinct (e.g. every other vertex must be distinct.) This leads to a simple corollary that trails are also paths in acyclic graphs.

I had a need for this when formalizing Cayley graphs, since this condition maps cleanly onto words in free groups being reduced.


This PR continues the work from #25630.

Original PR: #25630

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 12, 2025

PR summary 0fdf75b47d

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ IsAcyclic.isPath_iff_isChain
+ IsAcyclic.isPath_iff_isTrail
+ IsPath.eq_penultimate_of_mem_edges
+ IsPath.eq_snd_of_mem_edges

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh 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).

@vlad902 vlad902 force-pushed the vlad.tsyrklevich/cg4-istree branch from a28c15a to 31fa249 Compare July 4, 2025 05:12
@vlad902 vlad902 force-pushed the vlad.tsyrklevich/cg4-istree branch from be1dda6 to fd7cd78 Compare August 26, 2025 12:44
@vlad902 vlad902 changed the title feat(SimpleGraph): Weaker condition for paths in acyclic graphs feat(SimpleGraph): weaker condition for paths in acyclic graphs Oct 4, 2025
@vlad902 vlad902 force-pushed the vlad.tsyrklevich/cg4-istree branch from be09e36 to e2948b3 Compare October 4, 2025 09:40
@ocfnash
Copy link
Copy Markdown
Contributor

ocfnash commented Nov 20, 2025

LGTM other than the comment above

@ocfnash
Copy link
Copy Markdown
Contributor

ocfnash commented Nov 20, 2025

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 20, 2025

✌️ vlad902 can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Nov 20, 2025
vlad902 and others added 10 commits November 22, 2025 09:27
`IsAcyclic.isPath_iff_chain'` defines a weaker condition for proving
that a walk is a path, in particular it shows that rather than all
vertices in the support of a walk being distinct, one must only show
that consecutive vertices are distinct. This leads to a simple
corollary that trails are paths in acyclic graphs.
…nity#28184)

Fix typo in the docstring for the Picard–Lindelöf (Cauchy–Lipschitz) theorem: change "intial" to "initial".
@vlad902 vlad902 force-pushed the vlad.tsyrklevich/cg4-istree branch from e2948b3 to 4690f4f Compare November 22, 2025 08:29
@vlad902
Copy link
Copy Markdown
Collaborator Author

vlad902 commented Nov 22, 2025

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Nov 22, 2025
`IsAcyclic.isPath_iff_chain'` defines a weaker condition for proving that a walk is a path, in particular it shows that rather than proving that all vertices in the support of a walk are distinct, one must only show that consecutive edges are distinct (e.g. every other vertex must be distinct.) This leads to a simple corollary that trails are also paths in acyclic graphs.

I had a need for this when formalizing Cayley graphs, since this condition maps cleanly onto words in free groups being reduced.

Co-authored-by: themathqueen <2497250a@research.gla.ac.uk>
Co-authored-by: Dopamineee <austin20050819@gmail.com>
Co-authored-by: euprunin <euprunin@users.noreply.github.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 22, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(SimpleGraph): weaker condition for paths in acyclic graphs [Merged by Bors] - feat(SimpleGraph): weaker condition for paths in acyclic graphs Nov 22, 2025
@mathlib-bors mathlib-bors bot closed this Nov 22, 2025
alok added a commit to alok/mathlib4 that referenced this pull request Mar 17, 2026
…lib4

* 'master' of https://github.com/leanprover-community/mathlib4: (3130 commits)
  feat(SetTheory/ZFC): add `ZFSet.card` (leanprover-community#29365)
  feat: grind annotations for `choose_spec` (leanprover-community#31927)
  chore(scripts): update nolints.json (leanprover-community#31975)
  feat(Analysis): cos (n * π) = (-1) ^ n (leanprover-community#31971)
  chore: rename `mul_le_mul_right'` to `mul_le_mul_left` (leanprover-community#30242)
  chore: update Mathlib dependencies 2025-11-22 (leanprover-community#31955)
  feat(MeasureTheory): ae-measurability notation wrt non-standard sigma-algebra (leanprover-community#31910)
  doc: add missing spaces around doc code blocks (leanprover-community#31917)
  chore: update Mathlib dependencies 2025-11-22 (leanprover-community#31945)
  chore: shortcut instance for `Nat` to be mul-torsion-free (leanprover-community#31027)
  doc(Topology/Algebra/Algebra): outdated TODO (leanprover-community#31944)
  feat(EqHaar): add `addHaar_nnreal_smul` (leanprover-community#31922)
  chore(Algebra): make invertibleInv an instance (leanprover-community#31916)
  chore(Algebra): change two statements in CubicDiscriminant (leanprover-community#31912)
  chore(MeasureTheory): mark `map_dirac`  as simp (leanprover-community#31909)
  feat: `LinearOrder` instance for `Empty` (leanprover-community#31889)
  chore: deprecate all remaining modules in `Analysis/NormedSpace` (leanprover-community#31913)
  feat(SimpleGraph): weaker condition for paths in acyclic graphs (leanprover-community#25814)
  chore: do not set `group` when declaring option (leanprover-community#31888)
  chore: clean up more unused `Decidable*` instances in types (leanprover-community#31934)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-combinatorics Combinatorics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants