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

Theorem omeo 14757
Description: The difference of an odd and an even is odd. (Contributed by Scott Fenton, 7-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
Assertion
Ref Expression
omeo  |-  ( ( ( A  e.  ZZ  /\ 
-.  2  ||  A
)  /\  ( B  e.  ZZ  /\  2  ||  B ) )  ->  -.  2  ||  ( A  -  B ) )

Proof of Theorem omeo
Dummy variables  a 
b  c are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 odd2np1 14358 . . . . . 6  |-  ( A  e.  ZZ  ->  ( -.  2  ||  A  <->  E. a  e.  ZZ  ( ( 2  x.  a )  +  1 )  =  A ) )
2 2z 10966 . . . . . . 7  |-  2  e.  ZZ
3 divides 14300 . . . . . . 7  |-  ( ( 2  e.  ZZ  /\  B  e.  ZZ )  ->  ( 2  ||  B  <->  E. b  e.  ZZ  (
b  x.  2 )  =  B ) )
42, 3mpan 675 . . . . . 6  |-  ( B  e.  ZZ  ->  (
2  ||  B  <->  E. b  e.  ZZ  ( b  x.  2 )  =  B ) )
51, 4bi2anan9 883 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( -.  2  ||  A  /\  2  ||  B )  <->  ( E. a  e.  ZZ  (
( 2  x.  a
)  +  1 )  =  A  /\  E. b  e.  ZZ  (
b  x.  2 )  =  B ) ) )
6 reeanv 2957 . . . . . 6  |-  ( E. a  e.  ZZ  E. b  e.  ZZ  (
( ( 2  x.  a )  +  1 )  =  A  /\  ( b  x.  2 )  =  B )  <-> 
( E. a  e.  ZZ  ( ( 2  x.  a )  +  1 )  =  A  /\  E. b  e.  ZZ  ( b  x.  2 )  =  B ) )
7 zsubcl 10976 . . . . . . . . 9  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  ( a  -  b
)  e.  ZZ )
8 zcn 10939 . . . . . . . . . 10  |-  ( a  e.  ZZ  ->  a  e.  CC )
9 zcn 10939 . . . . . . . . . 10  |-  ( b  e.  ZZ  ->  b  e.  CC )
10 2cn 10677 . . . . . . . . . . . . 13  |-  2  e.  CC
11 subdi 10049 . . . . . . . . . . . . 13  |-  ( ( 2  e.  CC  /\  a  e.  CC  /\  b  e.  CC )  ->  (
2  x.  ( a  -  b ) )  =  ( ( 2  x.  a )  -  ( 2  x.  b
) ) )
1210, 11mp3an1 1350 . . . . . . . . . . . 12  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  (
a  -  b ) )  =  ( ( 2  x.  a )  -  ( 2  x.  b ) ) )
1312oveq1d 6303 . . . . . . . . . . 11  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( ( 2  x.  ( a  -  b
) )  +  1 )  =  ( ( ( 2  x.  a
)  -  ( 2  x.  b ) )  +  1 ) )
14 mulcl 9620 . . . . . . . . . . . . 13  |-  ( ( 2  e.  CC  /\  a  e.  CC )  ->  ( 2  x.  a
)  e.  CC )
1510, 14mpan 675 . . . . . . . . . . . 12  |-  ( a  e.  CC  ->  (
2  x.  a )  e.  CC )
16 mulcl 9620 . . . . . . . . . . . . 13  |-  ( ( 2  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  b
)  e.  CC )
1710, 16mpan 675 . . . . . . . . . . . 12  |-  ( b  e.  CC  ->  (
2  x.  b )  e.  CC )
18 ax-1cn 9594 . . . . . . . . . . . . 13  |-  1  e.  CC
19 addsub 9883 . . . . . . . . . . . . 13  |-  ( ( ( 2  x.  a
)  e.  CC  /\  1  e.  CC  /\  (
2  x.  b )  e.  CC )  -> 
( ( ( 2  x.  a )  +  1 )  -  (
2  x.  b ) )  =  ( ( ( 2  x.  a
)  -  ( 2  x.  b ) )  +  1 ) )
2018, 19mp3an2 1351 . . . . . . . . . . . 12  |-  ( ( ( 2  x.  a
)  e.  CC  /\  ( 2  x.  b
)  e.  CC )  ->  ( ( ( 2  x.  a )  +  1 )  -  ( 2  x.  b
) )  =  ( ( ( 2  x.  a )  -  (
2  x.  b ) )  +  1 ) )
2115, 17, 20syl2an 480 . . . . . . . . . . 11  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( ( ( 2  x.  a )  +  1 )  -  (
2  x.  b ) )  =  ( ( ( 2  x.  a
)  -  ( 2  x.  b ) )  +  1 ) )
22 mulcom 9622 . . . . . . . . . . . . . 14  |-  ( ( 2  e.  CC  /\  b  e.  CC )  ->  ( 2  x.  b
)  =  ( b  x.  2 ) )
2310, 22mpan 675 . . . . . . . . . . . . 13  |-  ( b  e.  CC  ->  (
2  x.  b )  =  ( b  x.  2 ) )
2423oveq2d 6304 . . . . . . . . . . . 12  |-  ( b  e.  CC  ->  (
( ( 2  x.  a )  +  1 )  -  ( 2  x.  b ) )  =  ( ( ( 2  x.  a )  +  1 )  -  ( b  x.  2 ) ) )
2524adantl 468 . . . . . . . . . . 11  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( ( ( 2  x.  a )  +  1 )  -  (
2  x.  b ) )  =  ( ( ( 2  x.  a
)  +  1 )  -  ( b  x.  2 ) ) )
2613, 21, 253eqtr2d 2490 . . . . . . . . . 10  |-  ( ( a  e.  CC  /\  b  e.  CC )  ->  ( ( 2  x.  ( a  -  b
) )  +  1 )  =  ( ( ( 2  x.  a
)  +  1 )  -  ( b  x.  2 ) ) )
278, 9, 26syl2an 480 . . . . . . . . 9  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  ( ( 2  x.  ( a  -  b
) )  +  1 )  =  ( ( ( 2  x.  a
)  +  1 )  -  ( b  x.  2 ) ) )
28 oveq2 6296 . . . . . . . . . . . 12  |-  ( c  =  ( a  -  b )  ->  (
2  x.  c )  =  ( 2  x.  ( a  -  b
) ) )
2928oveq1d 6303 . . . . . . . . . . 11  |-  ( c  =  ( a  -  b )  ->  (
( 2  x.  c
)  +  1 )  =  ( ( 2  x.  ( a  -  b ) )  +  1 ) )
3029eqeq1d 2452 . . . . . . . . . 10  |-  ( c  =  ( a  -  b )  ->  (
( ( 2  x.  c )  +  1 )  =  ( ( ( 2  x.  a
)  +  1 )  -  ( b  x.  2 ) )  <->  ( (
2  x.  ( a  -  b ) )  +  1 )  =  ( ( ( 2  x.  a )  +  1 )  -  (
b  x.  2 ) ) ) )
3130rspcev 3149 . . . . . . . . 9  |-  ( ( ( a  -  b
)  e.  ZZ  /\  ( ( 2  x.  ( a  -  b
) )  +  1 )  =  ( ( ( 2  x.  a
)  +  1 )  -  ( b  x.  2 ) ) )  ->  E. c  e.  ZZ  ( ( 2  x.  c )  +  1 )  =  ( ( ( 2  x.  a
)  +  1 )  -  ( b  x.  2 ) ) )
327, 27, 31syl2anc 666 . . . . . . . 8  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  E. c  e.  ZZ  ( ( 2  x.  c )  +  1 )  =  ( ( ( 2  x.  a
)  +  1 )  -  ( b  x.  2 ) ) )
33 oveq12 6297 . . . . . . . . . 10  |-  ( ( ( ( 2  x.  a )  +  1 )  =  A  /\  ( b  x.  2 )  =  B )  ->  ( ( ( 2  x.  a )  +  1 )  -  ( b  x.  2 ) )  =  ( A  -  B ) )
3433eqeq2d 2460 . . . . . . . . 9  |-  ( ( ( ( 2  x.  a )  +  1 )  =  A  /\  ( b  x.  2 )  =  B )  ->  ( ( ( 2  x.  c )  +  1 )  =  ( ( ( 2  x.  a )  +  1 )  -  (
b  x.  2 ) )  <->  ( ( 2  x.  c )  +  1 )  =  ( A  -  B ) ) )
3534rexbidv 2900 . . . . . . . 8  |-  ( ( ( ( 2  x.  a )  +  1 )  =  A  /\  ( b  x.  2 )  =  B )  ->  ( E. c  e.  ZZ  ( ( 2  x.  c )  +  1 )  =  ( ( ( 2  x.  a )  +  1 )  -  ( b  x.  2 ) )  <->  E. c  e.  ZZ  ( ( 2  x.  c )  +  1 )  =  ( A  -  B ) ) )
3632, 35syl5ibcom 224 . . . . . . 7  |-  ( ( a  e.  ZZ  /\  b  e.  ZZ )  ->  ( ( ( ( 2  x.  a )  +  1 )  =  A  /\  ( b  x.  2 )  =  B )  ->  E. c  e.  ZZ  ( ( 2  x.  c )  +  1 )  =  ( A  -  B ) ) )
3736rexlimivv 2883 . . . . . 6  |-  ( E. a  e.  ZZ  E. b  e.  ZZ  (
( ( 2  x.  a )  +  1 )  =  A  /\  ( b  x.  2 )  =  B )  ->  E. c  e.  ZZ  ( ( 2  x.  c )  +  1 )  =  ( A  -  B ) )
386, 37sylbir 217 . . . . 5  |-  ( ( E. a  e.  ZZ  ( ( 2  x.  a )  +  1 )  =  A  /\  E. b  e.  ZZ  (
b  x.  2 )  =  B )  ->  E. c  e.  ZZ  ( ( 2  x.  c )  +  1 )  =  ( A  -  B ) )
395, 38syl6bi 232 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( -.  2  ||  A  /\  2  ||  B )  ->  E. c  e.  ZZ  ( ( 2  x.  c )  +  1 )  =  ( A  -  B ) ) )
4039imp 431 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( -.  2  ||  A  /\  2  ||  B ) )  ->  E. c  e.  ZZ  ( ( 2  x.  c )  +  1 )  =  ( A  -  B ) )
4140an4s 834 . 2  |-  ( ( ( A  e.  ZZ  /\ 
-.  2  ||  A
)  /\  ( B  e.  ZZ  /\  2  ||  B ) )  ->  E. c  e.  ZZ  ( ( 2  x.  c )  +  1 )  =  ( A  -  B ) )
42 zsubcl 10976 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  -  B
)  e.  ZZ )
4342ad2ant2r 752 . . 3  |-  ( ( ( A  e.  ZZ  /\ 
-.  2  ||  A
)  /\  ( B  e.  ZZ  /\  2  ||  B ) )  -> 
( A  -  B
)  e.  ZZ )
44 odd2np1 14358 . . 3  |-  ( ( A  -  B )  e.  ZZ  ->  ( -.  2  ||  ( A  -  B )  <->  E. c  e.  ZZ  ( ( 2  x.  c )  +  1 )  =  ( A  -  B ) ) )
4543, 44syl 17 . 2  |-  ( ( ( A  e.  ZZ  /\ 
-.  2  ||  A
)  /\  ( B  e.  ZZ  /\  2  ||  B ) )  -> 
( -.  2  ||  ( A  -  B
)  <->  E. c  e.  ZZ  ( ( 2  x.  c )  +  1 )  =  ( A  -  B ) ) )
4641, 45mpbird 236 1  |-  ( ( ( A  e.  ZZ  /\ 
-.  2  ||  A
)  /\  ( B  e.  ZZ  /\  2  ||  B ) )  ->  -.  2  ||  ( A  -  B ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 188    /\ wa 371    = wceq 1443    e. wcel 1886   E.wrex 2737   class class class wbr 4401  (class class class)co 6288   CCcc 9534   1c1 9537    + caddc 9539    x. cmul 9541    - cmin 9857   2c2 10656   ZZcz 10934    || cdvds 14298
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1668  ax-4 1681  ax-5 1757  ax-6 1804  ax-7 1850  ax-8 1888  ax-9 1895  ax-10 1914  ax-11 1919  ax-12 1932  ax-13 2090  ax-ext 2430  ax-sep 4524  ax-nul 4533  ax-pow 4580  ax-pr 4638  ax-un 6580  ax-resscn 9593  ax-1cn 9594  ax-icn 9595  ax-addcl 9596  ax-addrcl 9597  ax-mulcl 9598  ax-mulrcl 9599  ax-mulcom 9600  ax-addass 9601  ax-mulass 9602  ax-distr 9603  ax-i2m1 9604  ax-1ne0 9605  ax-1rid 9606  ax-rnegex 9607  ax-rrecex 9608  ax-cnre 9609  ax-pre-lttri 9610  ax-pre-lttrn 9611  ax-pre-ltadd 9612  ax-pre-mulgt0 9613
This theorem depends on definitions:  df-bi 189  df-or 372  df-an 373  df-3or 985  df-3an 986  df-tru 1446  df-ex 1663  df-nf 1667  df-sb 1797  df-eu 2302  df-mo 2303  df-clab 2437  df-cleq 2443  df-clel 2446  df-nfc 2580  df-ne 2623  df-nel 2624  df-ral 2741  df-rex 2742  df-reu 2743  df-rmo 2744  df-rab 2745  df-v 3046  df-sbc 3267  df-csb 3363  df-dif 3406  df-un 3408  df-in 3410  df-ss 3417  df-pss 3419  df-nul 3731  df-if 3881  df-pw 3952  df-sn 3968  df-pr 3970  df-tp 3972  df-op 3974  df-uni 4198  df-iun 4279  df-br 4402  df-opab 4461  df-mpt 4462  df-tr 4497  df-eprel 4744  df-id 4748  df-po 4754  df-so 4755  df-fr 4792  df-we 4794  df-xp 4839  df-rel 4840  df-cnv 4841  df-co 4842  df-dm 4843  df-rn 4844  df-res 4845  df-ima 4846  df-pred 5379  df-ord 5425  df-on 5426  df-lim 5427  df-suc 5428  df-iota 5545  df-fun 5583  df-fn 5584  df-f 5585  df-f1 5586  df-fo 5587  df-f1o 5588  df-fv 5589  df-riota 6250  df-ov 6291  df-oprab 6292  df-mpt2 6293  df-om 6690  df-wrecs 7025  df-recs 7087  df-rdg 7125  df-er 7360  df-en 7567  df-dom 7568  df-sdom 7569  df-pnf 9674  df-mnf 9675  df-xr 9676  df-ltxr 9677  df-le 9678  df-sub 9859  df-neg 9860  df-div 10267  df-nn 10607  df-2 10665  df-n0 10867  df-z 10935  df-dvds 14299
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator