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

Theorem ndvdssub 12927
Description: Corollary of the division algorithm. If an integer  D greater than  1 divides  N, then it does not divide any of  N  -  1,  N  -  2...  N  -  ( D  -  1 ). (Contributed by Paul Chapman, 31-Mar-2011.)
Assertion
Ref Expression
ndvdssub  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  ( K  e.  NN  /\  K  <  D ) )  -> 
( D  ||  N  ->  -.  D  ||  ( N  -  K )
) )

Proof of Theorem ndvdssub
Dummy variables  r  x are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 nnnn0 10228 . . . . . . . 8  |-  ( K  e.  NN  ->  K  e.  NN0 )
2 nnne0 10032 . . . . . . . 8  |-  ( K  e.  NN  ->  K  =/=  0 )
31, 2jca 519 . . . . . . 7  |-  ( K  e.  NN  ->  ( K  e.  NN0  /\  K  =/=  0 ) )
4 df-ne 2601 . . . . . . . . . . . 12  |-  ( K  =/=  0  <->  -.  K  =  0 )
54anbi2i 676 . . . . . . . . . . 11  |-  ( ( K  <  D  /\  K  =/=  0 )  <->  ( K  <  D  /\  -.  K  =  0 ) )
6 divalg2 12925 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  E! r  e.  NN0  ( r  <  D  /\  D  ||  ( N  -  r ) ) )
7 breq1 4215 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( r  =  x  ->  (
r  <  D  <->  x  <  D ) )
8 oveq2 6089 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( r  =  x  ->  ( N  -  r )  =  ( N  -  x ) )
98breq2d 4224 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( r  =  x  ->  ( D  ||  ( N  -  r )  <->  D  ||  ( N  -  x )
) )
107, 9anbi12d 692 . . . . . . . . . . . . . . . . . . . . 21  |-  ( r  =  x  ->  (
( r  <  D  /\  D  ||  ( N  -  r ) )  <-> 
( x  <  D  /\  D  ||  ( N  -  x ) ) ) )
1110reu4 3128 . . . . . . . . . . . . . . . . . . . 20  |-  ( E! r  e.  NN0  (
r  <  D  /\  D  ||  ( N  -  r ) )  <->  ( E. r  e.  NN0  ( r  <  D  /\  D  ||  ( N  -  r
) )  /\  A. r  e.  NN0  A. x  e.  NN0  ( ( ( r  <  D  /\  D  ||  ( N  -  r ) )  /\  ( x  <  D  /\  D  ||  ( N  -  x ) ) )  ->  r  =  x ) ) )
126, 11sylib 189 . . . . . . . . . . . . . . . . . . 19  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( E. r  e. 
NN0  ( r  < 
D  /\  D  ||  ( N  -  r )
)  /\  A. r  e.  NN0  A. x  e. 
NN0  ( ( ( r  <  D  /\  D  ||  ( N  -  r ) )  /\  ( x  <  D  /\  D  ||  ( N  -  x ) ) )  ->  r  =  x ) ) )
1312simprd 450 . . . . . . . . . . . . . . . . . 18  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  A. r  e.  NN0  A. x  e.  NN0  (
( ( r  < 
D  /\  D  ||  ( N  -  r )
)  /\  ( x  <  D  /\  D  ||  ( N  -  x
) ) )  -> 
r  =  x ) )
14 nngt0 10029 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( D  e.  NN  ->  0  <  D )
15143ad2ant2 979 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  D  ||  N )  ->  0  <  D )
16 zcn 10287 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29  |-  ( N  e.  ZZ  ->  N  e.  CC )
1716subid1d 9400 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  |-  ( N  e.  ZZ  ->  ( N  -  0 )  =  N )
1817breq2d 4224 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  ( N  e.  ZZ  ->  ( D  ||  ( N  - 
0 )  <->  D  ||  N
) )
1918biimpar 472 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( N  e.  ZZ  /\  D  ||  N )  ->  D  ||  ( N  - 
0 ) )
20193adant2 976 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  D  ||  N )  ->  D  ||  ( N  -  0 ) )
2115, 20jca 519 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  D  ||  N )  ->  (
0  <  D  /\  D  ||  ( N  - 
0 ) ) )
22213expa 1153 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( N  e.  ZZ  /\  D  e.  NN )  /\  D  ||  N
)  ->  ( 0  <  D  /\  D  ||  ( N  -  0 ) ) )
2322anim2i 553 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( r  <  D  /\  D  ||  ( N  -  r ) )  /\  ( ( N  e.  ZZ  /\  D  e.  NN )  /\  D  ||  N ) )  -> 
( ( r  < 
D  /\  D  ||  ( N  -  r )
)  /\  ( 0  <  D  /\  D  ||  ( N  -  0 ) ) ) )
2423ancoms 440 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( N  e.  ZZ  /\  D  e.  NN )  /\  D  ||  N )  /\  (
r  <  D  /\  D  ||  ( N  -  r ) ) )  ->  ( ( r  <  D  /\  D  ||  ( N  -  r
) )  /\  (
0  <  D  /\  D  ||  ( N  - 
0 ) ) ) )
25 0nn0 10236 . . . . . . . . . . . . . . . . . . . . . 22  |-  0  e.  NN0
26 breq1 4215 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( x  =  0  ->  (
x  <  D  <->  0  <  D ) )
27 oveq2 6089 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  ( x  =  0  ->  ( N  -  x )  =  ( N  - 
0 ) )
2827breq2d 4224 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( x  =  0  ->  ( D  ||  ( N  -  x )  <->  D  ||  ( N  -  0 ) ) )
2926, 28anbi12d 692 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( x  =  0  ->  (
( x  <  D  /\  D  ||  ( N  -  x ) )  <-> 
( 0  <  D  /\  D  ||  ( N  -  0 ) ) ) )
3029anbi2d 685 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( x  =  0  ->  (
( ( r  < 
D  /\  D  ||  ( N  -  r )
)  /\  ( x  <  D  /\  D  ||  ( N  -  x
) ) )  <->  ( (
r  <  D  /\  D  ||  ( N  -  r ) )  /\  ( 0  <  D  /\  D  ||  ( N  -  0 ) ) ) ) )
31 eqeq2 2445 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( x  =  0  ->  (
r  =  x  <->  r  = 
0 ) )
3230, 31imbi12d 312 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( x  =  0  ->  (
( ( ( r  <  D  /\  D  ||  ( N  -  r
) )  /\  (
x  <  D  /\  D  ||  ( N  -  x ) ) )  ->  r  =  x )  <->  ( ( ( r  <  D  /\  D  ||  ( N  -  r ) )  /\  ( 0  <  D  /\  D  ||  ( N  -  0 ) ) )  ->  r  = 
0 ) ) )
3332rspcv 3048 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( 0  e.  NN0  ->  ( A. x  e.  NN0  ( ( ( r  <  D  /\  D  ||  ( N  -  r ) )  /\  ( x  < 
D  /\  D  ||  ( N  -  x )
) )  ->  r  =  x )  ->  (
( ( r  < 
D  /\  D  ||  ( N  -  r )
)  /\  ( 0  <  D  /\  D  ||  ( N  -  0 ) ) )  -> 
r  =  0 ) ) )
3425, 33ax-mp 8 . . . . . . . . . . . . . . . . . . . . 21  |-  ( A. x  e.  NN0  ( ( ( r  <  D  /\  D  ||  ( N  -  r ) )  /\  ( x  < 
D  /\  D  ||  ( N  -  x )
) )  ->  r  =  x )  ->  (
( ( r  < 
D  /\  D  ||  ( N  -  r )
)  /\  ( 0  <  D  /\  D  ||  ( N  -  0 ) ) )  -> 
r  =  0 ) )
3524, 34syl5 30 . . . . . . . . . . . . . . . . . . . 20  |-  ( A. x  e.  NN0  ( ( ( r  <  D  /\  D  ||  ( N  -  r ) )  /\  ( x  < 
D  /\  D  ||  ( N  -  x )
) )  ->  r  =  x )  ->  (
( ( ( N  e.  ZZ  /\  D  e.  NN )  /\  D  ||  N )  /\  (
r  <  D  /\  D  ||  ( N  -  r ) ) )  ->  r  =  0 ) )
3635exp3a 426 . . . . . . . . . . . . . . . . . . 19  |-  ( A. x  e.  NN0  ( ( ( r  <  D  /\  D  ||  ( N  -  r ) )  /\  ( x  < 
D  /\  D  ||  ( N  -  x )
) )  ->  r  =  x )  ->  (
( ( N  e.  ZZ  /\  D  e.  NN )  /\  D  ||  N )  ->  (
( r  <  D  /\  D  ||  ( N  -  r ) )  ->  r  =  0 ) ) )
3736ralimi 2781 . . . . . . . . . . . . . . . . . 18  |-  ( A. r  e.  NN0  A. x  e.  NN0  ( ( ( r  <  D  /\  D  ||  ( N  -  r ) )  /\  ( x  <  D  /\  D  ||  ( N  -  x ) ) )  ->  r  =  x )  ->  A. r  e.  NN0  ( ( ( N  e.  ZZ  /\  D  e.  NN )  /\  D  ||  N )  ->  ( ( r  <  D  /\  D  ||  ( N  -  r
) )  ->  r  =  0 ) ) )
3813, 37syl 16 . . . . . . . . . . . . . . . . 17  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  A. r  e.  NN0  ( ( ( N  e.  ZZ  /\  D  e.  NN )  /\  D  ||  N )  ->  (
( r  <  D  /\  D  ||  ( N  -  r ) )  ->  r  =  0 ) ) )
39 r19.21v 2793 . . . . . . . . . . . . . . . . 17  |-  ( A. r  e.  NN0  ( ( ( N  e.  ZZ  /\  D  e.  NN )  /\  D  ||  N
)  ->  ( (
r  <  D  /\  D  ||  ( N  -  r ) )  -> 
r  =  0 ) )  <->  ( ( ( N  e.  ZZ  /\  D  e.  NN )  /\  D  ||  N )  ->  A. r  e.  NN0  ( ( r  < 
D  /\  D  ||  ( N  -  r )
)  ->  r  = 
0 ) ) )
4038, 39sylib 189 . . . . . . . . . . . . . . . 16  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( ( ( N  e.  ZZ  /\  D  e.  NN )  /\  D  ||  N )  ->  A. r  e.  NN0  ( ( r  <  D  /\  D  ||  ( N  -  r
) )  ->  r  =  0 ) ) )
4140exp3a 426 . . . . . . . . . . . . . . 15  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( D  ||  N  ->  A. r  e.  NN0  ( ( r  <  D  /\  D  ||  ( N  -  r
) )  ->  r  =  0 ) ) ) )
4241pm2.43i 45 . . . . . . . . . . . . . 14  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( D  ||  N  ->  A. r  e.  NN0  ( ( r  < 
D  /\  D  ||  ( N  -  r )
)  ->  r  = 
0 ) ) )
43423impia 1150 . . . . . . . . . . . . 13  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  D  ||  N )  ->  A. r  e.  NN0  ( ( r  <  D  /\  D  ||  ( N  -  r
) )  ->  r  =  0 ) )
44 breq1 4215 . . . . . . . . . . . . . . . 16  |-  ( r  =  K  ->  (
r  <  D  <->  K  <  D ) )
45 oveq2 6089 . . . . . . . . . . . . . . . . 17  |-  ( r  =  K  ->  ( N  -  r )  =  ( N  -  K ) )
4645breq2d 4224 . . . . . . . . . . . . . . . 16  |-  ( r  =  K  ->  ( D  ||  ( N  -  r )  <->  D  ||  ( N  -  K )
) )
4744, 46anbi12d 692 . . . . . . . . . . . . . . 15  |-  ( r  =  K  ->  (
( r  <  D  /\  D  ||  ( N  -  r ) )  <-> 
( K  <  D  /\  D  ||  ( N  -  K ) ) ) )
48 eqeq1 2442 . . . . . . . . . . . . . . 15  |-  ( r  =  K  ->  (
r  =  0  <->  K  =  0 ) )
4947, 48imbi12d 312 . . . . . . . . . . . . . 14  |-  ( r  =  K  ->  (
( ( r  < 
D  /\  D  ||  ( N  -  r )
)  ->  r  = 
0 )  <->  ( ( K  <  D  /\  D  ||  ( N  -  K
) )  ->  K  =  0 ) ) )
5049rspcv 3048 . . . . . . . . . . . . 13  |-  ( K  e.  NN0  ->  ( A. r  e.  NN0  ( ( r  <  D  /\  D  ||  ( N  -  r ) )  -> 
r  =  0 )  ->  ( ( K  <  D  /\  D  ||  ( N  -  K
) )  ->  K  =  0 ) ) )
5143, 50syl5com 28 . . . . . . . . . . . 12  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  D  ||  N )  ->  ( K  e.  NN0  ->  (
( K  <  D  /\  D  ||  ( N  -  K ) )  ->  K  =  0 ) ) )
52 pm4.14 562 . . . . . . . . . . . 12  |-  ( ( ( K  <  D  /\  D  ||  ( N  -  K ) )  ->  K  =  0 )  <->  ( ( K  <  D  /\  -.  K  =  0 )  ->  -.  D  ||  ( N  -  K )
) )
5351, 52syl6ib 218 . . . . . . . . . . 11  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  D  ||  N )  ->  ( K  e.  NN0  ->  (
( K  <  D  /\  -.  K  =  0 )  ->  -.  D  ||  ( N  -  K
) ) ) )
545, 53syl7bi 222 . . . . . . . . . 10  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  D  ||  N )  ->  ( K  e.  NN0  ->  (
( K  <  D  /\  K  =/=  0
)  ->  -.  D  ||  ( N  -  K
) ) ) )
5554exp4a 590 . . . . . . . . 9  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  D  ||  N )  ->  ( K  e.  NN0  ->  ( K  <  D  ->  ( K  =/=  0  ->  -.  D  ||  ( N  -  K ) ) ) ) )
5655com23 74 . . . . . . . 8  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  D  ||  N )  ->  ( K  <  D  ->  ( K  e.  NN0  ->  ( K  =/=  0  ->  -.  D  ||  ( N  -  K ) ) ) ) )
5756imp4a 573 . . . . . . 7  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  D  ||  N )  ->  ( K  <  D  ->  (
( K  e.  NN0  /\  K  =/=  0 )  ->  -.  D  ||  ( N  -  K )
) ) )
583, 57syl7 65 . . . . . 6  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  D  ||  N )  ->  ( K  <  D  ->  ( K  e.  NN  ->  -.  D  ||  ( N  -  K ) ) ) )
5958com23 74 . . . . 5  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  D  ||  N )  ->  ( K  e.  NN  ->  ( K  <  D  ->  -.  D  ||  ( N  -  K ) ) ) )
6059imp3a 421 . . . 4  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  D  ||  N )  ->  (
( K  e.  NN  /\  K  <  D )  ->  -.  D  ||  ( N  -  K )
) )
61603expia 1155 . . 3  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( D  ||  N  ->  ( ( K  e.  NN  /\  K  < 
D )  ->  -.  D  ||  ( N  -  K ) ) ) )
6261com23 74 . 2  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( ( K  e.  NN  /\  K  < 
D )  ->  ( D  ||  N  ->  -.  D  ||  ( N  -  K ) ) ) )
63623impia 1150 1  |-  ( ( N  e.  ZZ  /\  D  e.  NN  /\  ( K  e.  NN  /\  K  <  D ) )  -> 
( D  ||  N  ->  -.  D  ||  ( N  -  K )
) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 359    /\ w3a 936    = wceq 1652    e. wcel 1725    =/= wne 2599   A.wral 2705   E.wrex 2706   E!wreu 2707   class class class wbr 4212  (class class class)co 6081   0cc0 8990    < clt 9120    - cmin 9291   NNcn 10000   NN0cn0 10221   ZZcz 10282    || cdivides 12852
This theorem is referenced by:  ndvdsadd  12928
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2417  ax-sep 4330  ax-nul 4338  ax-pow 4377  ax-pr 4403  ax-un 4701  ax-cnex 9046  ax-resscn 9047  ax-1cn 9048  ax-icn 9049  ax-addcl 9050  ax-addrcl 9051  ax-mulcl 9052  ax-mulrcl 9053  ax-mulcom 9054  ax-addass 9055  ax-mulass 9056  ax-distr 9057  ax-i2m1 9058  ax-1ne0 9059  ax-1rid 9060  ax-rnegex 9061  ax-rrecex 9062  ax-cnre 9063  ax-pre-lttri 9064  ax-pre-lttrn 9065  ax-pre-ltadd 9066  ax-pre-mulgt0 9067  ax-pre-sup 9068
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2285  df-mo 2286  df-clab 2423  df-cleq 2429  df-clel 2432  df-nfc 2561  df-ne 2601  df-nel 2602  df-ral 2710  df-rex 2711  df-reu 2712  df-rmo 2713  df-rab 2714  df-v 2958  df-sbc 3162  df-csb 3252  df-dif 3323  df-un 3325  df-in 3327  df-ss 3334  df-pss 3336  df-nul 3629  df-if 3740  df-pw 3801  df-sn 3820  df-pr 3821  df-tp 3822  df-op 3823  df-uni 4016  df-iun 4095  df-br 4213  df-opab 4267  df-mpt 4268  df-tr 4303  df-eprel 4494  df-id 4498  df-po 4503  df-so 4504  df-fr 4541  df-we 4543  df-ord 4584  df-on 4585  df-lim 4586  df-suc 4587  df-om 4846  df-xp 4884  df-rel 4885  df-cnv 4886  df-co 4887  df-dm 4888  df-rn 4889  df-res 4890  df-ima 4891  df-iota 5418  df-fun 5456  df-fn 5457  df-f 5458  df-f1 5459  df-fo 5460  df-f1o 5461  df-fv 5462  df-ov 6084  df-oprab 6085  df-mpt2 6086  df-1st 6349  df-2nd 6350  df-riota 6549  df-recs 6633  df-rdg 6668  df-er 6905  df-en 7110  df-dom 7111  df-sdom 7112  df-sup 7446  df-pnf 9122  df-mnf 9123  df-xr 9124  df-ltxr 9125  df-le 9126  df-sub 9293  df-neg 9294  df-div 9678  df-nn 10001  df-2 10058  df-3 10059  df-n0 10222  df-z 10283  df-uz 10489  df-rp 10613  df-fz 11044  df-seq 11324  df-exp 11383  df-cj 11904  df-re 11905  df-im 11906  df-sqr 12040  df-abs 12041  df-dvds 12853
  Copyright terms: Public domain W3C validator