Metamath Proof Explorer


Theorem smuval2

Description: The partial sum sequence stabilizes at N after the N + 1 -th element of the sequence; this stable value is the value of the sequence multiplication. (Contributed by Mario Carneiro, 9-Sep-2016)

Ref Expression
Hypotheses smuval.a φ A 0
smuval.b φ B 0
smuval.p P = seq 0 p 𝒫 0 , m 0 p sadd n 0 | m A n m B n 0 if n = 0 n 1
smuval.n φ N 0
smuval2.m φ M N + 1
Assertion smuval2 φ N A smul B N P M

Proof

Step Hyp Ref Expression
1 smuval.a φ A 0
2 smuval.b φ B 0
3 smuval.p P = seq 0 p 𝒫 0 , m 0 p sadd n 0 | m A n m B n 0 if n = 0 n 1
4 smuval.n φ N 0
5 smuval2.m φ M N + 1
6 fveq2 x = N + 1 P x = P N + 1
7 6 eleq2d x = N + 1 N P x N P N + 1
8 7 bibi2d x = N + 1 N A smul B N P x N A smul B N P N + 1
9 8 imbi2d x = N + 1 φ N A smul B N P x φ N A smul B N P N + 1
10 fveq2 x = k P x = P k
11 10 eleq2d x = k N P x N P k
12 11 bibi2d x = k N A smul B N P x N A smul B N P k
13 12 imbi2d x = k φ N A smul B N P x φ N A smul B N P k
14 fveq2 x = k + 1 P x = P k + 1
15 14 eleq2d x = k + 1 N P x N P k + 1
16 15 bibi2d x = k + 1 N A smul B N P x N A smul B N P k + 1
17 16 imbi2d x = k + 1 φ N A smul B N P x φ N A smul B N P k + 1
18 fveq2 x = M P x = P M
19 18 eleq2d x = M N P x N P M
20 19 bibi2d x = M N A smul B N P x N A smul B N P M
21 20 imbi2d x = M φ N A smul B N P x φ N A smul B N P M
22 1 2 3 4 smuval φ N A smul B N P N + 1
23 1 adantr φ k N + 1 A 0
24 2 adantr φ k N + 1 B 0
25 peano2nn0 N 0 N + 1 0
26 4 25 syl φ N + 1 0
27 eluznn0 N + 1 0 k N + 1 k 0
28 26 27 sylan φ k N + 1 k 0
29 23 24 3 28 smupp1 φ k N + 1 P k + 1 = P k sadd n 0 | k A n k B
30 29 eleq2d φ k N + 1 N P k + 1 N P k sadd n 0 | k A n k B
31 23 24 3 smupf φ k N + 1 P : 0 𝒫 0
32 31 28 ffvelrnd φ k N + 1 P k 𝒫 0
33 32 elpwid φ k N + 1 P k 0
34 ssrab2 n 0 | k A n k B 0
35 34 a1i φ k N + 1 n 0 | k A n k B 0
36 26 adantr φ k N + 1 N + 1 0
37 33 35 36 sadeq φ k N + 1 P k sadd n 0 | k A n k B 0 ..^ N + 1 = P k 0 ..^ N + 1 sadd n 0 | k A n k B 0 ..^ N + 1 0 ..^ N + 1
38 inrab2 n 0 | k A n k B 0 ..^ N + 1 = n 0 0 ..^ N + 1 | k A n k B
39 simpr φ k N + 1 n 0 0 ..^ N + 1 n 0 0 ..^ N + 1
40 39 elin1d φ k N + 1 n 0 0 ..^ N + 1 n 0
41 40 nn0red φ k N + 1 n 0 0 ..^ N + 1 n
42 4 adantr φ k N + 1 N 0
43 42 adantr φ k N + 1 n 0 0 ..^ N + 1 N 0
44 43 nn0red φ k N + 1 n 0 0 ..^ N + 1 N
45 1red φ k N + 1 n 0 0 ..^ N + 1 1
46 44 45 readdcld φ k N + 1 n 0 0 ..^ N + 1 N + 1
47 28 adantr φ k N + 1 n 0 0 ..^ N + 1 k 0
48 47 nn0red φ k N + 1 n 0 0 ..^ N + 1 k
49 39 elin2d φ k N + 1 n 0 0 ..^ N + 1 n 0 ..^ N + 1
50 elfzolt2 n 0 ..^ N + 1 n < N + 1
51 49 50 syl φ k N + 1 n 0 0 ..^ N + 1 n < N + 1
52 eluzle k N + 1 N + 1 k
53 52 ad2antlr φ k N + 1 n 0 0 ..^ N + 1 N + 1 k
54 41 46 48 51 53 ltletrd φ k N + 1 n 0 0 ..^ N + 1 n < k
55 41 48 ltnled φ k N + 1 n 0 0 ..^ N + 1 n < k ¬ k n
56 54 55 mpbid φ k N + 1 n 0 0 ..^ N + 1 ¬ k n
57 24 adantr φ k N + 1 n 0 0 ..^ N + 1 B 0
58 57 sseld φ k N + 1 n 0 0 ..^ N + 1 n k B n k 0
59 nn0ge0 n k 0 0 n k
60 58 59 syl6 φ k N + 1 n 0 0 ..^ N + 1 n k B 0 n k
61 41 48 subge0d φ k N + 1 n 0 0 ..^ N + 1 0 n k k n
62 60 61 sylibd φ k N + 1 n 0 0 ..^ N + 1 n k B k n
63 62 adantld φ k N + 1 n 0 0 ..^ N + 1 k A n k B k n
64 56 63 mtod φ k N + 1 n 0 0 ..^ N + 1 ¬ k A n k B
65 64 ralrimiva φ k N + 1 n 0 0 ..^ N + 1 ¬ k A n k B
66 rabeq0 n 0 0 ..^ N + 1 | k A n k B = n 0 0 ..^ N + 1 ¬ k A n k B
67 65 66 sylibr φ k N + 1 n 0 0 ..^ N + 1 | k A n k B =
68 38 67 eqtrid φ k N + 1 n 0 | k A n k B 0 ..^ N + 1 =
69 68 oveq2d φ k N + 1 P k 0 ..^ N + 1 sadd n 0 | k A n k B 0 ..^ N + 1 = P k 0 ..^ N + 1 sadd
70 inss1 P k 0 ..^ N + 1 P k
71 70 33 sstrid φ k N + 1 P k 0 ..^ N + 1 0
72 sadid1 P k 0 ..^ N + 1 0 P k 0 ..^ N + 1 sadd = P k 0 ..^ N + 1
73 71 72 syl φ k N + 1 P k 0 ..^ N + 1 sadd = P k 0 ..^ N + 1
74 69 73 eqtrd φ k N + 1 P k 0 ..^ N + 1 sadd n 0 | k A n k B 0 ..^ N + 1 = P k 0 ..^ N + 1
75 74 ineq1d φ k N + 1 P k 0 ..^ N + 1 sadd n 0 | k A n k B 0 ..^ N + 1 0 ..^ N + 1 = P k 0 ..^ N + 1 0 ..^ N + 1
76 inass P k 0 ..^ N + 1 0 ..^ N + 1 = P k 0 ..^ N + 1 0 ..^ N + 1
77 inidm 0 ..^ N + 1 0 ..^ N + 1 = 0 ..^ N + 1
78 77 ineq2i P k 0 ..^ N + 1 0 ..^ N + 1 = P k 0 ..^ N + 1
79 76 78 eqtri P k 0 ..^ N + 1 0 ..^ N + 1 = P k 0 ..^ N + 1
80 75 79 eqtrdi φ k N + 1 P k 0 ..^ N + 1 sadd n 0 | k A n k B 0 ..^ N + 1 0 ..^ N + 1 = P k 0 ..^ N + 1
81 37 80 eqtrd φ k N + 1 P k sadd n 0 | k A n k B 0 ..^ N + 1 = P k 0 ..^ N + 1
82 81 eleq2d φ k N + 1 N P k sadd n 0 | k A n k B 0 ..^ N + 1 N P k 0 ..^ N + 1
83 elin N P k sadd n 0 | k A n k B 0 ..^ N + 1 N P k sadd n 0 | k A n k B N 0 ..^ N + 1
84 elin N P k 0 ..^ N + 1 N P k N 0 ..^ N + 1
85 82 83 84 3bitr3g φ k N + 1 N P k sadd n 0 | k A n k B N 0 ..^ N + 1 N P k N 0 ..^ N + 1
86 nn0uz 0 = 0
87 42 86 eleqtrdi φ k N + 1 N 0
88 eluzfz2 N 0 N 0 N
89 87 88 syl φ k N + 1 N 0 N
90 42 nn0zd φ k N + 1 N
91 fzval3 N 0 N = 0 ..^ N + 1
92 90 91 syl φ k N + 1 0 N = 0 ..^ N + 1
93 89 92 eleqtrd φ k N + 1 N 0 ..^ N + 1
94 93 biantrud φ k N + 1 N P k sadd n 0 | k A n k B N P k sadd n 0 | k A n k B N 0 ..^ N + 1
95 93 biantrud φ k N + 1 N P k N P k N 0 ..^ N + 1
96 85 94 95 3bitr4d φ k N + 1 N P k sadd n 0 | k A n k B N P k
97 30 96 bitrd φ k N + 1 N P k + 1 N P k
98 97 bibi2d φ k N + 1 N A smul B N P k + 1 N A smul B N P k
99 98 biimprd φ k N + 1 N A smul B N P k N A smul B N P k + 1
100 99 expcom k N + 1 φ N A smul B N P k N A smul B N P k + 1
101 100 a2d k N + 1 φ N A smul B N P k φ N A smul B N P k + 1
102 9 13 17 21 22 101 uzind4i M N + 1 φ N A smul B N P M
103 5 102 mpcom φ N A smul B N P M