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

Theorem numclwwlk5 24984
Description: Huneke: "Let p be a prime divisor of k-1; then f(p) = 1 (mod p) [for each vertex v]". (Contributed by Alexander van der Vekens, 7-Oct-2018.)
Hypotheses
Ref Expression
numclwwlk.c  |-  C  =  ( n  e.  NN0  |->  ( ( V ClWWalksN  E ) `
 n ) )
numclwwlk.f  |-  F  =  ( v  e.  V ,  n  e.  NN0  |->  { w  e.  ( C `  n )  |  ( w ` 
0 )  =  v } )
Assertion
Ref Expression
numclwwlk5  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( ( # `  ( X F P ) )  mod  P )  =  1 )
Distinct variable groups:    n, E    n, V    w, C, n, v    n, X, v, w    v, V    w, E    w, V    w, F    w, P    v, E    v, K, w    P, n, v
Allowed substitution hints:    F( v, n)    K( n)

Proof of Theorem numclwwlk5
Dummy variables  m  u  z are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 simpl1 1000 . . . . 5  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  2  e.  Prime  /\  2  ||  ( K  -  1 ) ) )  ->  <. V ,  E >. RegUSGrph  K
)
2 simpr3 1005 . . . . 5  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  2  e.  Prime  /\  2  ||  ( K  -  1 ) ) )  -> 
2  ||  ( K  -  1 ) )
3 simpr1 1003 . . . . 5  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  2  e.  Prime  /\  2  ||  ( K  -  1 ) ) )  ->  X  e.  V )
4 numclwwlk.c . . . . . 6  |-  C  =  ( n  e.  NN0  |->  ( ( V ClWWalksN  E ) `
 n ) )
5 numclwwlk.f . . . . . 6  |-  F  =  ( v  e.  V ,  n  e.  NN0  |->  { w  e.  ( C `  n )  |  ( w ` 
0 )  =  v } )
64, 5numclwwlk5lem 24983 . . . . 5  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  2  ||  ( K  -  1 )  /\  X  e.  V )  ->  ( ( # `  ( X F 2 ) )  mod  2 )  =  1 )
71, 2, 3, 6syl3anc 1229 . . . 4  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  2  e.  Prime  /\  2  ||  ( K  -  1 ) ) )  -> 
( ( # `  ( X F 2 ) )  mod  2 )  =  1 )
87a1i 11 . . 3  |-  ( P  =  2  ->  (
( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  2  e.  Prime  /\  2  ||  ( K  -  1 ) ) )  ->  ( ( # `
 ( X F 2 ) )  mod  2 )  =  1 ) )
9 eleq1 2515 . . . . 5  |-  ( P  =  2  ->  ( P  e.  Prime  <->  2  e.  Prime ) )
10 breq1 4440 . . . . 5  |-  ( P  =  2  ->  ( P  ||  ( K  - 
1 )  <->  2  ||  ( K  -  1
) ) )
119, 103anbi23d 1303 . . . 4  |-  ( P  =  2  ->  (
( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) )  <-> 
( X  e.  V  /\  2  e.  Prime  /\  2  ||  ( K  -  1 ) ) ) )
1211anbi2d 703 . . 3  |-  ( P  =  2  ->  (
( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  <->  ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  2  e.  Prime  /\  2  ||  ( K  -  1 ) ) ) ) )
13 oveq2 6289 . . . . . 6  |-  ( P  =  2  ->  ( X F P )  =  ( X F 2 ) )
1413fveq2d 5860 . . . . 5  |-  ( P  =  2  ->  ( # `
 ( X F P ) )  =  ( # `  ( X F 2 ) ) )
15 id 22 . . . . 5  |-  ( P  =  2  ->  P  =  2 )
1614, 15oveq12d 6299 . . . 4  |-  ( P  =  2  ->  (
( # `  ( X F P ) )  mod  P )  =  ( ( # `  ( X F 2 ) )  mod  2 ) )
1716eqeq1d 2445 . . 3  |-  ( P  =  2  ->  (
( ( # `  ( X F P ) )  mod  P )  =  1  <->  ( ( # `  ( X F 2 ) )  mod  2
)  =  1 ) )
188, 12, 173imtr4d 268 . 2  |-  ( P  =  2  ->  (
( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  ->  ( ( # `
 ( X F P ) )  mod 
P )  =  1 ) )
19 3simpa 994 . . . . . . . 8  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  ->  ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E ) )
2019adantr 465 . . . . . . 7  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E ) )
2120adantl 466 . . . . . 6  |-  ( ( P  =/=  2  /\  ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) ) )  ->  ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E ) )
22 simprl3 1044 . . . . . 6  |-  ( ( P  =/=  2  /\  ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) ) )  ->  V  e.  Fin )
23 simprr1 1045 . . . . . 6  |-  ( ( P  =/=  2  /\  ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) ) )  ->  X  e.  V )
24 prmn2uzge3 14114 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  P  =/=  2 )  ->  P  e.  ( ZZ>= `  3 )
)
2524ex 434 . . . . . . . . 9  |-  ( P  e.  Prime  ->  ( P  =/=  2  ->  P  e.  ( ZZ>= `  3 )
) )
26253ad2ant2 1019 . . . . . . . 8  |-  ( ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) )  ->  ( P  =/=  2  ->  P  e.  ( ZZ>= `  3 )
) )
2726adantl 466 . . . . . . 7  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( P  =/=  2  ->  P  e.  ( ZZ>= ` 
3 ) ) )
2827impcom 430 . . . . . 6  |-  ( ( P  =/=  2  /\  ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) ) )  ->  P  e.  ( ZZ>= `  3 )
)
29 fveq1 5855 . . . . . . . . . . . 12  |-  ( u  =  w  ->  (
u `  0 )  =  ( w ` 
0 ) )
3029eqeq1d 2445 . . . . . . . . . . 11  |-  ( u  =  w  ->  (
( u `  0
)  =  v  <->  ( w `  0 )  =  v ) )
31 fveq1 5855 . . . . . . . . . . . 12  |-  ( u  =  w  ->  (
u `  ( n  -  2 ) )  =  ( w `  ( n  -  2
) ) )
3231, 29eqeq12d 2465 . . . . . . . . . . 11  |-  ( u  =  w  ->  (
( u `  (
n  -  2 ) )  =  ( u `
 0 )  <->  ( w `  ( n  -  2 ) )  =  ( w `  0 ) ) )
3330, 32anbi12d 710 . . . . . . . . . 10  |-  ( u  =  w  ->  (
( ( u ` 
0 )  =  v  /\  ( u `  ( n  -  2
) )  =  ( u `  0 ) )  <->  ( ( w `
 0 )  =  v  /\  ( w `
 ( n  - 
2 ) )  =  ( w `  0
) ) ) )
3433cbvrabv 3094 . . . . . . . . 9  |-  { u  e.  ( C `  n
)  |  ( ( u `  0 )  =  v  /\  (
u `  ( n  -  2 ) )  =  ( u ` 
0 ) ) }  =  { w  e.  ( C `  n
)  |  ( ( w `  0 )  =  v  /\  (
w `  ( n  -  2 ) )  =  ( w ` 
0 ) ) }
3534a1i 11 . . . . . . . 8  |-  ( ( v  e.  V  /\  n  e.  ( ZZ>= ` 
2 ) )  ->  { u  e.  ( C `  n )  |  ( ( u `
 0 )  =  v  /\  ( u `
 ( n  - 
2 ) )  =  ( u `  0
) ) }  =  { w  e.  ( C `  n )  |  ( ( w `
 0 )  =  v  /\  ( w `
 ( n  - 
2 ) )  =  ( w `  0
) ) } )
3635mpt2eq3ia 6347 . . . . . . 7  |-  ( v  e.  V ,  n  e.  ( ZZ>= `  2 )  |->  { u  e.  ( C `  n )  |  ( ( u `
 0 )  =  v  /\  ( u `
 ( n  - 
2 ) )  =  ( u `  0
) ) } )  =  ( v  e.  V ,  n  e.  ( ZZ>= `  2 )  |->  { w  e.  ( C `  n )  |  ( ( w `
 0 )  =  v  /\  ( w `
 ( n  - 
2 ) )  =  ( w `  0
) ) } )
37 fveq2 5856 . . . . . . . . . . . 12  |-  ( u  =  w  ->  ( lastS  `  u )  =  ( lastS  `  w ) )
3837neeq1d 2720 . . . . . . . . . . 11  |-  ( u  =  w  ->  (
( lastS  `  u )  =/=  v  <->  ( lastS  `  w )  =/=  v ) )
3930, 38anbi12d 710 . . . . . . . . . 10  |-  ( u  =  w  ->  (
( ( u ` 
0 )  =  v  /\  ( lastS  `  u
)  =/=  v )  <-> 
( ( w ` 
0 )  =  v  /\  ( lastS  `  w
)  =/=  v ) ) )
4039cbvrabv 3094 . . . . . . . . 9  |-  { u  e.  ( ( V WWalksN  E
) `  n )  |  ( ( u `
 0 )  =  v  /\  ( lastS  `  u
)  =/=  v ) }  =  { w  e.  ( ( V WWalksN  E
) `  n )  |  ( ( w `
 0 )  =  v  /\  ( lastS  `  w
)  =/=  v ) }
4140a1i 11 . . . . . . . 8  |-  ( ( v  e.  V  /\  n  e.  NN0 )  ->  { u  e.  (
( V WWalksN  E ) `  n )  |  ( ( u `  0
)  =  v  /\  ( lastS  `  u )  =/=  v ) }  =  { w  e.  (
( V WWalksN  E ) `  n )  |  ( ( w `  0
)  =  v  /\  ( lastS  `  w )  =/=  v ) } )
4241mpt2eq3ia 6347 . . . . . . 7  |-  ( v  e.  V ,  n  e.  NN0  |->  { u  e.  ( ( V WWalksN  E
) `  n )  |  ( ( u `
 0 )  =  v  /\  ( lastS  `  u
)  =/=  v ) } )  =  ( v  e.  V ,  n  e.  NN0  |->  { w  e.  ( ( V WWalksN  E
) `  n )  |  ( ( w `
 0 )  =  v  /\  ( lastS  `  w
)  =/=  v ) } )
43 eqeq2 2458 . . . . . . . . . 10  |-  ( z  =  v  ->  (
( u `  0
)  =  z  <->  ( u `  0 )  =  v ) )
4443anbi1d 704 . . . . . . . . 9  |-  ( z  =  v  ->  (
( ( u ` 
0 )  =  z  /\  ( u `  ( m  -  2
) )  =/=  (
u `  0 )
)  <->  ( ( u `
 0 )  =  v  /\  ( u `
 ( m  - 
2 ) )  =/=  ( u `  0
) ) ) )
4544rabbidv 3087 . . . . . . . 8  |-  ( z  =  v  ->  { u  e.  ( C `  m
)  |  ( ( u `  0 )  =  z  /\  (
u `  ( m  -  2 ) )  =/=  ( u ` 
0 ) ) }  =  { u  e.  ( C `  m
)  |  ( ( u `  0 )  =  v  /\  (
u `  ( m  -  2 ) )  =/=  ( u ` 
0 ) ) } )
46 fveq2 5856 . . . . . . . . . 10  |-  ( m  =  n  ->  ( C `  m )  =  ( C `  n ) )
47 oveq1 6288 . . . . . . . . . . . . 13  |-  ( m  =  n  ->  (
m  -  2 )  =  ( n  - 
2 ) )
4847fveq2d 5860 . . . . . . . . . . . 12  |-  ( m  =  n  ->  (
u `  ( m  -  2 ) )  =  ( u `  ( n  -  2
) ) )
4948neeq1d 2720 . . . . . . . . . . 11  |-  ( m  =  n  ->  (
( u `  (
m  -  2 ) )  =/=  ( u `
 0 )  <->  ( u `  ( n  -  2 ) )  =/=  (
u `  0 )
) )
5049anbi2d 703 . . . . . . . . . 10  |-  ( m  =  n  ->  (
( ( u ` 
0 )  =  v  /\  ( u `  ( m  -  2
) )  =/=  (
u `  0 )
)  <->  ( ( u `
 0 )  =  v  /\  ( u `
 ( n  - 
2 ) )  =/=  ( u `  0
) ) ) )
5146, 50rabeqbidv 3090 . . . . . . . . 9  |-  ( m  =  n  ->  { u  e.  ( C `  m
)  |  ( ( u `  0 )  =  v  /\  (
u `  ( m  -  2 ) )  =/=  ( u ` 
0 ) ) }  =  { u  e.  ( C `  n
)  |  ( ( u `  0 )  =  v  /\  (
u `  ( n  -  2 ) )  =/=  ( u ` 
0 ) ) } )
5231, 29neeq12d 2722 . . . . . . . . . . 11  |-  ( u  =  w  ->  (
( u `  (
n  -  2 ) )  =/=  ( u `
 0 )  <->  ( w `  ( n  -  2 ) )  =/=  (
w `  0 )
) )
5330, 52anbi12d 710 . . . . . . . . . 10  |-  ( u  =  w  ->  (
( ( u ` 
0 )  =  v  /\  ( u `  ( n  -  2
) )  =/=  (
u `  0 )
)  <->  ( ( w `
 0 )  =  v  /\  ( w `
 ( n  - 
2 ) )  =/=  ( w `  0
) ) ) )
5453cbvrabv 3094 . . . . . . . . 9  |-  { u  e.  ( C `  n
)  |  ( ( u `  0 )  =  v  /\  (
u `  ( n  -  2 ) )  =/=  ( u ` 
0 ) ) }  =  { w  e.  ( C `  n
)  |  ( ( w `  0 )  =  v  /\  (
w `  ( n  -  2 ) )  =/=  ( w ` 
0 ) ) }
5551, 54syl6eq 2500 . . . . . . . 8  |-  ( m  =  n  ->  { u  e.  ( C `  m
)  |  ( ( u `  0 )  =  v  /\  (
u `  ( m  -  2 ) )  =/=  ( u ` 
0 ) ) }  =  { w  e.  ( C `  n
)  |  ( ( w `  0 )  =  v  /\  (
w `  ( n  -  2 ) )  =/=  ( w ` 
0 ) ) } )
5645, 55cbvmpt2v 6362 . . . . . . 7  |-  ( z  e.  V ,  m  e.  NN0  |->  { u  e.  ( C `  m
)  |  ( ( u `  0 )  =  z  /\  (
u `  ( m  -  2 ) )  =/=  ( u ` 
0 ) ) } )  =  ( v  e.  V ,  n  e.  NN0  |->  { w  e.  ( C `  n
)  |  ( ( w `  0 )  =  v  /\  (
w `  ( n  -  2 ) )  =/=  ( w ` 
0 ) ) } )
574, 5, 36, 42, 56numclwwlk3 24981 . . . . . 6  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  P  e.  ( ZZ>= ` 
3 ) ) )  ->  ( # `  ( X F P ) )  =  ( ( ( K  -  1 )  x.  ( # `  ( X F ( P  - 
2 ) ) ) )  +  ( K ^ ( P  - 
2 ) ) ) )
5821, 22, 23, 28, 57syl13anc 1231 . . . . 5  |-  ( ( P  =/=  2  /\  ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) ) )  ->  ( # `
 ( X F P ) )  =  ( ( ( K  -  1 )  x.  ( # `  ( X F ( P  - 
2 ) ) ) )  +  ( K ^ ( P  - 
2 ) ) ) )
5958oveq1d 6296 . . . 4  |-  ( ( P  =/=  2  /\  ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) ) )  ->  (
( # `  ( X F P ) )  mod  P )  =  ( ( ( ( K  -  1 )  x.  ( # `  ( X F ( P  - 
2 ) ) ) )  +  ( K ^ ( P  - 
2 ) ) )  mod  P ) )
60 rusgraprop 24801 . . . . . . . . . . . . 13  |-  ( <. V ,  E >. RegUSGrph  K  ->  ( V USGrph  E  /\  K  e.  NN0  /\  A. v  e.  V  (
( V VDeg  E ) `  v )  =  K ) )
61 nn0z 10893 . . . . . . . . . . . . . 14  |-  ( K  e.  NN0  ->  K  e.  ZZ )
62613ad2ant2 1019 . . . . . . . . . . . . 13  |-  ( ( V USGrph  E  /\  K  e. 
NN0  /\  A. v  e.  V  ( ( V VDeg  E ) `  v
)  =  K )  ->  K  e.  ZZ )
6360, 62syl 16 . . . . . . . . . . . 12  |-  ( <. V ,  E >. RegUSGrph  K  ->  K  e.  ZZ )
6463zred 10974 . . . . . . . . . . 11  |-  ( <. V ,  E >. RegUSGrph  K  ->  K  e.  RR )
65 peano2rem 9891 . . . . . . . . . . 11  |-  ( K  e.  RR  ->  ( K  -  1 )  e.  RR )
6664, 65syl 16 . . . . . . . . . 10  |-  ( <. V ,  E >. RegUSGrph  K  ->  ( K  -  1 )  e.  RR )
67663ad2ant1 1018 . . . . . . . . 9  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  ->  ( K  -  1 )  e.  RR )
6867adantr 465 . . . . . . . 8  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( K  -  1 )  e.  RR )
69 rusisusgra 24803 . . . . . . . . . . . . . . 15  |-  ( <. V ,  E >. RegUSGrph  K  ->  V USGrph  E )
70 usgrav 24210 . . . . . . . . . . . . . . . 16  |-  ( V USGrph  E  ->  ( V  e. 
_V  /\  E  e.  _V ) )
7170simprd 463 . . . . . . . . . . . . . . 15  |-  ( V USGrph  E  ->  E  e.  _V )
7269, 71syl 16 . . . . . . . . . . . . . 14  |-  ( <. V ,  E >. RegUSGrph  K  ->  E  e.  _V )
7372anim1i 568 . . . . . . . . . . . . 13  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V  e.  Fin )  ->  ( E  e. 
_V  /\  V  e.  Fin ) )
7473ancomd 451 . . . . . . . . . . . 12  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V  e.  Fin )  ->  ( V  e. 
Fin  /\  E  e.  _V ) )
75743adant2 1016 . . . . . . . . . . 11  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  ->  ( V  e.  Fin  /\  E  e.  _V ) )
76 prmm2nn0 14115 . . . . . . . . . . . . 13  |-  ( P  e.  Prime  ->  ( P  -  2 )  e. 
NN0 )
7776anim2i 569 . . . . . . . . . . . 12  |-  ( ( X  e.  V  /\  P  e.  Prime )  -> 
( X  e.  V  /\  ( P  -  2 )  e.  NN0 )
)
78773adant3 1017 . . . . . . . . . . 11  |-  ( ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) )  ->  ( X  e.  V  /\  ( P  -  2
)  e.  NN0 )
)
794, 5numclwwlkffin 24954 . . . . . . . . . . 11  |-  ( ( ( V  e.  Fin  /\  E  e.  _V )  /\  ( X  e.  V  /\  ( P  -  2 )  e.  NN0 )
)  ->  ( X F ( P  - 
2 ) )  e. 
Fin )
8075, 78, 79syl2an 477 . . . . . . . . . 10  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( X F ( P  -  2 ) )  e.  Fin )
81 hashcl 12407 . . . . . . . . . 10  |-  ( ( X F ( P  -  2 ) )  e.  Fin  ->  ( # `
 ( X F ( P  -  2 ) ) )  e. 
NN0 )
8280, 81syl 16 . . . . . . . . 9  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( # `  ( X F ( P  - 
2 ) ) )  e.  NN0 )
8382nn0red 10859 . . . . . . . 8  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( # `  ( X F ( P  - 
2 ) ) )  e.  RR )
8468, 83remulcld 9627 . . . . . . 7  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( ( K  - 
1 )  x.  ( # `
 ( X F ( P  -  2 ) ) ) )  e.  RR )
