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

Theorem modcyc 11864
Description: The modulo operation is periodic. (Contributed by NM, 10-Nov-2008.)
Assertion
Ref Expression
modcyc  |-  ( ( A  e.  RR  /\  B  e.  RR+  /\  N  e.  ZZ )  ->  (
( A  +  ( N  x.  B ) )  mod  B )  =  ( A  mod  B ) )

Proof of Theorem modcyc
StepHypRef Expression
1 zre 10765 . . . . . . . 8  |-  ( N  e.  ZZ  ->  N  e.  RR )
2 rpre 11112 . . . . . . . 8  |-  ( B  e.  RR+  ->  B  e.  RR )
3 remulcl 9482 . . . . . . . 8  |-  ( ( N  e.  RR  /\  B  e.  RR )  ->  ( N  x.  B
)  e.  RR )
41, 2, 3syl2an 477 . . . . . . 7  |-  ( ( N  e.  ZZ  /\  B  e.  RR+ )  -> 
( N  x.  B
)  e.  RR )
5 readdcl 9480 . . . . . . 7  |-  ( ( A  e.  RR  /\  ( N  x.  B
)  e.  RR )  ->  ( A  +  ( N  x.  B
) )  e.  RR )
64, 5sylan2 474 . . . . . 6  |-  ( ( A  e.  RR  /\  ( N  e.  ZZ  /\  B  e.  RR+ )
)  ->  ( A  +  ( N  x.  B ) )  e.  RR )
763impb 1184 . . . . 5  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( A  +  ( N  x.  B ) )  e.  RR )
8 simp3 990 . . . . 5  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  B  e.  RR+ )
9 modval 11831 . . . . 5  |-  ( ( ( A  +  ( N  x.  B ) )  e.  RR  /\  B  e.  RR+ )  -> 
( ( A  +  ( N  x.  B
) )  mod  B
)  =  ( ( A  +  ( N  x.  B ) )  -  ( B  x.  ( |_ `  ( ( A  +  ( N  x.  B ) )  /  B ) ) ) ) )
107, 8, 9syl2anc 661 . . . 4  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  (
( A  +  ( N  x.  B ) )  mod  B )  =  ( ( A  +  ( N  x.  B ) )  -  ( B  x.  ( |_ `  ( ( A  +  ( N  x.  B ) )  /  B ) ) ) ) )
11 recn 9487 . . . . . . . . . . . 12  |-  ( A  e.  RR  ->  A  e.  CC )
12113ad2ant1 1009 . . . . . . . . . . 11  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  A  e.  CC )
134recnd 9527 . . . . . . . . . . . 12  |-  ( ( N  e.  ZZ  /\  B  e.  RR+ )  -> 
( N  x.  B
)  e.  CC )
14133adant1 1006 . . . . . . . . . . 11  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( N  x.  B )  e.  CC )
15 rpcnne0 11123 . . . . . . . . . . . 12  |-  ( B  e.  RR+  ->  ( B  e.  CC  /\  B  =/=  0 ) )
16153ad2ant3 1011 . . . . . . . . . . 11  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( B  e.  CC  /\  B  =/=  0 ) )
17 divdir 10132 . . . . . . . . . . 11  |-  ( ( A  e.  CC  /\  ( N  x.  B
)  e.  CC  /\  ( B  e.  CC  /\  B  =/=  0 ) )  ->  ( ( A  +  ( N  x.  B ) )  /  B )  =  ( ( A  /  B
)  +  ( ( N  x.  B )  /  B ) ) )
1812, 14, 16, 17syl3anc 1219 . . . . . . . . . 10  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  (
( A  +  ( N  x.  B ) )  /  B )  =  ( ( A  /  B )  +  ( ( N  x.  B )  /  B
) ) )
19 zcn 10766 . . . . . . . . . . . . 13  |-  ( N  e.  ZZ  ->  N  e.  CC )
20 divcan4 10134 . . . . . . . . . . . . . 14  |-  ( ( N  e.  CC  /\  B  e.  CC  /\  B  =/=  0 )  ->  (
( N  x.  B
)  /  B )  =  N )
21203expb 1189 . . . . . . . . . . . . 13  |-  ( ( N  e.  CC  /\  ( B  e.  CC  /\  B  =/=  0 ) )  ->  ( ( N  x.  B )  /  B )  =  N )
2219, 15, 21syl2an 477 . . . . . . . . . . . 12  |-  ( ( N  e.  ZZ  /\  B  e.  RR+ )  -> 
( ( N  x.  B )  /  B
)  =  N )
23223adant1 1006 . . . . . . . . . . 11  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  (
( N  x.  B
)  /  B )  =  N )
2423oveq2d 6219 . . . . . . . . . 10  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  (
( A  /  B
)  +  ( ( N  x.  B )  /  B ) )  =  ( ( A  /  B )  +  N ) )
2518, 24eqtrd 2495 . . . . . . . . 9  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  (
( A  +  ( N  x.  B ) )  /  B )  =  ( ( A  /  B )  +  N ) )
2625fveq2d 5806 . . . . . . . 8  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( |_ `  ( ( A  +  ( N  x.  B ) )  /  B ) )  =  ( |_ `  (
( A  /  B
)  +  N ) ) )
27 rerpdivcl 11133 . . . . . . . . . 10  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  /  B
)  e.  RR )
28273adant2 1007 . . . . . . . . 9  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( A  /  B )  e.  RR )
29 simp2 989 . . . . . . . . 9  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  N  e.  ZZ )
30 fladdz 11791 . . . . . . . . 9  |-  ( ( ( A  /  B
)  e.  RR  /\  N  e.  ZZ )  ->  ( |_ `  (
( A  /  B
)  +  N ) )  =  ( ( |_ `  ( A  /  B ) )  +  N ) )
3128, 29, 30syl2anc 661 . . . . . . . 8  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( |_ `  ( ( A  /  B )  +  N ) )  =  ( ( |_ `  ( A  /  B
) )  +  N
) )
3226, 31eqtrd 2495 . . . . . . 7  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( |_ `  ( ( A  +  ( N  x.  B ) )  /  B ) )  =  ( ( |_ `  ( A  /  B
) )  +  N
) )
3332oveq2d 6219 . . . . . 6  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( B  x.  ( |_ `  ( ( A  +  ( N  x.  B
) )  /  B
) ) )  =  ( B  x.  (
( |_ `  ( A  /  B ) )  +  N ) ) )
34 rpcn 11114 . . . . . . . 8  |-  ( B  e.  RR+  ->  B  e.  CC )
35343ad2ant3 1011 . . . . . . 7  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  B  e.  CC )
36 reflcl 11767 . . . . . . . . . 10  |-  ( ( A  /  B )  e.  RR  ->  ( |_ `  ( A  /  B ) )  e.  RR )
3736recnd 9527 . . . . . . . . 9  |-  ( ( A  /  B )  e.  RR  ->  ( |_ `  ( A  /  B ) )  e.  CC )
3827, 37syl 16 . . . . . . . 8  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( |_ `  ( A  /  B ) )  e.  CC )
39383adant2 1007 . . . . . . 7  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( |_ `  ( A  /  B ) )  e.  CC )
40193ad2ant2 1010 . . . . . . 7  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  N  e.  CC )
4135, 39, 40adddid 9525 . . . . . 6  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( B  x.  ( ( |_ `  ( A  /  B ) )  +  N ) )  =  ( ( B  x.  ( |_ `  ( A  /  B ) ) )  +  ( B  x.  N ) ) )
42 mulcom 9483 . . . . . . . . . 10  |-  ( ( N  e.  CC  /\  B  e.  CC )  ->  ( N  x.  B
)  =  ( B  x.  N ) )
4319, 34, 42syl2an 477 . . . . . . . . 9  |-  ( ( N  e.  ZZ  /\  B  e.  RR+ )  -> 
( N  x.  B
)  =  ( B  x.  N ) )
44433adant1 1006 . . . . . . . 8  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( N  x.  B )  =  ( B  x.  N ) )
4544eqcomd 2462 . . . . . . 7  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( B  x.  N )  =  ( N  x.  B ) )
4645oveq2d 6219 . . . . . 6  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  (
( B  x.  ( |_ `  ( A  /  B ) ) )  +  ( B  x.  N ) )  =  ( ( B  x.  ( |_ `  ( A  /  B ) ) )  +  ( N  x.  B ) ) )
4733, 41, 463eqtrd 2499 . . . . 5  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( B  x.  ( |_ `  ( ( A  +  ( N  x.  B
) )  /  B
) ) )  =  ( ( B  x.  ( |_ `  ( A  /  B ) ) )  +  ( N  x.  B ) ) )
4847oveq2d 6219 . . . 4  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  (
( A  +  ( N  x.  B ) )  -  ( B  x.  ( |_ `  ( ( A  +  ( N  x.  B
) )  /  B
) ) ) )  =  ( ( A  +  ( N  x.  B ) )  -  ( ( B  x.  ( |_ `  ( A  /  B ) ) )  +  ( N  x.  B ) ) ) )
4934adantl 466 . . . . . . 7  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  ->  B  e.  CC )
5049, 38mulcld 9521 . . . . . 6  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( B  x.  ( |_ `  ( A  /  B ) ) )  e.  CC )
51503adant2 1007 . . . . 5  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( B  x.  ( |_ `  ( A  /  B
) ) )  e.  CC )
5212, 51, 14pnpcan2d 9872 . . . 4  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  (
( A  +  ( N  x.  B ) )  -  ( ( B  x.  ( |_
`  ( A  /  B ) ) )  +  ( N  x.  B ) ) )  =  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) ) )
5310, 48, 523eqtrd 2499 . . 3  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  (
( A  +  ( N  x.  B ) )  mod  B )  =  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) ) )
54 modval 11831 . . . 4  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  mod  B
)  =  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) ) )
55543adant2 1007 . . 3  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  ( A  mod  B )  =  ( A  -  ( B  x.  ( |_ `  ( A  /  B
) ) ) ) )
5653, 55eqtr4d 2498 . 2  |-  ( ( A  e.  RR  /\  N  e.  ZZ  /\  B  e.  RR+ )  ->  (
( A  +  ( N  x.  B ) )  mod  B )  =  ( A  mod  B ) )
57563com23 1194 1  |-  ( ( A  e.  RR  /\  B  e.  RR+  /\  N  e.  ZZ )  ->  (
( A  +  ( N  x.  B ) )  mod  B )  =  ( A  mod  B ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    /\ w3a 965    = wceq 1370    e. wcel 1758    =/= wne 2648   ` cfv 5529  (class class class)co 6203   CCcc 9395   RRcr 9396   0cc0 9397    + caddc 9400    x. cmul 9402    - cmin 9710    / cdiv 10108   ZZcz 10761   RR+crp 11106   |_cfl 11761    mod cmo 11829
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 1955  ax-ext 2432  ax-sep 4524  ax-nul 4532  ax-pow 4581  ax-pr 4642  ax-un 6485  ax-cnex 9453  ax-resscn 9454  ax-1cn 9455  ax-icn 9456  ax-addcl 9457  ax-addrcl 9458  ax-mulcl 9459  ax-mulrcl 9460  ax-mulcom 9461  ax-addass 9462  ax-mulass 9463  ax-distr 9464  ax-i2m1 9465  ax-1ne0 9466  ax-1rid 9467  ax-rnegex 9468  ax-rrecex 9469  ax-cnre 9470  ax-pre-lttri 9471  ax-pre-lttrn 9472  ax-pre-ltadd 9473  ax-pre-mulgt0 9474  ax-pre-sup 9475
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 2266  df-mo 2267  df-clab 2440  df-cleq 2446  df-clel 2449  df-nfc 2604  df-ne 2650  df-nel 2651  df-ral 2804  df-rex 2805  df-reu 2806  df-rmo 2807  df-rab 2808  df-v 3080  df-sbc 3295  df-csb 3399  df-dif 3442  df-un 3444  df-in 3446  df-ss 3453  df-pss 3455  df-nul 3749  df-if 3903  df-pw 3973  df-sn 3989  df-pr 3991  df-tp 3993  df-op 3995  df-uni 4203  df-iun 4284  df-br 4404  df-opab 4462  df-mpt 4463  df-tr 4497  df-eprel 4743  df-id 4747  df-po 4752  df-so 4753  df-fr 4790  df-we 4792  df-ord 4833  df-on 4834  df-lim 4835  df-suc 4836  df-xp 4957  df-rel 4958  df-cnv 4959  df-co 4960  df-dm 4961  df-rn 4962  df-res 4963  df-ima 4964  df-iota 5492  df-fun 5531  df-fn 5532  df-f 5533  df-f1 5534  df-fo 5535  df-f1o 5536  df-fv 5537  df-riota 6164  df-ov 6206  df-oprab 6207  df-mpt2 6208  df-om 6590  df-recs 6945  df-rdg 6979  df-er 7214  df-en 7424  df-dom 7425  df-sdom 7426  df-sup 7806  df-pnf 9535  df-mnf 9536  df-xr 9537  df-ltxr 9538  df-le 9539  df-sub 9712  df-neg 9713  df-div 10109  df-nn 10438  df-n0 10695  df-z 10762  df-uz 10977  df-rp 11107  df-fl 11763  df-mod 11830
This theorem is referenced by:  modcyc2  11865  modxai  14219  wilthlem1  22549  wilthlem2  22550  lgsdir2lem1  22805  lgsdir2lem5  22809  lgseisenlem1  22831
  Copyright terms: Public domain W3C validator