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

Theorem wlkp1 26806
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 27389. (Contributed by Mario Carneiro, 7-Apr-2015.) (Revised by AV, 6-Mar-2021.) (Proof 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 26738 . . . . . 6 (𝐹(Walks‘𝐺)𝑃𝐹 ∈ Word dom 𝐼)
4 wrdf 13521 . . . . . . 7 (𝐹 ∈ Word dom 𝐼𝐹:(0..^(♯‘𝐹))⟶dom 𝐼)
5 wlkp1.n . . . . . . . . . 10 𝑁 = (♯‘𝐹)
65eqcomi 2815 . . . . . . . . 9 (♯‘𝐹) = 𝑁
76oveq2i 6885 . . . . . . . 8 (0..^(♯‘𝐹)) = (0..^𝑁)
87feq2i 6248 . . . . . . 7 (𝐹:(0..^(♯‘𝐹))⟶dom 𝐼𝐹:(0..^𝑁)⟶dom 𝐼)
94, 8sylib 209 . . . . . 6 (𝐹 ∈ Word dom 𝐼𝐹:(0..^𝑁)⟶dom 𝐼)
101, 3, 93syl 18 . . . . 5 (𝜑𝐹:(0..^𝑁)⟶dom 𝐼)
115fvexi 6422 . . . . . . 7 𝑁 ∈ V
1211a1i 11 . . . . . 6 (𝜑𝑁 ∈ V)
13 wlkp1.b . . . . . . . 8 (𝜑𝐵 ∈ V)
14 snidg 4400 . . . . . . . 8 (𝐵 ∈ V → 𝐵 ∈ {𝐵})
1513, 14syl 17 . . . . . . 7 (𝜑𝐵 ∈ {𝐵})
16 wlkp1.e . . . . . . . 8 (𝜑𝐸 ∈ (Edg‘𝐺))
17 dmsnopg 5818 . . . . . . . 8 (𝐸 ∈ (Edg‘𝐺) → dom {⟨𝐵, 𝐸⟩} = {𝐵})
1816, 17syl 17 . . . . . . 7 (𝜑 → dom {⟨𝐵, 𝐸⟩} = {𝐵})
1915, 18eleqtrrd 2888 . . . . . 6 (𝜑𝐵 ∈ dom {⟨𝐵, 𝐸⟩})
2012, 19fsnd 6395 . . . . 5 (𝜑 → {⟨𝑁, 𝐵⟩}:{𝑁}⟶dom {⟨𝐵, 𝐸⟩})
21 fzodisjsn 12730 . . . . . 6 ((0..^𝑁) ∩ {𝑁}) = ∅
2221a1i 11 . . . . 5 (𝜑 → ((0..^𝑁) ∩ {𝑁}) = ∅)
23 fun 6281 . . . . 5 (((𝐹:(0..^𝑁)⟶dom 𝐼 ∧ {⟨𝑁, 𝐵⟩}:{𝑁}⟶dom {⟨𝐵, 𝐸⟩}) ∧ ((0..^𝑁) ∩ {𝑁}) = ∅) → (𝐹 ∪ {⟨𝑁, 𝐵⟩}):((0..^𝑁) ∪ {𝑁})⟶(dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩}))
2410, 20, 22, 23syl21anc 857 . . . 4 (𝜑 → (𝐹 ∪ {⟨𝑁, 𝐵⟩}):((0..^𝑁) ∪ {𝑁})⟶(dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩}))
25 wlkp1.h . . . . . 6 𝐻 = (𝐹 ∪ {⟨𝑁, 𝐵⟩})
2625a1i 11 . . . . 5 (𝜑𝐻 = (𝐹 ∪ {⟨𝑁, 𝐵⟩}))
27 wlkp1.v . . . . . . . 8 𝑉 = (Vtx‘𝐺)
28 wlkp1.f . . . . . . . 8 (𝜑 → Fun 𝐼)
29 wlkp1.a . . . . . . . 8 (𝜑𝐼 ∈ Fin)
30 wlkp1.c . . . . . . . 8 (𝜑𝐶𝑉)
31 wlkp1.d . . . . . . . 8 (𝜑 → ¬ 𝐵 ∈ dom 𝐼)
32 wlkp1.x . . . . . . . 8 (𝜑 → {(𝑃𝑁), 𝐶} ⊆ 𝐸)
33 wlkp1.u . . . . . . . 8 (𝜑 → (iEdg‘𝑆) = (𝐼 ∪ {⟨𝐵, 𝐸⟩}))
3427, 2, 28, 29, 13, 30, 31, 1, 5, 16, 32, 33, 25wlkp1lem2 26799 . . . . . . 7 (𝜑 → (♯‘𝐻) = (𝑁 + 1))
3534oveq2d 6890 . . . . . 6 (𝜑 → (0..^(♯‘𝐻)) = (0..^(𝑁 + 1)))
36 wlkcl 26739 . . . . . . . 8 (𝐹(Walks‘𝐺)𝑃 → (♯‘𝐹) ∈ ℕ0)
37 eleq1 2873 . . . . . . . . . . 11 ((♯‘𝐹) = 𝑁 → ((♯‘𝐹) ∈ ℕ0𝑁 ∈ ℕ0))
3837eqcoms 2814 . . . . . . . . . 10 (𝑁 = (♯‘𝐹) → ((♯‘𝐹) ∈ ℕ0𝑁 ∈ ℕ0))
39 elnn0uz 11943 . . . . . . . . . . 11 (𝑁 ∈ ℕ0𝑁 ∈ (ℤ‘0))
4039biimpi 207 . . . . . . . . . 10 (𝑁 ∈ ℕ0𝑁 ∈ (ℤ‘0))
4138, 40syl6bi 244 . . . . . . . . 9 (𝑁 = (♯‘𝐹) → ((♯‘𝐹) ∈ ℕ0𝑁 ∈ (ℤ‘0)))
425, 41ax-mp 5 . . . . . . . 8 ((♯‘𝐹) ∈ ℕ0𝑁 ∈ (ℤ‘0))
431, 36, 423syl 18 . . . . . . 7 (𝜑𝑁 ∈ (ℤ‘0))
44 fzosplitsn 12800 . . . . . . 7 (𝑁 ∈ (ℤ‘0) → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ {𝑁}))
4543, 44syl 17 . . . . . 6 (𝜑 → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ {𝑁}))
4635, 45eqtrd 2840 . . . . 5 (𝜑 → (0..^(♯‘𝐻)) = ((0..^𝑁) ∪ {𝑁}))
4733dmeqd 5527 . . . . . 6 (𝜑 → dom (iEdg‘𝑆) = dom (𝐼 ∪ {⟨𝐵, 𝐸⟩}))
48 dmun 5532 . . . . . 6 dom (𝐼 ∪ {⟨𝐵, 𝐸⟩}) = (dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩})
4947, 48syl6eq 2856 . . . . 5 (𝜑 → dom (iEdg‘𝑆) = (dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩}))
5026, 46, 49feq123d 6245 . . . 4 (𝜑 → (𝐻:(0..^(♯‘𝐻))⟶dom (iEdg‘𝑆) ↔ (𝐹 ∪ {⟨𝑁, 𝐵⟩}):((0..^𝑁) ∪ {𝑁})⟶(dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩})))
5124, 50mpbird 248 . . 3 (𝜑𝐻:(0..^(♯‘𝐻))⟶dom (iEdg‘𝑆))
52 iswrdb 13522 . . 3 (𝐻 ∈ Word dom (iEdg‘𝑆) ↔ 𝐻:(0..^(♯‘𝐻))⟶dom (iEdg‘𝑆))
5351, 52sylibr 225 . 2 (𝜑𝐻 ∈ Word dom (iEdg‘𝑆))
5427wlkp 26740 . . . . . . 7 (𝐹(Walks‘𝐺)𝑃𝑃:(0...(♯‘𝐹))⟶𝑉)
551, 54syl 17 . . . . . 6 (𝜑𝑃:(0...(♯‘𝐹))⟶𝑉)
565oveq2i 6885 . . . . . . 7 (0...𝑁) = (0...(♯‘𝐹))
5756feq2i 6248 . . . . . 6 (𝑃:(0...𝑁)⟶𝑉𝑃:(0...(♯‘𝐹))⟶𝑉)
5855, 57sylibr 225 . . . . 5 (𝜑𝑃:(0...𝑁)⟶𝑉)
59 ovexd 6908 . . . . . 6 (𝜑 → (𝑁 + 1) ∈ V)
6059, 30fsnd 6395 . . . . 5 (𝜑 → {⟨(𝑁 + 1), 𝐶⟩}:{(𝑁 + 1)}⟶𝑉)
61 fzp1disj 12622 . . . . . 6 ((0...𝑁) ∩ {(𝑁 + 1)}) = ∅
6261a1i 11 . . . . 5 (𝜑 → ((0...𝑁) ∩ {(𝑁 + 1)}) = ∅)
63 fun 6281 . . . . 5 (((𝑃:(0...𝑁)⟶𝑉 ∧ {⟨(𝑁 + 1), 𝐶⟩}:{(𝑁 + 1)}⟶𝑉) ∧ ((0...𝑁) ∩ {(𝑁 + 1)}) = ∅) → (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):((0...𝑁) ∪ {(𝑁 + 1)})⟶(𝑉𝑉))
6458, 60, 62, 63syl21anc 857 . . . 4 (𝜑 → (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):((0...𝑁) ∪ {(𝑁 + 1)})⟶(𝑉𝑉))
65 fzsuc 12611 . . . . . 6 (𝑁 ∈ (ℤ‘0) → (0...(𝑁 + 1)) = ((0...𝑁) ∪ {(𝑁 + 1)}))
6643, 65syl 17 . . . . 5 (𝜑 → (0...(𝑁 + 1)) = ((0...𝑁) ∪ {(𝑁 + 1)}))
67 unidm 3955 . . . . . . 7 (𝑉𝑉) = 𝑉
6867eqcomi 2815 . . . . . 6 𝑉 = (𝑉𝑉)
6968a1i 11 . . . . 5 (𝜑𝑉 = (𝑉𝑉))
7066, 69feq23d 6251 . . . 4 (𝜑 → ((𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):(0...(𝑁 + 1))⟶𝑉 ↔ (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):((0...𝑁) ∪ {(𝑁 + 1)})⟶(𝑉𝑉)))
7164, 70mpbird 248 . . 3 (𝜑 → (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):(0...(𝑁 + 1))⟶𝑉)
72 wlkp1.q . . . . 5 𝑄 = (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩})
7372a1i 11 . . . 4 (𝜑𝑄 = (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}))
7434oveq2d 6890 . . . 4 (𝜑 → (0...(♯‘𝐻)) = (0...(𝑁 + 1)))
75 wlkp1.s . . . 4 (𝜑 → (Vtx‘𝑆) = 𝑉)
7673, 74, 75feq123d 6245 . . 3 (𝜑 → (𝑄:(0...(♯‘𝐻))⟶(Vtx‘𝑆) ↔ (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):(0...(𝑁 + 1))⟶𝑉))
7771, 76mpbird 248 . 2 (𝜑𝑄:(0...(♯‘𝐻))⟶(Vtx‘𝑆))
78 wlkp1.l . . 3 ((𝜑𝐶 = (𝑃𝑁)) → 𝐸 = {𝐶})
7927, 2, 28, 29, 13, 30, 31, 1, 5, 16, 32, 33, 25, 72, 75, 78wlkp1lem8 26805 . 2 (𝜑 → ∀𝑘 ∈ (0..^(♯‘𝐻))if-((𝑄𝑘) = (𝑄‘(𝑘 + 1)), ((iEdg‘𝑆)‘(𝐻𝑘)) = {(𝑄𝑘)}, {(𝑄𝑘), (𝑄‘(𝑘 + 1))} ⊆ ((iEdg‘𝑆)‘(𝐻𝑘))))
8027, 2, 28, 29, 13, 30, 31, 1, 5, 16, 32, 33, 25, 72, 75wlkp1lem4 26801 . . 3 (𝜑 → (𝑆 ∈ V ∧ 𝐻 ∈ V ∧ 𝑄 ∈ V))
81 eqid 2806 . . . 4 (Vtx‘𝑆) = (Vtx‘𝑆)
82 eqid 2806 . . . 4 (iEdg‘𝑆) = (iEdg‘𝑆)
8381, 82iswlk 26734 . . 3 ((𝑆 ∈ V ∧ 𝐻 ∈ V ∧ 𝑄 ∈ V) → (𝐻(Walks‘𝑆)𝑄 ↔ (𝐻 ∈ Word dom (iEdg‘𝑆) ∧ 𝑄:(0...(♯‘𝐻))⟶(Vtx‘𝑆) ∧ ∀𝑘 ∈ (0..^(♯‘𝐻))if-((𝑄𝑘) = (𝑄‘(𝑘 + 1)), ((iEdg‘𝑆)‘(𝐻𝑘)) = {(𝑄𝑘)}, {(𝑄𝑘), (𝑄‘(𝑘 + 1))} ⊆ ((iEdg‘𝑆)‘(𝐻𝑘))))))
8480, 83syl 17 . 2 (𝜑 → (𝐻(Walks‘𝑆)𝑄 ↔ (𝐻 ∈ Word dom (iEdg‘𝑆) ∧ 𝑄:(0...(♯‘𝐻))⟶(Vtx‘𝑆) ∧ ∀𝑘 ∈ (0..^(♯‘𝐻))if-((𝑄𝑘) = (𝑄‘(𝑘 + 1)), ((iEdg‘𝑆)‘(𝐻𝑘)) = {(𝑄𝑘)}, {(𝑄𝑘), (𝑄‘(𝑘 + 1))} ⊆ ((iEdg‘𝑆)‘(𝐻𝑘))))))
8553, 77, 79, 84mpbir3and 1435 1 (𝜑𝐻(Walks‘𝑆)𝑄)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 197  wa 384  if-wif 1078  w3a 1100   = wceq 1637  wcel 2156  wral 3096  Vcvv 3391  cun 3767  cin 3768  wss 3769  c0 4116  {csn 4370  {cpr 4372  cop 4376   class class class wbr 4844  dom cdm 5311  Fun wfun 6095  wf 6097  cfv 6101  (class class class)co 6874  Fincfn 8192  0cc0 10221  1c1 10222   + caddc 10224  0cn0 11559  cuz 11904  ...cfz 12549  ..^cfzo 12689  chash 13337  Word cword 13502  Vtxcvtx 26088  iEdgciedg 26089  Edgcedg 26153  Walkscwlks 26720
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1877  ax-4 1894  ax-5 2001  ax-6 2068  ax-7 2104  ax-8 2158  ax-9 2165  ax-10 2185  ax-11 2201  ax-12 2214  ax-13 2420  ax-ext 2784  ax-rep 4964  ax-sep 4975  ax-nul 4983  ax-pow 5035  ax-pr 5096  ax-un 7179  ax-cnex 10277  ax-resscn 10278  ax-1cn 10279  ax-icn 10280  ax-addcl 10281  ax-addrcl 10282  ax-mulcl 10283  ax-mulrcl 10284  ax-mulcom 10285  ax-addass 10286  ax-mulass 10287  ax-distr 10288  ax-i2m1 10289  ax-1ne0 10290  ax-1rid 10291  ax-rnegex 10292  ax-rrecex 10293  ax-cnre 10294  ax-pre-lttri 10295  ax-pre-lttrn 10296  ax-pre-ltadd 10297  ax-pre-mulgt0 10298
This theorem depends on definitions:  df-bi 198  df-an 385  df-or 866  df-ifp 1079  df-3or 1101  df-3an 1102  df-tru 1641  df-ex 1860  df-nf 1864  df-sb 2061  df-eu 2634  df-mo 2635  df-clab 2793  df-cleq 2799  df-clel 2802  df-nfc 2937  df-ne 2979  df-nel 3082  df-ral 3101  df-rex 3102  df-reu 3103  df-rmo 3104  df-rab 3105  df-v 3393  df-sbc 3634  df-csb 3729  df-dif 3772  df-un 3774  df-in 3776  df-ss 3783  df-pss 3785  df-nul 4117  df-if 4280  df-pw 4353  df-sn 4371  df-pr 4373  df-tp 4375  df-op 4377  df-uni 4631  df-int 4670  df-iun 4714  df-br 4845  df-opab 4907  df-mpt 4924  df-tr 4947  df-id 5219  df-eprel 5224  df-po 5232  df-so 5233  df-fr 5270  df-we 5272  df-xp 5317  df-rel 5318  df-cnv 5319  df-co 5320  df-dm 5321  df-rn 5322  df-res 5323  df-ima 5324  df-pred 5893  df-ord 5939  df-on 5940  df-lim 5941  df-suc 5942  df-iota 6064  df-fun 6103  df-fn 6104  df-f 6105  df-f1 6106  df-fo 6107  df-f1o 6108  df-fv 6109  df-riota 6835  df-ov 6877  df-oprab 6878  df-mpt2 6879  df-om 7296  df-1st 7398  df-2nd 7399  df-wrecs 7642  df-recs 7704  df-rdg 7742  df-1o 7796  df-oadd 7800  df-er 7979  df-map 8094  df-pm 8095  df-en 8193  df-dom 8194  df-sdom 8195  df-fin 8196  df-card 9048  df-cda 9275  df-pnf 10361  df-mnf 10362  df-xr 10363  df-ltxr 10364  df-le 10365  df-sub 10553  df-neg 10554  df-nn 11306  df-n0 11560  df-z 11644  df-uz 11905  df-fz 12550  df-fzo 12690  df-hash 13338  df-word 13510  df-wlks 26723
This theorem is referenced by:  eupthp1  27389
  Copyright terms: Public domain W3C validator