Metamath Proof Explorer


Theorem fzdif2

Description: Split the last element of a finite set of sequential integers. More generic than fzsuc . (Contributed by Thierry Arnoux, 22-Aug-2020)

Ref Expression
Assertion fzdif2
|- ( N e. ( ZZ>= ` M ) -> ( ( M ... N ) \ { N } ) = ( M ... ( N - 1 ) ) )

Proof

Step Hyp Ref Expression
1 fzspl
 |-  ( N e. ( ZZ>= ` M ) -> ( M ... N ) = ( ( M ... ( N - 1 ) ) u. { N } ) )
2 1 difeq1d
 |-  ( N e. ( ZZ>= ` M ) -> ( ( M ... N ) \ { N } ) = ( ( ( M ... ( N - 1 ) ) u. { N } ) \ { N } ) )
3 difun2
 |-  ( ( ( M ... ( N - 1 ) ) u. { N } ) \ { N } ) = ( ( M ... ( N - 1 ) ) \ { N } )
4 2 3 eqtrdi
 |-  ( N e. ( ZZ>= ` M ) -> ( ( M ... N ) \ { N } ) = ( ( M ... ( N - 1 ) ) \ { N } ) )
5 eluzelz
 |-  ( N e. ( ZZ>= ` M ) -> N e. ZZ )
6 uzid
 |-  ( N e. ZZ -> N e. ( ZZ>= ` N ) )
7 uznfz
 |-  ( N e. ( ZZ>= ` N ) -> -. N e. ( M ... ( N - 1 ) ) )
8 5 6 7 3syl
 |-  ( N e. ( ZZ>= ` M ) -> -. N e. ( M ... ( N - 1 ) ) )
9 disjsn
 |-  ( ( ( M ... ( N - 1 ) ) i^i { N } ) = (/) <-> -. N e. ( M ... ( N - 1 ) ) )
10 8 9 sylibr
 |-  ( N e. ( ZZ>= ` M ) -> ( ( M ... ( N - 1 ) ) i^i { N } ) = (/) )
11 disjdif2
 |-  ( ( ( M ... ( N - 1 ) ) i^i { N } ) = (/) -> ( ( M ... ( N - 1 ) ) \ { N } ) = ( M ... ( N - 1 ) ) )
12 10 11 syl
 |-  ( N e. ( ZZ>= ` M ) -> ( ( M ... ( N - 1 ) ) \ { N } ) = ( M ... ( N - 1 ) ) )
13 4 12 eqtrd
 |-  ( N e. ( ZZ>= ` M ) -> ( ( M ... N ) \ { N } ) = ( M ... ( N - 1 ) ) )