MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  usg2wotspth Structured version   Unicode version

Theorem usg2wotspth 24588
Description: A walk of length 2 between two different vertices as ordered triple corresponds to a simple path of length 2 in an undirected simple graph. (Contributed by Alexander van der Vekens, 16-Feb-2018.)
Assertion
Ref Expression
usg2wotspth  |-  ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V )  /\  A  =/=  C
)  ->  ( <. A ,  B ,  C >.  e.  ( A ( V 2WalksOnOt  E ) C )  <->  E. f E. p ( f ( V SPaths  E
) p  /\  ( # `
 f )  =  2  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) ) ) )
Distinct variable groups:    A, f, p    B, f, p    C, f, p    f, E, p   
f, V, p

Proof of Theorem usg2wotspth
StepHypRef Expression
1 usgrav 24042 . . . 4  |-  ( V USGrph  E  ->  ( V  e. 
_V  /\  E  e.  _V ) )
2 el2wlkonotot 24577 . . . . . . 7  |-  ( ( ( V  e.  _V  /\  E  e.  _V )  /\  ( A  e.  V  /\  C  e.  V
) )  ->  ( <. A ,  B ,  C >.  e.  ( A ( V 2WalksOnOt  E ) C )  <->  E. f E. p ( f ( V Walks  E ) p  /\  ( # `  f
)  =  2  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) ) ) )
32expcom 435 . . . . . 6  |-  ( ( A  e.  V  /\  C  e.  V )  ->  ( ( V  e. 
_V  /\  E  e.  _V )  ->  ( <. A ,  B ,  C >.  e.  ( A ( V 2WalksOnOt  E ) C )  <->  E. f E. p ( f ( V Walks  E ) p  /\  ( # `  f
)  =  2  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) ) ) ) )
433adant2 1015 . . . . 5  |-  ( ( A  e.  V  /\  B  e.  V  /\  C  e.  V )  ->  ( ( V  e. 
_V  /\  E  e.  _V )  ->  ( <. A ,  B ,  C >.  e.  ( A ( V 2WalksOnOt  E ) C )  <->  E. f E. p ( f ( V Walks  E ) p  /\  ( # `  f
)  =  2  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) ) ) ) )
54impcom 430 . . . 4  |-  ( ( ( V  e.  _V  /\  E  e.  _V )  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V
) )  ->  ( <. A ,  B ,  C >.  e.  ( A ( V 2WalksOnOt  E ) C )  <->  E. f E. p ( f ( V Walks  E ) p  /\  ( # `  f
)  =  2  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) ) ) )
61, 5sylan 471 . . 3  |-  ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V )
)  ->  ( <. A ,  B ,  C >.  e.  ( A ( V 2WalksOnOt  E ) C )  <->  E. f E. p ( f ( V Walks  E
) p  /\  ( # `
 f )  =  2  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) ) ) )
763adant3 1016 . 2  |-  ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V )  /\  A  =/=  C
)  ->  ( <. A ,  B ,  C >.  e.  ( A ( V 2WalksOnOt  E ) C )  <->  E. f E. p ( f ( V Walks  E
) p  /\  ( # `
 f )  =  2  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) ) ) )
8 simpr1 1002 . . . . . . 7  |-  ( ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V
)  /\  A  =/=  C )  /\  ( f ( V Walks  E ) p  /\  ( # `  f )  =  2  /\  ( A  =  ( p `  0
)  /\  B  =  ( p `  1
)  /\  C  =  ( p `  2
) ) ) )  ->  f ( V Walks 
E ) p )
9 vex 3116 . . . . . . . . . . . . . . . . 17  |-  f  e. 
_V
10 vex 3116 . . . . . . . . . . . . . . . . 17  |-  p  e. 
_V
119, 10pm3.2i 455 . . . . . . . . . . . . . . . 16  |-  ( f  e.  _V  /\  p  e.  _V )
12 is2wlk 24271 . . . . . . . . . . . . . . . 16  |-  ( ( ( V  e.  _V  /\  E  e.  _V )  /\  ( f  e.  _V  /\  p  e.  _V )
)  ->  ( (
f ( V Walks  E
) p  /\  ( # `
 f )  =  2 )  <->  ( f : ( 0..^ 2 ) --> dom  E  /\  p : ( 0 ... 2 ) --> V  /\  ( ( E `  ( f `  0
) )  =  {
( p `  0
) ,  ( p `
 1 ) }  /\  ( E `  ( f `  1
) )  =  {
( p `  1
) ,  ( p `
 2 ) } ) ) ) )
