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

Theorem wlkp1 27462
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 27994. (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 27395 . . . . . 6 (𝐹(Walks‘𝐺)𝑃𝐹 ∈ Word dom 𝐼)
4 wrdf 13865 . . . . . . 7 (𝐹 ∈ Word dom 𝐼𝐹:(0..^(♯‘𝐹))⟶dom 𝐼)
5 wlkp1.n . . . . . . . . . 10 𝑁 = (♯‘𝐹)
65eqcomi 2830 . . . . . . . . 9 (♯‘𝐹) = 𝑁
76oveq2i 7166 . . . . . . . 8 (0..^(♯‘𝐹)) = (0..^𝑁)
87feq2i 6505 . . . . . . 7 (𝐹:(0..^(♯‘𝐹))⟶dom 𝐼𝐹:(0..^𝑁)⟶dom 𝐼)
94, 8sylib 220 . . . . . 6 (𝐹 ∈ Word dom 𝐼𝐹:(0..^𝑁)⟶dom 𝐼)
101, 3, 93syl 18 . . . . 5 (𝜑𝐹:(0..^𝑁)⟶dom 𝐼)
115fvexi 6683 . . . . . . 7 𝑁 ∈ V
1211a1i 11 . . . . . 6 (𝜑𝑁 ∈ V)
13 wlkp1.b . . . . . . . 8 (𝜑𝐵 ∈ V)
14 snidg 4598 . . . . . . . 8 (𝐵 ∈ V → 𝐵 ∈ {𝐵})
1513, 14syl 17 . . . . . . 7 (𝜑𝐵 ∈ {𝐵})
16 wlkp1.e . . . . . . . 8 (𝜑𝐸 ∈ (Edg‘𝐺))
17 dmsnopg 6069 . . . . . . . 8 (𝐸 ∈ (Edg‘𝐺) → dom {⟨𝐵, 𝐸⟩} = {𝐵})
1816, 17syl 17 . . . . . . 7 (𝜑 → dom {⟨𝐵, 𝐸⟩} = {𝐵})
1915, 18eleqtrrd 2916 . . . . . 6 (𝜑𝐵 ∈ dom {⟨𝐵, 𝐸⟩})
2012, 19fsnd 6656 . . . . 5 (𝜑 → {⟨𝑁, 𝐵⟩}:{𝑁}⟶dom {⟨𝐵, 𝐸⟩})
21 fzodisjsn 13074 . . . . . 6 ((0..^𝑁) ∩ {𝑁}) = ∅
2221a1i 11 . . . . 5 (𝜑 → ((0..^𝑁) ∩ {𝑁}) = ∅)
23 fun 6539 . . . . 5 (((𝐹:(0..^𝑁)⟶dom 𝐼 ∧ {⟨𝑁, 𝐵⟩}:{𝑁}⟶dom {⟨𝐵, 𝐸⟩}) ∧ ((0..^𝑁) ∩ {𝑁}) = ∅) → (𝐹 ∪ {⟨𝑁, 𝐵⟩}):((0..^𝑁) ∪ {𝑁})⟶(dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩}))
2410, 20, 22, 23syl21anc 835 . . . 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 27455 . . . . . . 7 (𝜑 → (♯‘𝐻) = (𝑁 + 1))
3534oveq2d 7171 . . . . . 6 (𝜑 → (0..^(♯‘𝐻)) = (0..^(𝑁 + 1)))
36 wlkcl 27396 . . . . . . . 8 (𝐹(Walks‘𝐺)𝑃 → (♯‘𝐹) ∈ ℕ0)
37 eleq1 2900 . . . . . . . . . . 11 ((♯‘𝐹) = 𝑁 → ((♯‘𝐹) ∈ ℕ0𝑁 ∈ ℕ0))
3837eqcoms 2829 . . . . . . . . . 10 (𝑁 = (♯‘𝐹) → ((♯‘𝐹) ∈ ℕ0𝑁 ∈ ℕ0))
39 elnn0uz 12282 . . . . . . . . . . 11 (𝑁 ∈ ℕ0𝑁 ∈ (ℤ‘0))
4039biimpi 218 . . . . . . . . . 10 (𝑁 ∈ ℕ0𝑁 ∈ (ℤ‘0))
4138, 40syl6bi 255 . . . . . . . . 9 (𝑁 = (♯‘𝐹) → ((♯‘𝐹) ∈ ℕ0𝑁 ∈ (ℤ‘0)))
425, 41ax-mp 5 . . . . . . . 8 ((♯‘𝐹) ∈ ℕ0𝑁 ∈ (ℤ‘0))
431, 36, 423syl 18 . . . . . . 7 (𝜑𝑁 ∈ (ℤ‘0))
44 fzosplitsn 13144 . . . . . . 7 (𝑁 ∈ (ℤ‘0) → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ {𝑁}))
4543, 44syl 17 . . . . . 6 (𝜑 → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ {𝑁}))
4635, 45eqtrd 2856 . . . . 5 (𝜑 → (0..^(♯‘𝐻)) = ((0..^𝑁) ∪ {𝑁}))
4733dmeqd 5773 . . . . . 6 (𝜑 → dom (iEdg‘𝑆) = dom (𝐼 ∪ {⟨𝐵, 𝐸⟩}))
48 dmun 5778 . . . . . 6 dom (𝐼 ∪ {⟨𝐵, 𝐸⟩}) = (dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩})
4947, 48syl6eq 2872 . . . . 5 (𝜑 → dom (iEdg‘𝑆) = (dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩}))
5026, 46, 49feq123d 6502 . . . 4 (𝜑 → (𝐻:(0..^(♯‘𝐻))⟶dom (iEdg‘𝑆) ↔ (𝐹 ∪ {⟨𝑁, 𝐵⟩}):((0..^𝑁) ∪ {𝑁})⟶(dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩})))
5124, 50mpbird 259 . . 3 (𝜑𝐻:(0..^(♯‘𝐻))⟶dom (iEdg‘𝑆))
52 iswrdb 13866 . . 3 (𝐻 ∈ Word dom (iEdg‘𝑆) ↔ 𝐻:(0..^(♯‘𝐻))⟶dom (iEdg‘𝑆))
5351, 52sylibr 236 . 2 (𝜑𝐻 ∈ Word dom (iEdg‘𝑆))
5427wlkp 27397 . . . . . . 7 (𝐹(Walks‘𝐺)𝑃𝑃:(0...(♯‘𝐹))⟶𝑉)
551, 54syl 17 . . . . . 6 (𝜑𝑃:(0...(♯‘𝐹))⟶𝑉)
565oveq2i 7166 . . . . . . 7 (0...𝑁) = (0...(♯‘𝐹))
5756feq2i 6505 . . . . . 6 (𝑃:(0...𝑁)⟶𝑉𝑃:(0...(♯‘𝐹))⟶𝑉)
5855, 57sylibr 236 . . . . 5 (𝜑𝑃:(0...𝑁)⟶𝑉)
59 ovexd 7190 . . . . . 6 (𝜑 → (𝑁 + 1) ∈ V)
6059, 30fsnd 6656 . . . . 5 (𝜑 → {⟨(𝑁 + 1), 𝐶⟩}:{(𝑁 + 1)}⟶𝑉)
61 fzp1disj 12965 . . . . . 6 ((0...𝑁) ∩ {(𝑁 + 1)}) = ∅
6261a1i 11 . . . . 5 (𝜑 → ((0...𝑁) ∩ {(𝑁 + 1)}) = ∅)
63 fun 6539 . . . . 5 (((𝑃:(0...𝑁)⟶𝑉 ∧ {⟨(𝑁 + 1), 𝐶⟩}:{(𝑁 + 1)}⟶𝑉) ∧ ((0...𝑁) ∩ {(𝑁 + 1)}) = ∅) → (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):((0...𝑁) ∪ {(𝑁 + 1)})⟶(𝑉𝑉))
6458, 60, 62, 63syl21anc 835 . . . 4 (𝜑 → (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):((0...𝑁) ∪ {(𝑁 + 1)})⟶(𝑉𝑉))
65 fzsuc 12953 . . . . . 6 (𝑁 ∈ (ℤ‘0) → (0...(𝑁 + 1)) = ((0...𝑁) ∪ {(𝑁 + 1)}))
6643, 65syl 17 . . . . 5 (𝜑 → (0...(𝑁 + 1)) = ((0...𝑁) ∪ {(𝑁 + 1)}))
67 unidm 4127 . . . . . . 7 (𝑉𝑉) = 𝑉
6867eqcomi 2830 . . . . . 6 𝑉 = (𝑉𝑉)
6968a1i 11 . . . . 5 (𝜑𝑉 = (𝑉𝑉))
7066, 69feq23d 6508 . . . 4 (𝜑 → ((𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):(0...(𝑁 + 1))⟶𝑉 ↔ (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):((0...𝑁) ∪ {(𝑁 + 1)})⟶(𝑉𝑉)))
7164, 70mpbird 259 . . 3 (𝜑 → (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):(0...(𝑁 + 1))⟶𝑉)
72 wlkp1.q . . . . 5 𝑄 = (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩})
7372a1i 11 . . . 4 (𝜑𝑄 = (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}))
7434oveq2d 7171 . . . 4 (𝜑 → (0...(♯‘𝐻)) = (0...(𝑁 + 1)))
75 wlkp1.s . . . 4 (𝜑 → (Vtx‘𝑆) = 𝑉)
7673, 74, 75feq123d 6502 . . 3 (𝜑 → (𝑄:(0...(♯‘𝐻))⟶(Vtx‘𝑆) ↔ (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):(0...(𝑁 + 1))⟶𝑉))
7771, 76mpbird 259 . 2 (𝜑𝑄:(0...(♯‘𝐻))⟶(Vtx‘𝑆))
78 wlkp1.l . . 3 ((𝜑𝐶 = (𝑃𝑁)) → 𝐸 = {𝐶})
7927, 2, 28, 29, 13, 30, 31, 1, 5, 16, 32, 33, 25, 72, 75, 78wlkp1lem8 27461 . 2 (𝜑 → ∀𝑘 ∈ (0..^(♯‘𝐻))if-((𝑄𝑘) = (𝑄‘(𝑘 + 1)), ((iEdg‘𝑆)‘(𝐻𝑘)) = {(𝑄𝑘)}, {(𝑄𝑘), (𝑄‘(𝑘 + 1))} ⊆ ((iEdg‘𝑆)‘(𝐻𝑘))))
8027, 2, 28, 29, 13, 30, 31, 1, 5, 16, 32, 33, 25, 72, 75wlkp1lem4 27457 . . 3 (𝜑 → (𝑆 ∈ V ∧ 𝐻 ∈ V ∧ 𝑄 ∈ V))
81 eqid 2821 . . . 4 (Vtx‘𝑆) = (Vtx‘𝑆)
82 eqid 2821 . . . 4 (iEdg‘𝑆) = (iEdg‘𝑆)
8381, 82iswlk 27391 . . 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 1338 1 (𝜑𝐻(Walks‘𝑆)𝑄)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 208  wa 398  if-wif 1057  w3a 1083   = wceq 1533  wcel 2110  wral 3138  Vcvv 3494  cun 3933  cin 3934  wss 3935  c0 4290  {csn 4566  {cpr 4568  cop 4572   class class class wbr 5065  dom cdm 5554  Fun wfun 6348  wf 6350  cfv 6354  (class class class)co 7155  Fincfn 8508  0cc0 10536  1c1 10537   + caddc 10539  0cn0 11896  cuz 12242  ...cfz 12891  ..^cfzo 13032  chash 13689  Word cword 13860  Vtxcvtx 26780  iEdgciedg 26781  Edgcedg 26831  Walkscwlks 27377
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1792  ax-4 1806  ax-5 1907  ax-6 1966  ax-7 2011  ax-8 2112  ax-9 2120  ax-10 2141  ax-11 2157  ax-12 2173  ax-ext 2793  ax-rep 5189  ax-sep 5202  ax-nul 5209  ax-pow 5265  ax-pr 5329  ax-un 7460  ax-cnex 10592  ax-resscn 10593  ax-1cn 10594  ax-icn 10595  ax-addcl 10596  ax-addrcl 10597  ax-mulcl 10598  ax-mulrcl 10599  ax-mulcom 10600  ax-addass 10601  ax-mulass 10602  ax-distr 10603  ax-i2m1 10604  ax-1ne0 10605  ax-1rid 10606  ax-rnegex 10607  ax-rrecex 10608  ax-cnre 10609  ax-pre-lttri 10610  ax-pre-lttrn 10611  ax-pre-ltadd 10612  ax-pre-mulgt0 10613
This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-ifp 1058  df-3or 1084  df-3an 1085  df-tru 1536  df-ex 1777  df-nf 1781  df-sb 2066  df-mo 2618  df-eu 2650  df-clab 2800  df-cleq 2814  df-clel 2893  df-nfc 2963  df-ne 3017  df-nel 3124  df-ral 3143  df-rex 3144  df-reu 3145  df-rmo 3146  df-rab 3147  df-v 3496  df-sbc 3772  df-csb 3883  df-dif 3938  df-un 3940  df-in 3942  df-ss 3951  df-pss 3953  df-nul 4291  df-if 4467  df-pw 4540  df-sn 4567  df-pr 4569  df-tp 4571  df-op 4573  df-uni 4838  df-int 4876  df-iun 4920  df-br 5066  df-opab 5128  df-mpt 5146  df-tr 5172  df-id 5459  df-eprel 5464  df-po 5473  df-so 5474  df-fr 5513  df-we 5515  df-xp 5560  df-rel 5561  df-cnv 5562  df-co 5563  df-dm 5564  df-rn 5565  df-res 5566  df-ima 5567  df-pred 6147  df-ord 6193  df-on 6194  df-lim 6195  df-suc 6196  df-iota 6313  df-fun 6356  df-fn 6357  df-f 6358  df-f1 6359  df-fo 6360  df-f1o 6361  df-fv 6362  df-riota 7113  df-ov 7158  df-oprab 7159  df-mpo 7160  df-om 7580  df-1st 7688  df-2nd 7689  df-wrecs 7946  df-recs 8007  df-rdg 8045  df-1o 8101  df-oadd 8105  df-er 8288  df-map 8407  df-pm 8408  df-en 8509  df-dom 8510  df-sdom 8511  df-fin 8512  df-dju 9329  df-card 9367  df-pnf 10676  df-mnf 10677  df-xr 10678  df-ltxr 10679  df-le 10680  df-sub 10871  df-neg 10872  df-nn 11638  df-n0 11897  df-z 11981  df-uz 12243  df-fz 12892  df-fzo 13033  df-hash 13690  df-word 13861  df-wlks 27380
This theorem is referenced by:  eupthp1  27994
  Copyright terms: Public domain W3C validator