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

Theorem elwwlks2 26745
Description: A walk of length 2 between two vertices as length 3 string in a pseudograph. (Contributed by Alexander van der Vekens, 21-Feb-2018.) (Revised by AV, 17-May-2021.)
Hypothesis
Ref Expression
elwwlks2.v 𝑉 = (Vtx‘𝐺)
Assertion
Ref Expression
elwwlks2 (𝐺 ∈ UPGraph → (𝑊 ∈ (2 WWalksN 𝐺) ↔ ∃𝑎𝑉𝑏𝑉𝑐𝑉 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓𝑝(𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))))))
Distinct variable groups:   𝐺,𝑎,𝑏,𝑐,𝑓,𝑝   𝑉,𝑎,𝑏,𝑐,𝑓,𝑝   𝑊,𝑎,𝑏,𝑐,𝑓,𝑝

Proof of Theorem elwwlks2
StepHypRef Expression
1 2nn0 11261 . . 3 2 ∈ ℕ0
2 elwwlks2.v . . . 4 𝑉 = (Vtx‘𝐺)
32wwlksnwwlksnon 26696 . . 3 ((2 ∈ ℕ0𝐺 ∈ UPGraph ) → (𝑊 ∈ (2 WWalksN 𝐺) ↔ ∃𝑎𝑉𝑐𝑉 𝑊 ∈ (𝑎(2 WWalksNOn 𝐺)𝑐)))
41, 3mpan 705 . 2 (𝐺 ∈ UPGraph → (𝑊 ∈ (2 WWalksN 𝐺) ↔ ∃𝑎𝑉𝑐𝑉 𝑊 ∈ (𝑎(2 WWalksNOn 𝐺)𝑐)))
52elwwlks2on 26737 . . . 4 ((𝐺 ∈ UPGraph ∧ 𝑎𝑉𝑐𝑉) → (𝑊 ∈ (𝑎(2 WWalksNOn 𝐺)𝑐) ↔ ∃𝑏𝑉 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓(𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2))))
653expb 1263 . . 3 ((𝐺 ∈ UPGraph ∧ (𝑎𝑉𝑐𝑉)) → (𝑊 ∈ (𝑎(2 WWalksNOn 𝐺)𝑐) ↔ ∃𝑏𝑉 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓(𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2))))
762rexbidva 3050 . 2 (𝐺 ∈ UPGraph → (∃𝑎𝑉𝑐𝑉 𝑊 ∈ (𝑎(2 WWalksNOn 𝐺)𝑐) ↔ ∃𝑎𝑉𝑐𝑉𝑏𝑉 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓(𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2))))
8 rexcom 3092 . . . 4 (∃𝑐𝑉𝑏𝑉 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓(𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)) ↔ ∃𝑏𝑉𝑐𝑉 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓(𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)))
9 s3cli 13570 . . . . . . . . . 10 ⟨“𝑎𝑏𝑐”⟩ ∈ Word V
109a1i 11 . . . . . . . . 9 ((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → ⟨“𝑎𝑏𝑐”⟩ ∈ Word V)
11 simplr 791 . . . . . . . . . . . . . . . . 17 (((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) ∧ 𝑝 = ⟨“𝑎𝑏𝑐”⟩) → 𝑊 = ⟨“𝑎𝑏𝑐”⟩)
12 simpr 477 . . . . . . . . . . . . . . . . 17 (((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) ∧ 𝑝 = ⟨“𝑎𝑏𝑐”⟩) → 𝑝 = ⟨“𝑎𝑏𝑐”⟩)
1311, 12eqtr4d 2658 . . . . . . . . . . . . . . . 16 (((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) ∧ 𝑝 = ⟨“𝑎𝑏𝑐”⟩) → 𝑊 = 𝑝)
1413breq2d 4630 . . . . . . . . . . . . . . 15 (((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) ∧ 𝑝 = ⟨“𝑎𝑏𝑐”⟩) → (𝑓(Walks‘𝐺)𝑊𝑓(Walks‘𝐺)𝑝))
1514biimpd 219 . . . . . . . . . . . . . 14 (((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) ∧ 𝑝 = ⟨“𝑎𝑏𝑐”⟩) → (𝑓(Walks‘𝐺)𝑊𝑓(Walks‘𝐺)𝑝))
1615com12 32 . . . . . . . . . . . . 13 (𝑓(Walks‘𝐺)𝑊 → (((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) ∧ 𝑝 = ⟨“𝑎𝑏𝑐”⟩) → 𝑓(Walks‘𝐺)𝑝))
1716adantr 481 . . . . . . . . . . . 12 ((𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2) → (((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) ∧ 𝑝 = ⟨“𝑎𝑏𝑐”⟩) → 𝑓(Walks‘𝐺)𝑝))
1817impcom 446 . . . . . . . . . . 11 ((((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) ∧ 𝑝 = ⟨“𝑎𝑏𝑐”⟩) ∧ (𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)) → 𝑓(Walks‘𝐺)𝑝)
19 simprr 795 . . . . . . . . . . 11 ((((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) ∧ 𝑝 = ⟨“𝑎𝑏𝑐”⟩) ∧ (𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)) → (#‘𝑓) = 2)
20 vex 3192 . . . . . . . . . . . . . . . 16 𝑎 ∈ V
21 s3fv0 13580 . . . . . . . . . . . . . . . . 17 (𝑎 ∈ V → (⟨“𝑎𝑏𝑐”⟩‘0) = 𝑎)
2221eqcomd 2627 . . . . . . . . . . . . . . . 16 (𝑎 ∈ V → 𝑎 = (⟨“𝑎𝑏𝑐”⟩‘0))
2320, 22mp1i 13 . . . . . . . . . . . . . . 15 (𝑝 = ⟨“𝑎𝑏𝑐”⟩ → 𝑎 = (⟨“𝑎𝑏𝑐”⟩‘0))
24 fveq1 6152 . . . . . . . . . . . . . . 15 (𝑝 = ⟨“𝑎𝑏𝑐”⟩ → (𝑝‘0) = (⟨“𝑎𝑏𝑐”⟩‘0))
2523, 24eqtr4d 2658 . . . . . . . . . . . . . 14 (𝑝 = ⟨“𝑎𝑏𝑐”⟩ → 𝑎 = (𝑝‘0))
26 vex 3192 . . . . . . . . . . . . . . . 16 𝑏 ∈ V
27 s3fv1 13581 . . . . . . . . . . . . . . . . 17 (𝑏 ∈ V → (⟨“𝑎𝑏𝑐”⟩‘1) = 𝑏)
2827eqcomd 2627 . . . . . . . . . . . . . . . 16 (𝑏 ∈ V → 𝑏 = (⟨“𝑎𝑏𝑐”⟩‘1))
2926, 28mp1i 13 . . . . . . . . . . . . . . 15 (𝑝 = ⟨“𝑎𝑏𝑐”⟩ → 𝑏 = (⟨“𝑎𝑏𝑐”⟩‘1))
30 fveq1 6152 . . . . . . . . . . . . . . 15 (𝑝 = ⟨“𝑎𝑏𝑐”⟩ → (𝑝‘1) = (⟨“𝑎𝑏𝑐”⟩‘1))
3129, 30eqtr4d 2658 . . . . . . . . . . . . . 14 (𝑝 = ⟨“𝑎𝑏𝑐”⟩ → 𝑏 = (𝑝‘1))
32 vex 3192 . . . . . . . . . . . . . . . 16 𝑐 ∈ V
33 s3fv2 13582 . . . . . . . . . . . . . . . . 17 (𝑐 ∈ V → (⟨“𝑎𝑏𝑐”⟩‘2) = 𝑐)
3433eqcomd 2627 . . . . . . . . . . . . . . . 16 (𝑐 ∈ V → 𝑐 = (⟨“𝑎𝑏𝑐”⟩‘2))
3532, 34mp1i 13 . . . . . . . . . . . . . . 15 (𝑝 = ⟨“𝑎𝑏𝑐”⟩ → 𝑐 = (⟨“𝑎𝑏𝑐”⟩‘2))
36 fveq1 6152 . . . . . . . . . . . . . . 15 (𝑝 = ⟨“𝑎𝑏𝑐”⟩ → (𝑝‘2) = (⟨“𝑎𝑏𝑐”⟩‘2))
3735, 36eqtr4d 2658 . . . . . . . . . . . . . 14 (𝑝 = ⟨“𝑎𝑏𝑐”⟩ → 𝑐 = (𝑝‘2))
3825, 31, 373jca 1240 . . . . . . . . . . . . 13 (𝑝 = ⟨“𝑎𝑏𝑐”⟩ → (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2)))
3938adantl 482 . . . . . . . . . . . 12 (((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) ∧ 𝑝 = ⟨“𝑎𝑏𝑐”⟩) → (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2)))
4039adantr 481 . . . . . . . . . . 11 ((((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) ∧ 𝑝 = ⟨“𝑎𝑏𝑐”⟩) ∧ (𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)) → (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2)))
4118, 19, 403jca 1240 . . . . . . . . . 10 ((((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) ∧ 𝑝 = ⟨“𝑎𝑏𝑐”⟩) ∧ (𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)) → (𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))))
4241ex 450 . . . . . . . . 9 (((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) ∧ 𝑝 = ⟨“𝑎𝑏𝑐”⟩) → ((𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2) → (𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2)))))
4310, 42spcimedv 3281 . . . . . . . 8 ((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → ((𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2) → ∃𝑝(𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2)))))
44 wlklenvp1 26401 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑓(Walks‘𝐺)𝑝 → (#‘𝑝) = ((#‘𝑓) + 1))
45 simpl 473 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((#‘𝑝) = ((#‘𝑓) + 1) ∧ (#‘𝑓) = 2) → (#‘𝑝) = ((#‘𝑓) + 1))
46 oveq1 6617 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((#‘𝑓) = 2 → ((#‘𝑓) + 1) = (2 + 1))
4746adantl 482 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((#‘𝑝) = ((#‘𝑓) + 1) ∧ (#‘𝑓) = 2) → ((#‘𝑓) + 1) = (2 + 1))
4845, 47eqtrd 2655 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((#‘𝑝) = ((#‘𝑓) + 1) ∧ (#‘𝑓) = 2) → (#‘𝑝) = (2 + 1))
4948adantl 482 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((𝑓(Walks‘𝐺)𝑝 ∧ ((#‘𝑝) = ((#‘𝑓) + 1) ∧ (#‘𝑓) = 2)) → (#‘𝑝) = (2 + 1))
50 2p1e3 11103 . . . . . . . . . . . . . . . . . . . . . . . . 25 (2 + 1) = 3
5149, 50syl6eq 2671 . . . . . . . . . . . . . . . . . . . . . . . 24 ((𝑓(Walks‘𝐺)𝑝 ∧ ((#‘𝑝) = ((#‘𝑓) + 1) ∧ (#‘𝑓) = 2)) → (#‘𝑝) = 3)
5251exp32 630 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑓(Walks‘𝐺)𝑝 → ((#‘𝑝) = ((#‘𝑓) + 1) → ((#‘𝑓) = 2 → (#‘𝑝) = 3)))
5344, 52mpd 15 . . . . . . . . . . . . . . . . . . . . . 22 (𝑓(Walks‘𝐺)𝑝 → ((#‘𝑓) = 2 → (#‘𝑝) = 3))
5453adantr 481 . . . . . . . . . . . . . . . . . . . . 21 ((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) → ((#‘𝑓) = 2 → (#‘𝑝) = 3))
5554imp 445 . . . . . . . . . . . . . . . . . . . 20 (((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) ∧ (#‘𝑓) = 2) → (#‘𝑝) = 3)
56 eqcom 2628 . . . . . . . . . . . . . . . . . . . . . 22 (𝑎 = (𝑝‘0) ↔ (𝑝‘0) = 𝑎)
5756biimpi 206 . . . . . . . . . . . . . . . . . . . . 21 (𝑎 = (𝑝‘0) → (𝑝‘0) = 𝑎)
58 eqcom 2628 . . . . . . . . . . . . . . . . . . . . . 22 (𝑏 = (𝑝‘1) ↔ (𝑝‘1) = 𝑏)
5958biimpi 206 . . . . . . . . . . . . . . . . . . . . 21 (𝑏 = (𝑝‘1) → (𝑝‘1) = 𝑏)
60 eqcom 2628 . . . . . . . . . . . . . . . . . . . . . 22 (𝑐 = (𝑝‘2) ↔ (𝑝‘2) = 𝑐)
6160biimpi 206 . . . . . . . . . . . . . . . . . . . . 21 (𝑐 = (𝑝‘2) → (𝑝‘2) = 𝑐)
6257, 59, 613anim123i 1245 . . . . . . . . . . . . . . . . . . . 20 ((𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2)) → ((𝑝‘0) = 𝑎 ∧ (𝑝‘1) = 𝑏 ∧ (𝑝‘2) = 𝑐))
6355, 62anim12i 589 . . . . . . . . . . . . . . . . . . 19 ((((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) ∧ (#‘𝑓) = 2) ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))) → ((#‘𝑝) = 3 ∧ ((𝑝‘0) = 𝑎 ∧ (𝑝‘1) = 𝑏 ∧ (𝑝‘2) = 𝑐)))
642wlkpwrd 26400 . . . . . . . . . . . . . . . . . . . . . 22 (𝑓(Walks‘𝐺)𝑝𝑝 ∈ Word 𝑉)
65 simpr 477 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((𝐺 ∈ UPGraph ∧ 𝑎𝑉) → 𝑎𝑉)
6665anim1i 591 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) → (𝑎𝑉 ∧ (𝑏𝑉𝑐𝑉)))
67 3anass 1040 . . . . . . . . . . . . . . . . . . . . . . . 24 ((𝑎𝑉𝑏𝑉𝑐𝑉) ↔ (𝑎𝑉 ∧ (𝑏𝑉𝑐𝑉)))
6866, 67sylibr 224 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) → (𝑎𝑉𝑏𝑉𝑐𝑉))
6968adantr 481 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → (𝑎𝑉𝑏𝑉𝑐𝑉))
7064, 69anim12i 589 . . . . . . . . . . . . . . . . . . . . 21 ((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) → (𝑝 ∈ Word 𝑉 ∧ (𝑎𝑉𝑏𝑉𝑐𝑉)))
7170ad2antrr 761 . . . . . . . . . . . . . . . . . . . 20 ((((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) ∧ (#‘𝑓) = 2) ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))) → (𝑝 ∈ Word 𝑉 ∧ (𝑎𝑉𝑏𝑉𝑐𝑉)))
72 eqwrds3 13646 . . . . . . . . . . . . . . . . . . . 20 ((𝑝 ∈ Word 𝑉 ∧ (𝑎𝑉𝑏𝑉𝑐𝑉)) → (𝑝 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑝) = 3 ∧ ((𝑝‘0) = 𝑎 ∧ (𝑝‘1) = 𝑏 ∧ (𝑝‘2) = 𝑐))))
7371, 72syl 17 . . . . . . . . . . . . . . . . . . 19 ((((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) ∧ (#‘𝑓) = 2) ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))) → (𝑝 = ⟨“𝑎𝑏𝑐”⟩ ↔ ((#‘𝑝) = 3 ∧ ((𝑝‘0) = 𝑎 ∧ (𝑝‘1) = 𝑏 ∧ (𝑝‘2) = 𝑐))))
7463, 73mpbird 247 . . . . . . . . . . . . . . . . . 18 ((((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) ∧ (#‘𝑓) = 2) ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))) → 𝑝 = ⟨“𝑎𝑏𝑐”⟩)
75 simprr 795 . . . . . . . . . . . . . . . . . . 19 ((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) → 𝑊 = ⟨“𝑎𝑏𝑐”⟩)
7675ad2antrr 761 . . . . . . . . . . . . . . . . . 18 ((((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) ∧ (#‘𝑓) = 2) ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))) → 𝑊 = ⟨“𝑎𝑏𝑐”⟩)
7774, 76eqtr4d 2658 . . . . . . . . . . . . . . . . 17 ((((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) ∧ (#‘𝑓) = 2) ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))) → 𝑝 = 𝑊)
7877breq2d 4630 . . . . . . . . . . . . . . . 16 ((((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) ∧ (#‘𝑓) = 2) ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))) → (𝑓(Walks‘𝐺)𝑝𝑓(Walks‘𝐺)𝑊))
7978biimpd 219 . . . . . . . . . . . . . . 15 ((((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) ∧ (#‘𝑓) = 2) ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))) → (𝑓(Walks‘𝐺)𝑝𝑓(Walks‘𝐺)𝑊))
80 simplr 791 . . . . . . . . . . . . . . 15 ((((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) ∧ (#‘𝑓) = 2) ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))) → (#‘𝑓) = 2)
8179, 80jctird 566 . . . . . . . . . . . . . 14 ((((𝑓(Walks‘𝐺)𝑝 ∧ (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩)) ∧ (#‘𝑓) = 2) ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))) → (𝑓(Walks‘𝐺)𝑝 → (𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)))
8281exp41 637 . . . . . . . . . . . . 13 (𝑓(Walks‘𝐺)𝑝 → ((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → ((#‘𝑓) = 2 → ((𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2)) → (𝑓(Walks‘𝐺)𝑝 → (𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2))))))
8382com25 99 . . . . . . . . . . . 12 (𝑓(Walks‘𝐺)𝑝 → (𝑓(Walks‘𝐺)𝑝 → ((#‘𝑓) = 2 → ((𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2)) → ((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → (𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2))))))
8483pm2.43i 52 . . . . . . . . . . 11 (𝑓(Walks‘𝐺)𝑝 → ((#‘𝑓) = 2 → ((𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2)) → ((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → (𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)))))
85843imp 1254 . . . . . . . . . 10 ((𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))) → ((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → (𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)))
8685com12 32 . . . . . . . . 9 ((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → ((𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))) → (𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)))
8786exlimdv 1858 . . . . . . . 8 ((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → (∃𝑝(𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))) → (𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)))
8843, 87impbid 202 . . . . . . 7 ((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → ((𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2) ↔ ∃𝑝(𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2)))))
8988exbidv 1847 . . . . . 6 ((((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) ∧ 𝑊 = ⟨“𝑎𝑏𝑐”⟩) → (∃𝑓(𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2) ↔ ∃𝑓𝑝(𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2)))))
9089pm5.32da 672 . . . . 5 (((𝐺 ∈ UPGraph ∧ 𝑎𝑉) ∧ (𝑏𝑉𝑐𝑉)) → ((𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓(𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)) ↔ (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓𝑝(𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))))))
91902rexbidva 3050 . . . 4 ((𝐺 ∈ UPGraph ∧ 𝑎𝑉) → (∃𝑏𝑉𝑐𝑉 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓(𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)) ↔ ∃𝑏𝑉𝑐𝑉 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓𝑝(𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))))))
928, 91syl5bb 272 . . 3 ((𝐺 ∈ UPGraph ∧ 𝑎𝑉) → (∃𝑐𝑉𝑏𝑉 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓(𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)) ↔ ∃𝑏𝑉𝑐𝑉 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓𝑝(𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))))))
9392rexbidva 3043 . 2 (𝐺 ∈ UPGraph → (∃𝑎𝑉𝑐𝑉𝑏𝑉 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓(𝑓(Walks‘𝐺)𝑊 ∧ (#‘𝑓) = 2)) ↔ ∃𝑎𝑉𝑏𝑉𝑐𝑉 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓𝑝(𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))))))
944, 7, 933bitrd 294 1 (𝐺 ∈ UPGraph → (𝑊 ∈ (2 WWalksN 𝐺) ↔ ∃𝑎𝑉𝑏𝑉𝑐𝑉 (𝑊 = ⟨“𝑎𝑏𝑐”⟩ ∧ ∃𝑓𝑝(𝑓(Walks‘𝐺)𝑝 ∧ (#‘𝑓) = 2 ∧ (𝑎 = (𝑝‘0) ∧ 𝑏 = (𝑝‘1) ∧ 𝑐 = (𝑝‘2))))))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 384  w3a 1036   = wceq 1480  wex 1701  wcel 1987  wrex 2908  Vcvv 3189   class class class wbr 4618  cfv 5852  (class class class)co 6610  0cc0 9888  1c1 9889   + caddc 9891  2c2 11022  3c3 11023  0cn0 11244  #chash 13065  Word cword 13238  ⟨“cs3 13532  Vtxcvtx 25791   UPGraph cupgr 25888  Walkscwlks 26379   WWalksN cwwlksn 26604   WWalksNOn cwwlksnon 26605
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-rep 4736  ax-sep 4746  ax-nul 4754  ax-pow 4808  ax-pr 4872  ax-un 6909  ax-ac2 9237  ax-cnex 9944  ax-resscn 9945  ax-1cn 9946  ax-icn 9947  ax-addcl 9948  ax-addrcl 9949  ax-mulcl 9950  ax-mulrcl 9951  ax-mulcom 9952  ax-addass 9953  ax-mulass 9954  ax-distr 9955  ax-i2m1 9956  ax-1ne0 9957  ax-1rid 9958  ax-rnegex 9959  ax-rrecex 9960  ax-cnre 9961  ax-pre-lttri 9962  ax-pre-lttrn 9963  ax-pre-ltadd 9964  ax-pre-mulgt0 9965
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-ifp 1012  df-3or 1037  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-nel 2894  df-ral 2912  df-rex 2913  df-reu 2914  df-rmo 2915  df-rab 2916  df-v 3191  df-sbc 3422  df-csb 3519  df-dif 3562  df-un 3564  df-in 3566  df-ss 3573  df-pss 3575  df-nul 3897  df-if 4064  df-pw 4137  df-sn 4154  df-pr 4156  df-tp 4158  df-op 4160  df-uni 4408  df-int 4446  df-iun 4492  df-br 4619  df-opab 4679  df-mpt 4680  df-tr 4718  df-eprel 4990  df-id 4994  df-po 5000  df-so 5001  df-fr 5038  df-se 5039  df-we 5040  df-xp 5085  df-rel 5086  df-cnv 5087  df-co 5088  df-dm 5089  df-rn 5090  df-res 5091  df-ima 5092  df-pred 5644  df-ord 5690  df-on 5691  df-lim 5692  df-suc 5693  df-iota 5815  df-fun 5854  df-fn 5855  df-f 5856  df-f1 5857  df-fo 5858  df-f1o 5859  df-fv 5860  df-isom 5861  df-riota 6571  df-ov 6613  df-oprab 6614  df-mpt2 6615  df-om 7020  df-1st 7120  df-2nd 7121  df-wrecs 7359  df-recs 7420  df-rdg 7458  df-1o 7512  df-2o 7513  df-oadd 7516  df-er 7694  df-map 7811  df-pm 7812  df-en 7908  df-dom 7909  df-sdom 7910  df-fin 7911  df-card 8717  df-ac 8891  df-cda 8942  df-pnf 10028  df-mnf 10029  df-xr 10030  df-ltxr 10031  df-le 10032  df-sub 10220  df-neg 10221  df-nn 10973  df-2 11031  df-3 11032  df-n0 11245  df-xnn0 11316  df-z 11330  df-uz 11640  df-fz 12277  df-fzo 12415  df-hash 13066  df-word 13246  df-concat 13248  df-s1 13249  df-s2 13538  df-s3 13539  df-edg 25857  df-uhgr 25866  df-upgr 25890  df-wlks 26382  df-wwlks 26608  df-wwlksn 26609  df-wwlksnon 26610
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator