Proof of Theorem lgsvalmod
Step | Hyp | Ref
| Expression |
1 | | eldifi 3249 |
. . . . . . . 8
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℙ) |
2 | 1 | adantl 275 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 𝑃 ∈
ℙ) |
3 | | prmz 12065 |
. . . . . . 7
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℤ) |
4 | 2, 3 | syl 14 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 𝑃 ∈
ℤ) |
5 | | lgscl 13709 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ ℤ) → (𝐴 /L 𝑃) ∈
ℤ) |
6 | 4, 5 | syldan 280 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴
/L 𝑃)
∈ ℤ) |
7 | 6 | peano2zd 9337 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) +
1) ∈ ℤ) |
8 | | zq 9585 |
. . . 4
⊢ (((𝐴 /L 𝑃) + 1) ∈ ℤ →
((𝐴 /L
𝑃) + 1) ∈
ℚ) |
9 | 7, 8 | syl 14 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) +
1) ∈ ℚ) |
10 | | oddprm 12213 |
. . . . . . . 8
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ ((𝑃 − 1) / 2)
∈ ℕ) |
11 | 10 | adantl 275 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝑃 − 1) / 2)
∈ ℕ) |
12 | 11 | nnnn0d 9188 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝑃 − 1) / 2)
∈ ℕ0) |
13 | | zexpcl 10491 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ ((𝑃 − 1) / 2) ∈
ℕ0) → (𝐴↑((𝑃 − 1) / 2)) ∈
ℤ) |
14 | 12, 13 | syldan 280 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴↑((𝑃 − 1) / 2)) ∈
ℤ) |
15 | 14 | peano2zd 9337 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℤ) |
16 | | zq 9585 |
. . . 4
⊢ (((𝐴↑((𝑃 − 1) / 2)) + 1) ∈ ℤ →
((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℚ) |
17 | 15, 16 | syl 14 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℚ) |
18 | | neg1z 9244 |
. . . 4
⊢ -1 ∈
ℤ |
19 | | zq 9585 |
. . . 4
⊢ (-1
∈ ℤ → -1 ∈ ℚ) |
20 | 18, 19 | mp1i 10 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ -1 ∈ ℚ) |
21 | | prmnn 12064 |
. . . . 5
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℕ) |
22 | 2, 21 | syl 14 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 𝑃 ∈
ℕ) |
23 | | nnq 9592 |
. . . 4
⊢ (𝑃 ∈ ℕ → 𝑃 ∈
ℚ) |
24 | 22, 23 | syl 14 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 𝑃 ∈
ℚ) |
25 | 22 | nngt0d 8922 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 0 < 𝑃) |
26 | | lgsval3 13713 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴
/L 𝑃) =
((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) − 1)) |
27 | 26 | eqcomd 2176 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) − 1) = (𝐴 /L 𝑃)) |
28 | 15, 22 | zmodcld 10301 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) ∈
ℕ0) |
29 | 28 | nn0cnd 9190 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) ∈
ℂ) |
30 | | 1cnd 7936 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 1 ∈ ℂ) |
31 | 6 | zred 9334 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴
/L 𝑃)
∈ ℝ) |
32 | 31 | recnd 7948 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴
/L 𝑃)
∈ ℂ) |
33 | 29, 30, 32 | subadd2d 8249 |
. . . . . 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 5868 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) mod 𝑃) = ((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) mod 𝑃)) |
36 | | modqabs2 10314 |
. . . . 5
⊢ ((((𝐴↑((𝑃 − 1) / 2)) + 1) ∈ ℚ ∧
𝑃 ∈ ℚ ∧ 0
< 𝑃) → ((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) mod 𝑃) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃)) |
37 | 17, 24, 25, 36 | syl3anc 1233 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) mod 𝑃) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃)) |
38 | 35, 37 | eqtrd 2203 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) mod 𝑃) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃)) |
39 | 9, 17, 20, 24, 25, 38 | modqadd1 10317 |
. 2
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴
/L 𝑃) +
1) + -1) mod 𝑃) = ((((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) mod 𝑃)) |
40 | | peano2re 8055 |
. . . . . . 7
⊢ ((𝐴 /L 𝑃) ∈ ℝ → ((𝐴 /L 𝑃) + 1) ∈
ℝ) |
41 | 31, 40 | syl 14 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) +
1) ∈ ℝ) |
42 | 41 | recnd 7948 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) +
1) ∈ ℂ) |
43 | | ax-1cn 7867 |
. . . . 5
⊢ 1 ∈
ℂ |
44 | | negsub 8167 |
. . . . 5
⊢ ((((𝐴 /L 𝑃) + 1) ∈ ℂ ∧ 1
∈ ℂ) → (((𝐴
/L 𝑃) +
1) + -1) = (((𝐴
/L 𝑃) +
1) − 1)) |
45 | 42, 43, 44 | sylancl 411 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) + -1) = (((𝐴
/L 𝑃) +
1) − 1)) |
46 | | pncan 8125 |
. . . . 5
⊢ (((𝐴 /L 𝑃) ∈ ℂ ∧ 1 ∈
ℂ) → (((𝐴
/L 𝑃) +
1) − 1) = (𝐴
/L 𝑃)) |
47 | 32, 43, 46 | sylancl 411 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) − 1) = (𝐴
/L 𝑃)) |
48 | 45, 47 | eqtrd 2203 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) + -1) = (𝐴
/L 𝑃)) |
49 | 48 | oveq1d 5868 |
. 2
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴
/L 𝑃) +
1) + -1) mod 𝑃) = ((𝐴 /L 𝑃) mod 𝑃)) |
50 | 14 | zred 9334 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴↑((𝑃 − 1) / 2)) ∈
ℝ) |
51 | | peano2re 8055 |
. . . . . . 7
⊢ ((𝐴↑((𝑃 − 1) / 2)) ∈ ℝ →
((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℝ) |
52 | 50, 51 | syl 14 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℝ) |
53 | 52 | recnd 7948 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℂ) |
54 | | negsub 8167 |
. . . . 5
⊢ ((((𝐴↑((𝑃 − 1) / 2)) + 1) ∈ ℂ ∧
1 ∈ ℂ) → (((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) = (((𝐴↑((𝑃 − 1) / 2)) + 1) −
1)) |
55 | 53, 43, 54 | sylancl 411 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) =
(((𝐴↑((𝑃 − 1) / 2)) + 1) −
1)) |
56 | 50 | recnd 7948 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴↑((𝑃 − 1) / 2)) ∈
ℂ) |
57 | | pncan 8125 |
. . . . 5
⊢ (((𝐴↑((𝑃 − 1) / 2)) ∈ ℂ ∧ 1
∈ ℂ) → (((𝐴↑((𝑃 − 1) / 2)) + 1) − 1) = (𝐴↑((𝑃 − 1) / 2))) |
58 | 56, 43, 57 | sylancl 411 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) −
1) = (𝐴↑((𝑃 − 1) /
2))) |
59 | 55, 58 | eqtrd 2203 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) =
(𝐴↑((𝑃 − 1) / 2))) |
60 | 59 | oveq1d 5868 |
. 2
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) mod
𝑃) = ((𝐴↑((𝑃 − 1) / 2)) mod 𝑃)) |
61 | 39, 49, 60 | 3eqtr3d 2211 |
1
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) mod
𝑃) = ((𝐴↑((𝑃 − 1) / 2)) mod 𝑃)) |