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

Theorem opoe 12864
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 12587 . . . . 5  |-  ( A  e.  ZZ  ->  ( -.  2  ||  A  <->  E. a  e.  ZZ  ( ( 2  x.  a )  +  1 )  =  A ) )
2 odd2np1 12587 . . . . 5  |-  ( B  e.  ZZ  ->  ( -.  2  ||  B  <->  E. b  e.  ZZ  ( ( 2  x.  b )  +  1 )  =  B ) )
31, 2bi2anan9 843 . . . 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 2707 . . . . 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 10054 . . . . . . . . 9  |-  2  e.  ZZ
6 zaddcl 10059 . . . . . . . . . 10  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  ( a  +  b )  e.  ZZ )
76peano2zd 10120 . . . . . . . . 9  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  ( ( a  +  b )  +  1 )  e.  ZZ )
8 dvdsmul1 12550 . . . . . . . . 9  |-  ( ( 2  e.  ZZ  /\  ( ( a  +  b )  +  1 )  e.  ZZ )  ->  2  ||  (
2  x.  ( ( a  +  b )  +  1 ) ) )
95, 7, 8sylancr 644 . . . . . . . 8  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  2  ||  ( 2  x.  ( ( a  +  b )  +  1 ) ) )
10 zcn 10029 . . . . . . . . 9  |-  ( a  e.  ZZ  ->  a  e.  CC )
11 zcn 10029 . . . . . . . . 9  |-  ( b  e.  ZZ  ->  b  e.  CC )
12 addcl 8819 . . . . . . . . . . . . 13  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( a  +  b )  e.  CC )
13 2cn 9816 . . . . . . . . . . . . . 14  |-  2  e.  CC
14 ax-1cn 8795 . . . . . . . . . . . . . 14  |-  1  e.  CC
15 adddi 8826 . . . . . . . . . . . . . 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 1268 . . . . . . . . . . . . 13  |-  ( ( a  +  b )  e.  CC  ->  (
2  x.  ( ( a  +  b )  +  1 ) )  =  ( ( 2  x.  ( a  +  b ) )  +  ( 2  x.  1 ) ) )
1712, 16syl 15 . . . . . . . . . . . 12  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  (
( a  +  b )  +  1 ) )  =  ( ( 2  x.  ( a  +  b ) )  +  ( 2  x.  1 ) ) )
18 adddi 8826 . . . . . . . . . . . . . 14  |-  ( ( 2  e.  CC  /\  a  e.  CC  /\  b  e.  CC )  ->  (
2  x.  ( a  +  b ) )  =  ( ( 2  x.  a )  +  ( 2  x.  b
) ) )
1913, 18mp3an1 1264 . . . . . . . . . . . . 13  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  (
a  +  b ) )  =  ( ( 2  x.  a )  +  ( 2  x.  b ) ) )
2019oveq1d 5873 . . . . . . . . . . . 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 2315 . . . . . . . . . . 11  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  (
( a  +  b )  +  1 ) )  =  ( ( ( 2  x.  a
)  +  ( 2  x.  b ) )  +  ( 2  x.  1 ) ) )
2213mulid1i 8839 . . . . . . . . . . . . 13  |-  ( 2  x.  1 )  =  2
23 df-2 9804 . . . . . . . . . . . . 13  |-  2  =  ( 1  +  1 )
2422, 23eqtri 2303 . . . . . . . . . . . 12  |-  ( 2  x.  1 )  =  ( 1  +  1 )
2524oveq2i 5869 . . . . . . . . . . 11  |-  ( ( ( 2  x.  a
)  +  ( 2  x.  b ) )  +  ( 2  x.  1 ) )  =  ( ( ( 2  x.  a )  +  ( 2  x.  b
) )  +  ( 1  +  1 ) )
2621, 25syl6eq 2331 . . . . . . . . . 10  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  (
( a  +  b )  +  1 ) )  =  ( ( ( 2  x.  a
)  +  ( 2  x.  b ) )  +  ( 1  +  1 ) ) )
27 mulcl 8821 . . . . . . . . . . . 12  |-  ( ( 2  e.  CC  /\  a  e.  CC )  ->  ( 2  x.  a
)  e.  CC )
2813, 27mpan 651 . . . . . . . . . . 11  |-  ( a  e.  CC  ->  (
2  x.  a )  e.  CC )
29 mulcl 8821 . . . . . . . . . . . 12  |-  ( ( 2  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  b
)  e.  CC )
3013, 29mpan 651 . . . . . . . . . . 11  |-  ( b  e.  CC  ->  (
2  x.  b )  e.  CC )
31 add4 9027 . . . . . . . . . . . 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 666 . . . . . . . . . . 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 463 . . . . . . . . . 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 2315 . . . . . . . . 9  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  (
( a  +  b )  +  1 ) )  =  ( ( ( 2  x.  a
)  +  1 )  +  ( ( 2  x.  b )  +  1 ) ) )
3510, 11, 34syl2an 463 . . . . . . . 8  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  ( 2  x.  (
( a  +  b )  +  1 ) )  =  ( ( ( 2  x.  a
)  +  1 )  +  ( ( 2  x.  b )  +  1 ) ) )
369, 35breqtrd 4047 . . . . . . 7  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  2  ||  ( ( ( 2  x.  a
)  +  1 )  +  ( ( 2  x.  b )  +  1 ) ) )
37 oveq12 5867 . . . . . . . 8  |-  ( ( ( ( 2  x.  a )  +  1 )  =  A  /\  ( ( 2  x.  b )  +  1 )  =  B )  ->  ( ( ( 2  x.  a )  +  1 )  +  ( ( 2  x.  b )  +  1 ) )  =  ( A  +  B ) )
3837breq2d 4035 . . . . . . 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 211 . . . . . 6  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  ( ( ( ( 2  x.  a )  +  1 )  =  A  /\  ( ( 2  x.  b )  +  1 )  =  B )  ->  2  ||  ( A  +  B
) ) )
4039rexlimivv 2672 . . . . 5  |-  ( E. a  e.  ZZ  E. b  e.  ZZ  (
( ( 2  x.  a )  +  1 )  =  A  /\  ( ( 2  x.  b )  +  1 )  =  B )  ->  2  ||  ( A  +  B )
)
414, 40sylbir 204 . . . 4  |-  ( ( E. a  e.  ZZ  ( ( 2  x.  a )  +  1 )  =  A  /\  E. b  e.  ZZ  (
( 2  x.  b
)  +  1 )  =  B )  -> 
2  ||  ( A  +  B ) )
423, 41syl6bi 219 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( -.  2  ||  A  /\  -.  2  ||  B )  ->  2  ||  ( A  +  B
) ) )
4342imp 418 . 2  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( -.  2  ||  A  /\  -.  2  ||  B ) )  -> 
2  ||  ( A  +  B ) )
4443an4s 799 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 358    = wceq 1623    e. wcel 1684   E.wrex 2544   class class class wbr 4023  (class class class)co 5858   CCcc 8735   1c1 8738    + caddc 8740    x. cmul 8742   2c2 9795   ZZcz 10024    || cdivides 12531
This theorem is referenced by:  pythagtriplem11  12878  prmlem0  13107  eupath2lem3  23903
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814
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 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rmo 2551  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-riota 6304  df-recs 6388  df-rdg 6423  df-er 6660  df-en 6864  df-dom 6865  df-sdom 6866  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-div 9424  df-nn 9747  df-2 9804  df-n0 9966  df-z 10025  df-dvds 12532
  Copyright terms: Public domain W3C validator