Metamath Proof Explorer


Theorem sumrblem

Description: Lemma for sumrb . (Contributed by Mario Carneiro, 12-Aug-2013)

Ref Expression
Hypotheses summo.1 F = k if k A B 0
summo.2 φ k A B
sumrb.3 φ N M
Assertion sumrblem φ A N seq M + F N = seq N + F

Proof

Step Hyp Ref Expression
1 summo.1 F = k if k A B 0
2 summo.2 φ k A B
3 sumrb.3 φ N M
4 addid2 n 0 + n = n
5 4 adantl φ A N n 0 + n = n
6 0cnd φ A N 0
7 3 adantr φ A N N M
8 iftrue k A if k A B 0 = B
9 8 adantl φ k A if k A B 0 = B
10 9 2 eqeltrd φ k A if k A B 0
11 10 ex φ k A if k A B 0
12 iffalse ¬ k A if k A B 0 = 0
13 0cn 0
14 12 13 eqeltrdi ¬ k A if k A B 0
15 11 14 pm2.61d1 φ if k A B 0
16 15 adantr φ k if k A B 0
17 16 1 fmptd φ F :
18 17 adantr φ A N F :
19 eluzelz N M N
20 3 19 syl φ N
21 20 adantr φ A N N
22 18 21 ffvelrnd φ A N F N
23 elfzelz n M N 1 n
24 23 adantl φ A N n M N 1 n
25 simplr φ A N n M N 1 A N
26 20 zcnd φ N
27 26 ad2antrr φ A N n M N 1 N
28 ax-1cn 1
29 npcan N 1 N - 1 + 1 = N
30 27 28 29 sylancl φ A N n M N 1 N - 1 + 1 = N
31 30 fveq2d φ A N n M N 1 N - 1 + 1 = N
32 25 31 sseqtrrd φ A N n M N 1 A N - 1 + 1
33 fznuz n M N 1 ¬ n N - 1 + 1
34 33 adantl φ A N n M N 1 ¬ n N - 1 + 1
35 32 34 ssneldd φ A N n M N 1 ¬ n A
36 24 35 eldifd φ A N n M N 1 n A
37 fveqeq2 k = n F k = 0 F n = 0
38 eldifi k A k
39 eldifn k A ¬ k A
40 39 12 syl k A if k A B 0 = 0
41 40 13 eqeltrdi k A if k A B 0
42 1 fvmpt2 k if k A B 0 F k = if k A B 0
43 38 41 42 syl2anc k A F k = if k A B 0
44 43 40 eqtrd k A F k = 0
45 37 44 vtoclga n A F n = 0
46 36 45 syl φ A N n M N 1 F n = 0
47 5 6 7 22 46 seqid φ A N seq M + F N = seq N + F