Metamath Proof Explorer


Theorem elmod2

Description: An integer modulo 2 is either 0 or 1. (Contributed by AV, 24-May-2020) (Proof shortened by OpenAI, 3-Jul-2020)

Ref Expression
Assertion elmod2
|- ( N e. ZZ -> ( N mod 2 ) e. { 0 , 1 } )

Proof

Step Hyp Ref Expression
1 2nn
 |-  2 e. NN
2 zmodfzo
 |-  ( ( N e. ZZ /\ 2 e. NN ) -> ( N mod 2 ) e. ( 0 ..^ 2 ) )
3 2 ancoms
 |-  ( ( 2 e. NN /\ N e. ZZ ) -> ( N mod 2 ) e. ( 0 ..^ 2 ) )
4 1 3 mpan
 |-  ( N e. ZZ -> ( N mod 2 ) e. ( 0 ..^ 2 ) )
5 fzo0to2pr
 |-  ( 0 ..^ 2 ) = { 0 , 1 }
6 4 5 eleqtrdi
 |-  ( N e. ZZ -> ( N mod 2 ) e. { 0 , 1 } )