131, 11, 12sylancl 662 . . . . . . . . . . . . . . 15  |-  ( V USGrph  E  ->  ( ( f ( V Walks  E ) p  /\  ( # `  f )  =  2 )  <->  ( f : ( 0..^ 2 ) --> dom  E  /\  p : ( 0 ... 2 ) --> V  /\  ( ( E `  ( f `  0
) )  =  {
( p `  0
) ,  ( p `
 1 ) }  /\  ( E `  ( f `  1
) )  =  {
( p `  1
) ,  ( p `
 2 ) } ) ) ) )
14 usgrafun 24053 . . . . . . . . . . . . . . . . . . . . 21  |-  ( V USGrph  E  ->  Fun  E )
15 c0ex 9590 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  0  e.  _V
1615prid1 4135 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  0  e.  { 0 ,  1 }
17 fzo0to2pr 11867 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( 0..^ 2 )  =  {
0 ,  1 }
1816, 17eleqtrri 2554 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  0  e.  ( 0..^ 2 )
19 ffvelrn 6019 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( f : ( 0..^ 2 ) --> dom  E  /\  0  e.  (
0..^ 2 ) )  ->  ( f ` 
0 )  e.  dom  E )
2018, 19mpan2 671 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( f : ( 0..^ 2 ) --> dom  E  ->  ( f `  0 )  e.  dom  E )
21 fvelrn 6017 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( Fun  E  /\  (
f `  0 )  e.  dom  E )  -> 
( E `  (
f `  0 )
)  e.  ran  E
)
2220, 21sylan2 474 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( Fun  E  /\  f : ( 0..^ 2 ) --> dom  E )  ->  ( E `  (
f `  0 )
)  e.  ran  E
)
23 eleq1 2539 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( E `  ( f `
 0 ) )  =  { ( p `
 0 ) ,  ( p `  1
) }  ->  (
( E `  (
f `  0 )
)  e.  ran  E  <->  { ( p `  0
) ,  ( p `
 1 ) }  e.  ran  E ) )
2422, 23syl5ibcom 220 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( Fun  E  /\  f : ( 0..^ 2 ) --> dom  E )  ->  ( ( E `  ( f `  0
) )  =  {
( p `  0
) ,  ( p `
 1 ) }  ->  { ( p `
 0 ) ,  ( p `  1
) }  e.  ran  E ) )
25 1ex 9591 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  1  e.  _V
2625prid2 4136 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  1  e.  { 0 ,  1 }
2726, 17eleqtrri 2554 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  1  e.  ( 0..^ 2 )
28 ffvelrn 6019 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( f : ( 0..^ 2 ) --> dom  E  /\  1  e.  (
0..^ 2 ) )  ->  ( f ` 
1 )  e.  dom  E )
2927, 28mpan2 671 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( f : ( 0..^ 2 ) --> dom  E  ->  ( f `  1 )  e.  dom  E )
30 fvelrn 6017 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( Fun  E  /\  (
f `  1 )  e.  dom  E )  -> 
( E `  (
f `  1 )
)  e.  ran  E
)
3129, 30sylan2 474 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( Fun  E  /\  f : ( 0..^ 2 ) --> dom  E )  ->  ( E `  (
f `  1 )
)  e.  ran  E
)
32 eleq1 2539 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( E `  ( f `
 1 ) )  =  { ( p `
 1 ) ,  ( p `  2
) }  ->  (
( E `  (
f `  1 )
)  e.  ran  E  <->  { ( p `  1
) ,  ( p `
 2 ) }  e.  ran  E ) )
