ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  intfracq Unicode version

Theorem intfracq 9692
Description: Decompose a rational number, expressed as a ratio, into integer and fractional parts. The fractional part has a tighter bound than that of intqfrac2 9691. (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 znq 9078 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( M  /  N
)  e.  QQ )
2 intfracq.1 . . . . 5  |-  Z  =  ( |_ `  ( M  /  N ) )
3 intfracq.2 . . . . 5  |-  F  =  ( ( M  /  N )  -  Z
)
42, 3intqfrac2 9691 . . . 4  |-  ( ( M  /  N )  e.  QQ  ->  (
0  <_  F  /\  F  <  1  /\  ( M  /  N )  =  ( Z  +  F
) ) )
51, 4syl 14 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( 0  <_  F  /\  F  <  1  /\  ( M  /  N
)  =  ( Z  +  F ) ) )
65simp1d 955 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  0  <_  F )
7 qfraclt1 9652 . . . . . . 7  |-  ( ( M  /  N )  e.  QQ  ->  (
( M  /  N
)  -  ( |_
`  ( M  /  N ) ) )  <  1 )
81, 7syl 14 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( M  /  N )  -  ( |_ `  ( M  /  N ) ) )  <  1 )
92oveq2i 5645 . . . . . . . 8  |-  ( ( M  /  N )  -  Z )  =  ( ( M  /  N )  -  ( |_ `  ( M  /  N ) ) )
103, 9eqtri 2108 . . . . . . 7  |-  F  =  ( ( M  /  N )  -  ( |_ `  ( M  /  N ) ) )
1110a1i 9 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  =  ( ( M  /  N )  -  ( |_ `  ( M  /  N
) ) ) )
12 simpr 108 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  e.  NN )
1312nncnd 8408 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  e.  CC )
1412nnap0d 8439 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N #  0 )
1513, 14dividapd 8227 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  /  N
)  =  1 )
168, 11, 153brtr4d 3867 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  <  ( N  /  N ) )
17 qre 9079 . . . . . . . . 9  |-  ( ( M  /  N )  e.  QQ  ->  ( M  /  N )  e.  RR )
181, 17syl 14 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( M  /  N
)  e.  RR )
191flqcld 9649 . . . . . . . . . 10  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( |_ `  ( M  /  N ) )  e.  ZZ )
202, 19syl5eqel 2174 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  Z  e.  ZZ )
2120zred 8838 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  Z  e.  RR )
2218, 21resubcld 7838 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( M  /  N )  -  Z
)  e.  RR )
233, 22syl5eqel 2174 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  e.  RR )
24 nnre 8401 . . . . . . 7  |-  ( N  e.  NN  ->  N  e.  RR )
2524adantl 271 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  e.  RR )
26 nngt0 8419 . . . . . . . 8  |-  ( N  e.  NN  ->  0  <  N )
2724, 26jca 300 . . . . . . 7  |-  ( N  e.  NN  ->  ( N  e.  RR  /\  0  <  N ) )
2827adantl 271 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  e.  RR  /\  0  <  N ) )
29 ltmuldiv2 8308 . . . . . 6  |-  ( ( F  e.  RR  /\  N  e.  RR  /\  ( N  e.  RR  /\  0  <  N ) )  -> 
( ( N  x.  F )  <  N  <->  F  <  ( N  /  N ) ) )
3023, 25, 28, 29syl3anc 1174 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  F )  <  N  <->  F  <  ( N  /  N ) ) )
3116, 30mpbird 165 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  <  N )
323oveq2i 5645 . . . . . . 7  |-  ( N  x.  F )  =  ( N  x.  (
( M  /  N
)  -  Z ) )
3318recnd 7495 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( M  /  N
)  e.  CC )
3420zcnd 8839 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  Z  e.  CC )
3513, 33, 34subdid 7871 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  (
( M  /  N
)  -  Z ) )  =  ( ( N  x.  ( M  /  N ) )  -  ( N  x.  Z ) ) )
3632, 35syl5eq 2132 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  =  ( ( N  x.  ( M  /  N ) )  -  ( N  x.  Z ) ) )
37 zcn 8725 . . . . . . . . . 10  |-  ( M  e.  ZZ  ->  M  e.  CC )
3837adantr 270 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  M  e.  CC )
3938, 13, 14divcanap2d 8232 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  ( M  /  N ) )  =  M )
40 simpl 107 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  M  e.  ZZ )
4139, 40eqeltrd 2164 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  ( M  /  N ) )  e.  ZZ )
42 nnz 8739 . . . . . . . . 9  |-  ( N  e.  NN  ->  N  e.  ZZ )
4342adantl 271 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  N  e.  ZZ )
4443, 20zmulcld 8844 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  Z
)  e.  ZZ )
4541, 44zsubcld 8843 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  ( M  /  N
) )  -  ( N  x.  Z )
)  e.  ZZ )
4636, 45eqeltrd 2164 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  e.  ZZ )
47 zltlem1 8777 . . . . 5  |-  ( ( ( N  x.  F
)  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( N  x.  F )  <  N  <->  ( N  x.  F )  <_  ( N  - 
1 ) ) )
4846, 43, 47syl2anc 403 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  F )  <  N  <->  ( N  x.  F )  <_  ( N  - 
1 ) ) )
4931, 48mpbid 145 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  x.  F
)  <_  ( N  -  1 ) )
50 peano2rem 7728 . . . . . 6  |-  ( N  e.  RR  ->  ( N  -  1 )  e.  RR )
5124, 50syl 14 . . . . 5  |-  ( N  e.  NN  ->  ( N  -  1 )  e.  RR )
5251adantl 271 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( N  -  1 )  e.  RR )
53 lemuldiv2 8315 . . . 4  |-  ( ( F  e.  RR  /\  ( N  -  1
)  e.  RR  /\  ( N  e.  RR  /\  0  <  N ) )  ->  ( ( N  x.  F )  <_  ( N  -  1 )  <->  F  <_  ( ( N  -  1 )  /  N ) ) )
5423, 52, 28, 53syl3anc 1174 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( N  x.  F )  <_  ( N  -  1 )  <-> 
F  <_  ( ( N  -  1 )  /  N ) ) )
5549, 54mpbid 145 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  F  <_  ( ( N  -  1 )  /  N ) )
565simp3d 957 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( M  /  N
)  =  ( Z  +  F ) )
576, 55, 563jca 1123 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    /\ wa 102    <-> wb 103    /\ w3a 924    = wceq 1289    e. wcel 1438   class class class wbr 3837   ` cfv 5002  (class class class)co 5634   CCcc 7327   RRcr 7328   0cc0 7329   1c1 7330    + caddc 7332    x. cmul 7334    < clt 7501    <_ cle 7502    - cmin 7632    / cdiv 8113   NNcn 8394   ZZcz 8720   QQcq 9073   |_cfl 9640
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 579  ax-in2 580  ax-io 665  ax-5 1381  ax-7 1382  ax-gen 1383  ax-ie1 1427  ax-ie2 1428  ax-8 1440  ax-10 1441  ax-11 1442  ax-i12 1443  ax-bndl 1444  ax-4 1445  ax-13 1449  ax-14 1450  ax-17 1464  ax-i9 1468  ax-ial 1472  ax-i5r 1473  ax-ext 2070  ax-sep 3949  ax-pow 4001  ax-pr 4027  ax-un 4251  ax-setind 4343  ax-cnex 7415  ax-resscn 7416  ax-1cn 7417  ax-1re 7418  ax-icn 7419  ax-addcl 7420  ax-addrcl 7421  ax-mulcl 7422  ax-mulrcl 7423  ax-addcom 7424  ax-mulcom 7425  ax-addass 7426  ax-mulass 7427  ax-distr 7428  ax-i2m1 7429  ax-0lt1 7430  ax-1rid 7431  ax-0id 7432  ax-rnegex 7433  ax-precex 7434  ax-cnre 7435  ax-pre-ltirr 7436  ax-pre-ltwlin 7437  ax-pre-lttrn 7438  ax-pre-apti 7439  ax-pre-ltadd 7440  ax-pre-mulgt0 7441  ax-pre-mulext 7442  ax-arch 7443
This theorem depends on definitions:  df-bi 115  df-3or 925  df-3an 926  df-tru 1292  df-fal 1295  df-nf 1395  df-sb 1693  df-eu 1951  df-mo 1952  df-clab 2075  df-cleq 2081  df-clel 2084  df-nfc 2217  df-ne 2256  df-nel 2351  df-ral 2364  df-rex 2365  df-reu 2366  df-rmo 2367  df-rab 2368  df-v 2621  df-sbc 2839  df-csb 2932  df-dif 2999  df-un 3001  df-in 3003  df-ss 3010  df-pw 3427  df-sn 3447  df-pr 3448  df-op 3450  df-uni 3649  df-int 3684  df-iun 3727  df-br 3838  df-opab 3892  df-mpt 3893  df-id 4111  df-po 4114  df-iso 4115  df-xp 4434  df-rel 4435  df-cnv 4436  df-co 4437  df-dm 4438  df-rn 4439  df-res 4440  df-ima 4441  df-iota 4967  df-fun 5004  df-fn 5005  df-f 5006  df-fv 5010  df-riota 5590  df-ov 5637  df-oprab 5638  df-mpt2 5639  df-1st 5893  df-2nd 5894  df-pnf 7503  df-mnf 7504  df-xr 7505  df-ltxr 7506  df-le 7507  df-sub 7634  df-neg 7635  df-reap 8028  df-ap 8035  df-div 8114  df-inn 8395  df-n0 8644  df-z 8721  df-q 9074  df-rp 9104  df-fl 9642
This theorem is referenced by:  flqdiv  9693
  Copyright terms: Public domain W3C validator