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

Theorem quoremnn0ALT 11230
Description: Quotient and remainder of a nonnegative integer divided by a natural number. TO DO - Keep either quoremnn0ALT 11230 ((if we don't keep quoremz 11228) or quoremnn0 11229 (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 10222 . . . . . 6  |-  ( A  e.  NN0  ->  A  e.  RR )
32adantr 452 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  A  e.  RR )
4 nnre 9999 . . . . . 6  |-  ( B  e.  NN  ->  B  e.  RR )
54adantl 453 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  B  e.  RR )
6 nnne0 10024 . . . . . 6  |-  ( B  e.  NN  ->  B  =/=  0 )
76adantl 453 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  B  =/=  0 )
8 redivcl 9725 . . . . 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 10239 . . . . . 6  |-  ( A  e.  NN0  ->  0  <_  A )
112, 10jca 519 . . . . 5  |-  ( A  e.  NN0  ->  ( A  e.  RR  /\  0  <_  A ) )
12 nngt0 10021 . . . . . 6  |-  ( B  e.  NN  ->  0  <  B )
134, 12jca 519 . . . . 5  |-  ( B  e.  NN  ->  ( B  e.  RR  /\  0  <  B ) )
14 divge0 9871 . . . . 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 11217 . . . 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 2519 . 2  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  Q  e.  NN0 )
19 quorem.2 . . 3  |-  R  =  ( A  -  ( B  x.  Q )
)
20 nnnn0 10220 . . . . . 6  |-  ( B  e.  NN  ->  B  e.  NN0 )
2120adantl 453 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  B  e.  NN0 )
22 nn0mulcl 10248 . . . . 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 10223 . . . . . . . 8  |-  ( Q  e.  NN0  ->  Q  e.  CC )
2618, 25syl 16 . . . . . . 7  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  Q  e.  CC )
27 nncn 10000 . . . . . . . 8  |-  ( B  e.  NN  ->  B  e.  CC )
2827adantl 453 . . . . . . 7  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  B  e.  CC )
29 divcan3 9694 . . . . . . 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 11200 . . . . . . . 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 4237 . . . . . 6  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  Q  <_  ( A  /  B ) )
3430, 33eqbrtrd 4224 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( B  x.  Q )  /  B
)  <_  ( A  /  B ) )
35 nn0re 10222 . . . . . . 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 9867 . . . . . 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 10327 . . . 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 2519 . 2  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  R  e.  NN0 )
441oveq2i 6084 . . . . . 6  |-  ( ( A  /  B )  -  Q )  =  ( ( A  /  B )  -  ( |_ `  ( A  /  B ) ) )
45 fraclt1 11203 . . . . . . 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 4237 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( A  /  B )  -  Q
)  <  1 )
4819oveq1i 6083 . . . . . 6  |-  ( R  /  B )  =  ( ( A  -  ( B  x.  Q
) )  /  B
)
49 nn0cn 10223 . . . . . . . . 9  |-  ( A  e.  NN0  ->  A  e.  CC )
5049adantr 452 . . . . . . . 8  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  A  e.  CC )
51 nn0cn 10223 . . . . . . . . 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 9702 . . . . . . . 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 6089 . . . . . . 7  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( A  /  B )  -  (
( B  x.  Q
)  /  B ) )  =  ( ( A  /  B )  -  Q ) )
5856, 57eqtrd 2467 . . . . . 6  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( ( A  -  ( B  x.  Q
) )  /  B
)  =  ( ( A  /  B )  -  Q ) )
5948, 58syl5eq 2479 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( R  /  B
)  =  ( ( A  /  B )  -  Q ) )
60 divid 9697 . . . . . . 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 4234 . . . 4  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  ( R  /  B
)  <  ( B  /  B ) )
64 nn0re 10222 . . . . . 6  |-  ( R  e.  NN0  ->  R  e.  RR )
6543, 64syl 16 . . . . 5  |-  ( ( A  e.  NN0  /\  B  e.  NN )  ->  R  e.  RR )
66 ltdiv1 9866 . . . . 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 6084 . . . 4  |-  ( ( B  x.  Q )  +  R )  =  ( ( B  x.  Q )  +  ( A  -  ( B  x.  Q ) ) )
70 pncan3 9305 . . . . 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 2480 . . 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 1652    e. wcel 1725    =/= wne 2598   class class class wbr 4204   ` cfv 5446  (class class class)co 6073   CCcc 8980   RRcr 8981   0cc0 8982   1c1 8983    + caddc 8985    x. cmul 8987    < clt 9112    <_ cle 9113    - cmin 9283    / cdiv 9669   NNcn 9992   NN0cn0 10213   |_cfl 11193
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 2416  ax-sep 4322  ax-nul 4330  ax-pow 4369  ax-pr 4395  ax-un 4693  ax-cnex 9038  ax-resscn 9039  ax-1cn 9040  ax-icn 9041  ax-addcl 9042  ax-addrcl 9043  ax-mulcl 9044  ax-mulrcl 9045  ax-mulcom 9046  ax-addass 9047  ax-mulass 9048  ax-distr 9049  ax-i2m1 9050  ax-1ne0 9051  ax-1rid 9052  ax-rnegex 9053  ax-rrecex 9054  ax-cnre 9055  ax-pre-lttri 9056  ax-pre-lttrn 9057  ax-pre-ltadd 9058  ax-pre-mulgt0 9059  ax-pre-sup 9060
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 2284  df-mo 2285  df-clab 2422  df-cleq 2428  df-clel 2431  df-nfc 2560  df-ne 2600  df-nel 2601  df-ral 2702  df-rex 2703  df-reu 2704  df-rmo 2705  df-rab 2706  df-v 2950  df-sbc 3154  df-csb 3244  df-dif 3315  df-un 3317  df-in 3319  df-ss 3326  df-pss 3328  df-nul 3621  df-if 3732  df-pw 3793  df-sn 3812  df-pr 3813  df-tp 3814  df-op 3815  df-uni 4008  df-iun 4087  df-br 4205  df-opab 4259  df-mpt 4260  df-tr 4295  df-eprel 4486  df-id 4490  df-po 4495  df-so 4496  df-fr 4533  df-we 4535  df-ord 4576  df-on 4577  df-lim 4578  df-suc 4579  df-om 4838  df-xp 4876  df-rel 4877  df-cnv 4878  df-co 4879  df-dm 4880  df-rn 4881  df-res 4882  df-ima 4883  df-iota 5410  df-fun 5448  df-fn 5449  df-f 5450  df-f1 5451  df-fo 5452  df-f1o 5453  df-fv 5454  df-ov 6076  df-oprab 6077  df-mpt2 6078  df-riota 6541  df-recs 6625  df-rdg 6660  df-er 6897  df-en 7102  df-dom 7103  df-sdom 7104  df-sup 7438  df-pnf 9114  df-mnf 9115  df-xr 9116  df-ltxr 9117  df-le 9118  df-sub 9285  df-neg 9286  df-div 9670  df-nn 9993  df-n0 10214  df-z 10275  df-uz 10481  df-fl 11194
  Copyright terms: Public domain W3C validator