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

Theorem intfracq 11230
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 11229. (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 10276 . . . . . 6  |-  ( M  e.  ZZ  ->  M  e.  RR )
21adantr 452 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  M  e.  RR )
3 nnre 9997 . . . . . 6  |-  ( N  e.  NN  ->  N  e.  RR )
43adantl 453 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  e.  RR )
5 nnne0 10022 . . . . . 6  |-  ( N  e.  NN  ->  N  =/=  0 )
65adantl 453 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  =/=  0 )
72, 4, 6redivcld 9832 . . . 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 11229 . . . 4  |-  ( ( M  /  N )  e.  RR  ->  (
0  <_  F  /\  F  <  1  /\  ( M  /  N )  =  ( Z  +  F
) ) )
117, 10syl 16 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( 0  <_  F  /\  F  <  1  /\  ( M  /  N
)  =  ( Z  +  F ) ) )
1211simp1d 969 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  0  <_  F )
13 fraclt1 11201 . . . . . . 7  |-  ( ( M  /  N )  e.  RR  ->  (
( M  /  N
)  -  ( |_
`  ( M  /  N ) ) )  <  1 )
147, 13syl 16 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( M  /  N )  -  ( |_ `  ( M  /  N ) ) )  <  1 )
158oveq2i 6084 . . . . . . . 8  |-  ( ( M  /  N )  -  Z )  =  ( ( M  /  N )  -  ( |_ `  ( M  /  N ) ) )
169, 15eqtri 2455 . . . . . . 7  |-  F  =  ( ( M  /  N )  -  ( |_ `  ( M  /  N ) ) )
1716a1i 11 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  =  ( ( M  /  N )  -  ( |_ `  ( M  /  N
) ) ) )
18 nncn 9998 . . . . . . . 8  |-  ( N  e.  NN  ->  N  e.  CC )
1918, 5dividd 9778 . . . . . . 7  |-  ( N  e.  NN  ->  ( N  /  N )  =  1 )
2019adantl 453 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  /  N
)  =  1 )
2114, 17, 203brtr4d 4234 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  <  ( N  /  N ) )
22 reflcl 11195 . . . . . . . . . 10  |-  ( ( M  /  N )  e.  RR  ->  ( |_ `  ( M  /  N ) )  e.  RR )
237, 22syl 16 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( |_ `  ( M  /  N ) )  e.  RR )
248, 23syl5eqel 2519 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  Z  e.  RR )
257, 24resubcld 9455 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( M  /  N )  -  Z
)  e.  RR )
269, 25syl5eqel 2519 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  e.  RR )
27 nngt0 10019 . . . . . . . 8  |-  ( N  e.  NN  ->  0  <  N )
283, 27jca 519 . . . . . . 7  |-  ( N  e.  NN  ->  ( N  e.  RR  /\  0  <  N ) )
2928adantl 453 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  e.  RR  /\  0  <  N ) )
30 ltmuldiv2 9871 . . . . . 6  |-  ( ( F  e.  RR  /\  N  e.  RR  /\  ( N  e.  RR  /\  0  <  N ) )  -> 
( ( N  x.  F )  <  N  <->  F  <  ( N  /  N ) ) )
3126, 4, 29, 30syl3anc 1184 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  F )  <  N  <->  F  <  ( N  /  N ) ) )
3221, 31mpbird 224 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  <  N )
339oveq2i 6084 . . . . . . 7  |-  ( N  x.  F )  =  ( N  x.  (
( M  /  N
)  -  Z ) )
3418adantl 453 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  e.  CC )
357recnd 9104 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( M  /  N
)  e.  CC )
367flcld 11197 . . . . . . . . . 10  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( |_ `  ( M  /  N ) )  e.  ZZ )
378, 36syl5eqel 2519 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  Z  e.  ZZ )
3837zcnd 10366 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  Z  e.  CC )
3934, 35, 38subdid 9479 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  (
( M  /  N
)  -  Z ) )  =  ( ( N  x.  ( M  /  N ) )  -  ( N  x.  Z ) ) )
4033, 39syl5eq 2479 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  =  ( ( N  x.  ( M  /  N ) )  -  ( N  x.  Z ) ) )
41 zcn 10277 . . . . . . . . . 10  |-  ( M  e.  ZZ  ->  M  e.  CC )
4241adantr 452 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  M  e.  CC )
4342, 34, 6divcan2d 9782 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  ( M  /  N ) )  =  M )
44 simpl 444 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  M  e.  ZZ )
4543, 44eqeltrd 2509 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  ( M  /  N ) )  e.  ZZ )
46 nnz 10293 . . . . . . . . 9  |-  ( N  e.  NN  ->  N  e.  ZZ )
4746adantl 453 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  e.  ZZ )
4847, 37zmulcld 10371 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  Z
)  e.  ZZ )
4945, 48zsubcld 10370 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  ( M  /  N
) )  -  ( N  x.  Z )
)  e.  ZZ )
5040, 49eqeltrd 2509 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  e.  ZZ )
51 zltlem1 10318 . . . . 5  |-  ( ( ( N  x.  F
)  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( N  x.  F )  <  N  <->  ( N  x.  F )  <_  ( N  - 
1 ) ) )
5250, 47, 51syl2anc 643 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  F )  <  N  <->  ( N  x.  F )  <_  ( N  - 
1 ) ) )
5332, 52mpbid 202 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  <_  ( N  -  1 ) )
54 peano2rem 9357 . . . . . 6  |-  ( N  e.  RR  ->  ( N  -  1 )  e.  RR )
553, 54syl 16 . . . . 5  |-  ( N  e.  NN  ->  ( N  -  1 )  e.  RR )
5655adantl 453 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  -  1 )  e.  RR )
57 lemuldiv2 9880 . . . 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 1184 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  F )  <_  ( N  -  1 )  <-> 
F  <_  ( ( N  -  1 )  /  N ) ) )
5953, 58mpbid 202 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  <_  ( ( N  -  1 )  /  N ) )
6011simp3d 971 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( M  /  N
)  =  ( Z  +  F ) )
6112, 59, 603jca 1134 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 177    /\ wa 359    /\ w3a 936    = wceq 1652    e. wcel 1725    =/= wne 2598   class class class wbr 4204   ` cfv 5446  (class class class)co 6073   CCcc 8978   RRcr 8979   0cc0 8980   1c1 8981    + caddc 8983    x. cmul 8985    < clt 9110    <_ cle 9111    - cmin 9281    / cdiv 9667   NNcn 9990   ZZcz 10272   |_cfl 11191
This theorem is referenced by:  fldiv  11231
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 9036  ax-resscn 9037  ax-1cn 9038  ax-icn 9039  ax-addcl 9040  ax-addrcl 9041  ax-mulcl 9042  ax-mulrcl 9043  ax-mulcom 9044  ax-addass 9045  ax-mulass 9046  ax-distr 9047  ax-i2m1 9048  ax-1ne0 9049  ax-1rid 9050  ax-rnegex 9051  ax-rrecex 9052  ax-cnre 9053  ax-pre-lttri 9054  ax-pre-lttrn 9055  ax-pre-ltadd 9056  ax-pre-mulgt0 9057  ax-pre-sup 9058
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 9112  df-mnf 9113  df-xr 9114  df-ltxr 9115  df-le 9116  df-sub 9283  df-neg 9284  df-div 9668  df-nn 9991  df-n0 10212  df-z 10273  df-uz 10479  df-fl 11192
  Copyright terms: Public domain W3C validator