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

Theorem opoe 13114
Description: The sum of two odds is even. (Contributed by Scott Fenton, 7-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
Assertion
Ref Expression
opoe  |-  ( ( ( A  e.  ZZ  /\ 
-.  2  ||  A
)  /\  ( B  e.  ZZ  /\  -.  2  ||  B ) )  -> 
2  ||  ( A  +  B ) )

Proof of Theorem opoe
Dummy variables  a 
b are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 odd2np1 12837 . . . . 5  |-  ( A  e.  ZZ  ->  ( -.  2  ||  A  <->  E. a  e.  ZZ  ( ( 2  x.  a )  +  1 )  =  A ) )
2 odd2np1 12837 . . . . 5  |-  ( B  e.  ZZ  ->  ( -.  2  ||  B  <->  E. b  e.  ZZ  ( ( 2  x.  b )  +  1 )  =  B ) )
31, 2bi2anan9 844 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( -.  2  ||  A  /\  -.  2  ||  B )  <->  ( E. a  e.  ZZ  (
( 2  x.  a
)  +  1 )  =  A  /\  E. b  e.  ZZ  (
( 2  x.  b
)  +  1 )  =  B ) ) )
4 reeanv 2820 . . . . 5  |-  ( E. a  e.  ZZ  E. b  e.  ZZ  (
( ( 2  x.  a )  +  1 )  =  A  /\  ( ( 2  x.  b )  +  1 )  =  B )  <-> 
( E. a  e.  ZZ  ( ( 2  x.  a )  +  1 )  =  A  /\  E. b  e.  ZZ  ( ( 2  x.  b )  +  1 )  =  B ) )
5 2z 10246 . . . . . . . . 9  |-  2  e.  ZZ
6 zaddcl 10251 . . . . . . . . . 10  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  ( a  +  b )  e.  ZZ )
76peano2zd 10312 . . . . . . . . 9  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  ( ( a  +  b )  +  1 )  e.  ZZ )
8 dvdsmul1 12800 . . . . . . . . 9  |-  ( ( 2  e.  ZZ  /\  ( ( a  +  b )  +  1 )  e.  ZZ )  ->  2  ||  (
2  x.  ( ( a  +  b )  +  1 ) ) )
95, 7, 8sylancr 645 . . . . . . . 8  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  2  ||  ( 2  x.  ( ( a  +  b )  +  1 ) ) )
10 zcn 10221 . . . . . . . . 9  |-  ( a  e.  ZZ  ->  a  e.  CC )
11 zcn 10221 . . . . . . . . 9  |-  ( b  e.  ZZ  ->  b  e.  CC )
12 addcl 9007 . . . . . . . . . . . . 13  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( a  +  b )  e.  CC )
13 2cn 10004 . . . . . . . . . . . . . 14  |-  2  e.  CC
14 ax-1cn 8983 . . . . . . . . . . . . . 14  |-  1  e.  CC
15 adddi 9014 . . . . . . . . . . . . . 14  |-  ( ( 2  e.  CC  /\  ( a  +  b )  e.  CC  /\  1  e.  CC )  ->  ( 2  x.  (
( a  +  b )  +  1 ) )  =  ( ( 2  x.  ( a  +  b ) )  +  ( 2  x.  1 ) ) )
1613, 14, 15mp3an13 1270 . . . . . . . . . . . . 13  |-  ( ( a  +  b )  e.  CC  ->  (
2  x.  ( ( a  +  b )  +  1 ) )  =  ( ( 2  x.  ( a  +  b ) )  +  ( 2  x.  1 ) ) )
1712, 16syl 16 . . . . . . . . . . . 12  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  (
( a  +  b )  +  1 ) )  =  ( ( 2  x.  ( a  +  b ) )  +  ( 2  x.  1 ) ) )
18 adddi 9014 . . . . . . . . . . . . . 14  |-  ( ( 2  e.  CC  /\  a  e.  CC  /\  b  e.  CC )  ->  (
2  x.  ( a  +  b ) )  =  ( ( 2  x.  a )  +  ( 2  x.  b
) ) )
1913, 18mp3an1 1266 . . . . . . . . . . . . 13  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  (
a  +  b ) )  =  ( ( 2  x.  a )  +  ( 2  x.  b ) ) )
2019oveq1d 6037 . . . . . . . . . . . 12  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( ( 2  x.  ( a  +  b ) )  +  ( 2  x.  1 ) )  =  ( ( ( 2  x.  a
)  +  ( 2  x.  b ) )  +  ( 2  x.  1 ) ) )
2117, 20eqtrd 2421 . . . . . . . . . . 11  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  (
( a  +  b )  +  1 ) )  =  ( ( ( 2  x.  a
)  +  ( 2  x.  b ) )  +  ( 2  x.  1 ) ) )
2213mulid1i 9027 . . . . . . . . . . . . 13  |-  ( 2  x.  1 )  =  2
23 df-2 9992 . . . . . . . . . . . . 13  |-  2  =  ( 1  +  1 )
2422, 23eqtri 2409 . . . . . . . . . . . 12  |-  ( 2  x.  1 )  =  ( 1  +  1 )
2524oveq2i 6033 . . . . . . . . . . 11  |-  ( ( ( 2  x.  a
)  +  ( 2  x.  b ) )  +  ( 2  x.  1 ) )  =  ( ( ( 2  x.  a )  +  ( 2  x.  b
) )  +  ( 1  +  1 ) )
2621, 25syl6eq 2437 . . . . . . . . . 10  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  (
( a  +  b )  +  1 ) )  =  ( ( ( 2  x.  a
)  +  ( 2  x.  b ) )  +  ( 1  +  1 ) ) )
27 mulcl 9009 . . . . . . . . . . . 12  |-  ( ( 2  e.  CC  /\  a  e.  CC )  ->  ( 2  x.  a
)  e.  CC )
2813, 27mpan 652 . . . . . . . . . . 11  |-  ( a  e.  CC  ->  (
2  x.  a )  e.  CC )
29 mulcl 9009 . . . . . . . . . . . 12  |-  ( ( 2  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  b
)  e.  CC )
3013, 29mpan 652 . . . . . . . . . . 11  |-  ( b  e.  CC  ->  (
2  x.  b )  e.  CC )
31 add4 9215 . . . . . . . . . . . 12  |-  ( ( ( ( 2  x.  a )  e.  CC  /\  ( 2  x.  b
)  e.  CC )  /\  ( 1  e.  CC  /\  1  e.  CC ) )  -> 
( ( ( 2  x.  a )  +  ( 2  x.  b
) )  +  ( 1  +  1 ) )  =  ( ( ( 2  x.  a
)  +  1 )  +  ( ( 2  x.  b )  +  1 ) ) )
3214, 14, 31mpanr12 667 . . . . . . . . . . 11  |-  ( ( ( 2  x.  a
)  e.  CC  /\  ( 2  x.  b
)  e.  CC )  ->  ( ( ( 2  x.  a )  +  ( 2  x.  b ) )  +  ( 1  +  1 ) )  =  ( ( ( 2  x.  a )  +  1 )  +  ( ( 2  x.  b )  +  1 ) ) )
3328, 30, 32syl2an 464 . . . . . . . . . 10  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( ( ( 2  x.  a )  +  ( 2  x.  b
) )  +  ( 1  +  1 ) )  =  ( ( ( 2  x.  a
)  +  1 )  +  ( ( 2  x.  b )  +  1 ) ) )
3426, 33eqtrd 2421 . . . . . . . . 9  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  (
( a  +  b )  +  1 ) )  =  ( ( ( 2  x.  a
)  +  1 )  +  ( ( 2  x.  b )  +  1 ) ) )
3510, 11, 34syl2an 464 . . . . . . . 8  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  ( 2  x.  (
( a  +  b )  +  1 ) )  =  ( ( ( 2  x.  a
)  +  1 )  +  ( ( 2  x.  b )  +  1 ) ) )
369, 35breqtrd 4179 . . . . . . 7  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  2  ||  ( ( ( 2  x.  a
)  +  1 )  +  ( ( 2  x.  b )  +  1 ) ) )
37 oveq12 6031 . . . . . . . 8  |-  ( ( ( ( 2  x.  a )  +  1 )  =  A  /\  ( ( 2  x.  b )  +  1 )  =  B )  ->  ( ( ( 2  x.  a )  +  1 )  +  ( ( 2  x.  b )  +  1 ) )  =  ( A  +  B ) )
3837breq2d 4167 . . . . . . 7  |-  ( ( ( ( 2  x.  a )  +  1 )  =  A  /\  ( ( 2  x.  b )  +  1 )  =  B )  ->  ( 2  ||  ( ( ( 2  x.  a )  +  1 )  +  ( ( 2  x.  b
)  +  1 ) )  <->  2  ||  ( A  +  B )
) )
3936, 38syl5ibcom 212 . . . . . 6  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  ( ( ( ( 2  x.  a )  +  1 )  =  A  /\  ( ( 2  x.  b )  +  1 )  =  B )  ->  2  ||  ( A  +  B
) ) )
4039rexlimivv 2780 . . . . 5  |-  ( E. a  e.  ZZ  E. b  e.  ZZ  (
( ( 2  x.  a )  +  1 )  =  A  /\  ( ( 2  x.  b )  +  1 )  =  B )  ->  2  ||  ( A  +  B )
)
414, 40sylbir 205 . . . 4  |-  ( ( E. a  e.  ZZ  ( ( 2  x.  a )  +  1 )  =  A  /\  E. b  e.  ZZ  (
( 2  x.  b
)  +  1 )  =  B )  -> 
2  ||  ( A  +  B ) )
423, 41syl6bi 220 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( -.  2  ||  A  /\  -.  2  ||  B )  ->  2  ||  ( A  +  B
) ) )
4342imp 419 . 2  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( -.  2  ||  A  /\  -.  2  ||  B ) )  -> 
2  ||  ( A  +  B ) )
4443an4s 800 1  |-  ( ( ( A  e.  ZZ  /\ 
-.  2  ||  A
)  /\  ( B  e.  ZZ  /\  -.  2  ||  B ) )  -> 
2  ||  ( A  +  B ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 359    = wceq 1649    e. wcel 1717   E.wrex 2652   class class class wbr 4155  (class class class)co 6022   CCcc 8923   1c1 8926    + caddc 8928    x. cmul 8930   2c2 9983   ZZcz 10216    || cdivides 12781
This theorem is referenced by:  pythagtriplem11  13128  prmlem0  13357  eupath2lem3  21551
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-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
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-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-dvds 12782
  Copyright terms: Public domain W3C validator