Metamath Proof Explorer


Theorem omoe

Description: The difference of two odds is even. (Contributed by Scott Fenton, 7-Apr-2014) (Revised by Mario Carneiro, 19-Apr-2014)

Ref Expression
Assertion omoe
|- ( ( ( A e. ZZ /\ -. 2 || A ) /\ ( B e. ZZ /\ -. 2 || B ) ) -> 2 || ( A - B ) )

Proof

Step Hyp Ref Expression
1 odd2np1
 |-  ( A e. ZZ -> ( -. 2 || A <-> E. a e. ZZ ( ( 2 x. a ) + 1 ) = A ) )
2 odd2np1
 |-  ( B e. ZZ -> ( -. 2 || B <-> E. b e. ZZ ( ( 2 x. b ) + 1 ) = B ) )
3 1 2 bi2anan9
 |-  ( ( 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
 |-  ( 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
 |-  2 e. ZZ
6 zsubcl
 |-  ( ( a e. ZZ /\ b e. ZZ ) -> ( a - b ) e. ZZ )
7 dvdsmul1
 |-  ( ( 2 e. ZZ /\ ( a - b ) e. ZZ ) -> 2 || ( 2 x. ( a - b ) ) )
8 5 6 7 sylancr
 |-  ( ( a e. ZZ /\ b e. ZZ ) -> 2 || ( 2 x. ( a - b ) ) )
9 zcn
 |-  ( a e. ZZ -> a e. CC )
10 zcn
 |-  ( b e. ZZ -> b e. CC )
11 2cn
 |-  2 e. CC
12 mulcl
 |-  ( ( 2 e. CC /\ a e. CC ) -> ( 2 x. a ) e. CC )
13 11 12 mpan
 |-  ( a e. CC -> ( 2 x. a ) e. CC )
14 mulcl
 |-  ( ( 2 e. CC /\ b e. CC ) -> ( 2 x. b ) e. CC )
15 11 14 mpan
 |-  ( b e. CC -> ( 2 x. b ) e. CC )
16 ax-1cn
 |-  1 e. CC
17 pnpcan2
 |-  ( ( ( 2 x. a ) e. CC /\ ( 2 x. b ) e. CC /\ 1 e. CC ) -> ( ( ( 2 x. a ) + 1 ) - ( ( 2 x. b ) + 1 ) ) = ( ( 2 x. a ) - ( 2 x. b ) ) )
18 16 17 mp3an3
 |-  ( ( ( 2 x. a ) e. CC /\ ( 2 x. b ) e. CC ) -> ( ( ( 2 x. a ) + 1 ) - ( ( 2 x. b ) + 1 ) ) = ( ( 2 x. a ) - ( 2 x. b ) ) )
19 13 15 18 syl2an
 |-  ( ( a e. CC /\ b e. CC ) -> ( ( ( 2 x. a ) + 1 ) - ( ( 2 x. b ) + 1 ) ) = ( ( 2 x. a ) - ( 2 x. b ) ) )
20 subdi
 |-  ( ( 2 e. CC /\ a e. CC /\ b e. CC ) -> ( 2 x. ( a - b ) ) = ( ( 2 x. a ) - ( 2 x. b ) ) )
21 11 20 mp3an1
 |-  ( ( a e. CC /\ b e. CC ) -> ( 2 x. ( a - b ) ) = ( ( 2 x. a ) - ( 2 x. b ) ) )
22 19 21 eqtr4d
 |-  ( ( a e. CC /\ b e. CC ) -> ( ( ( 2 x. a ) + 1 ) - ( ( 2 x. b ) + 1 ) ) = ( 2 x. ( a - b ) ) )
23 9 10 22 syl2an
 |-  ( ( a e. ZZ /\ b e. ZZ ) -> ( ( ( 2 x. a ) + 1 ) - ( ( 2 x. b ) + 1 ) ) = ( 2 x. ( a - b ) ) )
24 8 23 breqtrrd
 |-  ( ( a e. ZZ /\ b e. ZZ ) -> 2 || ( ( ( 2 x. a ) + 1 ) - ( ( 2 x. b ) + 1 ) ) )
25 oveq12
 |-  ( ( ( ( 2 x. a ) + 1 ) = A /\ ( ( 2 x. b ) + 1 ) = B ) -> ( ( ( 2 x. a ) + 1 ) - ( ( 2 x. b ) + 1 ) ) = ( A - B ) )
26 25 breq2d
 |-  ( ( ( ( 2 x. a ) + 1 ) = A /\ ( ( 2 x. b ) + 1 ) = B ) -> ( 2 || ( ( ( 2 x. a ) + 1 ) - ( ( 2 x. b ) + 1 ) ) <-> 2 || ( A - B ) ) )
27 24 26 syl5ibcom
 |-  ( ( a e. ZZ /\ b e. ZZ ) -> ( ( ( ( 2 x. a ) + 1 ) = A /\ ( ( 2 x. b ) + 1 ) = B ) -> 2 || ( A - B ) ) )
28 27 rexlimivv
 |-  ( E. a e. ZZ E. b e. ZZ ( ( ( 2 x. a ) + 1 ) = A /\ ( ( 2 x. b ) + 1 ) = B ) -> 2 || ( A - B ) )
29 4 28 sylbir
 |-  ( ( E. a e. ZZ ( ( 2 x. a ) + 1 ) = A /\ E. b e. ZZ ( ( 2 x. b ) + 1 ) = B ) -> 2 || ( A - B ) )
30 3 29 syl6bi
 |-  ( ( A e. ZZ /\ B e. ZZ ) -> ( ( -. 2 || A /\ -. 2 || B ) -> 2 || ( A - B ) ) )
31 30 imp
 |-  ( ( ( A e. ZZ /\ B e. ZZ ) /\ ( -. 2 || A /\ -. 2 || B ) ) -> 2 || ( A - B ) )
32 31 an4s
 |-  ( ( ( A e. ZZ /\ -. 2 || A ) /\ ( B e. ZZ /\ -. 2 || B ) ) -> 2 || ( A - B ) )