3331, 32syl5ibcom 220 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( Fun  E  /\  f : ( 0..^ 2 ) --> dom  E )  ->  ( ( E `  ( f `  1
) )  =  {
( p `  1
) ,  ( p `
 2 ) }  ->  { ( p `
 1 ) ,  ( p `  2
) }  e.  ran  E ) )
3424, 33anim12d 563 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( Fun  E  /\  f : ( 0..^ 2 ) --> dom  E )  ->  ( ( ( E `
 ( f ` 
0 ) )  =  { ( p ` 
0 ) ,  ( p `  1 ) }  /\  ( E `
 ( f ` 
1 ) )  =  { ( p ` 
1 ) ,  ( p `  2 ) } )  ->  ( { ( p ` 
0 ) ,  ( p `  1 ) }  e.  ran  E  /\  { ( p ` 
1 ) ,  ( p `  2 ) }  e.  ran  E
) ) )
3514, 34sylan 471 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( V USGrph  E  /\  f : ( 0..^ 2 ) --> dom  E )  ->  ( ( ( E `
 ( f ` 
0 ) )  =  { ( p ` 
0 ) ,  ( p `  1 ) }  /\  ( E `
 ( f ` 
1 ) )  =  { ( p ` 
1 ) ,  ( p `  2 ) } )  ->  ( { ( p ` 
0 ) ,  ( p `  1 ) }  e.  ran  E  /\  { ( p ` 
1 ) ,  ( p `  2 ) }  e.  ran  E
) ) )
36 simpllr 758 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( ( ( ( V USGrph  E  /\  ( { ( p `  0 ) ,  ( p ` 
1 ) }  e.  ran  E  /\  { ( p `  1 ) ,  ( p ` 
2 ) }  e.  ran  E ) )  /\  p : ( 0 ... 2 ) --> V )  /\  A  =/=  C
)  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) )  ->  p : ( 0 ... 2 ) --> V )
37 usgraedgrn 24085 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33  |-  ( ( V USGrph  E  /\  { ( p `  0 ) ,  ( p ` 
1 ) }  e.  ran  E )  ->  (
p `  0 )  =/=  ( p `  1
) )
3837ex 434 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32  |-  ( V USGrph  E  ->  ( { ( p `  0 ) ,  ( p ` 
1 ) }  e.  ran  E  ->  ( p `  0 )  =/=  ( p `  1
) ) )
39 usgraedgrn 24085 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33  |-  ( ( V USGrph  E  /\  { ( p `  1 ) ,  ( p ` 
2 ) }  e.  ran  E )  ->  (
p `  1 )  =/=  ( p `  2
) )
4039ex 434 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32  |-  ( V USGrph  E  ->  ( { ( p `  1 ) ,  ( p ` 
2 ) }  e.  ran  E  ->  ( p `  1 )  =/=  ( p `  2
) ) )
41 simplll 757 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35  |-  ( ( ( ( ( p `
 0 )  =/=  ( p `  1
)  /\  ( p `  1 )  =/=  ( p `  2
) )  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) )  /\  A  =/= 
C )  ->  (
p `  0 )  =/=  ( p `  1
) )
42 simpl 457 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40  |-  ( ( A  =  ( p `
 0 )  /\  C  =  ( p `  2 ) )  ->  A  =  ( p `  0 ) )
43 simpr 461 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40  |-  ( ( A  =  ( p `
 0 )  /\  C  =  ( p `  2 ) )  ->  C  =  ( p `  2 ) )
4442, 43neeq12d 2746 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39  |-  ( ( A  =  ( p `
 0 )  /\  C  =  ( p `  2 ) )  ->  ( A  =/= 
C  <->  ( p ` 
0 )  =/=  (
p `  2 )
) )
4544biimpd 207 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38  |-  ( ( A  =  ( p `
 0 )  /\  C  =  ( p `  2 ) )  ->  ( A  =/= 
C  ->  ( p `  0 )  =/=  ( p `  2
) ) )
46453adant2 1015 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37  |-  ( ( A  =  ( p `
 0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  ( A  =/= 
C  ->  ( p `  0 )  =/=  ( p `  2
) ) )
4746adantl 466 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36  |-  ( ( ( ( p ` 
0 )  =/=  (
p `  1 )  /\  ( p `  1
)  =/=  ( p `
 2 ) )  /\  ( A  =  ( p `  0
)  /\  B  =  ( p `  1
)  /\  C  =  ( p `  2
) ) )  -> 
( A  =/=  C  ->  ( p `  0
)  =/=  ( p `
 2 ) ) )
