MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  wlkp1 Structured version   Visualization version   GIF version

Theorem wlkp1 26572
Description: Append one path segment (edge) 𝐸 from vertex (𝑃𝑁) to a vertex 𝐶 to a walk 𝐹, 𝑃 to become a walk 𝐻, 𝑄 of the supergraph 𝑆 obtained by adding the new edge to the graph 𝐺. Formerly proven directly for Eulerian paths (for pseudographs), see eupthp1 27069. (Contributed by Mario Carneiro, 7-Apr-2015.) (Revised by AV, 6-Mar-2021.) (Prove shortened by AV, 18-Apr-2021.)
Hypotheses
Ref Expression
wlkp1.v 𝑉 = (Vtx‘𝐺)
wlkp1.i 𝐼 = (iEdg‘𝐺)
wlkp1.f (𝜑 → Fun 𝐼)
wlkp1.a (𝜑𝐼 ∈ Fin)
wlkp1.b (𝜑𝐵 ∈ V)
wlkp1.c (𝜑𝐶𝑉)
wlkp1.d (𝜑 → ¬ 𝐵 ∈ dom 𝐼)
wlkp1.w (𝜑𝐹(Walks‘𝐺)𝑃)
wlkp1.n 𝑁 = (#‘𝐹)
wlkp1.e (𝜑𝐸 ∈ (Edg‘𝐺))
wlkp1.x (𝜑 → {(𝑃𝑁), 𝐶} ⊆ 𝐸)
wlkp1.u (𝜑 → (iEdg‘𝑆) = (𝐼 ∪ {⟨𝐵, 𝐸⟩}))
wlkp1.h 𝐻 = (𝐹 ∪ {⟨𝑁, 𝐵⟩})
wlkp1.q 𝑄 = (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩})
wlkp1.s (𝜑 → (Vtx‘𝑆) = 𝑉)
wlkp1.l ((𝜑𝐶 = (𝑃𝑁)) → 𝐸 = {𝐶})
Assertion
Ref Expression
wlkp1 (𝜑𝐻(Walks‘𝑆)𝑄)