85643ad2ant1 1018 . . . . . . . 8  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  ->  K  e.  RR )
86763ad2ant2 1019 . . . . . . . 8  |-  ( ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) )  ->  ( P  -  2 )  e.  NN0 )
87 reexpcl 12162 . . . . . . . 8  |-  ( ( K  e.  RR  /\  ( P  -  2
)  e.  NN0 )  ->  ( K ^ ( P  -  2 ) )  e.  RR )
8885, 86, 87syl2an 477 . . . . . . 7  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( K ^ ( P  -  2 ) )  e.  RR )
89 prmnn 14097 . . . . . . . . . 10  |-  ( P  e.  Prime  ->  P  e.  NN )
9089nnrpd 11264 . . . . . . . . 9  |-  ( P  e.  Prime  ->  P  e.  RR+ )
91903ad2ant2 1019 . . . . . . . 8  |-  ( ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) )  ->  P  e.  RR+ )
9291adantl 466 . . . . . . 7  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  ->  P  e.  RR+ )
9384, 88, 923jca 1177 . . . . . 6  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( ( ( K  -  1 )  x.  ( # `  ( X F ( P  - 
2 ) ) ) )  e.  RR  /\  ( K ^ ( P  -  2 ) )  e.  RR  /\  P  e.  RR+ ) )
9493adantl 466 . . . . 5  |-  ( ( P  =/=  2  /\  ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) ) )  ->  (
( ( K  - 
1 )  x.  ( # `
 ( X F ( P  -  2 ) ) ) )  e.  RR  /\  ( K ^ ( P  - 
2 ) )  e.  RR  /\  P  e.  RR+ ) )
95 modaddabs 12013 . . . . . 6  |-  ( ( ( ( K  - 
1 )  x.  ( # `
 ( X F ( P  -  2 ) ) ) )  e.  RR  /\  ( K ^ ( P  - 
2 ) )  e.  RR  /\  P  e.  RR+ )  ->  ( ( ( ( ( K  -  1 )  x.  ( # `  ( X F ( P  - 
2 ) ) ) )  mod  P )  +  ( ( K ^ ( P  - 
2 ) )  mod 
P ) )  mod 
P )  =  ( ( ( ( K  -  1 )  x.  ( # `  ( X F ( P  - 
2 ) ) ) )  +  ( K ^ ( P  - 
2 ) ) )  mod  P ) )
9695eqcomd 2451 . . . . 5  |-  ( ( ( ( K  - 
1 )  x.  ( # `
 ( X F ( P  -  2 ) ) ) )  e.  RR  /\  ( K ^ ( P  - 
2 ) )  e.  RR  /\  P  e.  RR+ )  ->  ( ( ( ( K  - 
1 )  x.  ( # `
 ( X F ( P  -  2 ) ) ) )  +  ( K ^
( P  -  2 ) ) )  mod 
P )  =  ( ( ( ( ( K  -  1 )  x.  ( # `  ( X F ( P  - 
2 ) ) ) )  mod  P )  +  ( ( K ^ ( P  - 
2 ) )  mod 
P ) )  mod 
P ) )
9794, 96syl 16 . . . 4  |-  ( ( P  =/=  2  /\  ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) ) )  ->  (
( ( ( K  -  1 )  x.  ( # `  ( X F ( P  - 
2 ) ) ) )  +  ( K ^ ( P  - 
2 ) ) )  mod  P )  =  ( ( ( ( ( K  -  1 )  x.  ( # `  ( X F ( P  -  2 ) ) ) )  mod 
P )  +  ( ( K ^ ( P  -  2 ) )  mod  P ) )  mod  P ) )
98893ad2ant2 1019 . . . . . . . . . . 11  |-  ( ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) )  ->  P  e.  NN )
9998adantl 466 . . . . . . . . . 10  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  ->  P  e.  NN )
100 peano2zm 10913 . . . . . . . . . . . . 13  |-  ( K  e.  ZZ  ->  ( K  -  1 )  e.  ZZ )
10163, 100syl 16 . . . . . . . . . . . 12  |-  ( <. V ,  E >. RegUSGrph  K  ->  ( K  -  1 )  e.  ZZ )
1021013ad2ant1 1018 . . . . . . . . . . 11  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  ->  ( K  -  1 )  e.  ZZ )
103102adantr 465 . . . . . . . . . 10  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( K  -  1 )  e.  ZZ )
10482nn0zd 10972 . . . . . . . . . 10  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( # `  ( X F ( P  - 
2 ) ) )  e.  ZZ )
10599, 103, 1043jca 1177 . . . . . . . . 9  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( P  e.  NN  /\  ( K  -  1 )  e.  ZZ  /\  ( # `  ( X F ( P  - 
2 ) ) )  e.  ZZ ) )
106 simpr3 1005 . . . . . . . . 9  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  ->  P  ||  ( K  - 
1 ) )
107 mulmoddvds 13921 . . . . . . . . 9  |-  ( ( P  e.  NN  /\  ( K  -  1
)  e.  ZZ  /\  ( # `  ( X F ( P  - 
2 ) ) )  e.  ZZ )  -> 
( P  ||  ( K  -  1 )  ->  ( ( ( K  -  1 )  x.  ( # `  ( X F ( P  - 
2 ) ) ) )  mod  P )  =  0 ) )
108105, 106, 107sylc 60 . . . . . . . 8  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( ( ( K  -  1 )  x.  ( # `  ( X F ( P  - 
2 ) ) ) )  mod  P )  =  0 )
109633ad2ant1 1018 . . . . . . . . . 10  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  ->  K  e.  ZZ )
110 simp2 998 . . . . . . . . . 10  |-  ( ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) )  ->  P  e.  Prime )
111109, 110anim12ci 567 . . . . . . . . 9  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( P  e.  Prime  /\  K  e.  ZZ ) )
112 powm2modprm 14205 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  ZZ )  ->  ( P  ||  ( K  - 
1 )  ->  (
( K ^ ( P  -  2 ) )  mod  P )  =  1 ) )
113111, 106, 112sylc 60 . . . . . . . 8  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( ( K ^
( P  -  2 ) )  mod  P
)  =  1 )
114108, 113oveq12d 6299 . . . . . . 7  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( ( ( ( K  -  1 )  x.  ( # `  ( X F ( P  - 
2 ) ) ) )  mod  P )  +  ( ( K ^ ( P  - 
2 ) )  mod 
P ) )  =  ( 0  +  1 ) )
115114oveq1d 6296 . . . . . 6  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( ( ( ( ( K  -  1 )  x.  ( # `  ( X F ( P  -  2 ) ) ) )  mod 
P )  +  ( ( K ^ ( P  -  2 ) )  mod  P ) )  mod  P )  =  ( ( 0  +  1 )  mod 
P ) )
116 0p1e1 10653 . . . . . . . . . 10  |-  ( 0  +  1 )  =  1
117116oveq1i 6291 . . . . . . . . 9  |-  ( ( 0  +  1 )  mod  P )  =  ( 1  mod  P
)
11889nnred 10557 . . . . . . . . . 10  |-  ( P  e.  Prime  ->  P  e.  RR )
119 prmgt1 14113 . . . . . . . . . 10  |-  ( P  e.  Prime  ->  1  < 
P )
120 1mod 12007 . . . . . . . . . 10  |-  ( ( P  e.  RR  /\  1  <  P )  -> 
( 1  mod  P
)  =  1 )
121118, 119, 120syl2anc 661 . . . . . . . . 9  |-  ( P  e.  Prime  ->  ( 1  mod  P )  =  1 )
122117, 121syl5eq 2496 . . . . . . . 8  |-  ( P  e.  Prime  ->  ( ( 0  +  1 )  mod  P )  =  1 )
1231223ad2ant2 1019 . . . . . . 7  |-  ( ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) )  ->  (
( 0  +  1 )  mod  P )  =  1 )
124123adantl 466 . . . . . 6  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( ( 0  +  1 )  mod  P
)  =  1 )
125115, 124eqtrd 2484 . . . . 5  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( ( ( ( ( K  -  1 )  x.  ( # `  ( X F ( P  -  2 ) ) ) )  mod 
P )  +  ( ( K ^ ( P  -  2 ) )  mod  P ) )  mod  P )  =  1 )
126125adantl 466 . . . 4  |-  ( ( P  =/=  2  /\  ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) ) )  ->  (
( ( ( ( K  -  1 )  x.  ( # `  ( X F ( P  - 
2 ) ) ) )  mod  P )  +  ( ( K ^ ( P  - 
2 ) )  mod 
P ) )  mod 
P )  =  1 )
12759, 97, 1263eqtrd 2488 . . 3  |-  ( ( P  =/=  2  /\  ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) ) )  ->  (
( # `  ( X F P ) )  mod  P )  =  1 )
128127ex 434 . 2  |-  ( P  =/=  2  ->  (
( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  ->  ( ( # `
 ( X F P ) )  mod 
P )  =  1 ) )
12918, 128pm2.61ine 2756 1  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E  /\  V  e.  Fin )  /\  ( X  e.  V  /\  P  e.  Prime  /\  P  ||  ( K  -  1 ) ) )  -> 
( ( # `  ( X F P ) )  mod  P )  =  1 )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    /\ w3a 974    = wceq 1383    e. wcel 1804    =/= wne 2638   A.wral 2793   {crab 2797   _Vcvv 3095   <.cop 4020   class class class wbr 4437    |-> cmpt 4495   ` cfv 5578  (class class class)co 6281    |-> cmpt2 6283   Fincfn 7518   RRcr 9494   0cc0 9495   1c1 9496    + caddc 9498    x. cmul 9500    < clt 9631    - cmin 9810   NNcn 10542   2c2 10591   3c3 10592   NN0cn0 10801   ZZcz 10870   ZZ>=cuz 11090   RR+crp 11229    mod cmo 11975   ^cexp 12145   #chash 12384   lastS clsw 12514    || cdvds 13863   Primecprime 14094   USGrph cusg 24202   WWalksN cwwlkn 24550   ClWWalksN cclwwlkn 24621   VDeg cvdg 24765   RegUSGrph crusgra 24795   FriendGrph cfrgra 24860
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1605  ax-4 1618  ax-5 1691  ax-6 1734  ax-7 1776  ax-8 1806  ax-9 1808  ax-10 1823  ax-11 1828  ax-12 1840  ax-13 1985  ax-ext 2421  ax-rep 4548  ax-sep 4558  ax-nul 4566  ax-pow 4615  ax-pr 4676  ax-un 6577  ax-inf2 8061  ax-cnex 9551  ax-resscn 9552  ax-1cn 9553  ax-icn 9554  ax-addcl 9555  ax-addrcl 9556  ax-mulcl 9557  ax-mulrcl 9558  ax-mulcom 9559  ax-addass 9560  ax-mulass 9561  ax-distr 9562  ax-i2m1 9563  ax-1ne0 9564  ax-1rid 9565  ax-rnegex 9566  ax-rrecex 9567  ax-cnre 9568  ax-pre-lttri 9569  ax-pre-lttrn 9570  ax-pre-ltadd 9571  ax-pre-mulgt0 9572  ax-pre-sup 9573
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 975  df-3an 976  df-tru 1386  df-fal 1389  df-ex 1600  df-nf 1604  df-sb 1727  df-eu 2272  df-mo 2273  df-clab 2429  df-cleq 2435  df-clel 2438  df-nfc 2593  df-ne 2640  df-nel 2641  df-ral 2798  df-rex 2799  df-reu 2800  df-rmo 2801  df-rab 2802  df-v 3097  df-sbc 3314  df-csb 3421  df-dif 3464  df-un 3466  df-in 3468  df-ss 3475  df-pss 3477  df-nul 3771  df-if 3927  df-pw 3999  df-sn 4015  df-pr 4017  df-tp 4019  df-op 4021  df-uni 4235  df-int 4272  df-iun 4317  df-disj 4408  df-br 4438  df-opab 4496  df-mpt 4497  df-tr 4531  df-eprel 4781  df-id 4785  df-po 4790  df-so 4791  df-fr 4828  df-se 4829  df-we 4830  df-ord 4871  df-on 4872  df-lim 4873  df-suc 4874  df-xp 4995  df-rel 4996  df-cnv 4997  df-co 4998  df-dm 4999  df-rn 5000  df-res 5001  df-ima 5002  df-iota 5541  df-fun 5580  df-fn 5581  df-f 5582  df-f1 5583  df-fo 5584  df-f1o 5585  df-fv 5586  df-isom 5587  df-riota 6242  df-ov 6284  df-oprab 6285  df-mpt2 6286  df-om 6686  df-1st 6785  df-2nd 6786  df-recs 7044  df-rdg 7078  df-1o 7132  df-2o 7133  df-oadd 7136  df-er 7313  df-map 7424  df-pm 7425  df-en 7519  df-dom 7520  df-sdom 7521  df-fin 7522  df-sup 7903  df-oi 7938  df-card 8323  df-cda 8551  df-pnf 9633  df-mnf 9634  df-xr 9635  df-ltxr 9636  df-le 9637  df-sub 9812  df-neg 9813  df-div 10213  df-nn 10543  df-2 10600  df-3 10601  df-n0 10802  df-z 10871  df-uz 11091  df-rp 11230  df-xadd 11328  df-fz 11682  df-fzo 11804  df-fl 11908  df-mod 11976  df-seq 12087  df-exp 12146  df-hash 12385  df-word 12521  df-lsw 12522  df-concat 12523  df-s1 12524  df-substr 12525  df-s2 12792  df-cj 12911  df-re 12912  df-im 12913  df-sqrt 13047  df-abs 13048  df-clim 13290  df-sum 13488  df-dvds 13864  df-gcd 14022  df-prm 14095  df-phi 14173  df-usgra 24205  df-nbgra 24292  df-wlk 24380  df-wwlk 24551  df-wwlkn 24552  df-clwwlk 24623  df-clwwlkn 24624  df-vdgr 24766  df-rgra 24796  df-rusgra 24797  df-frgra 24861
This theorem is referenced by:  numclwwlk6  24985
  Copyright terms: Public domain W3C validator