4847imp 429 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35  |-  ( ( ( ( ( p `
 0 )  =/=  ( p `  1
)  /\  ( p `  1 )  =/=  ( p `  2
) )  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) )  /\  A  =/= 
C )  ->  (
p `  0 )  =/=  ( p `  2
) )
49 simpllr 758 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35  |-  ( ( ( ( ( p `
 0 )  =/=  ( p `  1
)  /\  ( p `  1 )  =/=  ( p `  2
) )  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) )  /\  A  =/= 
C )  ->  (
p `  1 )  =/=  ( p `  2
) )
5041, 48, 493jca 1176 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34  |-  ( ( ( ( ( p `
 0 )  =/=  ( p `  1
)  /\  ( p `  1 )  =/=  ( p `  2
) )  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) )  /\  A  =/= 
C )  ->  (
( p `  0
)  =/=  ( p `
 1 )  /\  ( p `  0
)  =/=  ( p `
 2 )  /\  ( p `  1
)  =/=  ( p `
 2 ) ) )
5150exp31 604 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33  |-  ( ( ( p `  0
)  =/=  ( p `
 1 )  /\  ( p `  1
)  =/=  ( p `
 2 ) )  ->  ( ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) )  -> 
( A  =/=  C  ->  ( ( p ` 
0 )  =/=  (
p `  1 )  /\  ( p `  0
)  =/=  ( p `
 2 )  /\  ( p `  1
)  =/=  ( p `
 2 ) ) ) ) )
5251a1i 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32  |-  ( V USGrph  E  ->  ( ( ( p `  0 )  =/=  ( p ` 
1 )  /\  (
p `  1 )  =/=  ( p `  2
) )  ->  (
( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  ( A  =/=  C  ->  ( (
p `  0 )  =/=  ( p `  1
)  /\  ( p `  0 )  =/=  ( p `  2
)  /\  ( p `  1 )  =/=  ( p `  2
) ) ) ) ) )
5338, 40, 52syl2and 483 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31  |-  ( V USGrph  E  ->  ( ( { ( p `  0
) ,  ( p `
 1 ) }  e.  ran  E  /\  { ( p `  1
) ,  ( p `
 2 ) }  e.  ran  E )  ->  ( ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) )  -> 
( A  =/=  C  ->  ( ( p ` 
0 )  =/=  (
p `  1 )  /\  ( p `  0
)  =/=  ( p `
 2 )  /\  ( p `  1
)  =/=  ( p `
 2 ) ) ) ) ) )
5453imp 429 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30  |-  ( ( V USGrph  E  /\  ( { ( p ` 
0 ) ,  ( p `  1 ) }  e.  ran  E  /\  { ( p ` 
1 ) ,  ( p `  2 ) }  e.  ran  E
) )  ->  (
( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  ( A  =/=  C  ->  ( (
p `  0 )  =/=  ( p `  1
)  /\  ( p `  0 )  =/=  ( p `  2
)  /\  ( p `  1 )  =/=  ( p `  2
) ) ) ) )
5554adantr 465 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29  |-  ( ( ( V USGrph  E  /\  ( { ( p ` 
0 ) ,  ( p `  1 ) }  e.  ran  E  /\  { ( p ` 
1 ) ,  ( p `  2 ) }  e.  ran  E
) )  /\  p : ( 0 ... 2 ) --> V )  ->  ( ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) )  -> 
( A  =/=  C  ->  ( ( p ` 
0 )  =/=  (
p `  1 )  /\  ( p `  0
)  =/=  ( p `
 2 )  /\  ( p `  1
)  =/=  ( p `
 2 ) ) ) ) )
