Metamath Proof Explorer


Theorem fzsplit1nn0

Description: Split a finite 1-based set of integers in the middle, allowing either end to be empty ( ( 1 ... 0 ) ). (Contributed by Stefan O'Rear, 8-Oct-2014)

Ref Expression
Assertion fzsplit1nn0 A0B0AB1B=1AA+1B

Proof

Step Hyp Ref Expression
1 elnn0 A0AA=0
2 1zzd AB0AB1
3 nn0z B0B
4 3 ad2antrl AB0ABB
5 nnz AA
6 5 adantr AB0ABA
7 nnge1 A1A
8 7 adantr AB0AB1A
9 simprr AB0ABAB
10 2 4 6 8 9 elfzd AB0ABA1B
11 fzsplit A1B1B=1AA+1B
12 10 11 syl AB0AB1B=1AA+1B
13 uncom 1AA+1B=A+1B1A
14 oveq1 A=0A+1=0+1
15 14 adantr A=0B0ABA+1=0+1
16 0p1e1 0+1=1
17 15 16 eqtrdi A=0B0ABA+1=1
18 17 oveq1d A=0B0ABA+1B=1B
19 oveq2 A=01A=10
20 19 adantr A=0B0AB1A=10
21 fz10 10=
22 20 21 eqtrdi A=0B0AB1A=
23 18 22 uneq12d A=0B0ABA+1B1A=1B
24 un0 1B=1B
25 23 24 eqtrdi A=0B0ABA+1B1A=1B
26 13 25 eqtr2id A=0B0AB1B=1AA+1B
27 12 26 jaoian AA=0B0AB1B=1AA+1B
28 27 ex AA=0B0AB1B=1AA+1B
29 1 28 sylbi A0B0AB1B=1AA+1B
30 29 3impib A0B0AB1B=1AA+1B