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

Theorem usg2wotspth 25457
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 24911 . . . 4  |-  ( V USGrph  E  ->  ( V  e. 
_V  /\  E  e.  _V ) )
2 el2wlkonotot 25446 . . . . 5  |-  ( ( ( 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 ) ) ) ) )
323adantr2 1165 . . . 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 ) ) ) ) )
41, 3sylan 473 . . 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 ) ) ) ) )
543adant3 1025 . 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 ) ) ) ) )
6 simpr1 1011 . . . . . . 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 )
7 vex 3090 . . . . . . . . . . . . . . . . 17  |-  f  e. 
_V
8 vex 3090 . . . . . . . . . . . . . . . . 17  |-  p  e. 
_V
97, 8pm3.2i 456 . . . . . . . . . . . . . . . 16  |-  ( f  e.  _V  /\  p  e.  _V )
10 is2wlk 25140 . . . . . . . . . . . . . . . 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 ) } ) ) ) )
111, 9, 10sylancl 666 . . . . . . . . . . . . . . 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 ) } ) ) ) )
12 usgrafun 24922 . . . . . . . . . . . . . . . . . . . . 21  |-  ( V USGrph  E  ->  Fun  E )
13 c0ex 9636 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  0  e.  _V
1413prid1 4111 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  0  e.  { 0 ,  1 }
15 fzo0to2pr 11995 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( 0..^ 2 )  =  {
0 ,  1 }
1614, 15eleqtrri 2516 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  0  e.  ( 0..^ 2 )
17 ffvelrn 6035 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( f : ( 0..^ 2 ) --> dom  E  /\  0  e.  (
0..^ 2 ) )  ->  ( f ` 
0 )  e.  dom  E )
1816, 17mpan2 675 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( f : ( 0..^ 2 ) --> dom  E  ->  ( f `  0 )  e.  dom  E )
19 fvelrn 6030 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( Fun  E  /\  (
f `  0 )  e.  dom  E )  -> 
( E `  (
f `  0 )
)  e.  ran  E
)
2018, 19sylan2 476 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( Fun  E  /\  f : ( 0..^ 2 ) --> dom  E )  ->  ( E `  (
f `  0 )
)  e.  ran  E
)
21 eleq1 2501 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( E `  ( f `
 0 ) )  =  { ( p `
 0 ) ,  ( p `  1
) }  ->  (
( E `  (
f `  0 )
)  e.  ran  E  <->  { ( p `  0
) ,  ( p `
 1 ) }  e.  ran  E ) )
2220, 21syl5ibcom 223 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( Fun  E  /\  f : ( 0..^ 2 ) --> dom  E )  ->  ( ( E `  ( f `  0
) )  =  {
( p `  0
) ,  ( p `
 1 ) }  ->  { ( p `
 0 ) ,  ( p `  1
) }  e.  ran  E ) )
23 1ex 9637 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  1  e.  _V
2423prid2 4112 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  1  e.  { 0 ,  1 }
2524, 15eleqtrri 2516 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  1  e.  ( 0..^ 2 )
26 ffvelrn 6035 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( f : ( 0..^ 2 ) --> dom  E  /\  1  e.  (
0..^ 2 ) )  ->  ( f ` 
1 )  e.  dom  E )
2725, 26mpan2 675 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( f : ( 0..^ 2 ) --> dom  E  ->  ( f `  1 )  e.  dom  E )
28 fvelrn 6030 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( Fun  E  /\  (
f `  1 )  e.  dom  E )  -> 
( E `  (
f `  1 )
)  e.  ran  E
)
2927, 28sylan2 476 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( Fun  E  /\  f : ( 0..^ 2 ) --> dom  E )  ->  ( E `  (
f `  1 )
)  e.  ran  E
)
30 eleq1 2501 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( E `  ( f `
 1 ) )  =  { ( p `
 1 ) ,  ( p `  2
) }  ->  (
( E `  (
f `  1 )
)  e.  ran  E  <->  { ( p `  1
) ,  ( p `
 2 ) }  e.  ran  E ) )