5655com23 78 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  |-  ( ( ( V USGrph  E  /\  ( { ( p ` 
0 ) ,  ( p `  1 ) }  e.  ran  E  /\  { ( p ` 
1 ) ,  ( p `  2 ) }  e.  ran  E
) )  /\  p : ( 0 ... 2 ) --> V )  ->  ( A  =/= 
C  ->  ( ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  ( ( p `
 0 )  =/=  ( p `  1
)  /\  ( p `  0 )  =/=  ( p `  2
)  /\  ( p `  1 )  =/=  ( p `  2
) ) ) ) )
5756imp 429 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  ( ( ( ( V USGrph  E  /\  ( { ( p `
 0 ) ,  ( p `  1
) }  e.  ran  E  /\  { ( p `
 1 ) ,  ( p `  2
) }  e.  ran  E ) )  /\  p : ( 0 ... 2 ) --> V )  /\  A  =/=  C
)  ->  ( ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  ( ( p `
 0 )  =/=  ( p `  1
)  /\  ( p `  0 )  =/=  ( p `  2
)  /\  ( p `  1 )  =/=  ( p `  2
) ) ) )
5857imp 429 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( ( ( ( V USGrph  E  /\  ( { ( p `  0 ) ,  ( p ` 
1 ) }  e.  ran  E  /\  { ( p `  1 ) ,  ( p ` 
2 ) }  e.  ran  E ) )  /\  p : ( 0 ... 2 ) --> V )  /\  A  =/=  C
)  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) )  ->  ( ( p `
 0 )  =/=  ( p `  1
)  /\  ( p `  0 )  =/=  ( p `  2
)  /\  ( p `  1 )  =/=  ( p `  2
) ) )
59 eqid 2467 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  ( 0 ... 2 )  =  ( 0 ... 2
)
6059f13idfv 12074 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( p : ( 0 ... 2 ) -1-1-> V  <->  ( p : ( 0 ... 2 ) --> V  /\  ( ( p ` 
0 )  =/=  (
p `  1 )  /\  ( p `  0
)  =/=  ( p `
 2 )  /\  ( p `  1
)  =/=  ( p `
 2 ) ) ) )
