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

Theorem wlk2v2e 30186
Description: In a graph with two vertices and one edge connecting these two vertices, to go from one vertex to the other and back to the first vertex via the same/only edge is a walk. Notice that 𝐺 is a simple graph (without loops) only if 𝑋𝑌. (Contributed by Alexander van der Vekens, 22-Oct-2017.) (Revised by AV, 8-Jan-2021.)
Hypotheses
Ref Expression
wlk2v2e.i 𝐼 = ⟨“{𝑋, 𝑌}”⟩
wlk2v2e.f 𝐹 = ⟨“00”⟩
wlk2v2e.x 𝑋 ∈ V
wlk2v2e.y 𝑌 ∈ V
wlk2v2e.p 𝑃 = ⟨“𝑋𝑌𝑋”⟩
wlk2v2e.g 𝐺 = ⟨{𝑋, 𝑌}, 𝐼
Assertion
Ref Expression
wlk2v2e 𝐹(Walks‘𝐺)𝑃

Proof of Theorem wlk2v2e
Dummy variable 𝑘 is distinct from all other variables.
StepHypRef Expression
1 wlk2v2e.g . . . . 5 𝐺 = ⟨{𝑋, 𝑌}, 𝐼
2 wlk2v2e.i . . . . . 6 𝐼 = ⟨“{𝑋, 𝑌}”⟩
32opeq2i 4882 . . . . 5 ⟨{𝑋, 𝑌}, 𝐼⟩ = ⟨{𝑋, 𝑌}, ⟨“{𝑋, 𝑌}”⟩⟩
41, 3eqtri 2763 . . . 4 𝐺 = ⟨{𝑋, 𝑌}, ⟨“{𝑋, 𝑌}”⟩⟩
5 wlk2v2e.x . . . . 5 𝑋 ∈ V
6 wlk2v2e.y . . . . 5 𝑌 ∈ V
7 uspgr2v1e2w 29283 . . . . 5 ((𝑋 ∈ V ∧ 𝑌 ∈ V) → ⟨{𝑋, 𝑌}, ⟨“{𝑋, 𝑌}”⟩⟩ ∈ USPGraph)
85, 6, 7mp2an 692 . . . 4 ⟨{𝑋, 𝑌}, ⟨“{𝑋, 𝑌}”⟩⟩ ∈ USPGraph
94, 8eqeltri 2835 . . 3 𝐺 ∈ USPGraph
10 uspgrupgr 29210 . . 3 (𝐺 ∈ USPGraph → 𝐺 ∈ UPGraph)
119, 10ax-mp 5 . 2 𝐺 ∈ UPGraph
12 wlk2v2e.f . . . . 5 𝐹 = ⟨“00”⟩
132, 12wlk2v2elem1 30184 . . . 4 𝐹 ∈ Word dom 𝐼
14 wlk2v2e.p . . . . . . . 8 𝑃 = ⟨“𝑋𝑌𝑋”⟩
155prid1 4767 . . . . . . . . 9 𝑋 ∈ {𝑋, 𝑌}
166prid2 4768 . . . . . . . . 9 𝑌 ∈ {𝑋, 𝑌}
17 s3cl 14915 . . . . . . . . 9 ((𝑋 ∈ {𝑋, 𝑌} ∧ 𝑌 ∈ {𝑋, 𝑌} ∧ 𝑋 ∈ {𝑋, 𝑌}) → ⟨“𝑋𝑌𝑋”⟩ ∈ Word {𝑋, 𝑌})
1815, 16, 15, 17mp3an 1460 . . . . . . . 8 ⟨“𝑋𝑌𝑋”⟩ ∈ Word {𝑋, 𝑌}
1914, 18eqeltri 2835 . . . . . . 7 𝑃 ∈ Word {𝑋, 𝑌}
20 wrdf 14554 . . . . . . 7 (𝑃 ∈ Word {𝑋, 𝑌} → 𝑃:(0..^(♯‘𝑃))⟶{𝑋, 𝑌})
2119, 20ax-mp 5 . . . . . 6 𝑃:(0..^(♯‘𝑃))⟶{𝑋, 𝑌}
2214fveq2i 6910 . . . . . . . . 9 (♯‘𝑃) = (♯‘⟨“𝑋𝑌𝑋”⟩)
23 s3len 14930 . . . . . . . . 9 (♯‘⟨“𝑋𝑌𝑋”⟩) = 3
2422, 23eqtr2i 2764 . . . . . . . 8 3 = (♯‘𝑃)
2524oveq2i 7442 . . . . . . 7 (0..^3) = (0..^(♯‘𝑃))
2625feq2i 6729 . . . . . 6 (𝑃:(0..^3)⟶{𝑋, 𝑌} ↔ 𝑃:(0..^(♯‘𝑃))⟶{𝑋, 𝑌})
2721, 26mpbir 231 . . . . 5 𝑃:(0..^3)⟶{𝑋, 𝑌}
2812fveq2i 6910 . . . . . . . . 9 (♯‘𝐹) = (♯‘⟨“00”⟩)
29 s2len 14925 . . . . . . . . 9 (♯‘⟨“00”⟩) = 2
3028, 29eqtri 2763 . . . . . . . 8 (♯‘𝐹) = 2
3130oveq2i 7442 . . . . . . 7 (0...(♯‘𝐹)) = (0...2)
32 3z 12648 . . . . . . . . 9 3 ∈ ℤ
33 fzoval 13697 . . . . . . . . 9 (3 ∈ ℤ → (0..^3) = (0...(3 − 1)))
3432, 33ax-mp 5 . . . . . . . 8 (0..^3) = (0...(3 − 1))
35 3m1e2 12392 . . . . . . . . 9 (3 − 1) = 2
3635oveq2i 7442 . . . . . . . 8 (0...(3 − 1)) = (0...2)
3734, 36eqtr2i 2764 . . . . . . 7 (0...2) = (0..^3)
3831, 37eqtri 2763 . . . . . 6 (0...(♯‘𝐹)) = (0..^3)
3938feq2i 6729 . . . . 5 (𝑃:(0...(♯‘𝐹))⟶{𝑋, 𝑌} ↔ 𝑃:(0..^3)⟶{𝑋, 𝑌})
4027, 39mpbir 231 . . . 4 𝑃:(0...(♯‘𝐹))⟶{𝑋, 𝑌}
412, 12, 5, 6, 14wlk2v2elem2 30185 . . . 4 𝑘 ∈ (0..^(♯‘𝐹))(𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}
4213, 40, 413pm3.2i 1338 . . 3 (𝐹 ∈ Word dom 𝐼𝑃:(0...(♯‘𝐹))⟶{𝑋, 𝑌} ∧ ∀𝑘 ∈ (0..^(♯‘𝐹))(𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))})
431fveq2i 6910 . . . . 5 (Vtx‘𝐺) = (Vtx‘⟨{𝑋, 𝑌}, 𝐼⟩)
44 prex 5443 . . . . . 6 {𝑋, 𝑌} ∈ V
45 s1cli 14640 . . . . . . 7 ⟨“{𝑋, 𝑌}”⟩ ∈ Word V
462, 45eqeltri 2835 . . . . . 6 𝐼 ∈ Word V
47 opvtxfv 29036 . . . . . 6 (({𝑋, 𝑌} ∈ V ∧ 𝐼 ∈ Word V) → (Vtx‘⟨{𝑋, 𝑌}, 𝐼⟩) = {𝑋, 𝑌})
4844, 46, 47mp2an 692 . . . . 5 (Vtx‘⟨{𝑋, 𝑌}, 𝐼⟩) = {𝑋, 𝑌}
4943, 48eqtr2i 2764 . . . 4 {𝑋, 𝑌} = (Vtx‘𝐺)
501fveq2i 6910 . . . . 5 (iEdg‘𝐺) = (iEdg‘⟨{𝑋, 𝑌}, 𝐼⟩)
51 opiedgfv 29039 . . . . . 6 (({𝑋, 𝑌} ∈ V ∧ 𝐼 ∈ Word V) → (iEdg‘⟨{𝑋, 𝑌}, 𝐼⟩) = 𝐼)
5244, 46, 51mp2an 692 . . . . 5 (iEdg‘⟨{𝑋, 𝑌}, 𝐼⟩) = 𝐼
5350, 52eqtr2i 2764 . . . 4 𝐼 = (iEdg‘𝐺)
5449, 53upgriswlk 29674 . . 3 (𝐺 ∈ UPGraph → (𝐹(Walks‘𝐺)𝑃 ↔ (𝐹 ∈ Word dom 𝐼𝑃:(0...(♯‘𝐹))⟶{𝑋, 𝑌} ∧ ∀𝑘 ∈ (0..^(♯‘𝐹))(𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))})))
5542, 54mpbiri 258 . 2 (𝐺 ∈ UPGraph → 𝐹(Walks‘𝐺)𝑃)
5611, 55ax-mp 5 1 𝐹(Walks‘𝐺)𝑃
Colors of variables: wff setvar class
Syntax hints:  w3a 1086   = wceq 1537  wcel 2106  wral 3059  Vcvv 3478  {cpr 4633  cop 4637   class class class wbr 5148  dom cdm 5689  wf 6559  cfv 6563  (class class class)co 7431  0cc0 11153  1c1 11154   + caddc 11156  cmin 11490  2c2 12319  3c3 12320  cz 12611  ...cfz 13544  ..^cfzo 13691  chash 14366  Word cword 14549  ⟨“cs1 14630  ⟨“cs2 14877  ⟨“cs3 14878  Vtxcvtx 29028  iEdgciedg 29029  UPGraphcupgr 29112  USPGraphcuspgr 29180  Walkscwlks 29629
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 1908  ax-6 1965  ax-7 2005  ax-8 2108  ax-9 2116  ax-10 2139  ax-11 2155  ax-12 2175  ax-ext 2706  ax-rep 5285  ax-sep 5302  ax-nul 5312  ax-pow 5371  ax-pr 5438  ax-un 7754  ax-cnex 11209  ax-resscn 11210  ax-1cn 11211  ax-icn 11212  ax-addcl 11213  ax-addrcl 11214  ax-mulcl 11215  ax-mulrcl 11216  ax-mulcom 11217  ax-addass 11218  ax-mulass 11219  ax-distr 11220  ax-i2m1 11221  ax-1ne0 11222  ax-1rid 11223  ax-rnegex 11224  ax-rrecex 11225  ax-cnre 11226  ax-pre-lttri 11227  ax-pre-lttrn 11228  ax-pre-ltadd 11229  ax-pre-mulgt0 11230
This theorem depends on definitions:  df-bi 207  df-an 396  df-or 848  df-ifp 1063  df-3or 1087  df-3an 1088  df-tru 1540  df-fal 1550  df-ex 1777  df-nf 1781  df-sb 2063  df-mo 2538  df-eu 2567  df-clab 2713  df-cleq 2727  df-clel 2814  df-nfc 2890  df-ne 2939  df-nel 3045  df-ral 3060  df-rex 3069  df-reu 3379  df-rab 3434  df-v 3480  df-sbc 3792  df-csb 3909  df-dif 3966  df-un 3968  df-in 3970  df-ss 3980  df-pss 3983  df-nul 4340  df-if 4532  df-pw 4607  df-sn 4632  df-pr 4634  df-op 4638  df-uni 4913  df-int 4952  df-iun 4998  df-br 5149  df-opab 5211  df-mpt 5232  df-tr 5266  df-id 5583  df-eprel 5589  df-po 5597  df-so 5598  df-fr 5641  df-we 5643  df-xp 5695  df-rel 5696  df-cnv 5697  df-co 5698  df-dm 5699  df-rn 5700  df-res 5701  df-ima 5702  df-pred 6323  df-ord 6389  df-on 6390  df-lim 6391  df-suc 6392  df-iota 6516  df-fun 6565  df-fn 6566  df-f 6567  df-f1 6568  df-fo 6569  df-f1o 6570  df-fv 6571  df-riota 7388  df-ov 7434  df-oprab 7435  df-mpo 7436  df-om 7888  df-1st 8013  df-2nd 8014  df-frecs 8305  df-wrecs 8336  df-recs 8410  df-rdg 8449  df-1o 8505  df-2o 8506  df-oadd 8509  df-er 8744  df-map 8867  df-pm 8868  df-en 8985  df-dom 8986  df-sdom 8987  df-fin 8988  df-dju 9939  df-card 9977  df-pnf 11295  df-mnf 11296  df-xr 11297  df-ltxr 11298  df-le 11299  df-sub 11492  df-neg 11493  df-nn 12265  df-2 12327  df-3 12328  df-n0 12525  df-xnn0 12598  df-z 12612  df-uz 12877  df-fz 13545  df-fzo 13692  df-hash 14367  df-word 14550  df-concat 14606  df-s1 14631  df-s2 14884  df-s3 14885  df-vtx 29030  df-iedg 29031  df-edg 29080  df-uhgr 29090  df-upgr 29114  df-uspgr 29182  df-wlks 29632
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator