Metamath Proof Explorer


Theorem 3wlkond

Description: A walk of length 3 from one vertex to another, different vertex via a third vertex. (Contributed by AV, 8-Feb-2021) (Revised by AV, 24-Mar-2021)

Ref Expression
Hypotheses 3wlkd.p 𝑃 = ⟨“ 𝐴 𝐵 𝐶 𝐷 ”⟩
3wlkd.f 𝐹 = ⟨“ 𝐽 𝐾 𝐿 ”⟩
3wlkd.s ( 𝜑 → ( ( 𝐴𝑉𝐵𝑉 ) ∧ ( 𝐶𝑉𝐷𝑉 ) ) )
3wlkd.n ( 𝜑 → ( ( 𝐴𝐵𝐴𝐶 ) ∧ ( 𝐵𝐶𝐵𝐷 ) ∧ 𝐶𝐷 ) )
3wlkd.e ( 𝜑 → ( { 𝐴 , 𝐵 } ⊆ ( 𝐼𝐽 ) ∧ { 𝐵 , 𝐶 } ⊆ ( 𝐼𝐾 ) ∧ { 𝐶 , 𝐷 } ⊆ ( 𝐼𝐿 ) ) )
3wlkd.v 𝑉 = ( Vtx ‘ 𝐺 )
3wlkd.i 𝐼 = ( iEdg ‘ 𝐺 )
Assertion 3wlkond ( 𝜑𝐹 ( 𝐴 ( WalksOn ‘ 𝐺 ) 𝐷 ) 𝑃 )

Proof

Step Hyp Ref Expression
1 3wlkd.p 𝑃 = ⟨“ 𝐴 𝐵 𝐶 𝐷 ”⟩
2 3wlkd.f 𝐹 = ⟨“ 𝐽 𝐾 𝐿 ”⟩
3 3wlkd.s ( 𝜑 → ( ( 𝐴𝑉𝐵𝑉 ) ∧ ( 𝐶𝑉𝐷𝑉 ) ) )
4 3wlkd.n ( 𝜑 → ( ( 𝐴𝐵𝐴𝐶 ) ∧ ( 𝐵𝐶𝐵𝐷 ) ∧ 𝐶𝐷 ) )
5 3wlkd.e ( 𝜑 → ( { 𝐴 , 𝐵 } ⊆ ( 𝐼𝐽 ) ∧ { 𝐵 , 𝐶 } ⊆ ( 𝐼𝐾 ) ∧ { 𝐶 , 𝐷 } ⊆ ( 𝐼𝐿 ) ) )
6 3wlkd.v 𝑉 = ( Vtx ‘ 𝐺 )
7 3wlkd.i 𝐼 = ( iEdg ‘ 𝐺 )
8 1 2 3 4 5 6 7 3wlkd ( 𝜑𝐹 ( Walks ‘ 𝐺 ) 𝑃 )
9 8 wlkonwlk1l ( 𝜑𝐹 ( ( 𝑃 ‘ 0 ) ( WalksOn ‘ 𝐺 ) ( lastS ‘ 𝑃 ) ) 𝑃 )
10 1 2 3 3wlkdlem3 ( 𝜑 → ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ) ∧ ( ( 𝑃 ‘ 2 ) = 𝐶 ∧ ( 𝑃 ‘ 3 ) = 𝐷 ) ) )
11 simpll ( ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ) ∧ ( ( 𝑃 ‘ 2 ) = 𝐶 ∧ ( 𝑃 ‘ 3 ) = 𝐷 ) ) → ( 𝑃 ‘ 0 ) = 𝐴 )
12 11 eqcomd ( ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ) ∧ ( ( 𝑃 ‘ 2 ) = 𝐶 ∧ ( 𝑃 ‘ 3 ) = 𝐷 ) ) → 𝐴 = ( 𝑃 ‘ 0 ) )
13 10 12 syl ( 𝜑𝐴 = ( 𝑃 ‘ 0 ) )
14 1 fveq2i ( lastS ‘ 𝑃 ) = ( lastS ‘ ⟨“ 𝐴 𝐵 𝐶 𝐷 ”⟩ )
15 fvex ( 𝑃 ‘ 3 ) ∈ V
16 eleq1 ( ( 𝑃 ‘ 3 ) = 𝐷 → ( ( 𝑃 ‘ 3 ) ∈ V ↔ 𝐷 ∈ V ) )
17 15 16 mpbii ( ( 𝑃 ‘ 3 ) = 𝐷𝐷 ∈ V )
18 lsws4 ( 𝐷 ∈ V → ( lastS ‘ ⟨“ 𝐴 𝐵 𝐶 𝐷 ”⟩ ) = 𝐷 )
19 17 18 syl ( ( 𝑃 ‘ 3 ) = 𝐷 → ( lastS ‘ ⟨“ 𝐴 𝐵 𝐶 𝐷 ”⟩ ) = 𝐷 )
20 14 19 eqtr2id ( ( 𝑃 ‘ 3 ) = 𝐷𝐷 = ( lastS ‘ 𝑃 ) )
21 20 ad2antll ( ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ) ∧ ( ( 𝑃 ‘ 2 ) = 𝐶 ∧ ( 𝑃 ‘ 3 ) = 𝐷 ) ) → 𝐷 = ( lastS ‘ 𝑃 ) )
22 10 21 syl ( 𝜑𝐷 = ( lastS ‘ 𝑃 ) )
23 13 22 oveq12d ( 𝜑 → ( 𝐴 ( WalksOn ‘ 𝐺 ) 𝐷 ) = ( ( 𝑃 ‘ 0 ) ( WalksOn ‘ 𝐺 ) ( lastS ‘ 𝑃 ) ) )
24 23 breqd ( 𝜑 → ( 𝐹 ( 𝐴 ( WalksOn ‘ 𝐺 ) 𝐷 ) 𝑃𝐹 ( ( 𝑃 ‘ 0 ) ( WalksOn ‘ 𝐺 ) ( lastS ‘ 𝑃 ) ) 𝑃 ) )
25 9 24 mpbird ( 𝜑𝐹 ( 𝐴 ( WalksOn ‘ 𝐺 ) 𝐷 ) 𝑃 )