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

Theorem modmulnn 11004
Description: Move a natural number in and out of a floor in the first argument of a modulo operation. (Contributed by NM, 2-Jan-2009.)
Assertion
Ref Expression
modmulnn  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  (
( N  x.  ( |_ `  A ) )  mod  ( N  x.  M ) )  <_ 
( ( |_ `  ( N  x.  A
) )  mod  ( N  x.  M )
) )

Proof of Theorem modmulnn
StepHypRef Expression
1 nnre 9769 . . . . 5  |-  ( N  e.  NN  ->  N  e.  RR )
2 reflcl 10944 . . . . 5  |-  ( A  e.  RR  ->  ( |_ `  A )  e.  RR )
3 remulcl 8838 . . . . 5  |-  ( ( N  e.  RR  /\  ( |_ `  A )  e.  RR )  -> 
( N  x.  ( |_ `  A ) )  e.  RR )
41, 2, 3syl2an 463 . . . 4  |-  ( ( N  e.  NN  /\  A  e.  RR )  ->  ( N  x.  ( |_ `  A ) )  e.  RR )
543adant3 975 . . 3  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  ( N  x.  ( |_ `  A ) )  e.  RR )
6 remulcl 8838 . . . . . 6  |-  ( ( N  e.  RR  /\  A  e.  RR )  ->  ( N  x.  A
)  e.  RR )
71, 6sylan 457 . . . . 5  |-  ( ( N  e.  NN  /\  A  e.  RR )  ->  ( N  x.  A
)  e.  RR )
8 reflcl 10944 . . . . 5  |-  ( ( N  x.  A )  e.  RR  ->  ( |_ `  ( N  x.  A ) )  e.  RR )
97, 8syl 15 . . . 4  |-  ( ( N  e.  NN  /\  A  e.  RR )  ->  ( |_ `  ( N  x.  A )
)  e.  RR )
1093adant3 975 . . 3  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  ( |_ `  ( N  x.  A ) )  e.  RR )
11 nnmulcl 9785 . . . . . 6  |-  ( ( N  e.  NN  /\  M  e.  NN )  ->  ( N  x.  M
)  e.  NN )
1211nnred 9777 . . . . 5  |-  ( ( N  e.  NN  /\  M  e.  NN )  ->  ( N  x.  M
)  e.  RR )
13123adant2 974 . . . 4  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  ( N  x.  M )  e.  RR )
14 nncn 9770 . . . . . . . . 9  |-  ( N  e.  NN  ->  N  e.  CC )
15 nnne0 9794 . . . . . . . . 9  |-  ( N  e.  NN  ->  N  =/=  0 )
1614, 15jca 518 . . . . . . . 8  |-  ( N  e.  NN  ->  ( N  e.  CC  /\  N  =/=  0 ) )
17 nncn 9770 . . . . . . . . 9  |-  ( M  e.  NN  ->  M  e.  CC )
18 nnne0 9794 . . . . . . . . 9  |-  ( M  e.  NN  ->  M  =/=  0 )
1917, 18jca 518 . . . . . . . 8  |-  ( M  e.  NN  ->  ( M  e.  CC  /\  M  =/=  0 ) )
20 mulne0 9426 . . . . . . . 8  |-  ( ( ( N  e.  CC  /\  N  =/=  0 )  /\  ( M  e.  CC  /\  M  =/=  0 ) )  -> 
( N  x.  M
)  =/=  0 )
2116, 19, 20syl2an 463 . . . . . . 7  |-  ( ( N  e.  NN  /\  M  e.  NN )  ->  ( N  x.  M
)  =/=  0 )
22213adant2 974 . . . . . 6  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  ( N  x.  M )  =/=  0 )
235, 13, 22redivcld 9604 . . . . 5  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  (
( N  x.  ( |_ `  A ) )  /  ( N  x.  M ) )  e.  RR )
24 reflcl 10944 . . . . 5  |-  ( ( ( N  x.  ( |_ `  A ) )  /  ( N  x.  M ) )  e.  RR  ->  ( |_ `  ( ( N  x.  ( |_ `  A ) )  /  ( N  x.  M ) ) )  e.  RR )
2523, 24syl 15 . . . 4  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  ( |_ `  ( ( N  x.  ( |_ `  A ) )  / 
( N  x.  M
) ) )  e.  RR )
2613, 25remulcld 8879 . . 3  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  (
( N  x.  M
)  x.  ( |_
`  ( ( N  x.  ( |_ `  A ) )  / 
( N  x.  M
) ) ) )  e.  RR )
27 nnnn0 9988 . . . . 5  |-  ( N  e.  NN  ->  N  e.  NN0 )
28 flmulnn0 10968 . . . . 5  |-  ( ( N  e.  NN0  /\  A  e.  RR )  ->  ( N  x.  ( |_ `  A ) )  <_  ( |_ `  ( N  x.  A
) ) )
2927, 28sylan 457 . . . 4  |-  ( ( N  e.  NN  /\  A  e.  RR )  ->  ( N  x.  ( |_ `  A ) )  <_  ( |_ `  ( N  x.  A
) ) )
30293adant3 975 . . 3  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  ( N  x.  ( |_ `  A ) )  <_ 
( |_ `  ( N  x.  A )
) )
315, 10, 26, 30lesub1dd 9404 . 2  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  (
( N  x.  ( |_ `  A ) )  -  ( ( N  x.  M )  x.  ( |_ `  (
( N  x.  ( |_ `  A ) )  /  ( N  x.  M ) ) ) ) )  <_  (
( |_ `  ( N  x.  A )
)  -  ( ( N  x.  M )  x.  ( |_ `  ( ( N  x.  ( |_ `  A ) )  /  ( N  x.  M ) ) ) ) ) )
3211nnrpd 10405 . . . 4  |-  ( ( N  e.  NN  /\  M  e.  NN )  ->  ( N  x.  M
)  e.  RR+ )
33323adant2 974 . . 3  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  ( N  x.  M )  e.  RR+ )
34 modval 10991 . . 3  |-  ( ( ( N  x.  ( |_ `  A ) )  e.  RR  /\  ( N  x.  M )  e.  RR+ )  ->  (
( N  x.  ( |_ `  A ) )  mod  ( N  x.  M ) )  =  ( ( N  x.  ( |_ `  A ) )  -  ( ( N  x.  M )  x.  ( |_ `  ( ( N  x.  ( |_ `  A ) )  /  ( N  x.  M ) ) ) ) ) )
355, 33, 34syl2anc 642 . 2  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  (
( N  x.  ( |_ `  A ) )  mod  ( N  x.  M ) )  =  ( ( N  x.  ( |_ `  A ) )  -  ( ( N  x.  M )  x.  ( |_ `  ( ( N  x.  ( |_ `  A ) )  /  ( N  x.  M ) ) ) ) ) )
36 modval 10991 . . . 4  |-  ( ( ( |_ `  ( N  x.  A )
)  e.  RR  /\  ( N  x.  M
)  e.  RR+ )  ->  ( ( |_ `  ( N  x.  A
) )  mod  ( N  x.  M )
)  =  ( ( |_ `  ( N  x.  A ) )  -  ( ( N  x.  M )  x.  ( |_ `  (
( |_ `  ( N  x.  A )
)  /  ( N  x.  M ) ) ) ) ) )
3710, 33, 36syl2anc 642 . . 3  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  (
( |_ `  ( N  x.  A )
)  mod  ( N  x.  M ) )  =  ( ( |_ `  ( N  x.  A
) )  -  (
( N  x.  M
)  x.  ( |_
`  ( ( |_
`  ( N  x.  A ) )  / 
( N  x.  M
) ) ) ) ) )
3873adant3 975 . . . . . . 7  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  ( N  x.  A )  e.  RR )
39113adant2 974 . . . . . . 7  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  ( N  x.  M )  e.  NN )
40 fldiv 10980 . . . . . . 7  |-  ( ( ( N  x.  A
)  e.  RR  /\  ( N  x.  M
)  e.  NN )  ->  ( |_ `  ( ( |_ `  ( N  x.  A
) )  /  ( N  x.  M )
) )  =  ( |_ `  ( ( N  x.  A )  /  ( N  x.  M ) ) ) )
4138, 39, 40syl2anc 642 . . . . . 6  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  ( |_ `  ( ( |_
`  ( N  x.  A ) )  / 
( N  x.  M
) ) )  =  ( |_ `  (
( N  x.  A
)  /  ( N  x.  M ) ) ) )
42 fldiv 10980 . . . . . . . . 9  |-  ( ( A  e.  RR  /\  M  e.  NN )  ->  ( |_ `  (
( |_ `  A
)  /  M ) )  =  ( |_
`  ( A  /  M ) ) )
43423adant3 975 . . . . . . . 8  |-  ( ( A  e.  RR  /\  M  e.  NN  /\  N  e.  NN )  ->  ( |_ `  ( ( |_
`  A )  /  M ) )  =  ( |_ `  ( A  /  M ) ) )
442recnd 8877 . . . . . . . . . 10  |-  ( A  e.  RR  ->  ( |_ `  A )  e.  CC )
45 divcan5 9478 . . . . . . . . . 10  |-  ( ( ( |_ `  A
)  e.  CC  /\  ( M  e.  CC  /\  M  =/=  0 )  /\  ( N  e.  CC  /\  N  =/=  0 ) )  -> 
( ( N  x.  ( |_ `  A ) )  /  ( N  x.  M ) )  =  ( ( |_
`  A )  /  M ) )
4644, 19, 16, 45syl3an 1224 . . . . . . . . 9  |-  ( ( A  e.  RR  /\  M  e.  NN  /\  N  e.  NN )  ->  (
( N  x.  ( |_ `  A ) )  /  ( N  x.  M ) )  =  ( ( |_ `  A )  /  M
) )
4746fveq2d 5545 . . . . . . . 8  |-  ( ( A  e.  RR  /\  M  e.  NN  /\  N  e.  NN )  ->  ( |_ `  ( ( N  x.  ( |_ `  A ) )  / 
( N  x.  M
) ) )  =  ( |_ `  (
( |_ `  A
)  /  M ) ) )
48 recn 8843 . . . . . . . . . 10  |-  ( A  e.  RR  ->  A  e.  CC )
49 divcan5 9478 . . . . . . . . . 10  |-  ( ( A  e.  CC  /\  ( M  e.  CC  /\  M  =/=  0 )  /\  ( N  e.  CC  /\  N  =/=  0 ) )  -> 
( ( N  x.  A )  /  ( N  x.  M )
)  =  ( A  /  M ) )
5048, 19, 16, 49syl3an 1224 . . . . . . . . 9  |-  ( ( A  e.  RR  /\  M  e.  NN  /\  N  e.  NN )  ->  (
( N  x.  A
)  /  ( N  x.  M ) )  =  ( A  /  M ) )
5150fveq2d 5545 . . . . . . . 8  |-  ( ( A  e.  RR  /\  M  e.  NN  /\  N  e.  NN )  ->  ( |_ `  ( ( N  x.  A )  / 
( N  x.  M
) ) )  =  ( |_ `  ( A  /  M ) ) )
5243, 47, 513eqtr4rd 2339 . . . . . . 7  |-  ( ( A  e.  RR  /\  M  e.  NN  /\  N  e.  NN )  ->  ( |_ `  ( ( N  x.  A )  / 
( N  x.  M
) ) )  =  ( |_ `  (
( N  x.  ( |_ `  A ) )  /  ( N  x.  M ) ) ) )
53523comr 1159 . . . . . 6  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  ( |_ `  ( ( N  x.  A )  / 
( N  x.  M
) ) )  =  ( |_ `  (
( N  x.  ( |_ `  A ) )  /  ( N  x.  M ) ) ) )
5441, 53eqtrd 2328 . . . . 5  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  ( |_ `  ( ( |_
`  ( N  x.  A ) )  / 
( N  x.  M
) ) )  =  ( |_ `  (
( N  x.  ( |_ `  A ) )  /  ( N  x.  M ) ) ) )
5554oveq2d 5890 . . . 4  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  (
( N  x.  M
)  x.  ( |_
`  ( ( |_
`  ( N  x.  A ) )  / 
( N  x.  M
) ) ) )  =  ( ( N  x.  M )  x.  ( |_ `  (
( N  x.  ( |_ `  A ) )  /  ( N  x.  M ) ) ) ) )
5655oveq2d 5890 . . 3  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  (
( |_ `  ( N  x.  A )
)  -  ( ( N  x.  M )  x.  ( |_ `  ( ( |_ `  ( N  x.  A
) )  /  ( N  x.  M )
) ) ) )  =  ( ( |_
`  ( N  x.  A ) )  -  ( ( N  x.  M )  x.  ( |_ `  ( ( N  x.  ( |_ `  A ) )  / 
( N  x.  M
) ) ) ) ) )
5737, 56eqtrd 2328 . 2  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  (
( |_ `  ( N  x.  A )
)  mod  ( N  x.  M ) )  =  ( ( |_ `  ( N  x.  A
) )  -  (
( N  x.  M
)  x.  ( |_
`  ( ( N  x.  ( |_ `  A ) )  / 
( N  x.  M
) ) ) ) ) )
5831, 35, 573brtr4d 4069 1  |-  ( ( N  e.  NN  /\  A  e.  RR  /\  M  e.  NN )  ->  (
( N  x.  ( |_ `  A ) )  mod  ( N  x.  M ) )  <_ 
( ( |_ `  ( N  x.  A
) )  mod  ( N  x.  M )
) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ 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    x. cmul 8758    <_ cle 8884    - cmin 9053    / cdiv 9439   NNcn 9762   NN0cn0 9981   RR+crp 10370   |_cfl 10940    mod cmo 10989
This theorem is referenced by:  digit1  11251
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-rp 10371  df-fl 10941  df-mod 10990
  Copyright terms: Public domain W3C validator