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

Theorem quoremnn0ALT 11166
Description: Quotient and remainder of a nonnegative integer divided by a natural number. TO DO - Keep either quoremnn0ALT 11166 ((if we don't keep quoremz 11164) or quoremnn0 11165 (Contributed by NM, 14-Aug-2008.) (Proof modification is discouraged.) (New usage is discouraged.)
Hypotheses
Ref Expression
quorem.1  |-  Q  =  ( |_ `  ( A  /  B ) )
quorem.2  |-  R  =  ( A  -  ( B  x.  Q )
)
Assertion
Ref Expression
quoremnn0ALT  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( Q  e. 
NN0  /\  R  e.  NN0 )  /\  ( R  <  B  /\  A  =  ( ( B  x.  Q )  +  R ) ) ) )

Proof of Theorem quoremnn0ALT
StepHypRef Expression
1 quorem.1 . . 3  |-  Q  =  ( |_ `  ( A  /  B ) )
2 nn0re 10163 . . . . . 6  |-  ( A  e.  NN0  ->  A  e.  RR )
32adantr 452 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  A  e.  RR )
4 nnre 9940 . . . . . 6  |-  ( B  e.  NN  ->  B  e.  RR )
54adantl 453 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  B  e.  RR )
6 nnne0 9965 . . . . . 6  |-  ( B  e.  NN  ->  B  =/=  0 )
76adantl 453 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  B  =/=  0 )
8 redivcl 9666 . . . . 5  |-  ( ( A  e.  RR  /\  B  e.  RR  /\  B  =/=  0 )  ->  ( A  /  B )  e.  RR )
93, 5, 7, 8syl3anc 1184 . . . 4  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( A  /  B
)  e.  RR )
10 nn0ge0 10180 . . . . . 6  |-  ( A  e.  NN0  ->  0  <_  A )
112, 10jca 519 . . . . 5  |-  ( A  e.  NN0  ->  ( A  e.  RR  /\  0  <_  A ) )
12 nngt0 9962 . . . . . 6  |-  ( B  e.  NN  ->  0  <  B )
134, 12jca 519 . . . . 5  |-  ( B  e.  NN  ->  ( B  e.  RR  /\  0  <  B ) )
14 divge0 9812 . . . . 5  |-  ( ( ( A  e.  RR  /\  0  <_  A )  /\  ( B  e.  RR  /\  0  <  B ) )  ->  0  <_  ( A  /  B ) )
1511, 13, 14syl2an 464 . . . 4  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  0  <_  ( A  /  B ) )
16 flge0nn0 11153 . . . 4  |-  ( ( ( A  /  B
)  e.  RR  /\  0  <_  ( A  /  B ) )  -> 
( |_ `  ( A  /  B ) )  e.  NN0 )
179, 15, 16syl2anc 643 . . 3  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( |_ `  ( A  /  B ) )  e.  NN0 )
181, 17syl5eqel 2472 . 2  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  Q  e.  NN0 )
19 quorem.2 . . 3  |-  R  =  ( A  -  ( B  x.  Q )
)
20 nnnn0 10161 . . . . . 6  |-  ( B  e.  NN  ->  B  e.  NN0 )
2120adantl 453 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  B  e.  NN0 )
22 nn0mulcl 10189 . . . . 5  |-  ( ( B  e.  NN0  /\  Q  e.  NN0 )  -> 
( B  x.  Q
)  e.  NN0 )
2321, 18, 22syl2anc 643 . . . 4  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( B  x.  Q
)  e.  NN0 )
24 simpl 444 . . . 4  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  A  e.  NN0 )
25 nn0cn 10164 . . . . . . . 8  |-  ( Q  e.  NN0  ->  Q  e.  CC )
2618, 25syl 16 . . . . . . 7  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  Q  e.  CC )
27 nncn 9941 . . . . . . . 8  |-  ( B  e.  NN  ->  B  e.  CC )
2827adantl 453 . . . . . . 7  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  B  e.  CC )
29 divcan3 9635 . . . . . . 7  |-  ( ( Q  e.  CC  /\  B  e.  CC  /\  B  =/=  0 )  ->  (
( B  x.  Q
)  /  B )  =  Q )
3026, 28, 7, 29syl3anc 1184 . . . . . 6  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( B  x.  Q )  /  B
)  =  Q )
31 flle 11136 . . . . . . . 8  |-  ( ( A  /  B )  e.  RR  ->  ( |_ `  ( A  /  B ) )  <_ 
( A  /  B
) )
329, 31syl 16 . . . . . . 7  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( |_ `  ( A  /  B ) )  <_  ( A  /  B ) )
331, 32syl5eqbr 4187 . . . . . 6  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  Q  <_  ( A  /  B ) )
3430, 33eqbrtrd 4174 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( B  x.  Q )  /  B
)  <_  ( A  /  B ) )
35 nn0re 10163 . . . . . . 7  |-  ( ( B  x.  Q )  e.  NN0  ->  ( B  x.  Q )  e.  RR )
3623, 35syl 16 . . . . . 6  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( B  x.  Q
)  e.  RR )
3712adantl 453 . . . . . 6  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  0  <  B )
38 lediv1 9808 . . . . . 6  |-  ( ( ( B  x.  Q
)  e.  RR  /\  A  e.  RR  /\  ( B  e.  RR  /\  0  <  B ) )  -> 
( ( B  x.  Q )  <_  A  <->  ( ( B  x.  Q
)  /  B )  <_  ( A  /  B ) ) )
3936, 3, 5, 37, 38syl112anc 1188 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( B  x.  Q )  <_  A  <->  ( ( B  x.  Q
)  /  B )  <_  ( A  /  B ) ) )
4034, 39mpbird 224 . . . 4  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( B  x.  Q
)  <_  A )
41 nn0sub2 10268 . . . 4  |-  ( ( ( B  x.  Q
)  e.  NN0  /\  A  e.  NN0  /\  ( B  x.  Q )  <_  A )  ->  ( A  -  ( B  x.  Q ) )  e. 
NN0 )
4223, 24, 40, 41syl3anc 1184 . . 3  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( A  -  ( B  x.  Q )
)  e.  NN0 )
4319, 42syl5eqel 2472 . 2  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  R  e.  NN0 )
441oveq2i 6032 . . . . . 6  |-  ( ( A  /  B )  -  Q )  =  ( ( A  /  B )  -  ( |_ `  ( A  /  B ) ) )
45 fraclt1 11139 . . . . . . 7  |-  ( ( A  /  B )  e.  RR  ->  (
( A  /  B
)  -  ( |_
`  ( A  /  B ) ) )  <  1 )
469, 45syl 16 . . . . . 6  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( A  /  B )  -  ( |_ `  ( A  /  B ) ) )  <  1 )
4744, 46syl5eqbr 4187 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( A  /  B )  -  Q
)  <  1 )
4819oveq1i 6031 . . . . . 6  |-  ( R  /  B )  =  ( ( A  -  ( B  x.  Q
) )  /  B
)
49 nn0cn 10164 . . . . . . . . 9  |-  ( A  e.  NN0  ->  A  e.  CC )
5049adantr 452 . . . . . . . 8  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  A  e.  CC )
51 nn0cn 10164 . . . . . . . . 9  |-  ( ( B  x.  Q )  e.  NN0  ->  ( B  x.  Q )  e.  CC )
5223, 51syl 16 . . . . . . . 8  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( B  x.  Q
)  e.  CC )
5327, 6jca 519 . . . . . . . . 9  |-  ( B  e.  NN  ->  ( B  e.  CC  /\  B  =/=  0 ) )
5453adantl 453 . . . . . . . 8  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( B  e.  CC  /\  B  =/=  0 ) )
55 divsubdir 9643 . . . . . . . 8  |-  ( ( A  e.  CC  /\  ( B  x.  Q
)  e.  CC  /\  ( B  e.  CC  /\  B  =/=  0 ) )  ->  ( ( A  -  ( B  x.  Q ) )  /  B )  =  ( ( A  /  B
)  -  ( ( B  x.  Q )  /  B ) ) )
5650, 52, 54, 55syl3anc 1184 . . . . . . 7  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( A  -  ( B  x.  Q
) )  /  B
)  =  ( ( A  /  B )  -  ( ( B  x.  Q )  /  B ) ) )
5730oveq2d 6037 . . . . . . 7  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( A  /  B )  -  (
( B  x.  Q
)  /  B ) )  =  ( ( A  /  B )  -  Q ) )
5856, 57eqtrd 2420 . . . . . 6  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( A  -  ( B  x.  Q
) )  /  B
)  =  ( ( A  /  B )  -  Q ) )
5948, 58syl5eq 2432 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( R  /  B
)  =  ( ( A  /  B )  -  Q ) )
60 divid 9638 . . . . . . 7  |-  ( ( B  e.  CC  /\  B  =/=  0 )  -> 
( B  /  B
)  =  1 )
6127, 6, 60syl2anc 643 . . . . . 6  |-  ( B  e.  NN  ->  ( B  /  B )  =  1 )
6261adantl 453 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( B  /  B
)  =  1 )
6347, 59, 623brtr4d 4184 . . . 4  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( R  /  B
)  <  ( B  /  B ) )
64 nn0re 10163 . . . . . 6  |-  ( R  e.  NN0  ->  R  e.  RR )
6543, 64syl 16 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  R  e.  RR )
66 ltdiv1 9807 . . . . 5  |-  ( ( R  e.  RR  /\  B  e.  RR  /\  ( B  e.  RR  /\  0  <  B ) )  -> 
( R  <  B  <->  ( R  /  B )  <  ( B  /  B ) ) )
6765, 5, 5, 37, 66syl112anc 1188 . . . 4  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( R  <  B  <->  ( R  /  B )  <  ( B  /  B ) ) )
6863, 67mpbird 224 . . 3  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  R  <  B )
6919oveq2i 6032 . . . 4  |-  ( ( B  x.  Q )  +  R )  =  ( ( B  x.  Q )  +  ( A  -  ( B  x.  Q ) ) )
70 pncan3 9246 . . . . 5  |-  ( ( ( B  x.  Q
)  e.  CC  /\  A  e.  CC )  ->  ( ( B  x.  Q )  +  ( A  -  ( B  x.  Q ) ) )  =  A )
7152, 50, 70syl2anc 643 . . . 4  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( B  x.  Q )  +  ( A  -  ( B  x.  Q ) ) )  =  A )
7269, 71syl5req 2433 . . 3  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  A  =  ( ( B  x.  Q )  +  R ) )
7368, 72jca 519 . 2  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( R  <  B  /\  A  =  (
( B  x.  Q
)  +  R ) ) )
7418, 43, 73jca31 521 1  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( Q  e. 
NN0  /\  R  e.  NN0 )  /\  ( R  <  B  /\  A  =  ( ( B  x.  Q )  +  R ) ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 177    /\ wa 359    = wceq 1649    e. wcel 1717    =/= wne 2551   class class class wbr 4154   ` cfv 5395  (class class class)co 6021   CCcc 8922   RRcr 8923   0cc0 8924   1c1 8925    + caddc 8927    x. cmul 8929    < clt 9054    <_ cle 9055    - cmin 9224    / cdiv 9610   NNcn 9933   NN0cn0 10154   |_cfl 11129
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1661  ax-8 1682  ax-13 1719  ax-14 1721  ax-6 1736  ax-7 1741  ax-11 1753  ax-12 1939  ax-ext 2369  ax-sep 4272  ax-nul 4280  ax-pow 4319  ax-pr 4345  ax-un 4642  ax-cnex 8980  ax-resscn 8981  ax-1cn 8982  ax-icn 8983  ax-addcl 8984  ax-addrcl 8985  ax-mulcl 8986  ax-mulrcl 8987  ax-mulcom 8988  ax-addass 8989  ax-mulass 8990  ax-distr 8991  ax-i2m1 8992  ax-1ne0 8993  ax-1rid 8994  ax-rnegex 8995  ax-rrecex 8996  ax-cnre 8997  ax-pre-lttri 8998  ax-pre-lttrn 8999  ax-pre-ltadd 9000  ax-pre-mulgt0 9001  ax-pre-sup 9002
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2243  df-mo 2244  df-clab 2375  df-cleq 2381  df-clel 2384  df-nfc 2513  df-ne 2553  df-nel 2554  df-ral 2655  df-rex 2656  df-reu 2657  df-rmo 2658  df-rab 2659  df-v 2902  df-sbc 3106  df-csb 3196  df-dif 3267  df-un 3269  df-in 3271  df-ss 3278  df-pss 3280  df-nul 3573  df-if 3684  df-pw 3745  df-sn 3764  df-pr 3765  df-tp 3766  df-op 3767  df-uni 3959  df-iun 4038  df-br 4155  df-opab 4209  df-mpt 4210  df-tr 4245  df-eprel 4436  df-id 4440  df-po 4445  df-so 4446  df-fr 4483  df-we 4485  df-ord 4526  df-on 4527  df-lim 4528  df-suc 4529  df-om 4787  df-xp 4825  df-rel 4826  df-cnv 4827  df-co 4828  df-dm 4829  df-rn 4830  df-res 4831  df-ima 4832  df-iota 5359  df-fun 5397  df-fn 5398  df-f 5399  df-f1 5400  df-fo 5401  df-f1o 5402  df-fv 5403  df-ov 6024  df-oprab 6025  df-mpt2 6026  df-riota 6486  df-recs 6570  df-rdg 6605  df-er 6842  df-en 7047  df-dom 7048  df-sdom 7049  df-sup 7382  df-pnf 9056  df-mnf 9057  df-xr 9058  df-ltxr 9059  df-le 9060  df-sub 9226  df-neg 9227  df-div 9611  df-nn 9934  df-n0 10155  df-z 10216  df-uz 10422  df-fl 11130
  Copyright terms: Public domain W3C validator