Skip to content

Commit 9a67863

Browse files
SnirBroshibryangingechen
authored andcommitted
feat(Combinatorics/SimpleGraph/Paths): p.IsPath → p.dropLast.IsPath (leanprover-community#40667)
We have this for `tail`/`take`/`drop`/`takeUntil`/`dropUntil`/`reverse`/`copy`/`concat` but not for `dropLast`.
1 parent f110c11 commit 9a67863

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Mathlib/Combinatorics/SimpleGraph/Paths.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@ lemma IsPath.tail {p : G.Walk u v} (hp : p.IsPath) : p.tail.IsPath := by
358358
| cons hadj p =>
359359
simp_all [Walk.isPath_def]
360360

361+
theorem IsPath.dropLast (hp : p.IsPath) : p.dropLast.IsPath :=
362+
hp.take _
363+
361364
/-- There exists a trail of maximal length in a non-empty graph on finite edges. -/
362365
lemma exists_isTrail_forall_isTrail_length_le_length (G : SimpleGraph V) [N : Nonempty V]
363366
[Finite G.edgeSet] :

0 commit comments

Comments
 (0)