Metamath Proof Explorer


Theorem nnsum3primesprm

Description: Every prime is "the sum of at most 3" (actually one - the prime itself) primes. (Contributed by AV, 2-Aug-2020) (Proof shortened by AV, 17-Apr-2021)

Ref Expression
Assertion nnsum3primesprm P d f 1 d d 3 P = k = 1 d f k

Proof

Step Hyp Ref Expression
1 1nn 1
2 1zzd P 1
3 id P P
4 2 3 fsnd P 1 P : 1
5 prmex V
6 snex 1 V
7 5 6 elmap 1 P 1 1 P : 1
8 4 7 sylibr P 1 P 1
9 1re 1
10 simpl P k 1 P
11 fvsng 1 P 1 P 1 = P
12 9 10 11 sylancr P k 1 1 P 1 = P
13 12 sumeq2dv P k 1 1 P 1 = k 1 P
14 prmz P P
15 14 zcnd P P
16 eqidd k = 1 P = P
17 16 sumsn 1 P k 1 P = P
18 9 15 17 sylancr P k 1 P = P
19 13 18 eqtr2d P P = k 1 1 P 1
20 1le3 1 3
21 19 20 jctil P 1 3 P = k 1 1 P 1
22 simpl f = 1 P k 1 f = 1 P
23 elsni k 1 k = 1
24 23 adantl f = 1 P k 1 k = 1
25 22 24 fveq12d f = 1 P k 1 f k = 1 P 1
26 25 sumeq2dv f = 1 P k 1 f k = k 1 1 P 1
27 26 eqeq2d f = 1 P P = k 1 f k P = k 1 1 P 1
28 27 anbi2d f = 1 P 1 3 P = k 1 f k 1 3 P = k 1 1 P 1
29 28 rspcev 1 P 1 1 3 P = k 1 1 P 1 f 1 1 3 P = k 1 f k
30 8 21 29 syl2anc P f 1 1 3 P = k 1 f k
31 oveq2 d = 1 1 d = 1 1
32 1z 1
33 fzsn 1 1 1 = 1
34 32 33 ax-mp 1 1 = 1
35 31 34 eqtrdi d = 1 1 d = 1
36 35 oveq2d d = 1 1 d = 1
37 breq1 d = 1 d 3 1 3
38 35 sumeq1d d = 1 k = 1 d f k = k 1 f k
39 38 eqeq2d d = 1 P = k = 1 d f k P = k 1 f k
40 37 39 anbi12d d = 1 d 3 P = k = 1 d f k 1 3 P = k 1 f k
41 36 40 rexeqbidv d = 1 f 1 d d 3 P = k = 1 d f k f 1 1 3 P = k 1 f k
42 41 rspcev 1 f 1 1 3 P = k 1 f k d f 1 d d 3 P = k = 1 d f k
43 1 30 42 sylancr P d f 1 d d 3 P = k = 1 d f k