Metamath Proof Explorer


Theorem fz0to4untppr

Description: An integer range from 0 to 4 is the union of a triple and a pair. (Contributed by Alexander van der Vekens, 13-Aug-2017)

Ref Expression
Assertion fz0to4untppr
|- ( 0 ... 4 ) = ( { 0 , 1 , 2 } u. { 3 , 4 } )

Proof

Step Hyp Ref Expression
1 df-3
 |-  3 = ( 2 + 1 )
2 2cn
 |-  2 e. CC
3 2 addid2i
 |-  ( 0 + 2 ) = 2
4 3 eqcomi
 |-  2 = ( 0 + 2 )
5 4 oveq1i
 |-  ( 2 + 1 ) = ( ( 0 + 2 ) + 1 )
6 1 5 eqtri
 |-  3 = ( ( 0 + 2 ) + 1 )
7 3z
 |-  3 e. ZZ
8 0re
 |-  0 e. RR
9 3re
 |-  3 e. RR
10 3pos
 |-  0 < 3
11 8 9 10 ltleii
 |-  0 <_ 3
12 0z
 |-  0 e. ZZ
13 12 eluz1i
 |-  ( 3 e. ( ZZ>= ` 0 ) <-> ( 3 e. ZZ /\ 0 <_ 3 ) )
14 7 11 13 mpbir2an
 |-  3 e. ( ZZ>= ` 0 )
15 6 14 eqeltrri
 |-  ( ( 0 + 2 ) + 1 ) e. ( ZZ>= ` 0 )
16 4z
 |-  4 e. ZZ
17 2re
 |-  2 e. RR
18 4re
 |-  4 e. RR
19 2lt4
 |-  2 < 4
20 17 18 19 ltleii
 |-  2 <_ 4
21 2z
 |-  2 e. ZZ
22 21 eluz1i
 |-  ( 4 e. ( ZZ>= ` 2 ) <-> ( 4 e. ZZ /\ 2 <_ 4 ) )
23 16 20 22 mpbir2an
 |-  4 e. ( ZZ>= ` 2 )
24 4 fveq2i
 |-  ( ZZ>= ` 2 ) = ( ZZ>= ` ( 0 + 2 ) )
25 23 24 eleqtri
 |-  4 e. ( ZZ>= ` ( 0 + 2 ) )
26 fzsplit2
 |-  ( ( ( ( 0 + 2 ) + 1 ) e. ( ZZ>= ` 0 ) /\ 4 e. ( ZZ>= ` ( 0 + 2 ) ) ) -> ( 0 ... 4 ) = ( ( 0 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