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

Theorem intfracq 11810
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 11809. (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 10756 . . . . . 6  |-  ( M  e.  ZZ  ->  M  e.  RR )
21adantr 465 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  M  e.  RR )
3 nnre 10435 . . . . . 6  |-  ( N  e.  NN  ->  N  e.  RR )
43adantl 466 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  e.  RR )
5 nnne0 10460 . . . . . 6  |-  ( N  e.  NN  ->  N  =/=  0 )
65adantl 466 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  =/=  0 )
72, 4, 6redivcld 10265 . . . 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 11809 . . . 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 1000 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  0  <_  F )
13 fraclt1 11764 . . . . . . 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 6206 . . . . . . . 8  |-  ( ( M  /  N )  -  Z )  =  ( ( M  /  N )  -  ( |_ `  ( M  /  N ) ) )
169, 15eqtri 2481 . . . . . . 7  |-  F  =  ( ( M  /  N )  -  ( |_ `  ( M  /  N ) ) )
1716a1i 11 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  =  ( ( M  /  N )  -  ( |_ `  ( M  /  N
) ) ) )
18 nncn 10436 . . . . . . . 8  |-  ( N  e.  NN  ->  N  e.  CC )
1918, 5dividd 10211 . . . . . . 7  |-  ( N  e.  NN  ->  ( N  /  N )  =  1 )
2019adantl 466 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  /  N
)  =  1 )
2114, 17, 203brtr4d 4425 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  <  ( N  /  N ) )
22 reflcl 11758 . . . . . . . . . 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 2544 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  Z  e.  RR )
257, 24resubcld 9882 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( M  /  N )  -  Z
)  e.  RR )
269, 25syl5eqel 2544 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  e.  RR )
27 nngt0 10457 . . . . . . . 8  |-  ( N  e.  NN  ->  0  <  N )
283, 27jca 532 . . . . . . 7  |-  ( N  e.  NN  ->  ( N  e.  RR  /\  0  <  N ) )
2928adantl 466 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  e.  RR  /\  0  <  N ) )
30 ltmuldiv2 10309 . . . . . 6  |-  ( ( F  e.  RR  /\  N  e.  RR  /\  ( N  e.  RR  /\  0  <  N ) )  -> 
( ( N  x.  F )  <  N  <->  F  <  ( N  /  N ) ) )
3126, 4, 29, 30syl3anc 1219 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  F )  <  N  <->  F  <  ( N  /  N ) ) )
3221, 31mpbird 232 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  <  N )
339oveq2i 6206 . . . . . . 7  |-  ( N  x.  F )  =  ( N  x.  (
( M  /  N
)  -  Z ) )
3418adantl 466 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  e.  CC )
357recnd 9518 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( M  /  N
)  e.  CC )
367flcld 11760 . . . . . . . . . 10  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( |_ `  ( M  /  N ) )  e.  ZZ )
378, 36syl5eqel 2544 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  Z  e.  ZZ )
3837zcnd 10854 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  Z  e.  CC )
3934, 35, 38subdid 9906 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  (
( M  /  N
)  -  Z ) )  =  ( ( N  x.  ( M  /  N ) )  -  ( N  x.  Z ) ) )
4033, 39syl5eq 2505 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  =  ( ( N  x.  ( M  /  N ) )  -  ( N  x.  Z ) ) )
41 zcn 10757 . . . . . . . . . 10  |-  ( M  e.  ZZ  ->  M  e.  CC )
4241adantr 465 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  M  e.  CC )
4342, 34, 6divcan2d 10215 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  ( M  /  N ) )  =  M )
44 simpl 457 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  M  e.  ZZ )
4543, 44eqeltrd 2540 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  ( M  /  N ) )  e.  ZZ )
46 nnz 10774 . . . . . . . . 9  |-  ( N  e.  NN  ->  N  e.  ZZ )
4746adantl 466 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  e.  ZZ )
4847, 37zmulcld 10859 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  Z
)  e.  ZZ )
4945, 48zsubcld 10858 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  ( M  /  N
) )  -  ( N  x.  Z )
)  e.  ZZ )
5040, 49eqeltrd 2540 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  e.  ZZ )
51 zltlem1 10803 . . . . 5  |-  ( ( ( N  x.  F
)  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( N  x.  F )  <  N  <->  ( N  x.  F )  <_  ( N  - 
1 ) ) )
5250, 47, 51syl2anc 661 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  F )  <  N  <->  ( N  x.  F )  <_  ( N  - 
1 ) ) )
5332, 52mpbid 210 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  <_  ( N  -  1 ) )
54 peano2rem 9781 . . . . . 6  |-  ( N  e.  RR  ->  ( N  -  1 )  e.  RR )
553, 54syl 16 . . . . 5  |-  ( N  e.  NN  ->  ( N  -  1 )  e.  RR )
5655adantl 466 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  -  1 )  e.  RR )
57 lemuldiv2 10318 . . . 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 1219 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  F )  <_  ( N  -  1 )  <-> 
F  <_  ( ( N  -  1 )  /  N ) ) )
5953, 58mpbid 210 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  <_  ( ( N  -  1 )  /  N ) )
6011simp3d 1002 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( M  /  N
)  =  ( Z  +  F ) )
6112, 59, 603jca 1168 1  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( 0  <_  F  /\  F  <_  ( ( N  -  1 )  /  N )  /\  ( M  /  N
)  =  ( Z  +  F ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 965    = wceq 1370    e. wcel 1758    =/= wne 2645   class class class wbr 4395   ` cfv 5521  (class class class)co 6195   CCcc 9386   RRcr 9387   0cc0 9388   1c1 9389    + caddc 9391    x. cmul 9393    < clt 9524    <_ cle 9525    - cmin 9701    / cdiv 10099   NNcn 10428   ZZcz 10752   |_cfl 11752
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1954  ax-ext 2431  ax-sep 4516  ax-nul 4524  ax-pow 4573  ax-pr 4634  ax-un 6477  ax-cnex 9444  ax-resscn 9445  ax-1cn 9446  ax-icn 9447  ax-addcl 9448  ax-addrcl 9449  ax-mulcl 9450  ax-mulrcl 9451  ax-mulcom 9452  ax-addass 9453  ax-mulass 9454  ax-distr 9455  ax-i2m1 9456  ax-1ne0 9457  ax-1rid 9458  ax-rnegex 9459  ax-rrecex 9460  ax-cnre 9461  ax-pre-lttri 9462  ax-pre-lttrn 9463  ax-pre-ltadd 9464  ax-pre-mulgt0 9465  ax-pre-sup 9466
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2265  df-mo 2266  df-clab 2438  df-cleq 2444  df-clel 2447  df-nfc 2602  df-ne 2647  df-nel 2648  df-ral 2801  df-rex 2802  df-reu 2803  df-rmo 2804  df-rab 2805  df-v 3074  df-sbc 3289  df-csb 3391  df-dif 3434  df-un 3436  df-in 3438  df-ss 3445  df-pss 3447  df-nul 3741  df-if 3895  df-pw 3965  df-sn 3981  df-pr 3983  df-tp 3985  df-op 3987  df-uni 4195  df-iun 4276  df-br 4396  df-opab 4454  df-mpt 4455  df-tr 4489  df-eprel 4735  df-id 4739  df-po 4744  df-so 4745  df-fr 4782  df-we 4784  df-ord 4825  df-on 4826  df-lim 4827  df-suc 4828  df-xp 4949  df-rel 4950  df-cnv 4951  df-co 4952  df-dm 4953  df-rn 4954  df-res 4955  df-ima 4956  df-iota 5484  df-fun 5523  df-fn 5524  df-f 5525  df-f1 5526  df-fo 5527  df-f1o 5528  df-fv 5529  df-riota 6156  df-ov 6198  df-oprab 6199  df-mpt2 6200  df-om 6582  df-recs 6937  df-rdg 6971  df-er 7206  df-en 7416  df-dom 7417  df-sdom 7418  df-sup 7797  df-pnf 9526  df-mnf 9527  df-xr 9528  df-ltxr 9529  df-le 9530  df-sub 9703  df-neg 9704  df-div 10100  df-nn 10429  df-n0 10686  df-z 10753  df-uz 10968  df-fl 11754
This theorem is referenced by:  fldiv  11811
  Copyright terms: Public domain W3C validator