Metamath Proof Explorer


Theorem pcmpt2

Description: Dividing two prime count maps yields a number with all dividing primes confined to an interval. (Contributed by Mario Carneiro, 14-Mar-2014)

Ref Expression
Hypotheses pcmpt.1 F = n if n n A 1
pcmpt.2 φ n A 0
pcmpt.3 φ N
pcmpt.4 φ P
pcmpt.5 n = P A = B
pcmpt2.6 φ M N
Assertion pcmpt2 φ P pCnt seq 1 × F M seq 1 × F N = if P M ¬ P N B 0

Proof

Step Hyp Ref Expression
1 pcmpt.1 F = n if n n A 1
2 pcmpt.2 φ n A 0
3 pcmpt.3 φ N
4 pcmpt.4 φ P
5 pcmpt.5 n = P A = B
6 pcmpt2.6 φ M N
7 1 2 pcmptcl φ F : seq 1 × F :
8 7 simprd φ seq 1 × F :
9 eluznn N M N M
10 3 6 9 syl2anc φ M
11 8 10 ffvelrnd φ seq 1 × F M
12 11 nnzd φ seq 1 × F M
13 11 nnne0d φ seq 1 × F M 0
14 8 3 ffvelrnd φ seq 1 × F N
15 pcdiv P seq 1 × F M seq 1 × F M 0 seq 1 × F N P pCnt seq 1 × F M seq 1 × F N = P pCnt seq 1 × F M P pCnt seq 1 × F N
16 4 12 13 14 15 syl121anc φ P pCnt seq 1 × F M seq 1 × F N = P pCnt seq 1 × F M P pCnt seq 1 × F N
17 1 2 10 4 5 pcmpt φ P pCnt seq 1 × F M = if P M B 0
18 1 2 3 4 5 pcmpt φ P pCnt seq 1 × F N = if P N B 0
19 17 18 oveq12d φ P pCnt seq 1 × F M P pCnt seq 1 × F N = if P M B 0 if P N B 0
20 5 eleq1d n = P A 0 B 0
21 20 2 4 rspcdva φ B 0
22 21 nn0cnd φ B
23 22 subidd φ B B = 0
24 23 adantr φ P N B B = 0
25 prmnn P P
26 4 25 syl φ P
27 26 nnred φ P
28 27 adantr φ P N P
29 3 nnred φ N
30 29 adantr φ P N N
31 10 nnred φ M
32 31 adantr φ P N M
33 simpr φ P N P N
34 eluzle M N N M
35 6 34 syl φ N M
36 35 adantr φ P N N M
37 28 30 32 33 36 letrd φ P N P M
38 37 iftrued φ P N if P M B 0 = B
39 iftrue P N if P N B 0 = B
40 39 adantl φ P N if P N B 0 = B
41 38 40 oveq12d φ P N if P M B 0 if P N B 0 = B B
42 simpr P M ¬ P N ¬ P N
43 42 33 nsyl3 φ P N ¬ P M ¬ P N
44 43 iffalsed φ P N if P M ¬ P N B 0 = 0
45 24 41 44 3eqtr4d φ P N if P M B 0 if P N B 0 = if P M ¬ P N B 0
46 iffalse ¬ P N if P N B 0 = 0
47 46 oveq2d ¬ P N if P M B 0 if P N B 0 = if P M B 0 0
48 0cn 0
49 ifcl B 0 if P M B 0
50 22 48 49 sylancl φ if P M B 0
51 50 subid1d φ if P M B 0 0 = if P M B 0
52 47 51 sylan9eqr φ ¬ P N if P M B 0 if P N B 0 = if P M B 0
53 simpr φ ¬ P N ¬ P N
54 53 biantrud φ ¬ P N P M P M ¬ P N
55 54 ifbid φ ¬ P N if P M B 0 = if P M ¬ P N B 0
56 52 55 eqtrd φ ¬ P N if P M B 0 if P N B 0 = if P M ¬ P N B 0
57 45 56 pm2.61dan φ if P M B 0 if P N B 0 = if P M ¬ P N B 0
58 16 19 57 3eqtrd φ P pCnt seq 1 × F M seq 1 × F N = if P M ¬ P N B 0