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

Theorem 4sqlem5 13239
Description: Lemma for 4sq 13261. (Contributed by Mario Carneiro, 15-Jul-2014.)
Hypotheses
Ref Expression
4sqlem5.2  |-  ( ph  ->  A  e.  ZZ )
4sqlem5.3  |-  ( ph  ->  M  e.  NN )
4sqlem5.4  |-  B  =  ( ( ( A  +  ( M  / 
2 ) )  mod 
M )  -  ( M  /  2 ) )
Assertion
Ref Expression
4sqlem5  |-  ( ph  ->  ( B  e.  ZZ  /\  ( ( A  -  B )  /  M
)  e.  ZZ ) )

Proof of Theorem 4sqlem5
StepHypRef Expression
1 4sqlem5.2 . . . . 5  |-  ( ph  ->  A  e.  ZZ )
21zcnd 10310 . . . 4  |-  ( ph  ->  A  e.  CC )
3 4sqlem5.4 . . . . 5  |-  B  =  ( ( ( A  +  ( M  / 
2 ) )  mod 
M )  -  ( M  /  2 ) )
41zred 10309 . . . . . . . . 9  |-  ( ph  ->  A  e.  RR )
5 4sqlem5.3 . . . . . . . . . . 11  |-  ( ph  ->  M  e.  NN )
65nnred 9949 . . . . . . . . . 10  |-  ( ph  ->  M  e.  RR )
76rehalfcld 10148 . . . . . . . . 9  |-  ( ph  ->  ( M  /  2
)  e.  RR )
84, 7readdcld 9050 . . . . . . . 8  |-  ( ph  ->  ( A  +  ( M  /  2 ) )  e.  RR )
95nnrpd 10581 . . . . . . . 8  |-  ( ph  ->  M  e.  RR+ )
108, 9modcld 11183 . . . . . . 7  |-  ( ph  ->  ( ( A  +  ( M  /  2
) )  mod  M
)  e.  RR )
1110recnd 9049 . . . . . 6  |-  ( ph  ->  ( ( A  +  ( M  /  2
) )  mod  M
)  e.  CC )
127recnd 9049 . . . . . 6  |-  ( ph  ->  ( M  /  2
)  e.  CC )
1311, 12subcld 9345 . . . . 5  |-  ( ph  ->  ( ( ( A  +  ( M  / 
2 ) )  mod 
M )  -  ( M  /  2 ) )  e.  CC )
143, 13syl5eqel 2473 . . . 4  |-  ( ph  ->  B  e.  CC )
152, 14nncand 9350 . . 3  |-  ( ph  ->  ( A  -  ( A  -  B )
)  =  B )
162, 14subcld 9345 . . . . . 6  |-  ( ph  ->  ( A  -  B
)  e.  CC )
176recnd 9049 . . . . . 6  |-  ( ph  ->  M  e.  CC )
185nnne0d 9978 . . . . . 6  |-  ( ph  ->  M  =/=  0 )
1916, 17, 18divcan1d 9725 . . . . 5  |-  ( ph  ->  ( ( ( A  -  B )  /  M )  x.  M
)  =  ( A  -  B ) )
203oveq2i 6033 . . . . . . . . 9  |-  ( A  -  B )  =  ( A  -  (
( ( A  +  ( M  /  2
) )  mod  M
)  -  ( M  /  2 ) ) )
212, 11, 12subsub3d 9375 . . . . . . . . 9  |-  ( ph  ->  ( A  -  (
( ( A  +  ( M  /  2
) )  mod  M
)  -  ( M  /  2 ) ) )  =  ( ( A  +  ( M  /  2 ) )  -  ( ( A  +  ( M  / 
2 ) )  mod 
M ) ) )
2220, 21syl5eq 2433 . . . . . . . 8  |-  ( ph  ->  ( A  -  B
)  =  ( ( A  +  ( M  /  2 ) )  -  ( ( A  +  ( M  / 
2 ) )  mod 
M ) ) )
2322oveq1d 6037 . . . . . . 7  |-  ( ph  ->  ( ( A  -  B )  /  M
)  =  ( ( ( A  +  ( M  /  2 ) )  -  ( ( A  +  ( M  /  2 ) )  mod  M ) )  /  M ) )
24 moddifz 11189 . . . . . . . 8  |-  ( ( ( A  +  ( M  /  2 ) )  e.  RR  /\  M  e.  RR+ )  -> 
( ( ( A  +  ( M  / 
2 ) )  -  ( ( A  +  ( M  /  2
) )  mod  M
) )  /  M
)  e.  ZZ )
258, 9, 24syl2anc 643 . . . . . . 7  |-  ( ph  ->  ( ( ( A  +  ( M  / 
2 ) )  -  ( ( A  +  ( M  /  2
) )  mod  M
) )  /  M
)  e.  ZZ )
2623, 25eqeltrd 2463 . . . . . 6  |-  ( ph  ->  ( ( A  -  B )  /  M
)  e.  ZZ )
275nnzd 10308 . . . . . 6  |-  ( ph  ->  M  e.  ZZ )
2826, 27zmulcld 10315 . . . . 5  |-  ( ph  ->  ( ( ( A  -  B )  /  M )  x.  M
)  e.  ZZ )
2919, 28eqeltrrd 2464 . . . 4  |-  ( ph  ->  ( A  -  B
)  e.  ZZ )
301, 29zsubcld 10314 . . 3  |-  ( ph  ->  ( A  -  ( A  -  B )
)  e.  ZZ )
3115, 30eqeltrrd 2464 . 2  |-  ( ph  ->  B  e.  ZZ )
3231, 26jca 519 1  |-  ( ph  ->  ( B  e.  ZZ  /\  ( ( A  -  B )  /  M
)  e.  ZZ ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 359    = wceq 1649    e. wcel 1717  (class class class)co 6022   CCcc 8923   RRcr 8924    + caddc 8928    x. cmul 8930    - cmin 9225    / cdiv 9611   NNcn 9934   2c2 9983   ZZcz 10216   RR+crp 10546    mod cmo 11179
This theorem is referenced by:  4sqlem7  13241  4sqlem8  13242  4sqlem9  13243  4sqlem10  13244  4sqlem14  13255  4sqlem15  13256  4sqlem16  13257  4sqlem17  13258  2sqlem8a  21024  2sqlem8  21025
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1661  ax-8 1682  ax-13 1719  ax-14 1721  ax-6 1736  ax-7 1741  ax-11 1753  ax-12 1939  ax-ext 2370  ax-sep 4273  ax-nul 4281  ax-pow 4320  ax-pr 4346  ax-un 4643  ax-cnex 8981  ax-resscn 8982  ax-1cn 8983  ax-icn 8984  ax-addcl 8985  ax-addrcl 8986  ax-mulcl 8987  ax-mulrcl 8988  ax-mulcom 8989  ax-addass 8990  ax-mulass 8991  ax-distr 8992  ax-i2m1 8993  ax-1ne0 8994  ax-1rid 8995  ax-rnegex 8996  ax-rrecex 8997  ax-cnre 8998  ax-pre-lttri 8999  ax-pre-lttrn 9000  ax-pre-ltadd 9001  ax-pre-mulgt0 9002  ax-pre-sup 9003
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2244  df-mo 2245  df-clab 2376  df-cleq 2382  df-clel 2385  df-nfc 2514  df-ne 2554  df-nel 2555  df-ral 2656  df-rex 2657  df-reu 2658  df-rmo 2659  df-rab 2660  df-v 2903  df-sbc 3107  df-csb 3197  df-dif 3268  df-un 3270  df-in 3272  df-ss 3279  df-pss 3281  df-nul 3574  df-if 3685  df-pw 3746  df-sn 3765  df-pr 3766  df-tp 3767  df-op 3768  df-uni 3960  df-iun 4039  df-br 4156  df-opab 4210  df-mpt 4211  df-tr 4246  df-eprel 4437  df-id 4441  df-po 4446  df-so 4447  df-fr 4484  df-we 4486  df-ord 4527  df-on 4528  df-lim 4529  df-suc 4530  df-om 4788  df-xp 4826  df-rel 4827  df-cnv 4828  df-co 4829  df-dm 4830  df-rn 4831  df-res 4832  df-ima 4833  df-iota 5360  df-fun 5398  df-fn 5399  df-f 5400  df-f1 5401  df-fo 5402  df-f1o 5403  df-fv 5404  df-ov 6025  df-oprab 6026  df-mpt2 6027  df-riota 6487  df-recs 6571  df-rdg 6606  df-er 6843  df-en 7048  df-dom 7049  df-sdom 7050  df-sup 7383  df-pnf 9057  df-mnf 9058  df-xr 9059  df-ltxr 9060  df-le 9061  df-sub 9227  df-neg 9228  df-div 9612  df-nn 9935  df-2 9992  df-n0 10156  df-z 10217  df-uz 10423  df-rp 10547  df-fl 11131  df-mod 11180
  Copyright terms: Public domain W3C validator