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 N M M N = M N 1 N

Proof

Step Hyp Ref Expression
1 eluzelz N M N
2 1 zcnd N M N
3 1zzd N M 1
4 3 zcnd N M 1
5 2 4 npcand N M N - 1 + 1 = N
6 5 eleq1d N M N - 1 + 1 M N M
7 6 ibir N M N - 1 + 1 M
8 eluzelre N M N
9 8 lem1d N M N 1 N
10 1 3 zsubcld N M N 1
11 eluz1 N 1 N N 1 N N 1 N
12 10 11 syl N M N N 1 N N 1 N
13 1 9 12 mpbir2and N M N N 1
14 fzsplit2 N - 1 + 1 M N N 1 M N = M N 1 N - 1 + 1 N
15 7 13 14 syl2anc N M M N = M N 1 N - 1 + 1 N
16 5 oveq1d N M N - 1 + 1 N = N N
17 fzsn N N N = N
18 1 17 syl N M N N = N
19 16 18 eqtrd N M N - 1 + 1 N = N
20 19 uneq2d N M M N 1 N - 1 + 1 N = M N 1 N
21 15 20 eqtrd N M M N = M N 1 N