Metamath Proof Explorer


Theorem elwwlks2on

Description: A walk of length 2 between two vertices as length 3 string. (Contributed by Alexander van der Vekens, 15-Feb-2018) (Revised by AV, 12-May-2021)

Ref Expression
Hypothesis elwwlks2on.v 𝑉 = ( Vtx ‘ 𝐺 )
Assertion elwwlks2on ( ( 𝐺 ∈ UPGraph ∧ 𝐴𝑉𝐶𝑉 ) → ( 𝑊 ∈ ( 𝐴 ( 2 WWalksNOn 𝐺 ) 𝐶 ) ↔ ∃ 𝑏𝑉 ( 𝑊 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ∃ 𝑓 ( 𝑓 ( Walks ‘ 𝐺 ) 𝑊 ∧ ( ♯ ‘ 𝑓 ) = 2 ) ) ) )

Proof

Step Hyp Ref Expression
1 elwwlks2on.v 𝑉 = ( Vtx ‘ 𝐺 )
2 1 elwwlks2ons3 ( 𝑊 ∈ ( 𝐴 ( 2 WWalksNOn 𝐺 ) 𝐶 ) ↔ ∃ 𝑏𝑉 ( 𝑊 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∈ ( 𝐴 ( 2 WWalksNOn 𝐺 ) 𝐶 ) ) )
3 1 s3wwlks2on ( ( 𝐺 ∈ UPGraph ∧ 𝐴𝑉𝐶𝑉 ) → ( ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∈ ( 𝐴 ( 2 WWalksNOn 𝐺 ) 𝐶 ) ↔ ∃ 𝑓 ( 𝑓 ( Walks ‘ 𝐺 ) ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ( ♯ ‘ 𝑓 ) = 2 ) ) )
4 breq2 ( ⟨“ 𝐴 𝑏 𝐶 ”⟩ = 𝑊 → ( 𝑓 ( Walks ‘ 𝐺 ) ⟨“ 𝐴 𝑏 𝐶 ”⟩ ↔ 𝑓 ( Walks ‘ 𝐺 ) 𝑊 ) )
5 4 eqcoms ( 𝑊 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ → ( 𝑓 ( Walks ‘ 𝐺 ) ⟨“ 𝐴 𝑏 𝐶 ”⟩ ↔ 𝑓 ( Walks ‘ 𝐺 ) 𝑊 ) )
6 5 anbi1d ( 𝑊 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ → ( ( 𝑓 ( Walks ‘ 𝐺 ) ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ( ♯ ‘ 𝑓 ) = 2 ) ↔ ( 𝑓 ( Walks ‘ 𝐺 ) 𝑊 ∧ ( ♯ ‘ 𝑓 ) = 2 ) ) )
7 6 exbidv ( 𝑊 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ → ( ∃ 𝑓 ( 𝑓 ( Walks ‘ 𝐺 ) ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ( ♯ ‘ 𝑓 ) = 2 ) ↔ ∃ 𝑓 ( 𝑓 ( Walks ‘ 𝐺 ) 𝑊 ∧ ( ♯ ‘ 𝑓 ) = 2 ) ) )
8 3 7 sylan9bb ( ( ( 𝐺 ∈ UPGraph ∧ 𝐴𝑉𝐶𝑉 ) ∧ 𝑊 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ) → ( ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∈ ( 𝐴 ( 2 WWalksNOn 𝐺 ) 𝐶 ) ↔ ∃ 𝑓 ( 𝑓 ( Walks ‘ 𝐺 ) 𝑊 ∧ ( ♯ ‘ 𝑓 ) = 2 ) ) )
9 8 pm5.32da ( ( 𝐺 ∈ UPGraph ∧ 𝐴𝑉𝐶𝑉 ) → ( ( 𝑊 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∈ ( 𝐴 ( 2 WWalksNOn 𝐺 ) 𝐶 ) ) ↔ ( 𝑊 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ∃ 𝑓 ( 𝑓 ( Walks ‘ 𝐺 ) 𝑊 ∧ ( ♯ ‘ 𝑓 ) = 2 ) ) ) )
10 9 rexbidv ( ( 𝐺 ∈ UPGraph ∧ 𝐴𝑉𝐶𝑉 ) → ( ∃ 𝑏𝑉 ( 𝑊 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∈ ( 𝐴 ( 2 WWalksNOn 𝐺 ) 𝐶 ) ) ↔ ∃ 𝑏𝑉 ( 𝑊 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ∃ 𝑓 ( 𝑓 ( Walks ‘ 𝐺 ) 𝑊 ∧ ( ♯ ‘ 𝑓 ) = 2 ) ) ) )
11 2 10 syl5bb ( ( 𝐺 ∈ UPGraph ∧ 𝐴𝑉𝐶𝑉 ) → ( 𝑊 ∈ ( 𝐴 ( 2 WWalksNOn 𝐺 ) 𝐶 ) ↔ ∃ 𝑏𝑉 ( 𝑊 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ∃ 𝑓 ( 𝑓 ( Walks ‘ 𝐺 ) 𝑊 ∧ ( ♯ ‘ 𝑓 ) = 2 ) ) ) )