Skip to content

Commit 1bf88df

Browse files
committed
feat(Combinatorics/SimpleGraph/Walk): a vertex is in the support iff an edge in the walk contains it (#31678)
1 parent 98cd141 commit 1bf88df

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Mathlib/Combinatorics/SimpleGraph/Walk.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,14 @@ theorem snd_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : s(t, u
738738
u ∈ p.support :=
739739
p.fst_mem_support_of_mem_edges (Sym2.eq_swap ▸ he)
740740

741+
theorem mem_support_of_mem_edges {u v w : V} {e : Sym2 V} {p : G.Walk u v} (he : e ∈ p.edges)
742+
(hv : w ∈ e) : w ∈ p.support :=
743+
hv.elim fun _ heq ↦ p.fst_mem_support_of_mem_edges <| heq ▸ he
744+
745+
theorem mem_support_iff_exists_mem_edges {u v w : V} {p : G.Walk u v} :
746+
w ∈ p.support ↔ w = v ∨ ∃ e ∈ p.edges, w ∈ e := by
747+
induction p <;> aesop
748+
741749
theorem darts_nodup_of_support_nodup {u v : V} {p : G.Walk u v} (h : p.support.Nodup) :
742750
p.darts.Nodup := by
743751
induction p with
@@ -923,6 +931,12 @@ lemma notNilRec_cons {motive : {u w : V} → (p : G.Walk u w) → ¬ p.Nil → S
923931
theorem end_mem_tail_support {u v : V} {p : G.Walk u v} (h : ¬ p.Nil) : v ∈ p.support.tail :=
924932
p.notNilRec (by simp) h
925933

934+
theorem mem_support_iff_exists_mem_edges_of_not_nil {u v w : V} {p : G.Walk u v} (hnil : ¬p.Nil) :
935+
w ∈ p.support ↔ ∃ e ∈ p.edges, w ∈ e := by
936+
induction p with
937+
| nil => simp at hnil
938+
| cons h p ih => cases p <;> aesop
939+
926940
/-- The walk obtained by removing the first `n` darts of a walk. -/
927941
def drop {u v : V} (p : G.Walk u v) (n : ℕ) : G.Walk (p.getVert n) v :=
928942
match p, n with

0 commit comments

Comments
 (0)