3129, 30syl5ibcom 223 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( Fun  E  /\  f : ( 0..^ 2 ) --> dom  E )  ->  ( ( E `  ( f `  1
) )  =  {
( p `  1
) ,  ( p `
 2 ) }  ->  { ( p `
 1 ) ,  ( p `  2
) }  e.  ran  E ) )
3222, 31anim12d 565 . . . . . . . . . . . . . . . . . . . . 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
) ) )
3312, 32sylan 473 . . . . . . . . . . . . . . . . . . . 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
) ) )
34 simpllr 767 . . . . . . . . . . . . . . . . . . . . . . . . . 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 )
35 usgraedgrn 24954 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33  |-  ( ( V USGrph  E  /\  { ( p `  0 ) ,  ( p ` 
1 ) }  e.  ran  E )  ->  (
p `  0 )  =/=  ( p `  1
) )
3635ex 435 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32  |-  ( V USGrph  E  ->  ( { ( p `  0 ) ,  ( p ` 
1 ) }  e.  ran  E  ->  ( p `  0 )  =/=  ( p `  1
) ) )
37 usgraedgrn 24954 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33  |-  ( ( V USGrph  E  /\  { ( p `  1 ) ,  ( p ` 
2 ) }  e.  ran  E )  ->  (
p `  1 )  =/=  ( p `  2
) )
3837ex 435 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32  |-  ( V USGrph  E  ->  ( { ( p `  1 ) ,  ( p ` 
2 ) }  e.  ran  E  ->  ( p `  1 )  =/=  ( p `  2
) ) )
39 simplll 766 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35  |-  ( ( ( ( ( p `
 0 )  =/=  ( p `  1
)  /\  ( p `  1 )  =/=  ( p `  2
) )  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) )  /\  A  =/= 
C )  ->  (
p `  0 )  =/=  ( p `  1
) )
40 simpl 458 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40  |-  ( ( A  =  ( p `
 0 )  /\  C  =  ( p `  2 ) )  ->  A  =  ( p `  0 ) )
41 simpr 462 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40  |-  ( ( A  =  ( p `
 0 )  /\  C  =  ( p `  2 ) )  ->  C  =  ( p `  2 ) )
4240, 41neeq12d 2710 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39  |-  ( ( A  =  ( p `
 0 )  /\  C  =  ( p `  2 ) )  ->  ( A  =/= 
C  <->  ( p ` 
0 )  =/=  (
p `  2 )
) )
4342biimpd 210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38  |-  ( ( A  =  ( p `
 0 )  /\  C  =  ( p `  2 ) )  ->  ( A  =/= 
C  ->  ( p `  0 )  =/=  ( p `  2
) ) )
44433adant2 1024 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37  |-  ( ( A  =  ( p `
 0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  ( A  =/= 
C  ->  ( p `  0 )  =/=  ( p `  2
) ) )
4544adantl 467 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36  |-  ( ( ( ( p ` 
0 )  =/=  (
p `  1 )  /\  ( p `  1
)  =/=  ( p `
 2 ) )  /\  ( A  =  ( p `  0
)  /\  B  =  ( p `  1
)  /\  C  =  ( p `  2
) ) )  -> 
( A  =/=  C  ->  ( p `  0
)  =/=  ( p `
 2 ) ) )
4645imp 430 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35  |-  ( ( ( ( ( p `
 0 )  =/=  ( p `  1
)  /\  ( p `  1 )  =/=  ( p `  2
) )  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) )  /\  A  =/= 
C )  ->  (
p `  0 )  =/=  ( p `  2
) )
47 simpllr 767 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35  |-  ( ( ( ( ( p `
 0 )  =/=  ( p `  1
)  /\  ( p `  1 )  =/=  ( p `  2
) )  /\  ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) ) )  /\  A  =/= 
C )  ->  (
p `  1 )  =/=  ( p `  2
) )
4839, 46, 473jca 1185 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 ) ) )
4948exp31 607 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 ) ) ) ) )
5049a1i 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
) ) ) ) ) )
5136, 38, 50syl2and 485 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 ) ) ) ) ) )
5251imp 430 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
) ) ) ) )
5352adantr 466 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 ) ) ) ) )
5453com23 81 . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
) ) ) ) )
5554imp 430 . . . . . . . . . . . . . . . . . . . . . . . . . . 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
) ) ) )
5655imp 430 . . . . . . . . . . . . . . . . . . . . . . . . . 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
) ) )
57 eqid 2429 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  ( 0 ... 2 )  =  ( 0 ... 2
)
5857f13idfv 12209 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( p : ( 0 ... 2 ) -1-1-> V  <->  ( p : ( 0 ... 2 ) --> V  /\  ( ( p ` 
0 )  =/=  (
p `  1 )  /\  ( p `  0
)  =/=  ( p `
 2 )  /\  ( p `  1
)  =/=  ( p `
 2 ) ) ) )
