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

Theorem nnnn0modprm0 14343
Description: For a positive integer and a nonnegative integer both less than a given prime number there is always a second nonnegative integer (less than the given prime number) so that the sum of this second nonnegative integer multiplied with the positive integer and the first nonnegative integer is 0 ( modulo the given prime number). (Contributed by Alexander van der Vekens, 8-Nov-2018.)
Assertion
Ref Expression
nnnn0modprm0  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P )  /\  I  e.  ( 0..^ P ) )  ->  E. j  e.  ( 0..^ P ) ( ( I  +  ( j  x.  N ) )  mod  P )  =  0 )
Distinct variable groups:    j, I    j, N    P, j

Proof of Theorem nnnn0modprm0
StepHypRef Expression
1 prmnn 14232 . . . . . 6  |-  ( P  e.  Prime  ->  P  e.  NN )
21adantr 465 . . . . 5  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  P  e.  NN )
3 fzo0sn0fzo1 11905 . . . . 5  |-  ( P  e.  NN  ->  (
0..^ P )  =  ( { 0 }  u.  ( 1..^ P ) ) )
42, 3syl 16 . . . 4  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  ( 0..^ P )  =  ( { 0 }  u.  ( 1..^ P ) ) )
54eleq2d 2527 . . 3  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  ( I  e.  ( 0..^ P )  <-> 
I  e.  ( { 0 }  u.  (
1..^ P ) ) ) )
6 elun 3641 . . . . 5  |-  ( I  e.  ( { 0 }  u.  ( 1..^ P ) )  <->  ( I  e.  { 0 }  \/  I  e.  ( 1..^ P ) ) )
7 elsni 4057 . . . . . . 7  |-  ( I  e.  { 0 }  ->  I  =  0 )
8 lbfzo0 11861 . . . . . . . . . . . . 13  |-  ( 0  e.  ( 0..^ P )  <->  P  e.  NN )
91, 8sylibr 212 . . . . . . . . . . . 12  |-  ( P  e.  Prime  ->  0  e.  ( 0..^ P ) )
109adantr 465 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  0  e.  ( 0..^ P ) )
11 elfzoelz 11826 . . . . . . . . . . . . . . 15  |-  ( N  e.  ( 1..^ P )  ->  N  e.  ZZ )
12 zcn 10890 . . . . . . . . . . . . . . 15  |-  ( N  e.  ZZ  ->  N  e.  CC )
13 mul02 9775 . . . . . . . . . . . . . . . . 17  |-  ( N  e.  CC  ->  (
0  x.  N )  =  0 )
1413oveq2d 6312 . . . . . . . . . . . . . . . 16  |-  ( N  e.  CC  ->  (
0  +  ( 0  x.  N ) )  =  ( 0  +  0 ) )
15 00id 9772 . . . . . . . . . . . . . . . 16  |-  ( 0  +  0 )  =  0
1614, 15syl6eq 2514 . . . . . . . . . . . . . . 15  |-  ( N  e.  CC  ->  (
0  +  ( 0  x.  N ) )  =  0 )
1711, 12, 163syl 20 . . . . . . . . . . . . . 14  |-  ( N  e.  ( 1..^ P )  ->  ( 0  +  ( 0  x.  N ) )  =  0 )
1817adantl 466 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  ( 0  +  ( 0  x.  N ) )  =  0 )
1918oveq1d 6311 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  ( (
0  +  ( 0  x.  N ) )  mod  P )  =  ( 0  mod  P
) )
20 nnrp 11254 . . . . . . . . . . . . . 14  |-  ( P  e.  NN  ->  P  e.  RR+ )
21 0mod 12030 . . . . . . . . . . . . . 14  |-  ( P  e.  RR+  ->  ( 0  mod  P )  =  0 )
221, 20, 213syl 20 . . . . . . . . . . . . 13  |-  ( P  e.  Prime  ->  ( 0  mod  P )  =  0 )
2322adantr 465 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  ( 0  mod  P )  =  0 )
2419, 23eqtrd 2498 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  ( (
0  +  ( 0  x.  N ) )  mod  P )  =  0 )
25 oveq1 6303 . . . . . . . . . . . . . . 15  |-  ( j  =  0  ->  (
j  x.  N )  =  ( 0  x.  N ) )
2625oveq2d 6312 . . . . . . . . . . . . . 14  |-  ( j  =  0  ->  (
0  +  ( j  x.  N ) )  =  ( 0  +  ( 0  x.  N
) ) )
2726oveq1d 6311 . . . . . . . . . . . . 13  |-  ( j  =  0  ->  (
( 0  +  ( j  x.  N ) )  mod  P )  =  ( ( 0  +  ( 0  x.  N ) )  mod 
P ) )
2827eqeq1d 2459 . . . . . . . . . . . 12  |-  ( j  =  0  ->  (
( ( 0  +  ( j  x.  N
) )  mod  P
)  =  0  <->  (
( 0  +  ( 0  x.  N ) )  mod  P )  =  0 ) )
2928rspcev 3210 . . . . . . . . . . 11  |-  ( ( 0  e.  ( 0..^ P )  /\  (
( 0  +  ( 0  x.  N ) )  mod  P )  =  0 )  ->  E. j  e.  (
0..^ P ) ( ( 0  +  ( j  x.  N ) )  mod  P )  =  0 )
3010, 24, 29syl2anc 661 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  E. j  e.  ( 0..^ P ) ( ( 0  +  ( j  x.  N
) )  mod  P
)  =  0 )
3130adantl 466 . . . . . . . . 9  |-  ( ( I  =  0  /\  ( P  e.  Prime  /\  N  e.  ( 1..^ P ) ) )  ->  E. j  e.  ( 0..^ P ) ( ( 0  +  ( j  x.  N ) )  mod  P )  =  0 )
32 oveq1 6303 . . . . . . . . . . . . 13  |-  ( I  =  0  ->  (
I  +  ( j  x.  N ) )  =  ( 0  +  ( j  x.  N
) ) )
3332oveq1d 6311 . . . . . . . . . . . 12  |-  ( I  =  0  ->  (
( I  +  ( j  x.  N ) )  mod  P )  =  ( ( 0  +  ( j  x.  N ) )  mod 
P ) )
3433eqeq1d 2459 . . . . . . . . . . 11  |-  ( I  =  0  ->  (
( ( I  +  ( j  x.  N
) )  mod  P
)  =  0  <->  (
( 0  +  ( j  x.  N ) )  mod  P )  =  0 ) )
3534adantr 465 . . . . . . . . . 10  |-  ( ( I  =  0  /\  ( P  e.  Prime  /\  N  e.  ( 1..^ P ) ) )  ->  ( ( ( I  +  ( j  x.  N ) )  mod  P )  =  0  <->  ( ( 0  +  ( j  x.  N ) )  mod 
P )  =  0 ) )
3635rexbidv 2968 . . . . . . . . 9  |-  ( ( I  =  0  /\  ( P  e.  Prime  /\  N  e.  ( 1..^ P ) ) )  ->  ( E. j  e.  ( 0..^ P ) ( ( I  +  ( j  x.  N
) )  mod  P
)  =  0  <->  E. j  e.  ( 0..^ P ) ( ( 0  +  ( j  x.  N ) )  mod  P )  =  0 ) )
3731, 36mpbird 232 . . . . . . . 8  |-  ( ( I  =  0  /\  ( P  e.  Prime  /\  N  e.  ( 1..^ P ) ) )  ->  E. j  e.  ( 0..^ P ) ( ( I  +  ( j  x.  N ) )  mod  P )  =  0 )
3837ex 434 . . . . . . 7  |-  ( I  =  0  ->  (
( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  E. j  e.  (
0..^ P ) ( ( I  +  ( j  x.  N ) )  mod  P )  =  0 ) )
397, 38syl 16 . . . . . 6  |-  ( I  e.  { 0 }  ->  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  E. j  e.  ( 0..^ P ) ( ( I  +  ( j  x.  N
) )  mod  P
)  =  0 ) )
40 simpl 457 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  P  e.  Prime )
4140adantl 466 . . . . . . . 8  |-  ( ( I  e.  ( 1..^ P )  /\  ( P  e.  Prime  /\  N  e.  ( 1..^ P ) ) )  ->  P  e.  Prime )
42 simprr 757 . . . . . . . 8  |-  ( ( I  e.  ( 1..^ P )  /\  ( P  e.  Prime  /\  N  e.  ( 1..^ P ) ) )  ->  N  e.  ( 1..^ P ) )
43 simpl 457 . . . . . . . 8  |-  ( ( I  e.  ( 1..^ P )  /\  ( P  e.  Prime  /\  N  e.  ( 1..^ P ) ) )  ->  I  e.  ( 1..^ P ) )
44 modprm0 14342 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P )  /\  I  e.  ( 1..^ P ) )  ->  E. j  e.  ( 0..^ P ) ( ( I  +  ( j  x.  N ) )  mod  P )  =  0 )
4541, 42, 43, 44syl3anc 1228 . . . . . . 7  |-  ( ( I  e.  ( 1..^ P )  /\  ( P  e.  Prime  /\  N  e.  ( 1..^ P ) ) )  ->  E. j  e.  ( 0..^ P ) ( ( I  +  ( j  x.  N
) )  mod  P
)  =  0 )
4645ex 434 . . . . . 6  |-  ( I  e.  ( 1..^ P )  ->  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  E. j  e.  ( 0..^ P ) ( ( I  +  ( j  x.  N
) )  mod  P
)  =  0 ) )
4739, 46jaoi 379 . . . . 5  |-  ( ( I  e.  { 0 }  \/  I  e.  ( 1..^ P ) )  ->  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  E. j  e.  ( 0..^ P ) ( ( I  +  ( j  x.  N
) )  mod  P
)  =  0 ) )
486, 47sylbi 195 . . . 4  |-  ( I  e.  ( { 0 }  u.  ( 1..^ P ) )  -> 
( ( P  e. 
Prime  /\  N  e.  ( 1..^ P ) )  ->  E. j  e.  ( 0..^ P ) ( ( I  +  ( j  x.  N ) )  mod  P )  =  0 ) )
4948com12 31 . . 3  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  ( I  e.  ( { 0 }  u.  ( 1..^ P ) )  ->  E. j  e.  ( 0..^ P ) ( ( I  +  ( j  x.  N
) )  mod  P
)  =  0 ) )
505, 49sylbid 215 . 2  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P ) )  ->  ( I  e.  ( 0..^ P )  ->  E. j  e.  ( 0..^ P ) ( ( I  +  ( j  x.  N ) )  mod  P )  =  0 ) )
51503impia 1193 1  |-  ( ( P  e.  Prime  /\  N  e.  ( 1..^ P )  /\  I  e.  ( 0..^ P ) )  ->  E. j  e.  ( 0..^ P ) ( ( I  +  ( j  x.  N ) )  mod  P )  =  0 )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    \/ wo 368    /\ wa 369    /\ w3a 973    = wceq 1395    e. wcel 1819   E.wrex 2808    u. cun 3469   {csn 4032  (class class class)co 6296   CCcc 9507   0cc0 9509   1c1 9510    + caddc 9512    x. cmul 9514   NNcn 10556   ZZcz 10885   RR+crp 11245  ..^cfzo 11821    mod cmo 11999   Primecprime 14229
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1619  ax-4 1632  ax-5 1705  ax-6 1748  ax-7 1791  ax-8 1821  ax-9 1823  ax-10 1838  ax-11 1843  ax-12 1855  ax-13 2000  ax-ext 2435  ax-rep 4568  ax-sep 4578  ax-nul 4586  ax-pow 4634  ax-pr 4695  ax-un 6591  ax-cnex 9565  ax-resscn 9566  ax-1cn 9567  ax-icn 9568  ax-addcl 9569  ax-addrcl 9570  ax-mulcl 9571  ax-mulrcl 9572  ax-mulcom 9573  ax-addass 9574  ax-mulass 9575  ax-distr 9576  ax-i2m1 9577  ax-1ne0 9578  ax-1rid 9579  ax-rnegex 9580  ax-rrecex 9581  ax-cnre 9582  ax-pre-lttri 9583  ax-pre-lttrn 9584  ax-pre-ltadd 9585  ax-pre-mulgt0 9586  ax-pre-sup 9587
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1398  df-ex 1614  df-nf 1618  df-sb 1741  df-eu 2287  df-mo 2288  df-clab 2443  df-cleq 2449  df-clel 2452  df-nfc 2607  df-ne 2654  df-nel 2655  df-ral 2812  df-rex 2813  df-reu 2814  df-rmo 2815  df-rab 2816  df-v 3111  df-sbc 3328  df-csb 3431  df-dif 3474  df-un 3476  df-in 3478  df-ss 3485  df-pss 3487  df-nul 3794  df-if 3945  df-pw 4017  df-sn 4033  df-pr 4035  df-tp 4037  df-op 4039  df-uni 4252  df-int 4289  df-iun 4334  df-br 4457  df-opab 4516  df-mpt 4517  df-tr 4551  df-eprel 4800  df-id 4804  df-po 4809  df-so 4810  df-fr 4847  df-we 4849  df-ord 4890  df-on 4891  df-lim 4892  df-suc 4893  df-xp 5014  df-rel 5015  df-cnv 5016  df-co 5017  df-dm 5018  df-rn 5019  df-res 5020  df-ima 5021  df-iota 5557  df-fun 5596  df-fn 5597  df-f 5598  df-f1 5599  df-fo 5600  df-f1o 5601  df-fv 5602  df-riota 6258  df-ov 6299  df-oprab 6300  df-mpt2 6301  df-om 6700  df-1st 6799  df-2nd 6800  df-recs 7060  df-rdg 7094  df-1o 7148  df-2o 7149  df-oadd 7152  df-er 7329  df-map 7440  df-en 7536  df-dom 7537  df-sdom 7538  df-fin 7539  df-sup 7919  df-card 8337  df-cda 8565  df-pnf 9647  df-mnf 9648  df-xr 9649  df-ltxr 9650  df-le 9651  df-sub 9826  df-neg 9827  df-div 10228  df-nn 10557  df-2 10615  df-3 10616  df-n0 10817  df-z 10886  df-uz 11107  df-rp 11246  df-fz 11698  df-fzo 11822  df-fl 11932  df-mod 12000  df-seq 12111  df-exp 12170  df-hash 12409  df-cj 12944  df-re 12945  df-im 12946  df-sqrt 13080  df-abs 13081  df-dvds 13999  df-gcd 14157  df-prm 14230  df-phi 14308
This theorem is referenced by:  modprmn0modprm0  14344
  Copyright terms: Public domain W3C validator