6136, 58, 60sylanbrc 664 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( ( ( ( V USGrph  E  /\  ( { ( p `  0 ) ,  ( p ` 
1 ) }  e.  ran  E  /\  { ( p `  1 ) ,  ( p ` 
2 ) }  e.  ran  E ) )  /\  p : ( 0 ... 2 ) --> V )  /\  A  =/=  C
)  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) )  ->  p : ( 0 ... 2 )
-1-1-> V )
62 df-f1 5593 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( p : ( 0 ... 2 ) -1-1-> V  <->  ( p : ( 0 ... 2 ) --> V  /\  Fun  `' p ) )
6361, 62sylib 196 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( ( ( ( V USGrph  E  /\  ( { ( p `  0 ) ,  ( p ` 
1 ) }  e.  ran  E  /\  { ( p `  1 ) ,  ( p ` 
2 ) }  e.  ran  E ) )  /\  p : ( 0 ... 2 ) --> V )  /\  A  =/=  C
)  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) )  ->  ( p : ( 0 ... 2
) --> V  /\  Fun  `' p ) )
6463simprd 463 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( ( ( V USGrph  E  /\  ( { ( p `  0 ) ,  ( p ` 
1 ) }  e.  ran  E  /\  { ( p `  1 ) ,  ( p ` 
2 ) }  e.  ran  E ) )  /\  p : ( 0 ... 2 ) --> V )  /\  A  =/=  C
)  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) )  ->  Fun  `' p
)
6564exp31 604 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( V USGrph  E  /\  ( { ( p ` 
0 ) ,  ( p `  1 ) }  e.  ran  E  /\  { ( p ` 
1 ) ,  ( p `  2 ) }  e.  ran  E
) )  /\  p : ( 0 ... 2 ) --> V )  ->  ( A  =/= 
C  ->  ( ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  Fun  `' p
) ) )
6665exp31 604 . . . . . . . . . . . . . . . . . . . . 21  |-  ( V USGrph  E  ->  ( ( { ( p `  0
) ,  ( p `
 1 ) }  e.  ran  E  /\  { ( p `  1
) ,  ( p `
 2 ) }  e.  ran  E )  ->  ( p : ( 0 ... 2
) --> V  ->  ( A  =/=  C  ->  (
( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  Fun  `' p
) ) ) ) )
6766adantr 465 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( V USGrph  E  /\  f : ( 0..^ 2 ) --> dom  E )  ->  ( ( { ( p `  0 ) ,  ( p ` 
1 ) }  e.  ran  E  /\  { ( p `  1 ) ,  ( p ` 
2 ) }  e.  ran  E )  ->  (
p : ( 0 ... 2 ) --> V  ->  ( A  =/= 
C  ->  ( ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  Fun  `' p
) ) ) ) )
6835, 67syld 44 . . . . . . . . . . . . . . . . . . 19  |-  ( ( V USGrph  E  /\  f : ( 0..^ 2 ) --> dom  E )  ->  ( ( ( E `
 ( f ` 
0 ) )  =  { ( p ` 
0 ) ,  ( p `  1 ) }  /\  ( E `
 ( f ` 
1 ) )  =  { ( p ` 
1 ) ,  ( p `  2 ) } )  ->  (
p : ( 0 ... 2 ) --> V  ->  ( A  =/= 
C  ->  ( ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  Fun  `' p
) ) ) ) )
6968expcom 435 . . . . . . . . . . . . . . . . . 18  |-  ( f : ( 0..^ 2 ) --> dom  E  ->  ( V USGrph  E  ->  ( ( ( E `  (
f `  0 )
)  =  { ( p `  0 ) ,  ( p ` 
1 ) }  /\  ( E `  ( f `
 1 ) )  =  { ( p `
 1 ) ,  ( p `  2
) } )  -> 
( p : ( 0 ... 2 ) --> V  ->  ( A  =/=  C  ->  ( ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  Fun  `' p
) ) ) ) ) )
7069com24 87 . . . . . . . . . . . . . . . . 17  |-  ( f : ( 0..^ 2 ) --> dom  E  ->  ( p : ( 0 ... 2 ) --> V  ->  ( ( ( E `  ( f `
 0 ) )  =  { ( p `
 0 ) ,  ( p `  1
) }  /\  ( E `  ( f `  1 ) )  =  { ( p `
 1 ) ,  ( p `  2
) } )  -> 
( V USGrph  E  ->  ( A  =/=  C  -> 
( ( A  =  ( p `  0
)  /\  B  =  ( p `  1
)  /\  C  =  ( p `  2
) )  ->  Fun  `' p ) ) ) ) ) )
71703imp 1190 . . . . . . . . . . . . . . . 16  |-  ( ( f : ( 0..^ 2 ) --> dom  E  /\  p : ( 0 ... 2 ) --> V  /\  ( ( E `
 ( f ` 
0 ) )  =  { ( p ` 
0 ) ,  ( p `  1 ) }  /\  ( E `
 ( f ` 
1 ) )  =  { ( p ` 
1 ) ,  ( p `  2 ) } ) )  -> 
( V USGrph  E  ->  ( A  =/=  C  -> 
( ( A  =  ( p `  0
)  /\  B  =  ( p `  1
)  /\  C  =  ( p `  2
) )  ->  Fun  `' p ) ) ) )
7271com12 31 . . . . . . . . . . . . . . 15  |-  ( V USGrph  E  ->  ( ( f : ( 0..^ 2 ) --> dom  E  /\  p : ( 0 ... 2 ) --> V  /\  ( ( E `  ( f `  0
) )  =  {
( p `  0
) ,  ( p `
 1 ) }  /\  ( E `  ( f `  1
) )  =  {
( p `  1
) ,  ( p `
 2 ) } ) )  ->  ( A  =/=  C  ->  (
( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  Fun  `' p
) ) ) )
7313, 72sylbid 215 . . . . . . . . . . . . . 14  |-  ( V USGrph  E  ->  ( ( f ( V Walks  E ) p  /\  ( # `  f )  =  2 )  ->  ( A  =/=  C  ->  ( ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  Fun  `' p
) ) ) )
7473com14 88 . . . . . . . . . . . . 13  |-  ( ( A  =  ( p `
 0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  ( ( f ( V Walks  E ) p  /\  ( # `  f )  =  2 )  ->  ( A  =/=  C  ->  ( V USGrph  E  ->  Fun  `' p
) ) ) )
7574com12 31 . . . . . . . . . . . 12  |-  ( ( f ( V Walks  E
) p  /\  ( # `
 f )  =  2 )  ->  (
( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  ( A  =/=  C  ->  ( V USGrph  E  ->  Fun  `' p
) ) ) )
76753impia 1193 . . . . . . . . . . 11  |-  ( ( f ( V Walks  E
) p  /\  ( # `
 f )  =  2  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) )  ->  ( A  =/= 
C  ->  ( V USGrph  E  ->  Fun  `' p
) ) )
7776com13 80 . . . . . . . . . 10  |-  ( V USGrph  E  ->  ( A  =/= 
C  ->  ( (
f ( V Walks  E
) p  /\  ( # `
 f )  =  2  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) )  ->  Fun  `' p
) ) )
7877a1d 25 . . . . . . . . 9  |-  ( V USGrph  E  ->  ( ( A  e.  V  /\  B  e.  V  /\  C  e.  V )  ->  ( A  =/=  C  ->  (
( f ( V Walks 
E ) p  /\  ( # `  f )  =  2  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) )  ->  Fun  `' p
) ) ) )
79783imp 1190 . . . . . . . 8  |-  ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V )  /\  A  =/=  C
)  ->  ( (
f ( V Walks  E
) p  /\  ( # `
 f )  =  2  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) )  ->  Fun  `' p
) )
8079imp 429 . . . . . . 7  |-  ( ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V
)  /\  A  =/=  C )  /\  ( f ( V Walks  E ) p  /\  ( # `  f )  =  2  /\  ( A  =  ( p `  0
)  /\  B  =  ( p `  1
)  /\  C  =  ( p `  2
) ) ) )  ->  Fun  `' p
)
81 wlkdvspth 24314 . . . . . . 7  |-  ( ( f ( V Walks  E
) p  /\  Fun  `' p )  ->  f
( V SPaths  E )
p )
828, 80, 81syl2anc 661 . . . . . 6  |-  ( ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V
)  /\  A  =/=  C )  /\  ( f ( V Walks  E ) p  /\  ( # `  f )  =  2  /\  ( A  =  ( p `  0
)  /\  B  =  ( p `  1
)  /\  C  =  ( p `  2
) ) ) )  ->  f ( V SPaths  E ) p )
83 simpr2 1003 . . . . . 6  |-  ( ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V
)  /\  A  =/=  C )  /\  ( f ( V Walks  E ) p  /\  ( # `  f )  =  2  /\  ( A  =  ( p `  0
)  /\  B  =  ( p `  1
)  /\  C  =  ( p `  2
) ) ) )  ->  ( # `  f
)  =  2 )
84 simpr3 1004 . . . . . 6  |-  ( ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V
)  /\  A  =/=  C )  /\  ( f ( V Walks  E ) p  /\  ( # `  f )  =  2  /\  ( A  =  ( p `  0
)  /\  B  =  ( p `  1
)  /\  C  =  ( p `  2
) ) ) )  ->  ( A  =  ( p `  0
)  /\  B  =  ( p `  1
)  /\  C  =  ( p `  2
) ) )
8582, 83, 843jca 1176 . . . . 5  |-  ( ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V
)  /\  A  =/=  C )  /\  ( f ( V Walks  E ) p  /\  ( # `  f )  =  2  /\  ( A  =  ( p `  0
)  /\  B  =  ( p `  1
)  /\  C  =  ( p `  2
) ) ) )  ->  ( f ( V SPaths  E ) p  /\  ( # `  f
)  =  2  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) ) )
8685ex 434 . . . 4  |-  ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V )  /\  A  =/=  C
)  ->  ( (
f ( V Walks  E
) p  /\  ( # `
 f )  =  2  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) )  ->  ( f ( V SPaths  E ) p  /\  ( # `  f
)  =  2  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) ) ) )
87 spthispth 24279 . . . . . 6  |-  ( f ( V SPaths  E ) p  ->  f ( V Paths  E ) p )
88 pthistrl 24278 . . . . . 6  |-  ( f ( V Paths  E ) p  ->  f ( V Trails  E ) p )
89 trliswlk 24245 . . . . . 6  |-  ( f ( V Trails  E ) p  ->  f ( V Walks  E ) p )
9087, 88, 893syl 20 . . . . 5  |-  ( f ( V SPaths  E ) p  ->  f ( V Walks  E ) p )
91903anim1i 1182 . . . 4  |-  ( ( f ( V SPaths  E
) p  /\  ( # `
 f )  =  2  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) )  ->  ( f ( V Walks  E ) p  /\  ( # `  f
)  =  2  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) ) )
9286, 91impbid1 203 . . 3  |-  ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V )  /\  A  =/=  C
)  ->  ( (
f ( V Walks  E
) p  /\  ( # `
 f )  =  2  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) )  <-> 