5934, 56, 58sylanbrc 668 . . . . . . . . . . . . . . . . . . . . . . . . 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 )
60 df-f1 5606 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( p : ( 0 ... 2 ) -1-1-> V  <->  ( p : ( 0 ... 2 ) --> V  /\  Fun  `' p ) )
6159, 60sylib 199 . . . . . . . . . . . . . . . . . . . . . . . 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 ) )
6261simprd 464 . . . . . . . . . . . . . . . . . . . . . . 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
)
6362exp31 607 . . . . . . . . . . . . . . . . . . . . . 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
) ) )
6463exp31 607 . . . . . . . . . . . . . . . . . . . . 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
) ) ) ) )
6564adantr 466 . . . . . . . . . . . . . . . . . . . 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
) ) ) ) )
6633, 65syld 45 . . . . . . . . . . . . . . . . . . 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
) ) ) ) )
6766expcom 436 . . . . . . . . . . . . . . . . . 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
) ) ) ) ) )
6867com24 90 . . . . . . . . . . . . . . . . 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 ) ) ) ) ) )
69683imp 1199 . . . . . . . . . . . . . . . 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 ) ) ) )
7069com12 32 . . . . . . . . . . . . . . 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
) ) ) )
7111, 70sylbid 218 . . . . . . . . . . . . . 14  |-  ( V USGrph  E  ->  ( ( f ( V Walks  E ) p  /\  ( # `  f )  =  2 )  ->  ( A  =/=  C  ->  ( ( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  Fun  `' p
) ) ) )
7271com14 91 . . . . . . . . . . . . 13  |-  ( ( A  =  ( p `
 0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  ( ( f ( V Walks  E ) p  /\  ( # `  f )  =  2 )  ->  ( A  =/=  C  ->  ( V USGrph  E  ->  Fun  `' p
) ) ) )
7372com12 32 . . . . . . . . . . . 12  |-  ( ( f ( V Walks  E
) p  /\  ( # `
 f )  =  2 )  ->  (
( A  =  ( p `  0 )  /\  B  =  ( p `  1 )  /\  C  =  ( p `  2 ) )  ->  ( A  =/=  C  ->  ( V USGrph  E  ->  Fun  `' p
) ) ) )
74733impia 1202 . . . . . . . . . . 11  |-  ( ( f ( V Walks  E
) p  /\  ( # `
 f )  =  2  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) )  ->  ( A  =/= 
C  ->  ( V USGrph  E  ->  Fun  `' p
) ) )
7574com13 83 . . . . . . . . . 10  |-  ( V USGrph  E  ->  ( A  =/= 
C  ->  ( (
f ( V Walks  E
) p  /\  ( # `
 f )  =  2  /\  ( A  =  ( p ` 
0 )  /\  B  =  ( p ` 
1 )  /\  C  =  ( p ` 
2 ) ) )  ->  Fun  `' p
) ) )
7675a1d 26 . . . . . . . . 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
) ) ) )
77763imp 1199 . . . . . . . 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
) )
7877imp 430 . . . . . . 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
)
79 wlkdvspth 25183 . . . . . . 7  |-  ( ( f ( V Walks  E
) p  /\  Fun  `' p )  ->  f
( V SPaths  E )
p )
806, 78, 79syl2anc 665 . . . . . 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 )
81 simpr2 1012 . . . . . 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 )
82 simpr3 1013 . . . . . 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
) ) )
8380, 81, 823jca 1185 . . . . 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 ) ) ) )
8483ex 435 . . . 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 ) ) ) ) )
85 spthispth 25148 . . . . . 6  |-  ( f ( V SPaths  E ) p  ->  f ( V Paths  E ) p )
86 pthistrl 25147 . . . . . 6  |-  ( f ( V Paths  E ) p  ->  f ( V Trails  E ) p )
87 trliswlk 25114 . . . . . 6  |-  ( f ( V Trails  E ) p  ->  f ( V Walks  E ) p )
8885, 86, 873syl 18 . . . . 5  |-  ( f ( V SPaths  E ) p  ->  f ( V Walks  E ) p )
89883anim1i 1191 . . . 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 ) ) ) )
9084, 89impbid1 206 . . 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 ) ) ) ) )
91902exbidv 1763 . 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 ) ) ) ) )
925, 91bitrd 256 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 187    /\ wa 370    /\ w3a 982    = wceq 1437   E.wex 1659    e. wcel 1870    =/= wne 2625   _Vcvv 3087   {cpr 4004   <.cotp 4010   class class class wbr 4426   `'ccnv 4853   dom cdm 4854   ran crn 4855   Fun wfun 5595   -->wf 5597   -1-1->wf1 5598   ` cfv 5601  (class class class)co 6305   0cc0 9538   1c1 9539   2c2 10659   ...cfz 11782  ..^cfzo 11913   #chash 12512   USGrph cusg 24903   Walks cwalk 25071   Trails ctrail 25072   Paths cpath 25073   SPaths cspath 25074   2WalksOnOt c2wlkonot 25428
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1665  ax-4 1678  ax-5 1751  ax-6 1797  ax-7 1841  ax-8 1872  ax-9 1874  ax-10 1889  ax-11 1894  ax-12 1907  ax-13 2055  ax-ext 2407  ax-rep 4538  ax-sep 4548  ax-nul 4556  ax-pow 4603  ax-pr 4661  ax-un 6597  ax-cnex 9594  ax-resscn 9595  ax-1cn 9596  ax-icn 9597  ax-addcl 9598  ax-addrcl 9599  ax-mulcl 9600  ax-mulrcl 9601  ax-mulcom 9602  ax-addass 9603  ax-mulass 9604  ax-distr 9605  ax-i2m1 9606  ax-1ne0 9607  ax-1rid 9608  ax-rnegex 9609  ax-rrecex 9610  ax-cnre 9611  ax-pre-lttri 9612  ax-pre-lttrn 9613  ax-pre-ltadd 9614  ax-pre-mulgt0 9615
This theorem depends on definitions:  df-bi 188  df-or 371  df-an 372  df-3or 983  df-3an 984  df-tru 1440  df-ex 1660  df-nf 1664  df-sb 1790  df-eu 2270  df-mo 2271  df-clab 2415  df-cleq 2421  df-clel 2424  df-nfc 2579  df-ne 2627  df-nel 2628  df-ral 2787  df-rex 2788  df-reu 2789  df-rmo 2790  df-rab 2791  df-v 3089  df-sbc 3306  df-csb 3402  df-dif 3445  df-un 3447  df-in 3449  df-ss 3456  df-pss 3458  df-nul 3768  df-if 3916  df-pw 3987  df-sn 4003  df-pr 4005  df-tp 4007  df-op 4009  df-ot 4011  df-uni 4223  df-int 4259  df-iun 4304  df-br 4427  df-opab 4485  df-mpt 4486  df-tr 4521  df-eprel 4765  df-id 4769  df-po 4775  df-so 4776  df-fr 4813  df-we 4815  df-xp 4860  df-rel 4861  df-cnv 4862  df-co 4863  df-dm 4864  df-rn 4865  df-res 4866  df-ima 4867  df-pred 5399  df-ord 5445  df-on 5446  df-lim 5447  df-suc 5448  df-iota 5565  df-fun 5603  df-fn 5604  df-f 5605  df-f1 5606  df-fo 5607  df-f1o 5608  df-fv 5609  df-riota 6267  df-ov 6308  df-oprab 6309  df-mpt2 6310  df-om 6707  df-1st 6807  df-2nd 6808  df-wrecs 7036  df-recs 7098  df-rdg 7136  df-1o 7190  df-oadd 7194  df-er 7371  df-map 7482  df-pm 7483  df-en 7578  df-dom 7579  df-sdom 7580  df-fin 7581  df-card 8372  df-cda 8596  df-pnf 9676  df-mnf 9677  df-xr 9678  df-ltxr 9679  df-le 9680  df-sub 9861  df-neg 9862  df-nn 10610  df-2 10668  df-n0 10870  df-z 10938  df-uz 11160  df-fz 11783  df-fzo 11914  df-hash 12513  df-word 12651  df-usgra 24906  df-wlk 25081  df-trail 25082  df-pth 25083  df-spth 25084  df-wlkon 25087  df-2wlkonot 25431
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator