Metamath Proof Explorer


Theorem seqcoll2

Description: The function F contains a sparse set of nonzero values to be summed. The function G is an order isomorphism from the set of nonzero values of F to a 1-based finite sequence, and H collects these nonzero values together. Under these conditions, the sum over the values in H yields the same result as the sum over the original set F . (Contributed by Mario Carneiro, 13-Dec-2014)

Ref Expression
Hypotheses seqcoll2.1 φ k S Z + ˙ k = k
seqcoll2.1b φ k S k + ˙ Z = k
seqcoll2.c φ k S n S k + ˙ n S
seqcoll2.a φ Z S
seqcoll2.2 φ G Isom < , < 1 A A
seqcoll2.3 φ A
seqcoll2.5 φ A M N
seqcoll2.6 φ k M N F k S
seqcoll2.7 φ k M N A F k = Z
seqcoll2.8 φ n 1 A H n = F G n
Assertion seqcoll2 φ seq M + ˙ F N = seq 1 + ˙ H A

Proof

Step Hyp Ref Expression
1 seqcoll2.1 φ k S Z + ˙ k = k
2 seqcoll2.1b φ k S k + ˙ Z = k
3 seqcoll2.c φ k S n S k + ˙ n S
4 seqcoll2.a φ Z S
5 seqcoll2.2 φ G Isom < , < 1 A A
6 seqcoll2.3 φ A
7 seqcoll2.5 φ A M N
8 seqcoll2.6 φ k M N F k S
9 seqcoll2.7 φ k M N A F k = Z
10 seqcoll2.8 φ n 1 A H n = F G n
11 fzssuz M N M
12 isof1o G Isom < , < 1 A A G : 1 A 1-1 onto A
13 5 12 syl φ G : 1 A 1-1 onto A
14 f1of G : 1 A 1-1 onto A G : 1 A A
15 13 14 syl φ G : 1 A A
16 fzfi M N Fin
17 ssfi M N Fin A M N A Fin
18 16 7 17 sylancr φ A Fin
19 hasheq0 A Fin A = 0 A =
20 18 19 syl φ A = 0 A =
21 20 necon3bbid φ ¬ A = 0 A
22 6 21 mpbird φ ¬ A = 0
23 hashcl A Fin A 0
24 18 23 syl φ A 0
25 elnn0 A 0 A A = 0
26 24 25 sylib φ A A = 0
27 26 ord φ ¬ A A = 0
28 22 27 mt3d φ A
29 nnuz = 1
30 28 29 eleqtrdi φ A 1
31 eluzfz2 A 1 A 1 A
32 30 31 syl φ A 1 A
33 15 32 ffvelrnd φ G A A
34 7 33 sseldd φ G A M N
35 11 34 sselid φ G A M
36 elfzuz3 G A M N N G A
37 34 36 syl φ N G A
38 fzss2 N G A M G A M N
39 37 38 syl φ M G A M N
40 39 sselda φ k M G A k M N
41 40 8 syldan φ k M G A F k S
42 35 41 3 seqcl φ seq M + ˙ F G A S
43 peano2uz G A M G A + 1 M
44 35 43 syl φ G A + 1 M
45 fzss1 G A + 1 M G A + 1 N M N
46 44 45 syl φ G A + 1 N M N
47 46 sselda φ k G A + 1 N k M N
48 eluzelre G A M G A
49 35 48 syl φ G A
50 49 adantr φ k G A + 1 N G A
51 peano2re G A G A + 1
52 50 51 syl φ k G A + 1 N G A + 1
53 elfzelz k G A + 1 N k
54 53 zred k G A + 1 N k
55 54 adantl φ k G A + 1 N k
56 50 ltp1d φ k G A + 1 N G A < G A + 1
57 elfzle1 k G A + 1 N G A + 1 k
58 57 adantl φ k G A + 1 N G A + 1 k
59 50 52 55 56 58 ltletrd φ k G A + 1 N G A < k
60 13 adantr φ k G A + 1 N k A G : 1 A 1-1 onto A
61 f1ocnv G : 1 A 1-1 onto A G -1 : A 1-1 onto 1 A
62 60 61 syl φ k G A + 1 N k A G -1 : A 1-1 onto 1 A
63 f1of G -1 : A 1-1 onto 1 A G -1 : A 1 A
64 62 63 syl φ k G A + 1 N k A G -1 : A 1 A
65 simprr φ k G A + 1 N k A k A
66 64 65 ffvelrnd φ k G A + 1 N k A G -1 k 1 A
67 66 elfzelzd φ k G A + 1 N k A G -1 k
68 67 zred φ k G A + 1 N k A G -1 k
69 24 adantr φ k G A + 1 N k A A 0
70 69 nn0red φ k G A + 1 N k A A
71 elfzle2 G -1 k 1 A G -1 k A
72 66 71 syl φ k G A + 1 N k A G -1 k A
73 68 70 72 lensymd φ k G A + 1 N k A ¬ A < G -1 k
74 5 adantr φ k G A + 1 N k A G Isom < , < 1 A A
75 32 adantr φ k G A + 1 N k A A 1 A
76 isorel G Isom < , < 1 A A A 1 A G -1 k 1 A A < G -1 k G A < G G -1 k
77 74 75 66 76 syl12anc φ k G A + 1 N k A A < G -1 k G A < G G -1 k
78 f1ocnvfv2 G : 1 A 1-1 onto A k A G G -1 k = k
79 60 65 78 syl2anc φ k G A + 1 N k A G G -1 k = k
80 79 breq2d φ k G A + 1 N k A G A < G G -1 k G A < k
81 77 80 bitrd φ k G A + 1 N k A A < G -1 k G A < k
82 73 81 mtbid φ k G A + 1 N k A ¬ G A < k
83 82 expr φ k G A + 1 N k A ¬ G A < k
84 59 83 mt2d φ k G A + 1 N ¬ k A
85 47 84 eldifd φ k G A + 1 N k M N A
86 85 9 syldan φ k G A + 1 N F k = Z
87 2 35 37 42 86 seqid2 φ seq M + ˙ F G A = seq M + ˙ F N
88 7 11 sstrdi φ A M
89 39 ssdifd φ M G A A M N A
90 89 sselda φ k M G A A k M N A
91 90 9 syldan φ k M G A A F k = Z
92 1 2 3 4 5 32 88 41 91 10 seqcoll φ seq M + ˙ F G A = seq 1 + ˙ H A
93 87 92 eqtr3d φ seq M + ˙ F N = seq 1 + ˙ H A