( f ( V SPaths  E ) p  /\  ( # `  f )  =  2  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) ) ) )
93922exbidv 1692 . 2  |-  ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V )  /\  A  =/=  C
)  ->  ( E. f E. p ( f ( V Walks  E ) p  /\  ( # `  f )  =  2  /\  ( A  =  ( p `  0
)  /\  B  =  ( p `  1
)  /\  C  =  ( p `  2
) ) )  <->  E. f E. p ( f ( V SPaths  E ) p  /\  ( # `  f
)  =  2  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) ) ) )
947, 93bitrd 253 1  |-  ( ( V USGrph  E  /\  ( A  e.  V  /\  B  e.  V  /\  C  e.  V )  /\  A  =/=  C
)  ->  ( <. A ,  B ,  C >.  e.  ( A ( V 2WalksOnOt  E ) C )  <->  E. f E. p ( f ( V SPaths  E
) p  /\  ( # `
 f )  =  2  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 973    = wceq 1379   E.wex 1596    e. wcel 1767    =/= wne 2662   _Vcvv 3113   {cpr 4029   <.cotp 4035   class class class wbr 4447   `'ccnv 4998   dom cdm 4999   ran crn 5000   Fun wfun 5582   -->wf 5584   -1-1->wf1 5585   ` cfv 5588  (class class class)co 6284   0cc0 9492   1c1 9493   2c2 10585   ...cfz 11672  ..^cfzo 11792   #chash 12373   USGrph cusg 24034   Walks cwalk 24202   Trails ctrail 24203   Paths cpath 24204   SPaths cspath 24205   2WalksOnOt c2wlkonot 24559
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-rep 4558  ax-sep 4568  ax-nul 4576  ax-pow 4625  ax-pr 4686  ax-un 6576  ax-cnex 9548  ax-resscn 9549  ax-1cn 9550  ax-icn 9551  ax-addcl 9552  ax-addrcl 9553  ax-mulcl 9554  ax-mulrcl 9555  ax-mulcom 9556  ax-addass 9557  ax-mulass 9558  ax-distr 9559  ax-i2m1 9560  ax-1ne0 9561  ax-1rid 9562  ax-rnegex 9563  ax-rrecex 9564  ax-cnre 9565  ax-pre-lttri 9566  ax-pre-lttrn 9567  ax-pre-ltadd 9568  ax-pre-mulgt0 9569
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-nel 2665  df-ral 2819  df-rex 2820  df-reu 2821  df-rmo 2822  df-rab 2823  df-v 3115  df-sbc 3332  df-csb 3436  df-dif 3479  df-un 3481  df-in 3483  df-ss 3490  df-pss 3492  df-nul 3786  df-if 3940  df-pw 4012  df-sn 4028  df-pr 4030  df-tp 4032  df-op 4034  df-ot 4036  df-uni 4246  df-int 4283  df-iun 4327  df-br 4448  df-opab 4506  df-mpt 4507  df-tr 4541  df-eprel 4791  df-id 4795  df-po 4800  df-so 4801  df-fr 4838  df-we 4840  df-ord 4881  df-on 4882  df-lim 4883  df-suc 4884  df-xp 5005  df-rel 5006  df-cnv 5007  df-co 5008  df-dm 5009  df-rn 5010  df-res 5011  df-ima 5012  df-iota 5551  df-fun 5590  df-fn 5591  df-f 5592  df-f1 5593  df-fo 5594  df-f1o 5595  df-fv 5596  df-riota 6245  df-ov 6287  df-oprab 6288  df-mpt2 6289  df-om 6685  df-1st 6784  df-2nd 6785  df-recs 7042  df-rdg 7076  df-1o 7130  df-oadd 7134  df-er 7311  df-map 7422  df-pm 7423  df-en 7517  df-dom 7518  df-sdom 7519  df-fin 7520  df-card 8320  df-cda 8548  df-pnf 9630  df-mnf 9631  df-xr 9632  df-ltxr 9633  df-le 9634  df-sub 9807  df-neg 9808  df-nn 10537  df-2 10594  df-3 10595  df-n0 10796  df-z 10865  df-uz 11083  df-fz 11673  df-fzo 11793  df-hash 12374  df-word 12508  df-usgra 24037  df-wlk 24212  df-trail 24213  df-pth 24214  df-spth 24215  df-wlkon 24218  df-2wlkonot 24562
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator