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

Theorem wlkp1 26634
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 27194. (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 26566 . . . . . 6 (𝐹(Walks‘𝐺)𝑃𝐹 ∈ Word dom 𝐼)
4 wrdf 13342 . . . . . . 7 (𝐹 ∈ Word dom 𝐼𝐹:(0..^(#‘𝐹))⟶dom 𝐼)
5 wlkp1.n . . . . . . . . . 10 𝑁 = (#‘𝐹)
65eqcomi 2660 . . . . . . . . 9 (#‘𝐹) = 𝑁
76oveq2i 6701 . . . . . . . 8 (0..^(#‘𝐹)) = (0..^𝑁)
87feq2i 6075 . . . . . . 7 (𝐹:(0..^(#‘𝐹))⟶dom 𝐼𝐹:(0..^𝑁)⟶dom 𝐼)
94, 8sylib 208 . . . . . 6 (𝐹 ∈ Word dom 𝐼𝐹:(0..^𝑁)⟶dom 𝐼)
101, 3, 93syl 18 . . . . 5 (𝜑𝐹:(0..^𝑁)⟶dom 𝐼)
11 fvex 6239 . . . . . . . 8 (#‘𝐹) ∈ V
125, 11eqeltri 2726 . . . . . . 7 𝑁 ∈ V
1312a1i 11 . . . . . 6 (𝜑𝑁 ∈ V)
14 wlkp1.b . . . . . . . 8 (𝜑𝐵 ∈ V)
15 snidg 4239 . . . . . . . 8 (𝐵 ∈ V → 𝐵 ∈ {𝐵})
1614, 15syl 17 . . . . . . 7 (𝜑𝐵 ∈ {𝐵})
17 wlkp1.e . . . . . . . 8 (𝜑𝐸 ∈ (Edg‘𝐺))
18 dmsnopg 5642 . . . . . . . 8 (𝐸 ∈ (Edg‘𝐺) → dom {⟨𝐵, 𝐸⟩} = {𝐵})
1917, 18syl 17 . . . . . . 7 (𝜑 → dom {⟨𝐵, 𝐸⟩} = {𝐵})
2016, 19eleqtrrd 2733 . . . . . 6 (𝜑𝐵 ∈ dom {⟨𝐵, 𝐸⟩})
2113, 20fsnd 6217 . . . . 5 (𝜑 → {⟨𝑁, 𝐵⟩}:{𝑁}⟶dom {⟨𝐵, 𝐸⟩})
22 fzodisjsn 12545 . . . . . 6 ((0..^𝑁) ∩ {𝑁}) = ∅
2322a1i 11 . . . . 5 (𝜑 → ((0..^𝑁) ∩ {𝑁}) = ∅)
24 fun 6104 . . . . 5 (((𝐹:(0..^𝑁)⟶dom 𝐼 ∧ {⟨𝑁, 𝐵⟩}:{𝑁}⟶dom {⟨𝐵, 𝐸⟩}) ∧ ((0..^𝑁) ∩ {𝑁}) = ∅) → (𝐹 ∪ {⟨𝑁, 𝐵⟩}):((0..^𝑁) ∪ {𝑁})⟶(dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩}))
2510, 21, 23, 24syl21anc 1365 . . . 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 26627 . . . . . . 7 (𝜑 → (#‘𝐻) = (𝑁 + 1))
3635oveq2d 6706 . . . . . 6 (𝜑 → (0..^(#‘𝐻)) = (0..^(𝑁 + 1)))
37 wlkcl 26567 . . . . . . . 8 (𝐹(Walks‘𝐺)𝑃 → (#‘𝐹) ∈ ℕ0)
38 eleq1 2718 . . . . . . . . . . 11 ((#‘𝐹) = 𝑁 → ((#‘𝐹) ∈ ℕ0𝑁 ∈ ℕ0))
3938eqcoms 2659 . . . . . . . . . 10 (𝑁 = (#‘𝐹) → ((#‘𝐹) ∈ ℕ0𝑁 ∈ ℕ0))
40 elnn0uz 11763 . . . . . . . . . . 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 12616 . . . . . . 7 (𝑁 ∈ (ℤ‘0) → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ {𝑁}))
4644, 45syl 17 . . . . . 6 (𝜑 → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ {𝑁}))
4736, 46eqtrd 2685 . . . . 5 (𝜑 → (0..^(#‘𝐻)) = ((0..^𝑁) ∪ {𝑁}))
4834dmeqd 5358 . . . . . 6 (𝜑 → dom (iEdg‘𝑆) = dom (𝐼 ∪ {⟨𝐵, 𝐸⟩}))
49 dmun 5363 . . . . . 6 dom (𝐼 ∪ {⟨𝐵, 𝐸⟩}) = (dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩})
5048, 49syl6eq 2701 . . . . 5 (𝜑 → dom (iEdg‘𝑆) = (dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩}))
5127, 47, 50feq123d 6072 . . . 4 (𝜑 → (𝐻:(0..^(#‘𝐻))⟶dom (iEdg‘𝑆) ↔ (𝐹 ∪ {⟨𝑁, 𝐵⟩}):((0..^𝑁) ∪ {𝑁})⟶(dom 𝐼 ∪ dom {⟨𝐵, 𝐸⟩})))
5225, 51mpbird 247 . . 3 (𝜑𝐻:(0..^(#‘𝐻))⟶dom (iEdg‘𝑆))
53 iswrdb 13343 . . 3 (𝐻 ∈ Word dom (iEdg‘𝑆) ↔ 𝐻:(0..^(#‘𝐻))⟶dom (iEdg‘𝑆))
5452, 53sylibr 224 . 2 (𝜑𝐻 ∈ Word dom (iEdg‘𝑆))
5528wlkp 26568 . . . . . . 7 (𝐹(Walks‘𝐺)𝑃𝑃:(0...(#‘𝐹))⟶𝑉)
561, 55syl 17 . . . . . 6 (𝜑𝑃:(0...(#‘𝐹))⟶𝑉)
575oveq2i 6701 . . . . . . 7 (0...𝑁) = (0...(#‘𝐹))
5857feq2i 6075 . . . . . 6 (𝑃:(0...𝑁)⟶𝑉𝑃:(0...(#‘𝐹))⟶𝑉)
5956, 58sylibr 224 . . . . 5 (𝜑𝑃:(0...𝑁)⟶𝑉)
60 ovexd 6720 . . . . . 6 (𝜑 → (𝑁 + 1) ∈ V)
6160, 31fsnd 6217 . . . . 5 (𝜑 → {⟨(𝑁 + 1), 𝐶⟩}:{(𝑁 + 1)}⟶𝑉)
62 fzp1disj 12437 . . . . . 6 ((0...𝑁) ∩ {(𝑁 + 1)}) = ∅
6362a1i 11 . . . . 5 (𝜑 → ((0...𝑁) ∩ {(𝑁 + 1)}) = ∅)
64 fun 6104 . . . . 5 (((𝑃:(0...𝑁)⟶𝑉 ∧ {⟨(𝑁 + 1), 𝐶⟩}:{(𝑁 + 1)}⟶𝑉) ∧ ((0...𝑁) ∩ {(𝑁 + 1)}) = ∅) → (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):((0...𝑁) ∪ {(𝑁 + 1)})⟶(𝑉𝑉))
6559, 61, 63, 64syl21anc 1365 . . . 4 (𝜑 → (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):((0...𝑁) ∪ {(𝑁 + 1)})⟶(𝑉𝑉))
66 fzsuc 12426 . . . . . 6 (𝑁 ∈ (ℤ‘0) → (0...(𝑁 + 1)) = ((0...𝑁) ∪ {(𝑁 + 1)}))
6744, 66syl 17 . . . . 5 (𝜑 → (0...(𝑁 + 1)) = ((0...𝑁) ∪ {(𝑁 + 1)}))
68 unidm 3789 . . . . . . 7 (𝑉𝑉) = 𝑉
6968eqcomi 2660 . . . . . 6 𝑉 = (𝑉𝑉)
7069a1i 11 . . . . 5 (𝜑𝑉 = (𝑉𝑉))
7167, 70feq23d 6078 . . . 4 (𝜑 → ((𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):(0...(𝑁 + 1))⟶𝑉 ↔ (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):((0...𝑁) ∪ {(𝑁 + 1)})⟶(𝑉𝑉)))
7265, 71mpbird 247 . . 3 (𝜑 → (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}):(0...(𝑁 + 1))⟶𝑉)
73 wlkp1.q . . . . 5 𝑄 = (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩})
7473a1i 11 . . . 4 (𝜑𝑄 = (𝑃 ∪ {⟨(𝑁 + 1), 𝐶⟩}))
7535oveq2d 6706 . . . 4 (𝜑 → (0...(#‘𝐻)) = (0...(𝑁 + 1)))
76 wlkp1.s . . . 4 (𝜑 → (Vtx‘𝑆) = 𝑉)
7774, 75, 76feq123d 6072 . . 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 26633 . 2 (𝜑 → ∀𝑘 ∈ (0..^(#‘𝐻))if-((𝑄𝑘) = (𝑄‘(𝑘 + 1)), ((iEdg‘𝑆)‘(𝐻𝑘)) = {(𝑄𝑘)}, {(𝑄𝑘), (𝑄‘(𝑘 + 1))} ⊆ ((iEdg‘𝑆)‘(𝐻𝑘))))
8128, 2, 29, 30, 14, 31, 32, 1, 5, 17, 33, 34, 26, 73, 76wlkp1lem4 26629 . . 3 (𝜑 → (𝑆 ∈ V ∧ 𝐻 ∈ V ∧ 𝑄 ∈ V))
82 eqid 2651 . . . 4 (Vtx‘𝑆) = (Vtx‘𝑆)
83 eqid 2651 . . . 4 (iEdg‘𝑆) = (iEdg‘𝑆)
8482, 83iswlk 26562 . . 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 1264 1 (𝜑𝐻(Walks‘𝑆)𝑄)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 196  wa 383  if-wif 1032  w3a 1054   = wceq 1523  wcel 2030  wral 2941  Vcvv 3231  cun 3605  cin 3606  wss 3607  c0 3948  {csn 4210  {cpr 4212  cop 4216   class class class wbr 4685  dom cdm 5143  Fun wfun 5920  wf 5922  cfv 5926  (class class class)co 6690  Fincfn 7997  0cc0 9974  1c1 9975   + caddc 9977  0cn0 11330  cuz 11725  ...cfz 12364  ..^cfzo 12504  #chash 13157  Word cword 13323  Vtxcvtx 25919  iEdgciedg 25920  Edgcedg 25984  Walkscwlks 26548
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1762  ax-4 1777  ax-5 1879  ax-6 1945  ax-7 1981  ax-8 2032  ax-9 2039  ax-10 2059  ax-11 2074  ax-12 2087  ax-13 2282  ax-ext 2631  ax-rep 4804  ax-sep 4814  ax-nul 4822  ax-pow 4873  ax-pr 4936  ax-un 6991  ax-cnex 10030  ax-resscn 10031  ax-1cn 10032  ax-icn 10033  ax-addcl 10034  ax-addrcl 10035  ax-mulcl 10036  ax-mulrcl 10037  ax-mulcom 10038  ax-addass 10039  ax-mulass 10040  ax-distr 10041  ax-i2m1 10042  ax-1ne0 10043  ax-1rid 10044  ax-rnegex 10045  ax-rrecex 10046  ax-cnre 10047  ax-pre-lttri 10048  ax-pre-lttrn 10049  ax-pre-ltadd 10050  ax-pre-mulgt0 10051
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-ifp 1033  df-3or 1055  df-3an 1056  df-tru 1526  df-ex 1745  df-nf 1750  df-sb 1938  df-eu 2502  df-mo 2503  df-clab 2638  df-cleq 2644  df-clel 2647  df-nfc 2782  df-ne 2824  df-nel 2927  df-ral 2946  df-rex 2947  df-reu 2948  df-rmo 2949  df-rab 2950  df-v 3233  df-sbc 3469  df-csb 3567  df-dif 3610  df-un 3612  df-in 3614  df-ss 3621  df-pss 3623  df-nul 3949  df-if 4120  df-pw 4193  df-sn 4211  df-pr 4213  df-tp 4215  df-op 4217  df-uni 4469  df-int 4508  df-iun 4554  df-br 4686  df-opab 4746  df-mpt 4763  df-tr 4786  df-id 5053  df-eprel 5058  df-po 5064  df-so 5065  df-fr 5102  df-we 5104  df-xp 5149  df-rel 5150  df-cnv 5151  df-co 5152  df-dm 5153  df-rn 5154  df-res 5155  df-ima 5156  df-pred 5718  df-ord 5764  df-on 5765  df-lim 5766  df-suc 5767  df-iota 5889  df-fun 5928  df-fn 5929  df-f 5930  df-f1 5931  df-fo 5932  df-f1o 5933  df-fv 5934  df-riota 6651  df-ov 6693  df-oprab 6694  df-mpt2 6695  df-om 7108  df-1st 7210  df-2nd 7211  df-wrecs 7452  df-recs 7513  df-rdg 7551  df-1o 7605  df-oadd 7609  df-er 7787  df-map 7901  df-pm 7902  df-en 7998  df-dom 7999  df-sdom 8000  df-fin 8001  df-card 8803  df-cda 9028  df-pnf 10114  df-mnf 10115  df-xr 10116  df-ltxr 10117  df-le 10118  df-sub 10306  df-neg 10307  df-nn 11059  df-n0 11331  df-z 11416  df-uz 11726  df-fz 12365  df-fzo 12505  df-hash 13158  df-word 13331  df-wlks 26551
This theorem is referenced by:  eupthp1  27194
  Copyright terms: Public domain W3C validator