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

Theorem divalglem4 13930
Description: Lemma for divalg 13937. (Contributed by Paul Chapman, 21-Mar-2011.)
Hypotheses
Ref Expression
divalglem0.1  |-  N  e.  ZZ
divalglem0.2  |-  D  e.  ZZ
divalglem1.3  |-  D  =/=  0
divalglem2.4  |-  S  =  { r  e.  NN0  |  D  ||  ( N  -  r ) }
Assertion
Ref Expression
divalglem4  |-  S  =  { r  e.  NN0  |  E. q  e.  ZZ  N  =  ( (
q  x.  D )  +  r ) }
Distinct variable groups:    D, r    N, r    D, q, r    N, q
Allowed substitution hints:    S( r, q)

Proof of Theorem divalglem4
Dummy variable  z is distinct from all other variables.
StepHypRef Expression
1 divalglem0.2 . . . . . 6  |-  D  e.  ZZ
2 divalglem0.1 . . . . . . 7  |-  N  e.  ZZ
3 nn0z 10899 . . . . . . 7  |-  ( z  e.  NN0  ->  z  e.  ZZ )
4 zsubcl 10917 . . . . . . 7  |-  ( ( N  e.  ZZ  /\  z  e.  ZZ )  ->  ( N  -  z
)  e.  ZZ )
52, 3, 4sylancr 663 . . . . . 6  |-  ( z  e.  NN0  ->  ( N  -  z )  e.  ZZ )
6 divides 13866 . . . . . 6  |-  ( ( D  e.  ZZ  /\  ( N  -  z
)  e.  ZZ )  ->  ( D  ||  ( N  -  z
)  <->  E. q  e.  ZZ  ( q  x.  D
)  =  ( N  -  z ) ) )
71, 5, 6sylancr 663 . . . . 5  |-  ( z  e.  NN0  ->  ( D 
||  ( N  -  z )  <->  E. q  e.  ZZ  ( q  x.  D )  =  ( N  -  z ) ) )
8 nn0cn 10817 . . . . . . . 8  |-  ( z  e.  NN0  ->  z  e.  CC )
9 zmulcl 10923 . . . . . . . . . 10  |-  ( ( q  e.  ZZ  /\  D  e.  ZZ )  ->  ( q  x.  D
)  e.  ZZ )
101, 9mpan2 671 . . . . . . . . 9  |-  ( q  e.  ZZ  ->  (
q  x.  D )  e.  ZZ )
1110zcnd 10979 . . . . . . . 8  |-  ( q  e.  ZZ  ->  (
q  x.  D )  e.  CC )
12 zcn 10881 . . . . . . . . . . 11  |-  ( N  e.  ZZ  ->  N  e.  CC )
132, 12ax-mp 5 . . . . . . . . . 10  |-  N  e.  CC
14 subadd 9835 . . . . . . . . . 10  |-  ( ( N  e.  CC  /\  z  e.  CC  /\  (
q  x.  D )  e.  CC )  -> 
( ( N  -  z )  =  ( q  x.  D )  <-> 
( z  +  ( q  x.  D ) )  =  N ) )
1513, 14mp3an1 1311 . . . . . . . . 9  |-  ( ( z  e.  CC  /\  ( q  x.  D
)  e.  CC )  ->  ( ( N  -  z )  =  ( q  x.  D
)  <->  ( z  +  ( q  x.  D
) )  =  N ) )
16 addcom 9777 . . . . . . . . . 10  |-  ( ( z  e.  CC  /\  ( q  x.  D
)  e.  CC )  ->  ( z  +  ( q  x.  D
) )  =  ( ( q  x.  D
)  +  z ) )
1716eqeq1d 2469 . . . . . . . . 9  |-  ( ( z  e.  CC  /\  ( q  x.  D
)  e.  CC )  ->  ( ( z  +  ( q  x.  D ) )  =  N  <->  ( ( q  x.  D )  +  z )  =  N ) )
1815, 17bitrd 253 . . . . . . . 8  |-  ( ( z  e.  CC  /\  ( q  x.  D
)  e.  CC )  ->  ( ( N  -  z )  =  ( q  x.  D
)  <->  ( ( q  x.  D )  +  z )  =  N ) )
198, 11, 18syl2an 477 . . . . . . 7  |-  ( ( z  e.  NN0  /\  q  e.  ZZ )  ->  ( ( N  -  z )  =  ( q  x.  D )  <-> 
( ( q  x.  D )  +  z )  =  N ) )
20 eqcom 2476 . . . . . . 7  |-  ( ( N  -  z )  =  ( q  x.  D )  <->  ( q  x.  D )  =  ( N  -  z ) )
21 eqcom 2476 . . . . . . 7  |-  ( ( ( q  x.  D
)  +  z )  =  N  <->  N  =  ( ( q  x.  D )  +  z ) )
2219, 20, 213bitr3g 287 . . . . . 6  |-  ( ( z  e.  NN0  /\  q  e.  ZZ )  ->  ( ( q  x.  D )  =  ( N  -  z )  <-> 
N  =  ( ( q  x.  D )  +  z ) ) )
2322rexbidva 2975 . . . . 5  |-  ( z  e.  NN0  ->  ( E. q  e.  ZZ  (
q  x.  D )  =  ( N  -  z )  <->  E. q  e.  ZZ  N  =  ( ( q  x.  D
)  +  z ) ) )
247, 23bitrd 253 . . . 4  |-  ( z  e.  NN0  ->  ( D 
||  ( N  -  z )  <->  E. q  e.  ZZ  N  =  ( ( q  x.  D
)  +  z ) ) )
2524pm5.32i 637 . . 3  |-  ( ( z  e.  NN0  /\  D  ||  ( N  -  z ) )  <->  ( z  e.  NN0  /\  E. q  e.  ZZ  N  =  ( ( q  x.  D
)  +  z ) ) )
26 oveq2 6303 . . . . 5  |-  ( r  =  z  ->  ( N  -  r )  =  ( N  -  z ) )
2726breq2d 4465 . . . 4  |-  ( r  =  z  ->  ( D  ||  ( N  -  r )  <->  D  ||  ( N  -  z )
) )
28 divalglem2.4 . . . 4  |-  S  =  { r  e.  NN0  |  D  ||  ( N  -  r ) }
2927, 28elrab2 3268 . . 3  |-  ( z  e.  S  <->  ( z  e.  NN0  /\  D  ||  ( N  -  z
) ) )
30 oveq2 6303 . . . . . 6  |-  ( r  =  z  ->  (
( q  x.  D
)  +  r )  =  ( ( q  x.  D )  +  z ) )
3130eqeq2d 2481 . . . . 5  |-  ( r  =  z  ->  ( N  =  ( (
q  x.  D )  +  r )  <->  N  =  ( ( q  x.  D )  +  z ) ) )
3231rexbidv 2978 . . . 4  |-  ( r  =  z  ->  ( E. q  e.  ZZ  N  =  ( (
q  x.  D )  +  r )  <->  E. q  e.  ZZ  N  =  ( ( q  x.  D
)  +  z ) ) )
3332elrab 3266 . . 3  |-  ( z  e.  { r  e. 
NN0  |  E. q  e.  ZZ  N  =  ( ( q  x.  D
)  +  r ) }  <->  ( z  e. 
NN0  /\  E. q  e.  ZZ  N  =  ( ( q  x.  D
)  +  z ) ) )
3425, 29, 333bitr4i 277 . 2  |-  ( z  e.  S  <->  z  e.  { r  e.  NN0  |  E. q  e.  ZZ  N  =  ( (
q  x.  D )  +  r ) } )
3534eqriv 2463 1  |-  S  =  { r  e.  NN0  |  E. q  e.  ZZ  N  =  ( (
q  x.  D )  +  r ) }
Colors of variables: wff setvar class
Syntax hints:    <-> wb 184    /\ wa 369    = wceq 1379    e. wcel 1767    =/= wne 2662   E.wrex 2818   {crab 2821   class class class wbr 4453  (class class class)co 6295   CCcc 9502   0cc0 9504    + caddc 9507    x. cmul 9509    - cmin 9817   NN0cn0 10807   ZZcz 10876    || cdivides 13864
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-sep 4574  ax-nul 4582  ax-pow 4631  ax-pr 4692  ax-un 6587  ax-resscn 9561  ax-1cn 9562  ax-icn 9563  ax-addcl 9564  ax-addrcl 9565  ax-mulcl 9566  ax-mulrcl 9567  ax-mulcom 9568  ax-addass 9569  ax-mulass 9570  ax-distr 9571  ax-i2m1 9572  ax-1ne0 9573  ax-1rid 9574  ax-rnegex 9575  ax-rrecex 9576  ax-cnre 9577  ax-pre-lttri 9578  ax-pre-lttrn 9579  ax-pre-ltadd 9580  ax-pre-mulgt0 9581
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 2822  df-rex 2823  df-reu 2824  df-rab 2826  df-v 3120  df-sbc 3337  df-csb 3441  df-dif 3484  df-un 3486  df-in 3488  df-ss 3495  df-pss 3497  df-nul 3791  df-if 3946  df-pw 4018  df-sn 4034  df-pr 4036  df-tp 4038  df-op 4040  df-uni 4252  df-iun 4333  df-br 4454  df-opab 4512  df-mpt 4513  df-tr 4547  df-eprel 4797  df-id 4801  df-po 4806  df-so 4807  df-fr 4844  df-we 4846  df-ord 4887  df-on 4888  df-lim 4889  df-suc 4890  df-xp 5011  df-rel 5012  df-cnv 5013  df-co 5014  df-dm 5015  df-rn 5016  df-res 5017  df-ima 5018  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 6256  df-ov 6298  df-oprab 6299  df-mpt2 6300  df-om 6696  df-recs 7054  df-rdg 7088  df-er 7323  df-en 7529  df-dom 7530  df-sdom 7531  df-pnf 9642  df-mnf 9643  df-xr 9644  df-ltxr 9645  df-le 9646  df-sub 9819  df-neg 9820  df-nn 10549  df-n0 10808  df-z 10877  df-dvds 13865
This theorem is referenced by:  divalglem10  13936
  Copyright terms: Public domain W3C validator