Proof of Theorem wlkp1
Dummy variable 𝑘 is distinct from all other variables.
StepHypRef Expression
1 wlkp1.w . . . . . 6 (𝜑𝐹(Walks‘𝐺)𝑃)
2 wlkp1.i . . . . . . 7 𝐼 = (iEdg‘𝐺)
32wlkf 26504 . . . . . 6 (𝐹(Walks‘𝐺)𝑃𝐹 ∈ Word dom 𝐼)
4 wrdf 13305 . . . . . . 7 (𝐹 ∈ Word dom 𝐼𝐹:(0..^(#‘𝐹))⟶dom 𝐼)
5 wlkp1.n . . . . . . . . . 10 𝑁 = (#‘𝐹)
65eqcomi 2630 . . . . . . . . 9 (#‘𝐹) = 𝑁
76oveq2i 6658 . . . . . . . 8 (0..^(#‘𝐹)) = (0..^𝑁)
87feq2i 6035 . . . . . . 7 (𝐹:(0..^(#‘𝐹))⟶dom 𝐼𝐹:(0..^𝑁)⟶dom 𝐼)
94, 8sylib 208 . . . . . 6 (𝐹 ∈ Word dom 𝐼𝐹:(0..^𝑁)⟶dom 𝐼)
101, 3, 93syl 18 . . . . 5 (𝜑𝐹:(0..^𝑁)⟶dom 𝐼)
11 fvex 6199 . . . . . . . 8 (#‘𝐹) ∈ V
125, 11eqeltri 2696 . . . . . . 7 𝑁 ∈ V
1312a1i 11 . . . . . 6 (𝜑𝑁 ∈ V)
14 wlkp1.b . . . . . . . 8 (𝜑𝐵 ∈ V)
15 snidg 4204 . . . . . . . 8 (𝐵 ∈ V → 𝐵 ∈ {𝐵})
1614, 15syl 17 . . . . . . 7 (𝜑𝐵 ∈ {𝐵})
17 wlkp1.e . . . . . . . 8 (𝜑𝐸 ∈ (Edg‘𝐺))
18 dmsnopg 5604 . . . . . . . 8 (𝐸 ∈ (Edg‘𝐺) → dom {⟨𝐵, 𝐸⟩} = {𝐵})
1917, 18syl 17 . . . . . . 7 (𝜑 → dom {⟨𝐵, 𝐸⟩} = {𝐵})
2016, 19eleqtrrd 2703 . . . . . 6 (𝜑𝐵 ∈ dom {⟨𝐵, 𝐸⟩})
2113, 20fsnd 6177 . . . . 5 (𝜑 → {⟨𝑁, 𝐵⟩}:{𝑁}⟶dom {⟨𝐵, 𝐸⟩})
22 fzodisjsn 12501 . . . . . 6 ((0..^𝑁) ∩ {𝑁}) = ∅
2322a1i 11 . . . . 5 (𝜑 → ((0..^𝑁) ∩ {𝑁}) = ∅)
24 fun 6064 . . . . 5 (((𝐹:(0..^𝑁)⟶dom 𝐼 ∧ {⟨𝑁, 𝐵⟩}:{𝑁}⟶dom {⟨𝐵, 𝐸⟩}) ∧ ((0..^𝑁) ∩ {𝑁}) = ∅) → (𝐹 ∪ {⟨𝑁, 𝐵⟩}):((0..^𝑁) ∪ {𝑁})⟶(dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩}))
2510, 21, 23, 24syl21anc 1324 . . . 4 (𝜑 → (𝐹 ∪ {⟨𝑁, 𝐵⟩}):((0..^𝑁) ∪ {𝑁})⟶(dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩}))
26 wlkp1.h . . . . . 6 𝐻 = (𝐹 ∪ {⟨𝑁, 𝐵⟩})
2726a1i 11 . . . . 5 (𝜑𝐻 = (𝐹 ∪ {⟨𝑁, 𝐵⟩}))
28 wlkp1.v . . . . . . . 8 𝑉 = (Vtx‘𝐺)
29 wlkp1.f . . . . . . . 8 (𝜑 → Fun 𝐼)
30 wlkp1.a . . . . . . . 8 (𝜑𝐼 ∈ Fin)
31 wlkp1.c . . . . . . . 8 (𝜑𝐶𝑉)
32 wlkp1.d . . . . . . . 8 (𝜑 → ¬ 𝐵 ∈ dom 𝐼)
33 wlkp1.x . . . . . . . 8 (𝜑 → {(𝑃𝑁), 𝐶} ⊆ 𝐸)
34 wlkp1.u . . . . . . . 8 (𝜑 → (iEdg‘𝑆) = (𝐼 ∪ {⟨𝐵, 𝐸⟩}))
3528, 2, 29, 30, 14, 31, 32, 1, 5, 17, 33, 34, 26wlkp1lem2 26565 . . . . . . 7 (𝜑 → (#‘𝐻) = (𝑁 + 1))
3635oveq2d 6663 . . . . . 6 (𝜑 → (0..^(#‘𝐻)) = (0..^(𝑁 + 1)))
37 wlkcl 26505 . . . . . . . 8 (𝐹(Walks‘𝐺)𝑃 → (#‘𝐹) ∈ ℕ0)
38 eleq1 2688 . . . . . . . . . . 11 ((#‘𝐹) = 𝑁 → ((#‘𝐹) ∈ ℕ0𝑁 ∈ ℕ0))
3938eqcoms 2629 . . . . . . . . . 10 (𝑁 = (#‘𝐹) → ((#‘𝐹) ∈ ℕ0𝑁 ∈ ℕ0))
40 elnn0uz 11722 . . . . . . . . . . 11 (𝑁 ∈ ℕ0𝑁 ∈ (ℤ‘0))
4140biimpi 206 . . . . . . . . . 10 (𝑁 ∈ ℕ0𝑁 ∈ (ℤ‘0))
4239, 41syl6bi 243 . . . . . . . . 9 (𝑁 = (#‘𝐹) → ((#‘𝐹) ∈ ℕ0𝑁 ∈ (ℤ‘0)))
435, 42ax-mp 5 . . . . . . . 8 ((#‘𝐹) ∈ ℕ0𝑁 ∈ (ℤ‘0))
441, 37, 433syl 18 . . . . . . 7 (𝜑𝑁 ∈ (ℤ‘0))
45 fzosplitsn 12572 . . . . . . 7 (𝑁 ∈ (ℤ‘0) → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ {𝑁}))
4644, 45syl 17 . . . . . 6 (𝜑 → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ {𝑁}))
4736, 46eqtrd 2655 . . . . 5 (𝜑 → (0..^(#‘𝐻)) = ((0..^𝑁) ∪ {𝑁}))
4834dmeqd 5324 . . . . . 6 (𝜑 → dom (iEdg‘𝑆) = dom (𝐼 ∪ {⟨𝐵, 𝐸⟩}))
49 dmun 5329 . . . . . 6 dom (𝐼 ∪ {⟨𝐵, 𝐸⟩}) = (dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩})
5048, 49syl6eq 2671 . . . . 5 (𝜑 → dom (iEdg‘𝑆) = (dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩}))
5127, 47, 50feq123d 6032 . . . 4 (𝜑 → (𝐻:(0..^(#‘𝐻))⟶dom (iEdg‘𝑆) ↔ (𝐹 ∪ {⟨𝑁, 𝐵⟩}):((0..^𝑁) ∪ {𝑁})⟶(dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩})))
5225, 51mpbird 247 . . 3 (𝜑𝐻:(0..^(#‘𝐻))⟶dom (iEdg‘𝑆))
53 iswrdb 13306 . . 3 (𝐻 ∈ Word dom (iEdg‘𝑆) ↔ 𝐻:(0..^(#‘𝐻))⟶dom (iEdg‘𝑆))
5452, 53sylibr 224 . 2 (𝜑𝐻 ∈ Word dom (iEdg‘𝑆))
5528wlkp 26506 . . . . . . 7 (𝐹(Walks‘𝐺)𝑃𝑃:(0...(#‘𝐹))⟶𝑉)
561, 55syl 17 . . . . . 6 (𝜑𝑃:(0...(#‘𝐹))⟶𝑉)
575oveq2i 6658 . . . . . . 7 (0...𝑁) = (0...(#‘𝐹))
5857feq2i 6035 . . . . . 6 (𝑃:(0...𝑁)⟶𝑉𝑃:(0...(#‘𝐹))⟶𝑉)
5956, 58sylibr 224 . . . . 5 (𝜑𝑃:(0...𝑁)⟶𝑉)
60 ovexd 6677 . . . . . 6 (𝜑 → (𝑁 + 1) ∈ V)
6160, 31fsnd 6177 . . . . 5 (𝜑 → {⟨(𝑁 + 1), 𝐶⟩}:{(𝑁 + 1)}⟶𝑉)
62 fzp1disj 12396 . . . . . 6 ((0...𝑁) ∩ {(𝑁 + 1)}) = ∅
6362a1i 11 . . . . 5 (𝜑 → ((0...𝑁) ∩ {(𝑁 + 1)}) = ∅)
64 fun 6064 . . . . 5 (((𝑃:(0...𝑁)⟶𝑉 ∧ {⟨(𝑁 + 1), 𝐶⟩}:{(𝑁 + 1)}⟶𝑉) ∧ ((0...𝑁) ∩ {(𝑁 + 1)}) = ∅) → (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):((0...𝑁) ∪ {(𝑁 + 1)})⟶(𝑉𝑉))
6559, 61, 63, 64syl21anc 1324 . . . 4 (𝜑 → (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):((0...𝑁) ∪ {(𝑁 + 1)})⟶(𝑉𝑉))
66 fzsuc 12385 . . . . . 6 (𝑁 ∈ (ℤ‘0) → (0...(𝑁 + 1)) = ((0...𝑁) ∪ {(𝑁 + 1)}))
6744, 66syl 17 . . . . 5 (𝜑 → (0...(𝑁 + 1)) = ((0...𝑁) ∪ {(𝑁 + 1)}))
68 unidm 3754 . . . . . . 7 (𝑉𝑉) = 𝑉
6968eqcomi 2630 . . . . . 6 𝑉 = (𝑉𝑉)
7069a1i 11 . . . . 5 (𝜑𝑉 = (𝑉𝑉))
7167, 70feq23d 6038 . . . 4 (𝜑 → ((𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):(0...(𝑁 + 1))⟶𝑉 ↔ (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):((0...𝑁) ∪ {(𝑁 + 1)})⟶(𝑉𝑉)))
7265, 71mpbird 247 . . 3 (𝜑 → (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):(0...(𝑁 + 1))⟶𝑉)
73 wlkp1.q . . . . 5 𝑄 = (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩})
7473a1i 11 . . . 4 (𝜑𝑄 = (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}))
7535oveq2d 6663 . . . 4 (𝜑 → (0...(#‘𝐻)) = (0...(𝑁 + 1)))
76 wlkp1.s . . . 4 (𝜑 → (Vtx‘𝑆) = 𝑉)
7774, 75, 76feq123d 6032 . . 3 (𝜑 → (𝑄:(0...(#‘𝐻))⟶(Vtx‘𝑆) ↔ (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):(0...(𝑁 + 1))⟶𝑉))
7872, 77mpbird 247 . 2 (𝜑𝑄:(0...(#‘𝐻))⟶(Vtx‘𝑆))
79 wlkp1.l . . 3 ((𝜑𝐶 = (𝑃𝑁)) → 𝐸 = {𝐶})
8028, 2, 29, 30, 14, 31, 32, 1, 5, 17, 33, 34, 26, 73, 76, 79wlkp1lem8 26571 . 2 (𝜑 → ∀𝑘 ∈ (0..^(#‘𝐻))if-((𝑄𝑘) = (𝑄‘(𝑘 + 1)), ((iEdg‘𝑆)‘(𝐻𝑘)) = {(𝑄𝑘)}, {(𝑄𝑘), (𝑄‘(𝑘 + 1))} ⊆ ((iEdg‘𝑆)‘(𝐻𝑘))))
8128, 2, 29, 30, 14, 31, 32, 1, 5, 17, 33, 34, 26, 73, 76wlkp1lem4 26567 . . 3 (𝜑 → (𝑆 ∈ V ∧ 𝐻 ∈ V ∧ 𝑄 ∈ V))
82 eqid 2621 . . . 4 (Vtx‘𝑆) = (Vtx‘𝑆)
83 eqid 2621 . . . 4 (iEdg‘𝑆) = (iEdg‘𝑆)
8482, 83iswlk 26500 . . 3 ((𝑆 ∈ V ∧ 𝐻 ∈ V ∧ 𝑄 ∈ V) → (𝐻(Walks‘𝑆)𝑄 ↔ (𝐻 ∈ Word dom (iEdg‘𝑆) ∧ 𝑄:(0...(#‘𝐻))⟶(Vtx‘𝑆) ∧ ∀𝑘 ∈ (0..^(#‘𝐻))if-((𝑄𝑘) = (𝑄‘(𝑘 + 1)), ((iEdg‘𝑆)‘(𝐻𝑘)) = {(𝑄𝑘)}, {(𝑄𝑘), (𝑄‘(𝑘 + 1))} ⊆ ((iEdg‘𝑆)‘(𝐻𝑘))))))
8581, 84syl 17 . 2 (𝜑 → (𝐻(Walks‘𝑆)𝑄 ↔ (𝐻 ∈ Word dom (iEdg‘𝑆) ∧ 𝑄:(0...(#‘𝐻))⟶(Vtx‘𝑆) ∧ ∀𝑘 ∈ (0..^(#‘𝐻))if-((𝑄𝑘) = (𝑄‘(𝑘 + 1)), ((iEdg‘𝑆)‘(𝐻𝑘)) = {(𝑄𝑘)}, {(𝑄𝑘), (𝑄‘(𝑘 + 1))} ⊆ ((iEdg‘𝑆)‘(𝐻𝑘))))))
8654, 78, 80, 85mpbir3and 1244 1 (𝜑𝐻(Walks‘𝑆)𝑄)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 196  wa 384  if-wif 1012  w3a 1037   = wceq 1482  wcel 1989  wral 2911  Vcvv 3198  cun 3570  cin 3571  wss 3572  c0 3913  {csn 4175  {cpr 4177  cop 4181   class class class wbr 4651  dom cdm 5112  Fun wfun 5880  wf 5882  cfv 5886  (class class class)co 6647  Fincfn 7952  0cc0 9933  1c1 9934   + caddc 9936  0cn0 11289  cuz 11684  ...cfz 12323  ..^cfzo 12461  #chash 13112  Word cword 13286  Vtxcvtx 25868  iEdgciedg 25869  Edgcedg 25933  Walkscwlks 26486
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1721  ax-4 1736  ax-5 1838  ax-6 1887  ax-7 1934  ax-8 1991  ax-9 1998  ax-10 2018  ax-11 2033  ax-12 2046  ax-13 2245  ax-ext 2601  ax-rep 4769  ax-sep 4779  ax-nul 4787  ax-pow 4841  ax-pr 4904  ax-un 6946  ax-cnex 9989  ax-resscn 9990  ax-1cn 9991  ax-icn 9992  ax-addcl 9993  ax-addrcl 9994  ax-mulcl 9995  ax-mulrcl 9996  ax-mulcom 9997  ax-addass 9998  ax-mulass 9999  ax-distr 10000  ax-i2m1 10001  ax-1ne0 10002  ax-1rid 10003  ax-rnegex 10004  ax-rrecex 10005  ax-cnre 10006  ax-pre-lttri 10007  ax-pre-lttrn 10008  ax-pre-ltadd 10009  ax-pre-mulgt0 10010
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-ifp 1013  df-3or 1038  df-3an 1039  df-tru 1485  df-ex 1704  df-nf 1709  df-sb 1880  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2752  df-ne 2794  df-nel 2897  df-ral 2916  df-rex 2917  df-reu 2918  df-rmo 2919  df-rab 2920  df-v 3200  df-sbc 3434  df-csb 3532  df-dif 3575  df-un 3577  df-in 3579  df-ss 3586  df-pss 3588  df-nul 3914  df-if 4085  df-pw 4158  df-sn 4176  df-pr 4178  df-tp 4180  df-op 4182  df-uni 4435  df-int 4474  df-iun 4520  df-br 4652  df-opab 4711  df-mpt 4728  df-tr 4751  df-id 5022  df-eprel 5027  df-po 5033  df-so 5034  df-fr 5071  df-we 5073  df-xp 5118  df-rel 5119  df-cnv 5120  df-co 5121  df-dm 5122  df-rn 5123  df-res 5124  df-ima 5125  df-pred 5678  df-ord 5724  df-on 5725  df-lim 5726  df-suc 5727  df-iota 5849  df-fun 5888  df-fn 5889  df-f 5890  df-f1 5891  df-fo 5892  df-f1o 5893  df-fv 5894  df-riota 6608  df-ov 6650  df-oprab 6651  df-mpt2 6652  df-om 7063  df-1st 7165  df-2nd 7166  df-wrecs 7404  df-recs 7465  df-rdg 7503  df-1o 7557  df-oadd 7561  df-er 7739  df-map 7856  df-pm 7857  df-en 7953  df-dom 7954  df-sdom 7955  df-fin 7956  df-card 8762  df-cda 8987  df-pnf 10073  df-mnf 10074  df-xr 10075  df-ltxr 10076  df-le 10077  df-sub 10265  df-neg 10266  df-nn 11018  df-n0 11290  df-z 11375  df-uz 11685  df-fz 12324  df-fzo 12462  df-hash 13113  df-word 13294  df-wlks 26489
This theorem is referenced by:  eupthp1  27069
  Copyright terms: Public domain W3C validator