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

Theorem upgr2wlk 26766
 Description: Properties of a pair of functions to be a walk of length 2 in a pseudograph. Note that the vertices need not to be distinct and the edges can be loops or multiedges. (Contributed by Alexander van der Vekens, 16-Feb-2018.) (Revised by AV, 3-Jan-2021.) (Revised by AV, 28-Oct-2021.)
Hypotheses
Ref Expression
upgr2wlk.v 𝑉 = (Vtx‘𝐺)
upgr2wlk.i 𝐼 = (iEdg‘𝐺)
Assertion
Ref Expression
upgr2wlk (𝐺 ∈ UPGraph → ((𝐹(Walks‘𝐺)𝑃 ∧ (♯‘𝐹) = 2) ↔ (𝐹:(0..^2)⟶dom 𝐼𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))

Proof of Theorem upgr2wlk
Dummy variable 𝑘 is distinct from all other variables.
StepHypRef Expression
1 upgr2wlk.v . . . 4 𝑉 = (Vtx‘𝐺)
2 upgr2wlk.i . . . 4 𝐼 = (iEdg‘𝐺)
31, 2upgriswlk 26739 . . 3 (𝐺 ∈ UPGraph → (𝐹(Walks‘𝐺)𝑃 ↔ (𝐹 ∈ Word dom 𝐼𝑃:(0...(♯‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(♯‘𝐹))(𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))})))
43anbi1d 743 . 2 (𝐺 ∈ UPGraph → ((𝐹(Walks‘𝐺)𝑃 ∧ (♯‘𝐹) = 2) ↔ ((𝐹 ∈ Word dom 𝐼𝑃:(0...(♯‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(♯‘𝐹))(𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}) ∧ (♯‘𝐹) = 2)))
5 iswrdb 13489 . . . . . . . . 9 (𝐹 ∈ Word dom 𝐼𝐹:(0..^(♯‘𝐹))⟶dom 𝐼)
6 oveq2 6813 . . . . . . . . . 10 ((♯‘𝐹) = 2 → (0..^(♯‘𝐹)) = (0..^2))
76feq2d 6184 . . . . . . . . 9 ((♯‘𝐹) = 2 → (𝐹:(0..^(♯‘𝐹))⟶dom 𝐼𝐹:(0..^2)⟶dom 𝐼))
85, 7syl5bb 272 . . . . . . . 8 ((♯‘𝐹) = 2 → (𝐹 ∈ Word dom 𝐼𝐹:(0..^2)⟶dom 𝐼))
9 oveq2 6813 . . . . . . . . 9 ((♯‘𝐹) = 2 → (0...(♯‘𝐹)) = (0...2))
109feq2d 6184 . . . . . . . 8 ((♯‘𝐹) = 2 → (𝑃:(0...(♯‘𝐹))⟶𝑉𝑃:(0...2)⟶𝑉))
11 fzo0to2pr 12739 . . . . . . . . . . 11 (0..^2) = {0, 1}
126, 11syl6eq 2802 . . . . . . . . . 10 ((♯‘𝐹) = 2 → (0..^(♯‘𝐹)) = {0, 1})
1312raleqdv 3275 . . . . . . . . 9 ((♯‘𝐹) = 2 → (∀𝑘 ∈ (0..^(♯‘𝐹))(𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))} ↔ ∀𝑘 ∈ {0, 1} (𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}))
14 2wlklem 26765 . . . . . . . . 9 (∀𝑘 ∈ {0, 1} (𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))} ↔ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))
1513, 14syl6bb 276 . . . . . . . 8 ((♯‘𝐹) = 2 → (∀𝑘 ∈ (0..^(♯‘𝐹))(𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))} ↔ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)})))
168, 10, 153anbi123d 1540 . . . . . . 7 ((♯‘𝐹) = 2 → ((𝐹 ∈ Word dom 𝐼𝑃:(0...(♯‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(♯‘𝐹))(𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}) ↔ (𝐹:(0..^2)⟶dom 𝐼𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))
1716adantl 473 . . . . . 6 ((𝐺 ∈ UPGraph ∧ (♯‘𝐹) = 2) → ((𝐹 ∈ Word dom 𝐼𝑃:(0...(♯‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(♯‘𝐹))(𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}) ↔ (𝐹:(0..^2)⟶dom 𝐼𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))
18 3anass 1081 . . . . . 6 ((𝐹:(0..^2)⟶dom 𝐼𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)})) ↔ (𝐹:(0..^2)⟶dom 𝐼 ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))
1917, 18syl6bb 276 . . . . 5 ((𝐺 ∈ UPGraph ∧ (♯‘𝐹) = 2) → ((𝐹 ∈ Word dom 𝐼𝑃:(0...(♯‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(♯‘𝐹))(𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}) ↔ (𝐹:(0..^2)⟶dom 𝐼 ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)})))))
2019ex 449 . . . 4 (𝐺 ∈ UPGraph → ((♯‘𝐹) = 2 → ((𝐹 ∈ Word dom 𝐼𝑃:(0...(♯‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(♯‘𝐹))(𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}) ↔ (𝐹:(0..^2)⟶dom 𝐼 ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))))
2120pm5.32rd 675 . . 3 (𝐺 ∈ UPGraph → (((𝐹 ∈ Word dom 𝐼𝑃:(0...(♯‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(♯‘𝐹))(𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}) ∧ (♯‘𝐹) = 2) ↔ ((𝐹:(0..^2)⟶dom 𝐼 ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))) ∧ (♯‘𝐹) = 2)))
22 3anass 1081 . . . 4 (((𝐹:(0..^2)⟶dom 𝐼 ∧ (♯‘𝐹) = 2) ∧ 𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)})) ↔ ((𝐹:(0..^2)⟶dom 𝐼 ∧ (♯‘𝐹) = 2) ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))
23 an32 874 . . . 4 (((𝐹:(0..^2)⟶dom 𝐼 ∧ (♯‘𝐹) = 2) ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))) ↔ ((𝐹:(0..^2)⟶dom 𝐼 ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))) ∧ (♯‘𝐹) = 2))
2422, 23bitri 264 . . 3 (((𝐹:(0..^2)⟶dom 𝐼 ∧ (♯‘𝐹) = 2) ∧ 𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)})) ↔ ((𝐹:(0..^2)⟶dom 𝐼 ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))) ∧ (♯‘𝐹) = 2))
2521, 24syl6bbr 278 . 2 (𝐺 ∈ UPGraph → (((𝐹 ∈ Word dom 𝐼𝑃:(0...(♯‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(♯‘𝐹))(𝐼‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}) ∧ (♯‘𝐹) = 2) ↔ ((𝐹:(0..^2)⟶dom 𝐼 ∧ (♯‘𝐹) = 2) ∧ 𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))
26 2nn0 11493 . . . . . . 7 2 ∈ ℕ0
27 fnfzo0hash 13418 . . . . . . 7 ((2 ∈ ℕ0𝐹:(0..^2)⟶dom 𝐼) → (♯‘𝐹) = 2)
2826, 27mpan 708 . . . . . 6 (𝐹:(0..^2)⟶dom 𝐼 → (♯‘𝐹) = 2)
2928pm4.71i 667 . . . . 5 (𝐹:(0..^2)⟶dom 𝐼 ↔ (𝐹:(0..^2)⟶dom 𝐼 ∧ (♯‘𝐹) = 2))
3029bicomi 214 . . . 4 ((𝐹:(0..^2)⟶dom 𝐼 ∧ (♯‘𝐹) = 2) ↔ 𝐹:(0..^2)⟶dom 𝐼)
3130a1i 11 . . 3 (𝐺 ∈ UPGraph → ((𝐹:(0..^2)⟶dom 𝐼 ∧ (♯‘𝐹) = 2) ↔ 𝐹:(0..^2)⟶dom 𝐼))
32313anbi1d 1544 . 2 (𝐺 ∈ UPGraph → (((𝐹:(0..^2)⟶dom 𝐼 ∧ (♯‘𝐹) = 2) ∧ 𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)})) ↔ (𝐹:(0..^2)⟶dom 𝐼𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))
334, 25, 323bitrd 294 1 (𝐺 ∈ UPGraph → ((𝐹(Walks‘𝐺)𝑃 ∧ (♯‘𝐹) = 2) ↔ (𝐹:(0..^2)⟶dom 𝐼𝑃:(0...2)⟶𝑉 ∧ ((𝐼‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐼‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ↔ wb 196   ∧ wa 383   ∧ w3a 1072   = wceq 1624   ∈ wcel 2131  ∀wral 3042  {cpr 4315   class class class wbr 4796  dom cdm 5258  ⟶wf 6037  ‘cfv 6041  (class class class)co 6805  0cc0 10120  1c1 10121   + caddc 10123  2c2 11254  ℕ0cn0 11476  ...cfz 12511  ..^cfzo 12651  ♯chash 13303  Word cword 13469  Vtxcvtx 26065  iEdgciedg 26066  UPGraphcupgr 26166  Walkscwlks 26694 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1863  ax-4 1878  ax-5 1980  ax-6 2046  ax-7 2082  ax-8 2133  ax-9 2140  ax-10 2160  ax-11 2175  ax-12 2188  ax-13 2383  ax-ext 2732  ax-rep 4915  ax-sep 4925  ax-nul 4933  ax-pow 4984  ax-pr 5047  ax-un 7106  ax-cnex 10176  ax-resscn 10177  ax-1cn 10178  ax-icn 10179  ax-addcl 10180  ax-addrcl 10181  ax-mulcl 10182  ax-mulrcl 10183  ax-mulcom 10184  ax-addass 10185  ax-mulass 10186  ax-distr 10187  ax-i2m1 10188  ax-1ne0 10189  ax-1rid 10190  ax-rnegex 10191  ax-rrecex 10192  ax-cnre 10193  ax-pre-lttri 10194  ax-pre-lttrn 10195  ax-pre-ltadd 10196  ax-pre-mulgt0 10197 This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-ifp 1051  df-3or 1073  df-3an 1074  df-tru 1627  df-ex 1846  df-nf 1851  df-sb 2039  df-eu 2603  df-mo 2604  df-clab 2739  df-cleq 2745  df-clel 2748  df-nfc 2883  df-ne 2925  df-nel 3028  df-ral 3047  df-rex 3048  df-reu 3049  df-rmo 3050  df-rab 3051  df-v 3334  df-sbc 3569  df-csb 3667  df-dif 3710  df-un 3712  df-in 3714  df-ss 3721  df-pss 3723  df-nul 4051  df-if 4223  df-pw 4296  df-sn 4314  df-pr 4316  df-tp 4318  df-op 4320  df-uni 4581  df-int 4620  df-iun 4666  df-br 4797  df-opab 4857  df-mpt 4874  df-tr 4897  df-id 5166  df-eprel 5171  df-po 5179  df-so 5180  df-fr 5217  df-we 5219  df-xp 5264  df-rel 5265  df-cnv 5266  df-co 5267  df-dm 5268  df-rn 5269  df-res 5270  df-ima 5271  df-pred 5833  df-ord 5879  df-on 5880  df-lim 5881  df-suc 5882  df-iota 6004  df-fun 6043  df-fn 6044  df-f 6045  df-f1 6046  df-fo 6047  df-f1o 6048  df-fv 6049  df-riota 6766  df-ov 6808  df-oprab 6809  df-mpt2 6810  df-om 7223  df-1st 7325  df-2nd 7326  df-wrecs 7568  df-recs 7629  df-rdg 7667  df-1o 7721  df-2o 7722  df-oadd 7725  df-er 7903  df-map 8017  df-pm 8018  df-en 8114  df-dom 8115  df-sdom 8116  df-fin 8117  df-card 8947  df-cda 9174  df-pnf 10260  df-mnf 10261  df-xr 10262  df-ltxr 10263  df-le 10264  df-sub 10452  df-neg 10453  df-nn 11205  df-2 11263  df-n0 11477  df-xnn0 11548  df-z 11562  df-uz 11872  df-fz 12512  df-fzo 12652  df-hash 13304  df-word 13477  df-edg 26131  df-uhgr 26144  df-upgr 26168  df-wlks 26697 This theorem is referenced by:  umgrwwlks2on  27070
 Copyright terms: Public domain W3C validator