Add proof of the existence of eulerian path#39700
Conversation
samuelchassot
commented
May 22, 2026
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR. Thank you again for joining our community. |
🚨 PR Title Needs FormattingPlease update the title to match our commit style conventions. Errors from script: Details on the required title formatThe title should fit the following format:
|
PR summary 8985862c6dImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new SimpleGraph module proving the existence direction of the Eulerian trail theorem (connected finite graph with 0 or 2 odd-degree vertices ⇒ Eulerian trail), and updates documentation/imports accordingly.
Changes:
- Add
Mathlib.Combinatorics.SimpleGraph.Eulerianwith maximal-trail-based existence proofs (0-odd and 2-odd cases). - Update
Trails.leanmodule docs to reference the new existence proof location. - Re-export the new module from
Mathlib.lean.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Mathlib/Combinatorics/SimpleGraph/Trails.lean | Replaces TODO with “Related” note pointing to the new existence-direction file. |
| Mathlib/Combinatorics/SimpleGraph/Eulerian.lean | New file implementing the existence direction using maximal trail constructions and parity arguments. |
| Mathlib.lean | Adds public import for the new Eulerian module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Samuel Chassot | ||
| -/ | ||
| module |
| lemma `exists_maximal_walk`, parameterised by an arbitrary walk predicate. | ||
| -/ | ||
|
|
||
| @[expose] public section |
| hrev.exists_longer_of_unused_edge_at_start hvw.symm hunusedRev | ||
| have hle := hpmax.length_le hqT.reverse | ||
| simp only [edges_reverse, List.length_reverse] at hle hqL | ||
| omega |