Proof of Theorem lgsvalmod
Step | Hyp | Ref
| Expression |
1 | | eldifi 3243 |
. . . . . . . 8
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℙ) |
2 | 1 | adantl 275 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 𝑃 ∈
ℙ) |
3 | | prmz 12039 |
. . . . . . 7
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℤ) |
4 | 2, 3 | syl 14 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 𝑃 ∈
ℤ) |
5 | | lgscl 13515 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ ℤ) → (𝐴 /L 𝑃) ∈
ℤ) |
6 | 4, 5 | syldan 280 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴
/L 𝑃)
∈ ℤ) |
7 | 6 | peano2zd 9312 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) +
1) ∈ ℤ) |
8 | | zq 9560 |
. . . 4
⊢ (((𝐴 /L 𝑃) + 1) ∈ ℤ →
((𝐴 /L
𝑃) + 1) ∈
ℚ) |
9 | 7, 8 | syl 14 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) +
1) ∈ ℚ) |
10 | | oddprm 12187 |
. . . . . . . 8
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ ((𝑃 − 1) / 2)
∈ ℕ) |
11 | 10 | adantl 275 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝑃 − 1) / 2)
∈ ℕ) |
12 | 11 | nnnn0d 9163 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝑃 − 1) / 2)
∈ ℕ0) |
13 | | zexpcl 10466 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ ((𝑃 − 1) / 2) ∈
ℕ0) → (𝐴↑((𝑃 − 1) / 2)) ∈
ℤ) |
14 | 12, 13 | syldan 280 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴↑((𝑃 − 1) / 2)) ∈
ℤ) |
15 | 14 | peano2zd 9312 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℤ) |
16 | | zq 9560 |
. . . 4
⊢ (((𝐴↑((𝑃 − 1) / 2)) + 1) ∈ ℤ →
((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℚ) |
17 | 15, 16 | syl 14 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℚ) |
18 | | neg1z 9219 |
. . . 4
⊢ -1 ∈
ℤ |
19 | | zq 9560 |
. . . 4
⊢ (-1
∈ ℤ → -1 ∈ ℚ) |
20 | 18, 19 | mp1i 10 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ -1 ∈ ℚ) |
21 | | prmnn 12038 |
. . . . 5
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℕ) |
22 | 2, 21 | syl 14 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 𝑃 ∈
ℕ) |
23 | | nnq 9567 |
. . . 4
⊢ (𝑃 ∈ ℕ → 𝑃 ∈
ℚ) |
24 | 22, 23 | syl 14 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 𝑃 ∈
ℚ) |
25 | 22 | nngt0d 8897 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 0 < 𝑃) |
26 | | lgsval3 13519 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴
/L 𝑃) =
((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) − 1)) |
27 | 26 | eqcomd 2171 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) − 1) = (𝐴 /L 𝑃)) |
28 | 15, 22 | zmodcld 10276 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) ∈
ℕ0) |
29 | 28 | nn0cnd 9165 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) ∈
ℂ) |
30 | | 1cnd 7911 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 1 ∈ ℂ) |
31 | 6 | zred 9309 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴
/L 𝑃)
∈ ℝ) |
32 | 31 | recnd 7923 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴
/L 𝑃)
∈ ℂ) |
33 | 29, 30, 32 | subadd2d 8224 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) − 1) = (𝐴 /L 𝑃) ↔ ((𝐴 /L 𝑃) + 1) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃))) |
34 | 27, 33 | mpbid 146 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) +
1) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃)) |
35 | 34 | oveq1d 5856 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) mod 𝑃) = ((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) mod 𝑃)) |
36 | | modqabs2 10289 |
. . . . 5
⊢ ((((𝐴↑((𝑃 − 1) / 2)) + 1) ∈ ℚ ∧
𝑃 ∈ ℚ ∧ 0
< 𝑃) → ((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) mod 𝑃) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃)) |
37 | 17, 24, 25, 36 | syl3anc 1228 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) mod 𝑃) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃)) |
38 | 35, 37 | eqtrd 2198 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) mod 𝑃) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃)) |
39 | 9, 17, 20, 24, 25, 38 | modqadd1 10292 |
. 2
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴
/L 𝑃) +
1) + -1) mod 𝑃) = ((((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) mod 𝑃)) |
40 | | peano2re 8030 |
. . . . . . 7
⊢ ((𝐴 /L 𝑃) ∈ ℝ → ((𝐴 /L 𝑃) + 1) ∈
ℝ) |
41 | 31, 40 | syl 14 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) +
1) ∈ ℝ) |
42 | 41 | recnd 7923 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) +
1) ∈ ℂ) |
43 | | ax-1cn 7842 |
. . . . 5
⊢ 1 ∈
ℂ |
44 | | negsub 8142 |
. . . . 5
⊢ ((((𝐴 /L 𝑃) + 1) ∈ ℂ ∧ 1
∈ ℂ) → (((𝐴
/L 𝑃) +
1) + -1) = (((𝐴
/L 𝑃) +
1) − 1)) |
45 | 42, 43, 44 | sylancl 410 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) + -1) = (((𝐴
/L 𝑃) +
1) − 1)) |
46 | | pncan 8100 |
. . . . 5
⊢ (((𝐴 /L 𝑃) ∈ ℂ ∧ 1 ∈
ℂ) → (((𝐴
/L 𝑃) +
1) − 1) = (𝐴
/L 𝑃)) |
47 | 32, 43, 46 | sylancl 410 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) − 1) = (𝐴
/L 𝑃)) |
48 | 45, 47 | eqtrd 2198 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) + -1) = (𝐴
/L 𝑃)) |
49 | 48 | oveq1d 5856 |
. 2
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴
/L 𝑃) +
1) + -1) mod 𝑃) = ((𝐴 /L 𝑃) mod 𝑃)) |
50 | 14 | zred 9309 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴↑((𝑃 − 1) / 2)) ∈
ℝ) |
51 | | peano2re 8030 |
. . . . . . 7
⊢ ((𝐴↑((𝑃 − 1) / 2)) ∈ ℝ →
((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℝ) |
52 | 50, 51 | syl 14 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℝ) |
53 | 52 | recnd 7923 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℂ) |
54 | | negsub 8142 |
. . . . 5
⊢ ((((𝐴↑((𝑃 − 1) / 2)) + 1) ∈ ℂ ∧
1 ∈ ℂ) → (((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) = (((𝐴↑((𝑃 − 1) / 2)) + 1) −
1)) |
55 | 53, 43, 54 | sylancl 410 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) =
(((𝐴↑((𝑃 − 1) / 2)) + 1) −
1)) |
56 | 50 | recnd 7923 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴↑((𝑃 − 1) / 2)) ∈
ℂ) |
57 | | pncan 8100 |
. . . . 5
⊢ (((𝐴↑((𝑃 − 1) / 2)) ∈ ℂ ∧ 1
∈ ℂ) → (((𝐴↑((𝑃 − 1) / 2)) + 1) − 1) = (𝐴↑((𝑃 − 1) / 2))) |
58 | 56, 43, 57 | sylancl 410 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) −
1) = (𝐴↑((𝑃 − 1) /
2))) |
59 | 55, 58 | eqtrd 2198 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) =
(𝐴↑((𝑃 − 1) / 2))) |
60 | 59 | oveq1d 5856 |
. 2
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) mod
𝑃) = ((𝐴↑((𝑃 − 1) / 2)) mod 𝑃)) |
61 | 39, 49, 60 | 3eqtr3d 2206 |
1
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) mod
𝑃) = ((𝐴↑((𝑃 − 1) / 2)) mod 𝑃)) |