ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  divalglemnn Unicode version

Theorem divalglemnn 11011
Description: Lemma for divalg 11017. Existence for a positive denominator. (Contributed by Jim Kingdon, 30-Nov-2021.)
Assertion
Ref Expression
divalglemnn  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  E. r  e.  ZZ  E. q  e.  ZZ  (
0  <_  r  /\  r  <  ( abs `  D
)  /\  N  =  ( ( q  x.  D )  +  r ) ) )
Distinct variable groups:    D, q, r    N, q, r

Proof of Theorem divalglemnn
StepHypRef Expression
1 zmodcl 9716 . . 3  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( N  mod  D
)  e.  NN0 )
21nn0zd 8836 . 2  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( N  mod  D
)  e.  ZZ )
3 znq 9078 . . 3  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( N  /  D
)  e.  QQ )
43flqcld 9649 . 2  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( |_ `  ( N  /  D ) )  e.  ZZ )
51nn0ge0d 8699 . 2  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  0  <_  ( N  mod  D ) )
6 zq 9080 . . . . 5  |-  ( N  e.  ZZ  ->  N  e.  QQ )
76adantr 270 . . . 4  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  N  e.  QQ )
8 nnq 9087 . . . . 5  |-  ( D  e.  NN  ->  D  e.  QQ )
98adantl 271 . . . 4  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  D  e.  QQ )
10 nngt0 8419 . . . . 5  |-  ( D  e.  NN  ->  0  <  D )
1110adantl 271 . . . 4  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  0  <  D )
12 modqlt 9705 . . . 4  |-  ( ( N  e.  QQ  /\  D  e.  QQ  /\  0  <  D )  ->  ( N  mod  D )  < 
D )
137, 9, 11, 12syl3anc 1174 . . 3  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( N  mod  D
)  <  D )
14 nnre 8401 . . . . 5  |-  ( D  e.  NN  ->  D  e.  RR )
1514adantl 271 . . . 4  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  D  e.  RR )
16 0red 7468 . . . . 5  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  0  e.  RR )
1716, 15, 11ltled 7581 . . . 4  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  0  <_  D )
1815, 17absidd 10565 . . 3  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( abs `  D
)  =  D )
1913, 18breqtrrd 3863 . 2  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( N  mod  D
)  <  ( abs `  D ) )
201nn0cnd 8698 . . 3  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( N  mod  D
)  e.  CC )
214zcnd 8839 . . . 4  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( |_ `  ( N  /  D ) )  e.  CC )
22 simpr 108 . . . . 5  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  D  e.  NN )
2322nncnd 8408 . . . 4  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  D  e.  CC )
2421, 23mulcld 7487 . . 3  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( ( |_ `  ( N  /  D
) )  x.  D
)  e.  CC )
25 modqvalr 9697 . . . . . 6  |-  ( ( N  e.  QQ  /\  D  e.  QQ  /\  0  <  D )  ->  ( N  mod  D )  =  ( N  -  (
( |_ `  ( N  /  D ) )  x.  D ) ) )
267, 9, 11, 25syl3anc 1174 . . . . 5  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( N  mod  D
)  =  ( N  -  ( ( |_
`  ( N  /  D ) )  x.  D ) ) )
2726oveq1d 5649 . . . 4  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( ( N  mod  D )  +  ( ( |_ `  ( N  /  D ) )  x.  D ) )  =  ( ( N  -  ( ( |_
`  ( N  /  D ) )  x.  D ) )  +  ( ( |_ `  ( N  /  D
) )  x.  D
) ) )
28 simpl 107 . . . . . 6  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  N  e.  ZZ )
2928zcnd 8839 . . . . 5  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  N  e.  CC )
3029, 24npcand 7776 . . . 4  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  ( ( N  -  ( ( |_ `  ( N  /  D
) )  x.  D
) )  +  ( ( |_ `  ( N  /  D ) )  x.  D ) )  =  N )
3127, 30eqtr2d 2121 . . 3  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  N  =  ( ( N  mod  D )  +  ( ( |_
`  ( N  /  D ) )  x.  D ) ) )
3220, 24, 31comraddd 7618 . 2  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  N  =  ( ( ( |_ `  ( N  /  D ) )  x.  D )  +  ( N  mod  D
) ) )
33 breq2 3841 . . . 4  |-  ( r  =  ( N  mod  D )  ->  ( 0  <_  r  <->  0  <_  ( N  mod  D ) ) )
34 breq1 3840 . . . 4  |-  ( r  =  ( N  mod  D )  ->  ( r  <  ( abs `  D
)  <->  ( N  mod  D )  <  ( abs `  D ) ) )
35 oveq2 5642 . . . . 5  |-  ( r  =  ( N  mod  D )  ->  ( (
q  x.  D )  +  r )  =  ( ( q  x.  D )  +  ( N  mod  D ) ) )
3635eqeq2d 2099 . . . 4  |-  ( r  =  ( N  mod  D )  ->  ( N  =  ( ( q  x.  D )  +  r )  <->  N  =  ( ( q  x.  D )  +  ( N  mod  D ) ) ) )
3733, 34, 363anbi123d 1248 . . 3  |-  ( r  =  ( N  mod  D )  ->  ( (
0  <_  r  /\  r  <  ( abs `  D
)  /\  N  =  ( ( q  x.  D )  +  r ) )  <->  ( 0  <_  ( N  mod  D )  /\  ( N  mod  D )  < 
( abs `  D
)  /\  N  =  ( ( q  x.  D )  +  ( N  mod  D ) ) ) ) )
38 oveq1 5641 . . . . . 6  |-  ( q  =  ( |_ `  ( N  /  D
) )  ->  (
q  x.  D )  =  ( ( |_
`  ( N  /  D ) )  x.  D ) )
3938oveq1d 5649 . . . . 5  |-  ( q  =  ( |_ `  ( N  /  D
) )  ->  (
( q  x.  D
)  +  ( N  mod  D ) )  =  ( ( ( |_ `  ( N  /  D ) )  x.  D )  +  ( N  mod  D
) ) )
4039eqeq2d 2099 . . . 4  |-  ( q  =  ( |_ `  ( N  /  D
) )  ->  ( N  =  ( (
q  x.  D )  +  ( N  mod  D ) )  <->  N  =  ( ( ( |_
`  ( N  /  D ) )  x.  D )  +  ( N  mod  D ) ) ) )
41403anbi3d 1254 . . 3  |-  ( q  =  ( |_ `  ( N  /  D
) )  ->  (
( 0  <_  ( N  mod  D )  /\  ( N  mod  D )  <  ( abs `  D
)  /\  N  =  ( ( q  x.  D )  +  ( N  mod  D ) ) )  <->  ( 0  <_  ( N  mod  D )  /\  ( N  mod  D )  < 
( abs `  D
)  /\  N  =  ( ( ( |_
`  ( N  /  D ) )  x.  D )  +  ( N  mod  D ) ) ) ) )
4237, 41rspc2ev 2735 . 2  |-  ( ( ( N  mod  D
)  e.  ZZ  /\  ( |_ `  ( N  /  D ) )  e.  ZZ  /\  (
0  <_  ( N  mod  D )  /\  ( N  mod  D )  < 
( abs `  D
)  /\  N  =  ( ( ( |_
`  ( N  /  D ) )  x.  D )  +  ( N  mod  D ) ) ) )  ->  E. r  e.  ZZ  E. q  e.  ZZ  (
0  <_  r  /\  r  <  ( abs `  D
)  /\  N  =  ( ( q  x.  D )  +  r ) ) )
432, 4, 5, 19, 32, 42syl113anc 1186 1  |-  ( ( N  e.  ZZ  /\  D  e.  NN )  ->  E. r  e.  ZZ  E. q  e.  ZZ  (
0  <_  r  /\  r  <  ( abs `  D
)  /\  N  =  ( ( q  x.  D )  +  r ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 102    /\ w3a 924    = wceq 1289    e. wcel 1438   E.wrex 2360   class class class wbr 3837   ` cfv 5002  (class class class)co 5634   RRcr 7328   0cc0 7329    + caddc 7332    x. cmul 7334    < clt 7501    <_ cle 7502    - cmin 7632    / cdiv 8113   NNcn 8394   ZZcz 8720   QQcq 9073   |_cfl 9640    mod cmo 9694   abscabs 10395
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 579  ax-in2 580  ax-io 665  ax-5 1381  ax-7 1382  ax-gen 1383  ax-ie1 1427  ax-ie2 1428  ax-8 1440  ax-10 1441  ax-11 1442  ax-i12 1443  ax-bndl 1444  ax-4 1445  ax-13 1449  ax-14 1450  ax-17 1464  ax-i9 1468  ax-ial 1472  ax-i5r 1473  ax-ext 2070  ax-coll 3946  ax-sep 3949  ax-nul 3957  ax-pow 4001  ax-pr 4027  ax-un 4251  ax-setind 4343  ax-iinf 4393  ax-cnex 7415  ax-resscn 7416  ax-1cn 7417  ax-1re 7418  ax-icn 7419  ax-addcl 7420  ax-addrcl 7421  ax-mulcl 7422  ax-mulrcl 7423  ax-addcom 7424  ax-mulcom 7425  ax-addass 7426  ax-mulass 7427  ax-distr 7428  ax-i2m1 7429  ax-0lt1 7430  ax-1rid 7431  ax-0id 7432  ax-rnegex 7433  ax-precex 7434  ax-cnre 7435  ax-pre-ltirr 7436  ax-pre-ltwlin 7437  ax-pre-lttrn 7438  ax-pre-apti 7439  ax-pre-ltadd 7440  ax-pre-mulgt0 7441  ax-pre-mulext 7442  ax-arch 7443
This theorem depends on definitions:  df-bi 115  df-dc 781  df-3or 925  df-3an 926  df-tru 1292  df-fal 1295  df-nf 1395  df-sb 1693  df-eu 1951  df-mo 1952  df-clab 2075  df-cleq 2081  df-clel 2084  df-nfc 2217  df-ne 2256  df-nel 2351  df-ral 2364  df-rex 2365  df-reu 2366  df-rmo 2367  df-rab 2368  df-v 2621  df-sbc 2839  df-csb 2932  df-dif 2999  df-un 3001  df-in 3003  df-ss 3010  df-nul 3285  df-if 3390  df-pw 3427  df-sn 3447  df-pr 3448  df-op 3450  df-uni 3649  df-int 3684  df-iun 3727  df-br 3838  df-opab 3892  df-mpt 3893  df-tr 3929  df-id 4111  df-po 4114  df-iso 4115  df-iord 4184  df-on 4186  df-ilim 4187  df-suc 4189  df-iom 4396  df-xp 4434  df-rel 4435  df-cnv 4436  df-co 4437  df-dm 4438  df-rn 4439  df-res 4440  df-ima 4441  df-iota 4967  df-fun 5004  df-fn 5005  df-f 5006  df-f1 5007  df-fo 5008  df-f1o 5009  df-fv 5010  df-riota 5590  df-ov 5637  df-oprab 5638  df-mpt2 5639  df-1st 5893  df-2nd 5894  df-recs 6052  df-frec 6138  df-pnf 7503  df-mnf 7504  df-xr 7505  df-ltxr 7506  df-le 7507  df-sub 7634  df-neg 7635  df-reap 8028  df-ap 8035  df-div 8114  df-inn 8395  df-2 8452  df-n0 8644  df-z 8721  df-uz 8989  df-q 9074  df-rp 9104  df-fl 9642  df-mod 9695  df-iseq 9818  df-seq3 9819  df-exp 9920  df-cj 10241  df-re 10242  df-im 10243  df-rsqrt 10396  df-abs 10397
This theorem is referenced by:  divalglemeunn  11014  divalglemex  11015
  Copyright terms: Public domain W3C validator