Section GraphTheory_basic1.
Context {G : GRAPH.t}.
#[local] Notation V := G.(vertices).
#[local] Notation E := G.(edges).
#[local] Notation In := L.In.
#[local] Infix "\in" := E.In : type_scope.
Inductive walk (v : V) : V -> list V -> Prop :=
| walk_refl
: v ~~~[ [] ]~~> v
| walk_step (v0 : V) (v1 : V) (w : list V)
(H_edge : (v0, v1) \in E)
(H_walk : v1 ~~~[ w ]~~> v)
: v0 ~~~[ v1 :: w ]~~> v
where " src ~~~[ w ]~~> tgt " := (walk tgt src w) : type_scope.
#[local] Hint Constructors walk : core.
Inductive path (v : V) : V -> list V -> Prop :=
| path_refl
: v ---[ [] ]--> v
| path_step (v0 : V) (v1 : V) (p : list V)
(H_edge : (v0, v1) \in E)
(H_path : v1 ---[ p ]--> v)
(NOT_IN : ~ In v1 p)
: v0 ---[ v1 :: p ]--> v
where " src ---[ p ]--> tgt " := (path tgt src p) : type_scope.
#[local] Hint Constructors path : core.

Lemma no_dup_walk_is_path (v0 : V) (v : V) (w : list V)
(NO_DUP : NoDup w)
(H_walk : v0 ~~~[ w ]~~> v)
: v0 ---[ w ]--> v.