Metamath Proof Explorer


Theorem fzspl

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

Ref Expression
Assertion fzspl NMMN=MN1N

Proof

Step Hyp Ref Expression
1 eluzelz NMN
2 1 zcnd NMN
3 1zzd NM1
4 3 zcnd NM1
5 2 4 npcand NMN-1+1=N
6 5 eleq1d NMN-1+1MNM
7 6 ibir NMN-1+1M
8 eluzelre NMN
9 8 lem1d NMN1N
10 1 3 zsubcld NMN1
11 eluz1 N1NN1NN1N
12 10 11 syl NMNN1NN1N
13 1 9 12 mpbir2and NMNN1
14 fzsplit2 N-1+1MNN1MN=MN1N-1+1N
15 7 13 14 syl2anc NMMN=MN1N-1+1N
16 5 oveq1d NMN-1+1N=NN
17 fzsn NNN=N
18 1 17 syl NMNN=N
19 16 18 eqtrd NMN-1+1N=N
20 19 uneq2d NMMN1N-1+1N=MN1N
21 15 20 eqtrd NMMN=MN1N