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

Theorem intfracq 10979
Description: Decompose a rational number, expressed as a ratio, into integer and fractional parts. The fractional part has a tighter bound than that of intfrac2 10978. (Contributed by NM, 16-Aug-2008.)
Hypotheses
Ref Expression
intfracq.1  |-  Z  =  ( |_ `  ( M  /  N ) )
intfracq.2  |-  F  =  ( ( M  /  N )  -  Z
)
Assertion
Ref Expression
intfracq  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( 0  <_  F  /\  F  <_  ( ( N  -  1 )  /  N )  /\  ( M  /  N
)  =  ( Z  +  F ) ) )

Proof of Theorem intfracq
StepHypRef Expression
1 zre 10044 . . . . . 6  |-  ( M  e.  ZZ  ->  M  e.  RR )
21adantr 451 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  M  e.  RR )
3 nnre 9769 . . . . . 6  |-  ( N  e.  NN  ->  N  e.  RR )
43adantl 452 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  e.  RR )
5 nnne0 9794 . . . . . 6  |-  ( N  e.  NN  ->  N  =/=  0 )
65adantl 452 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  =/=  0 )
72, 4, 6redivcld 9604 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( M  /  N
)  e.  RR )
8 intfracq.1 . . . . 5  |-  Z  =  ( |_ `  ( M  /  N ) )
9 intfracq.2 . . . . 5  |-  F  =  ( ( M  /  N )  -  Z
)
108, 9intfrac2 10978 . . . 4  |-  ( ( M  /  N )  e.  RR  ->  (
0  <_  F  /\  F  <  1  /\  ( M  /  N )  =  ( Z  +  F
) ) )
117, 10syl 15 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( 0  <_  F  /\  F  <  1  /\  ( M  /  N
)  =  ( Z  +  F ) ) )
1211simp1d 967 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  0  <_  F )
13 fraclt1 10950 . . . . . . 7  |-  ( ( M  /  N )  e.  RR  ->  (
( M  /  N
)  -  ( |_
`  ( M  /  N ) ) )  <  1 )
147, 13syl 15 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( M  /  N )  -  ( |_ `  ( M  /  N ) ) )  <  1 )
158oveq2i 5885 . . . . . . . 8  |-  ( ( M  /  N )  -  Z )  =  ( ( M  /  N )  -  ( |_ `  ( M  /  N ) ) )
169, 15eqtri 2316 . . . . . . 7  |-  F  =  ( ( M  /  N )  -  ( |_ `  ( M  /  N ) ) )
1716a1i 10 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  =  ( ( M  /  N )  -  ( |_ `  ( M  /  N
) ) ) )
18 nncn 9770 . . . . . . . 8  |-  ( N  e.  NN  ->  N  e.  CC )
1918, 5dividd 9550 . . . . . . 7  |-  ( N  e.  NN  ->  ( N  /  N )  =  1 )
2019adantl 452 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  /  N
)  =  1 )
2114, 17, 203brtr4d 4069 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  <  ( N  /  N ) )
22 reflcl 10944 . . . . . . . . . 10  |-  ( ( M  /  N )  e.  RR  ->  ( |_ `  ( M  /  N ) )  e.  RR )
237, 22syl 15 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( |_ `  ( M  /  N ) )  e.  RR )
248, 23syl5eqel 2380 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  Z  e.  RR )
257, 24resubcld 9227 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( M  /  N )  -  Z
)  e.  RR )
269, 25syl5eqel 2380 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  e.  RR )
27 nngt0 9791 . . . . . . . 8  |-  ( N  e.  NN  ->  0  <  N )
283, 27jca 518 . . . . . . 7  |-  ( N  e.  NN  ->  ( N  e.  RR  /\  0  <  N ) )
2928adantl 452 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  e.  RR  /\  0  <  N ) )
30 ltmuldiv2 9643 . . . . . 6  |-  ( ( F  e.  RR  /\  N  e.  RR  /\  ( N  e.  RR  /\  0  <  N ) )  -> 
( ( N  x.  F )  <  N  <->  F  <  ( N  /  N ) ) )
3126, 4, 29, 30syl3anc 1182 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  F )  <  N  <->  F  <  ( N  /  N ) ) )
3221, 31mpbird 223 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  <  N )
339oveq2i 5885 . . . . . . 7  |-  ( N  x.  F )  =  ( N  x.  (
( M  /  N
)  -  Z ) )
3418adantl 452 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  e.  CC )
357recnd 8877 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( M  /  N
)  e.  CC )
367flcld 10946 . . . . . . . . . 10  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( |_ `  ( M  /  N ) )  e.  ZZ )
378, 36syl5eqel 2380 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  Z  e.  ZZ )
3837zcnd 10134 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  Z  e.  CC )
3934, 35, 38subdid 9251 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  (
( M  /  N
)  -  Z ) )  =  ( ( N  x.  ( M  /  N ) )  -  ( N  x.  Z ) ) )
4033, 39syl5eq 2340 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  =  ( ( N  x.  ( M  /  N ) )  -  ( N  x.  Z ) ) )
41 zcn 10045 . . . . . . . . . 10  |-  ( M  e.  ZZ  ->  M  e.  CC )
4241adantr 451 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  M  e.  CC )
4342, 34, 6divcan2d 9554 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  ( M  /  N ) )  =  M )
44 simpl 443 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  M  e.  ZZ )
4543, 44eqeltrd 2370 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  ( M  /  N ) )  e.  ZZ )
46 nnz 10061 . . . . . . . . 9  |-  ( N  e.  NN  ->  N  e.  ZZ )
4746adantl 452 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  e.  ZZ )
4847, 37zmulcld 10139 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  Z
)  e.  ZZ )
4945, 48zsubcld 10138 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  ( M  /  N
) )  -  ( N  x.  Z )
)  e.  ZZ )
5040, 49eqeltrd 2370 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  e.  ZZ )
51 zltlem1 10086 . . . . 5  |-  ( ( ( N  x.  F
)  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( N  x.  F )  <  N  <->  ( N  x.  F )  <_  ( N  - 
1 ) ) )
5250, 47, 51syl2anc 642 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  F )  <  N  <->  ( N  x.  F )  <_  ( N  - 
1 ) ) )
5332, 52mpbid 201 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  <_  ( N  -  1 ) )
54 peano2rem 9129 . . . . . 6  |-  ( N  e.  RR  ->  ( N  -  1 )  e.  RR )
553, 54syl 15 . . . . 5  |-  ( N  e.  NN  ->  ( N  -  1 )  e.  RR )
5655adantl 452 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  -  1 )  e.  RR )
57 lemuldiv2 9652 . . . 4  |-  ( ( F  e.  RR  /\  ( N  -  1
)  e.  RR  /\  ( N  e.  RR  /\  0  <  N ) )  ->  ( ( N  x.  F )  <_  ( N  -  1 )  <->  F  <_  ( ( N  -  1 )  /  N ) ) )
5826, 56, 29, 57syl3anc 1182 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  F )  <_  ( N  -  1 )  <-> 
F  <_  ( ( N  -  1 )  /  N ) ) )
5953, 58mpbid 201 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  <_  ( ( N  -  1 )  /  N ) )
6011simp3d 969 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( M  /  N
)  =  ( Z  +  F ) )
6112, 59, 603jca 1132 1  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( 0  <_  F  /\  F  <_  ( ( N  -  1 )  /  N )  /\  ( M  /  N
)  =  ( Z  +  F ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 176    /\ wa 358    /\ w3a 934    = wceq 1632    e. wcel 1696    =/= wne 2459   class class class wbr 4039   ` cfv 5271  (class class class)co 5874   CCcc 8751   RRcr 8752   0cc0 8753   1c1 8754    + caddc 8756    x. cmul 8758    < clt 8883    <_ cle 8884    - cmin 9053    / cdiv 9439   NNcn 9762   ZZcz 10040   |_cfl 10940
This theorem is referenced by:  fldiv  10980
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528  ax-cnex 8809  ax-resscn 8810  ax-1cn 8811  ax-icn 8812  ax-addcl 8813  ax-addrcl 8814  ax-mulcl 8815  ax-mulrcl 8816  ax-mulcom 8817  ax-addass 8818  ax-mulass 8819  ax-distr 8820  ax-i2m1 8821  ax-1ne0 8822  ax-1rid 8823  ax-rnegex 8824  ax-rrecex 8825  ax-cnre 8826  ax-pre-lttri 8827  ax-pre-lttrn 8828  ax-pre-ltadd 8829  ax-pre-mulgt0 8830  ax-pre-sup 8831
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-nel 2462  df-ral 2561  df-rex 2562  df-reu 2563  df-rmo 2564  df-rab 2565  df-v 2803  df-sbc 3005  df-csb 3095  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-pss 3181  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-tp 3661  df-op 3662  df-uni 3844  df-iun 3923  df-br 4040  df-opab 4094  df-mpt 4095  df-tr 4130  df-eprel 4321  df-id 4325  df-po 4330  df-so 4331  df-fr 4368  df-we 4370  df-ord 4411  df-on 4412  df-lim 4413  df-suc 4414  df-om 4673  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-riota 6320  df-recs 6404  df-rdg 6439  df-er 6676  df-en 6880  df-dom 6881  df-sdom 6882  df-sup 7210  df-pnf 8885  df-mnf 8886  df-xr 8887  df-ltxr 8888  df-le 8889  df-sub 9055  df-neg 9056  df-div 9440  df-nn 9763  df-n0 9982  df-z 10041  df-uz 10247  df-fl 10941
  Copyright terms: Public domain W3C validator