Metamath Proof Explorer


Theorem rpnnen2lem10

Description: Lemma for rpnnen2 . (Contributed by Mario Carneiro, 13-May-2013) (Revised by Mario Carneiro, 30-Apr-2014)

Ref Expression
Hypotheses rpnnen2.1 F = x 𝒫 n if n x 1 3 n 0
rpnnen2.2 φ A
rpnnen2.3 φ B
rpnnen2.4 φ m A B
rpnnen2.5 φ n n < m n A n B
rpnnen2.6 ψ k F A k = k F B k
Assertion rpnnen2lem10 φ ψ k m F A k = k m F B k

Proof

Step Hyp Ref Expression
1 rpnnen2.1 F = x 𝒫 n if n x 1 3 n 0
2 rpnnen2.2 φ A
3 rpnnen2.3 φ B
4 rpnnen2.4 φ m A B
5 rpnnen2.5 φ n n < m n A n B
6 rpnnen2.6 ψ k F A k = k F B k
7 simpr φ ψ ψ
8 7 6 sylib φ ψ k F A k = k F B k
9 eldifi m A B m A
10 ssel2 A m A m
11 9 10 sylan2 A m A B m
12 2 4 11 syl2anc φ m
13 1 rpnnen2lem8 A m k F A k = k = 1 m 1 F A k + k m F A k
14 2 12 13 syl2anc φ k F A k = k = 1 m 1 F A k + k m F A k
15 1z 1
16 nnz m m
17 elfzm11 1 m k 1 m 1 k 1 k k < m
18 15 16 17 sylancr m k 1 m 1 k 1 k k < m
19 18 biimpa m k 1 m 1 k 1 k k < m
20 12 19 sylan φ k 1 m 1 k 1 k k < m
21 20 simp3d φ k 1 m 1 k < m
22 elfznn k 1 m 1 k
23 breq1 n = k n < m k < m
24 eleq1w n = k n A k A
25 eleq1w n = k n B k B
26 24 25 bibi12d n = k n A n B k A k B
27 23 26 imbi12d n = k n < m n A n B k < m k A k B
28 27 rspccva n n < m n A n B k k < m k A k B
29 5 22 28 syl2an φ k 1 m 1 k < m k A k B
30 21 29 mpd φ k 1 m 1 k A k B
31 30 ifbid φ k 1 m 1 if k A 1 3 k 0 = if k B 1 3 k 0
32 1 rpnnen2lem1 A k F A k = if k A 1 3 k 0
33 2 22 32 syl2an φ k 1 m 1 F A k = if k A 1 3 k 0
34 1 rpnnen2lem1 B k F B k = if k B 1 3 k 0
35 3 22 34 syl2an φ k 1 m 1 F B k = if k B 1 3 k 0
36 31 33 35 3eqtr4d φ k 1 m 1 F A k = F B k
37 36 sumeq2dv φ k = 1 m 1 F A k = k = 1 m 1 F B k
38 37 oveq1d φ k = 1 m 1 F A k + k m F A k = k = 1 m 1 F B k + k m F A k
39 14 38 eqtrd φ k F A k = k = 1 m 1 F B k + k m F A k
40 39 adantr φ ψ k F A k = k = 1 m 1 F B k + k m F A k
41 1 rpnnen2lem8 B m k F B k = k = 1 m 1 F B k + k m F B k
42 3 12 41 syl2anc φ k F B k = k = 1 m 1 F B k + k m F B k
43 42 adantr φ ψ k F B k = k = 1 m 1 F B k + k m F B k
44 8 40 43 3eqtr3d φ ψ k = 1 m 1 F B k + k m F A k = k = 1 m 1 F B k + k m F B k
45 1 rpnnen2lem6 A m k m F A k
46 2 12 45 syl2anc φ k m F A k
47 1 rpnnen2lem6 B m k m F B k
48 3 12 47 syl2anc φ k m F B k
49 fzfid φ 1 m 1 Fin
50 1 rpnnen2lem2 B F B :
51 3 50 syl φ F B :
52 ffvelrn F B : k F B k
53 51 22 52 syl2an φ k 1 m 1 F B k
54 49 53 fsumrecl φ k = 1 m 1 F B k
55 readdcan k m F A k k m F B k k = 1 m 1 F B k k = 1 m 1 F B k + k m F A k = k = 1 m 1 F B k + k m F B k k m F A k = k m F B k
56 46 48 54 55 syl3anc φ k = 1 m 1 F B k + k m F A k = k = 1 m 1 F B k + k m F B k k m F A k = k m F B k
57 56 adantr φ ψ k = 1 m 1 F B k + k m F A k = k = 1 m 1 F B k + k m F B k k m F A k = k m F B k
58 44 57 mpbid φ ψ k m F A k = k m F B k