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 A 0 B 0 A B 1 B = 1 A A + 1 B

Proof

Step Hyp Ref Expression
1 elnn0 A 0 A A = 0
2 1zzd A B 0 A B 1
3 nn0z B 0 B
4 3 ad2antrl A B 0 A B B
5 nnz A A
6 5 adantr A B 0 A B A
7 nnge1 A 1 A
8 7 adantr A B 0 A B 1 A
9 simprr A B 0 A B A B
10 2 4 6 8 9 elfzd A B 0 A B A 1 B
11 fzsplit A 1 B 1 B = 1 A A + 1 B
12 10 11 syl A B 0 A B 1 B = 1 A A + 1 B
13 uncom 1 A A + 1 B = A + 1 B 1 A
14 oveq1 A = 0 A + 1 = 0 + 1
15 14 adantr A = 0 B 0 A B A + 1 = 0 + 1
16 0p1e1 0 + 1 = 1
17 15 16 eqtrdi A = 0 B 0 A B A + 1 = 1
18 17 oveq1d A = 0 B 0 A B A + 1 B = 1 B
19 oveq2 A = 0 1 A = 1 0
20 19 adantr A = 0 B 0 A B 1 A = 1 0
21 fz10 1 0 =
22 20 21 eqtrdi A = 0 B 0 A B 1 A =
23 18 22 uneq12d A = 0 B 0 A B A + 1 B 1 A = 1 B
24 un0 1 B = 1 B
25 23 24 eqtrdi A = 0 B 0 A B A + 1 B 1 A = 1 B
26 13 25 eqtr2id A = 0 B 0 A B 1 B = 1 A A + 1 B
27 12 26 jaoian A A = 0 B 0 A B 1 B = 1 A A + 1 B
28 27 ex A A = 0 B 0 A B 1 B = 1 A A + 1 B
29 1 28 sylbi A 0 B 0 A B 1 B = 1 A A + 1 B
30 29 3impib A 0 B 0 A B 1 B = 1 A A + 1 B