Metamath Proof Explorer


Theorem usgr2wspthon

Description: A simple path of length 2 between two vertices corresponds to two adjacent edges in a simple graph. (Contributed by Alexander van der Vekens, 9-Mar-2018) (Revised by AV, 17-May-2021)

Ref Expression
Hypotheses usgr2wspthon0.v 𝑉 = ( Vtx ‘ 𝐺 )
usgr2wspthon0.e 𝐸 = ( Edg ‘ 𝐺 )
Assertion usgr2wspthon ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) → ( 𝑇 ∈ ( 𝐴 ( 2 WSPathsNOn 𝐺 ) 𝐶 ) ↔ ∃ 𝑏𝑉 ( ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ 𝐴𝐶 ) ∧ ( { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) ) )

Proof

Step Hyp Ref Expression
1 usgr2wspthon0.v 𝑉 = ( Vtx ‘ 𝐺 )
2 usgr2wspthon0.e 𝐸 = ( Edg ‘ 𝐺 )
3 usgrupgr ( 𝐺 ∈ USGraph → 𝐺 ∈ UPGraph )
4 3 adantr ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) → 𝐺 ∈ UPGraph )
5 simpl ( ( 𝐴𝑉𝐶𝑉 ) → 𝐴𝑉 )
6 5 adantl ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) → 𝐴𝑉 )
7 simpr ( ( 𝐴𝑉𝐶𝑉 ) → 𝐶𝑉 )
8 7 adantl ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) → 𝐶𝑉 )
9 1 elwspths2on ( ( 𝐺 ∈ UPGraph ∧ 𝐴𝑉𝐶𝑉 ) → ( 𝑇 ∈ ( 𝐴 ( 2 WSPathsNOn 𝐺 ) 𝐶 ) ↔ ∃ 𝑏𝑉 ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∈ ( 𝐴 ( 2 WSPathsNOn 𝐺 ) 𝐶 ) ) ) )
10 4 6 8 9 syl3anc ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) → ( 𝑇 ∈ ( 𝐴 ( 2 WSPathsNOn 𝐺 ) 𝐶 ) ↔ ∃ 𝑏𝑉 ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∈ ( 𝐴 ( 2 WSPathsNOn 𝐺 ) 𝐶 ) ) ) )
11 simpl ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) → 𝐺 ∈ USGraph )
12 11 adantr ( ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) ∧ 𝑏𝑉 ) → 𝐺 ∈ USGraph )
13 simplrl ( ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) ∧ 𝑏𝑉 ) → 𝐴𝑉 )
14 simpr ( ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) ∧ 𝑏𝑉 ) → 𝑏𝑉 )
15 simplrr ( ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) ∧ 𝑏𝑉 ) → 𝐶𝑉 )
16 1 2 usgr2wspthons3 ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝑏𝑉𝐶𝑉 ) ) → ( ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∈ ( 𝐴 ( 2 WSPathsNOn 𝐺 ) 𝐶 ) ↔ ( 𝐴𝐶 ∧ { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) )
17 12 13 14 15 16 syl13anc ( ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) ∧ 𝑏𝑉 ) → ( ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∈ ( 𝐴 ( 2 WSPathsNOn 𝐺 ) 𝐶 ) ↔ ( 𝐴𝐶 ∧ { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) )
18 17 anbi2d ( ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) ∧ 𝑏𝑉 ) → ( ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∈ ( 𝐴 ( 2 WSPathsNOn 𝐺 ) 𝐶 ) ) ↔ ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ( 𝐴𝐶 ∧ { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) ) )
19 anass ( ( ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ 𝐴𝐶 ) ∧ ( { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) ↔ ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ( 𝐴𝐶 ∧ ( { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) ) )
20 3anass ( ( 𝐴𝐶 ∧ { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ↔ ( 𝐴𝐶 ∧ ( { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) )
21 20 bicomi ( ( 𝐴𝐶 ∧ ( { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) ↔ ( 𝐴𝐶 ∧ { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) )
22 21 anbi2i ( ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ( 𝐴𝐶 ∧ ( { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) ) ↔ ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ( 𝐴𝐶 ∧ { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) )
23 19 22 bitri ( ( ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ 𝐴𝐶 ) ∧ ( { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) ↔ ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ( 𝐴𝐶 ∧ { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) )
24 18 23 bitr4di ( ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) ∧ 𝑏𝑉 ) → ( ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∈ ( 𝐴 ( 2 WSPathsNOn 𝐺 ) 𝐶 ) ) ↔ ( ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ 𝐴𝐶 ) ∧ ( { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) ) )
25 24 rexbidva ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) → ( ∃ 𝑏𝑉 ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∈ ( 𝐴 ( 2 WSPathsNOn 𝐺 ) 𝐶 ) ) ↔ ∃ 𝑏𝑉 ( ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ 𝐴𝐶 ) ∧ ( { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) ) )
26 10 25 bitrd ( ( 𝐺 ∈ USGraph ∧ ( 𝐴𝑉𝐶𝑉 ) ) → ( 𝑇 ∈ ( 𝐴 ( 2 WSPathsNOn 𝐺 ) 𝐶 ) ↔ ∃ 𝑏𝑉 ( ( 𝑇 = ⟨“ 𝐴 𝑏 𝐶 ”⟩ ∧ 𝐴𝐶 ) ∧ ( { 𝐴 , 𝑏 } ∈ 𝐸 ∧ { 𝑏 , 𝐶 } ∈ 𝐸 ) ) ) )