Proof of Theorem pcmpt2
Step | Hyp | Ref
| Expression |
1 | | pcmpt.4 |
. . 3
⊢ (𝜑 → 𝑃 ∈ ℙ) |
2 | | pcmpt.1 |
. . . . . . 7
⊢ 𝐹 = (𝑛 ∈ ℕ ↦ if(𝑛 ∈ ℙ, (𝑛↑𝐴), 1)) |
3 | | pcmpt.2 |
. . . . . . 7
⊢ (𝜑 → ∀𝑛 ∈ ℙ 𝐴 ∈
ℕ0) |
4 | 2, 3 | pcmptcl 16592 |
. . . . . 6
⊢ (𝜑 → (𝐹:ℕ⟶ℕ ∧ seq1( ·
, 𝐹):ℕ⟶ℕ)) |
5 | 4 | simprd 496 |
. . . . 5
⊢ (𝜑 → seq1( · , 𝐹):ℕ⟶ℕ) |
6 | | pcmpt.3 |
. . . . . 6
⊢ (𝜑 → 𝑁 ∈ ℕ) |
7 | | pcmpt2.6 |
. . . . . 6
⊢ (𝜑 → 𝑀 ∈ (ℤ≥‘𝑁)) |
8 | | eluznn 12658 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ 𝑀 ∈
(ℤ≥‘𝑁)) → 𝑀 ∈ ℕ) |
9 | 6, 7, 8 | syl2anc 584 |
. . . . 5
⊢ (𝜑 → 𝑀 ∈ ℕ) |
10 | 5, 9 | ffvelrnd 6962 |
. . . 4
⊢ (𝜑 → (seq1( · , 𝐹)‘𝑀) ∈ ℕ) |
11 | 10 | nnzd 12425 |
. . 3
⊢ (𝜑 → (seq1( · , 𝐹)‘𝑀) ∈ ℤ) |
12 | 10 | nnne0d 12023 |
. . 3
⊢ (𝜑 → (seq1( · , 𝐹)‘𝑀) ≠ 0) |
13 | 5, 6 | ffvelrnd 6962 |
. . 3
⊢ (𝜑 → (seq1( · , 𝐹)‘𝑁) ∈ ℕ) |
14 | | pcdiv 16553 |
. . 3
⊢ ((𝑃 ∈ ℙ ∧ ((seq1(
· , 𝐹)‘𝑀) ∈ ℤ ∧ (seq1(
· , 𝐹)‘𝑀) ≠ 0) ∧ (seq1( ·
, 𝐹)‘𝑁) ∈ ℕ) → (𝑃 pCnt ((seq1( · , 𝐹)‘𝑀) / (seq1( · , 𝐹)‘𝑁))) = ((𝑃 pCnt (seq1( · , 𝐹)‘𝑀)) − (𝑃 pCnt (seq1( · , 𝐹)‘𝑁)))) |
15 | 1, 11, 12, 13, 14 | syl121anc 1374 |
. 2
⊢ (𝜑 → (𝑃 pCnt ((seq1( · , 𝐹)‘𝑀) / (seq1( · , 𝐹)‘𝑁))) = ((𝑃 pCnt (seq1( · , 𝐹)‘𝑀)) − (𝑃 pCnt (seq1( · , 𝐹)‘𝑁)))) |
16 | | pcmpt.5 |
. . . 4
⊢ (𝑛 = 𝑃 → 𝐴 = 𝐵) |
17 | 2, 3, 9, 1, 16 | pcmpt 16593 |
. . 3
⊢ (𝜑 → (𝑃 pCnt (seq1( · , 𝐹)‘𝑀)) = if(𝑃 ≤ 𝑀, 𝐵, 0)) |
18 | 2, 3, 6, 1, 16 | pcmpt 16593 |
. . 3
⊢ (𝜑 → (𝑃 pCnt (seq1( · , 𝐹)‘𝑁)) = if(𝑃 ≤ 𝑁, 𝐵, 0)) |
19 | 17, 18 | oveq12d 7293 |
. 2
⊢ (𝜑 → ((𝑃 pCnt (seq1( · , 𝐹)‘𝑀)) − (𝑃 pCnt (seq1( · , 𝐹)‘𝑁))) = (if(𝑃 ≤ 𝑀, 𝐵, 0) − if(𝑃 ≤ 𝑁, 𝐵, 0))) |
20 | 16 | eleq1d 2823 |
. . . . . . . 8
⊢ (𝑛 = 𝑃 → (𝐴 ∈ ℕ0 ↔ 𝐵 ∈
ℕ0)) |
21 | 20, 3, 1 | rspcdva 3562 |
. . . . . . 7
⊢ (𝜑 → 𝐵 ∈
ℕ0) |
22 | 21 | nn0cnd 12295 |
. . . . . 6
⊢ (𝜑 → 𝐵 ∈ ℂ) |
23 | 22 | subidd 11320 |
. . . . 5
⊢ (𝜑 → (𝐵 − 𝐵) = 0) |
24 | 23 | adantr 481 |
. . . 4
⊢ ((𝜑 ∧ 𝑃 ≤ 𝑁) → (𝐵 − 𝐵) = 0) |
25 | | prmnn 16379 |
. . . . . . . . . 10
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℕ) |
26 | 1, 25 | syl 17 |
. . . . . . . . 9
⊢ (𝜑 → 𝑃 ∈ ℕ) |
27 | 26 | nnred 11988 |
. . . . . . . 8
⊢ (𝜑 → 𝑃 ∈ ℝ) |
28 | 27 | adantr 481 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝑃 ≤ 𝑁) → 𝑃 ∈ ℝ) |
29 | 6 | nnred 11988 |
. . . . . . . 8
⊢ (𝜑 → 𝑁 ∈ ℝ) |
30 | 29 | adantr 481 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝑃 ≤ 𝑁) → 𝑁 ∈ ℝ) |
31 | 9 | nnred 11988 |
. . . . . . . 8
⊢ (𝜑 → 𝑀 ∈ ℝ) |
32 | 31 | adantr 481 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝑃 ≤ 𝑁) → 𝑀 ∈ ℝ) |
33 | | simpr 485 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝑃 ≤ 𝑁) → 𝑃 ≤ 𝑁) |
34 | | eluzle 12595 |
. . . . . . . . 9
⊢ (𝑀 ∈
(ℤ≥‘𝑁) → 𝑁 ≤ 𝑀) |
35 | 7, 34 | syl 17 |
. . . . . . . 8
⊢ (𝜑 → 𝑁 ≤ 𝑀) |
36 | 35 | adantr 481 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝑃 ≤ 𝑁) → 𝑁 ≤ 𝑀) |
37 | 28, 30, 32, 33, 36 | letrd 11132 |
. . . . . 6
⊢ ((𝜑 ∧ 𝑃 ≤ 𝑁) → 𝑃 ≤ 𝑀) |
38 | 37 | iftrued 4467 |
. . . . 5
⊢ ((𝜑 ∧ 𝑃 ≤ 𝑁) → if(𝑃 ≤ 𝑀, 𝐵, 0) = 𝐵) |
39 | | iftrue 4465 |
. . . . . 6
⊢ (𝑃 ≤ 𝑁 → if(𝑃 ≤ 𝑁, 𝐵, 0) = 𝐵) |
40 | 39 | adantl 482 |
. . . . 5
⊢ ((𝜑 ∧ 𝑃 ≤ 𝑁) → if(𝑃 ≤ 𝑁, 𝐵, 0) = 𝐵) |
41 | 38, 40 | oveq12d 7293 |
. . . 4
⊢ ((𝜑 ∧ 𝑃 ≤ 𝑁) → (if(𝑃 ≤ 𝑀, 𝐵, 0) − if(𝑃 ≤ 𝑁, 𝐵, 0)) = (𝐵 − 𝐵)) |
42 | | simpr 485 |
. . . . . 6
⊢ ((𝑃 ≤ 𝑀 ∧ ¬ 𝑃 ≤ 𝑁) → ¬ 𝑃 ≤ 𝑁) |
43 | 42, 33 | nsyl3 138 |
. . . . 5
⊢ ((𝜑 ∧ 𝑃 ≤ 𝑁) → ¬ (𝑃 ≤ 𝑀 ∧ ¬ 𝑃 ≤ 𝑁)) |
44 | 43 | iffalsed 4470 |
. . . 4
⊢ ((𝜑 ∧ 𝑃 ≤ 𝑁) → if((𝑃 ≤ 𝑀 ∧ ¬ 𝑃 ≤ 𝑁), 𝐵, 0) = 0) |
45 | 24, 41, 44 | 3eqtr4d 2788 |
. . 3
⊢ ((𝜑 ∧ 𝑃 ≤ 𝑁) → (if(𝑃 ≤ 𝑀, 𝐵, 0) − if(𝑃 ≤ 𝑁, 𝐵, 0)) = if((𝑃 ≤ 𝑀 ∧ ¬ 𝑃 ≤ 𝑁), 𝐵, 0)) |
46 | | iffalse 4468 |
. . . . . 6
⊢ (¬
𝑃 ≤ 𝑁 → if(𝑃 ≤ 𝑁, 𝐵, 0) = 0) |
47 | 46 | oveq2d 7291 |
. . . . 5
⊢ (¬
𝑃 ≤ 𝑁 → (if(𝑃 ≤ 𝑀, 𝐵, 0) − if(𝑃 ≤ 𝑁, 𝐵, 0)) = (if(𝑃 ≤ 𝑀, 𝐵, 0) − 0)) |
48 | | 0cn 10967 |
. . . . . . 7
⊢ 0 ∈
ℂ |
49 | | ifcl 4504 |
. . . . . . 7
⊢ ((𝐵 ∈ ℂ ∧ 0 ∈
ℂ) → if(𝑃 ≤
𝑀, 𝐵, 0) ∈ ℂ) |
50 | 22, 48, 49 | sylancl 586 |
. . . . . 6
⊢ (𝜑 → if(𝑃 ≤ 𝑀, 𝐵, 0) ∈ ℂ) |
51 | 50 | subid1d 11321 |
. . . . 5
⊢ (𝜑 → (if(𝑃 ≤ 𝑀, 𝐵, 0) − 0) = if(𝑃 ≤ 𝑀, 𝐵, 0)) |
52 | 47, 51 | sylan9eqr 2800 |
. . . 4
⊢ ((𝜑 ∧ ¬ 𝑃 ≤ 𝑁) → (if(𝑃 ≤ 𝑀, 𝐵, 0) − if(𝑃 ≤ 𝑁, 𝐵, 0)) = if(𝑃 ≤ 𝑀, 𝐵, 0)) |
53 | | simpr 485 |
. . . . . 6
⊢ ((𝜑 ∧ ¬ 𝑃 ≤ 𝑁) → ¬ 𝑃 ≤ 𝑁) |
54 | 53 | biantrud 532 |
. . . . 5
⊢ ((𝜑 ∧ ¬ 𝑃 ≤ 𝑁) → (𝑃 ≤ 𝑀 ↔ (𝑃 ≤ 𝑀 ∧ ¬ 𝑃 ≤ 𝑁))) |
55 | 54 | ifbid 4482 |
. . . 4
⊢ ((𝜑 ∧ ¬ 𝑃 ≤ 𝑁) → if(𝑃 ≤ 𝑀, 𝐵, 0) = if((𝑃 ≤ 𝑀 ∧ ¬ 𝑃 ≤ 𝑁), 𝐵, 0)) |
56 | 52, 55 | eqtrd 2778 |
. . 3
⊢ ((𝜑 ∧ ¬ 𝑃 ≤ 𝑁) → (if(𝑃 ≤ 𝑀, 𝐵, 0) − if(𝑃 ≤ 𝑁, 𝐵, 0)) = if((𝑃 ≤ 𝑀 ∧ ¬ 𝑃 ≤ 𝑁), 𝐵, 0)) |
57 | 45, 56 | pm2.61dan 810 |
. 2
⊢ (𝜑 → (if(𝑃 ≤ 𝑀, 𝐵, 0) − if(𝑃 ≤ 𝑁, 𝐵, 0)) = if((𝑃 ≤ 𝑀 ∧ ¬ 𝑃 ≤ 𝑁), 𝐵, 0)) |
58 | 15, 19, 57 | 3eqtrd 2782 |
1
⊢ (𝜑 → (𝑃 pCnt ((seq1( · , 𝐹)‘𝑀) / (seq1( · , 𝐹)‘𝑁))) = if((𝑃 ≤ 𝑀 ∧ ¬ 𝑃 ≤ 𝑁), 𝐵, 0)) |