Metamath Proof Explorer


Theorem 2pthd

Description: A path of length 2 from one vertex to another vertex via a third vertex. (Contributed by Alexander van der Vekens, 6-Dec-2017) (Revised by AV, 24-Jan-2021) (Revised by AV, 24-Mar-2021)

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

Proof

Step Hyp Ref Expression
1 2wlkd.p 𝑃 = ⟨“ 𝐴 𝐵 𝐶 ”⟩
2 2wlkd.f 𝐹 = ⟨“ 𝐽 𝐾 ”⟩
3 2wlkd.s ( 𝜑 → ( 𝐴𝑉𝐵𝑉𝐶𝑉 ) )
4 2wlkd.n ( 𝜑 → ( 𝐴𝐵𝐵𝐶 ) )
5 2wlkd.e ( 𝜑 → ( { 𝐴 , 𝐵 } ⊆ ( 𝐼𝐽 ) ∧ { 𝐵 , 𝐶 } ⊆ ( 𝐼𝐾 ) ) )
6 2wlkd.v 𝑉 = ( Vtx ‘ 𝐺 )
7 2wlkd.i 𝐼 = ( iEdg ‘ 𝐺 )
8 2trld.n ( 𝜑𝐽𝐾 )
9 s3cli ⟨“ 𝐴 𝐵 𝐶 ”⟩ ∈ Word V
10 1 9 eqeltri 𝑃 ∈ Word V
11 10 a1i ( 𝜑𝑃 ∈ Word V )
12 2 fveq2i ( ♯ ‘ 𝐹 ) = ( ♯ ‘ ⟨“ 𝐽 𝐾 ”⟩ )
13 s2len ( ♯ ‘ ⟨“ 𝐽 𝐾 ”⟩ ) = 2
14 12 13 eqtri ( ♯ ‘ 𝐹 ) = 2
15 3m1e2 ( 3 − 1 ) = 2
16 1 fveq2i ( ♯ ‘ 𝑃 ) = ( ♯ ‘ ⟨“ 𝐴 𝐵 𝐶 ”⟩ )
17 s3len ( ♯ ‘ ⟨“ 𝐴 𝐵 𝐶 ”⟩ ) = 3
18 16 17 eqtr2i 3 = ( ♯ ‘ 𝑃 )
19 18 oveq1i ( 3 − 1 ) = ( ( ♯ ‘ 𝑃 ) − 1 )
20 14 15 19 3eqtr2i ( ♯ ‘ 𝐹 ) = ( ( ♯ ‘ 𝑃 ) − 1 )
21 1 2 3 4 2pthdlem1 ( 𝜑 → ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑃 ) ) ∀ 𝑗 ∈ ( 1 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝑘𝑗 → ( 𝑃𝑘 ) ≠ ( 𝑃𝑗 ) ) )
22 eqid ( ♯ ‘ 𝐹 ) = ( ♯ ‘ 𝐹 )
23 1 2 3 4 5 6 7 8 2trld ( 𝜑𝐹 ( Trails ‘ 𝐺 ) 𝑃 )
24 11 20 21 22 23 pthd ( 𝜑𝐹 ( Paths ‘ 𝐺 ) 𝑃 )