Proof of Theorem lgsvalmod
Step | Hyp | Ref
| Expression |
1 | | eldifi 4057 |
. . . . . . . 8
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℙ) |
2 | 1 | adantl 481 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 𝑃 ∈
ℙ) |
3 | | prmz 16308 |
. . . . . . 7
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℤ) |
4 | 2, 3 | syl 17 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 𝑃 ∈
ℤ) |
5 | | lgscl 26364 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ ℤ) → (𝐴 /L 𝑃) ∈
ℤ) |
6 | 4, 5 | syldan 590 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴
/L 𝑃)
∈ ℤ) |
7 | 6 | zred 12355 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴
/L 𝑃)
∈ ℝ) |
8 | | peano2re 11078 |
. . . 4
⊢ ((𝐴 /L 𝑃) ∈ ℝ → ((𝐴 /L 𝑃) + 1) ∈
ℝ) |
9 | 7, 8 | syl 17 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) +
1) ∈ ℝ) |
10 | | oddprm 16439 |
. . . . . . . 8
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ ((𝑃 − 1) / 2)
∈ ℕ) |
11 | 10 | adantl 481 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝑃 − 1) / 2)
∈ ℕ) |
12 | 11 | nnnn0d 12223 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝑃 − 1) / 2)
∈ ℕ0) |
13 | | zexpcl 13725 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ ((𝑃 − 1) / 2) ∈
ℕ0) → (𝐴↑((𝑃 − 1) / 2)) ∈
ℤ) |
14 | 12, 13 | syldan 590 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴↑((𝑃 − 1) / 2)) ∈
ℤ) |
15 | 14 | zred 12355 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴↑((𝑃 − 1) / 2)) ∈
ℝ) |
16 | | peano2re 11078 |
. . . 4
⊢ ((𝐴↑((𝑃 − 1) / 2)) ∈ ℝ →
((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℝ) |
17 | 15, 16 | syl 17 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℝ) |
18 | | neg1rr 12018 |
. . . 4
⊢ -1 ∈
ℝ |
19 | 18 | a1i 11 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ -1 ∈ ℝ) |
20 | | prmnn 16307 |
. . . . 5
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℕ) |
21 | 2, 20 | syl 17 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 𝑃 ∈
ℕ) |
22 | 21 | nnrpd 12699 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 𝑃 ∈
ℝ+) |
23 | | lgsval3 26368 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴
/L 𝑃) =
((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) − 1)) |
24 | 23 | eqcomd 2744 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) − 1) = (𝐴 /L 𝑃)) |
25 | 17, 22 | modcld 13523 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) ∈
ℝ) |
26 | 25 | recnd 10934 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) ∈
ℂ) |
27 | | ax-1cn 10860 |
. . . . . . . 8
⊢ 1 ∈
ℂ |
28 | 27 | a1i 11 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ 1 ∈ ℂ) |
29 | 7 | recnd 10934 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴
/L 𝑃)
∈ ℂ) |
30 | 26, 28, 29 | subadd2d 11281 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) − 1) = (𝐴 /L 𝑃) ↔ ((𝐴 /L 𝑃) + 1) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃))) |
31 | 24, 30 | mpbid 231 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) +
1) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃)) |
32 | 31 | oveq1d 7270 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) mod 𝑃) = ((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) mod 𝑃)) |
33 | | modabs2 13553 |
. . . . 5
⊢ ((((𝐴↑((𝑃 − 1) / 2)) + 1) ∈ ℝ ∧
𝑃 ∈
ℝ+) → ((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) mod 𝑃) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃)) |
34 | 17, 22, 33 | syl2anc 583 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃) mod 𝑃) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃)) |
35 | 32, 34 | eqtrd 2778 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) mod 𝑃) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃)) |
36 | | modadd1 13556 |
. . 3
⊢
(((((𝐴
/L 𝑃) +
1) ∈ ℝ ∧ ((𝐴↑((𝑃 − 1) / 2)) + 1) ∈ ℝ) ∧
(-1 ∈ ℝ ∧ 𝑃
∈ ℝ+) ∧ (((𝐴 /L 𝑃) + 1) mod 𝑃) = (((𝐴↑((𝑃 − 1) / 2)) + 1) mod 𝑃)) → ((((𝐴 /L 𝑃) + 1) + -1) mod 𝑃) = ((((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) mod 𝑃)) |
37 | 9, 17, 19, 22, 35, 36 | syl221anc 1379 |
. 2
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴
/L 𝑃) +
1) + -1) mod 𝑃) = ((((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) mod 𝑃)) |
38 | 9 | recnd 10934 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) +
1) ∈ ℂ) |
39 | | negsub 11199 |
. . . . 5
⊢ ((((𝐴 /L 𝑃) + 1) ∈ ℂ ∧ 1
∈ ℂ) → (((𝐴
/L 𝑃) +
1) + -1) = (((𝐴
/L 𝑃) +
1) − 1)) |
40 | 38, 27, 39 | sylancl 585 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) + -1) = (((𝐴
/L 𝑃) +
1) − 1)) |
41 | | pncan 11157 |
. . . . 5
⊢ (((𝐴 /L 𝑃) ∈ ℂ ∧ 1 ∈
ℂ) → (((𝐴
/L 𝑃) +
1) − 1) = (𝐴
/L 𝑃)) |
42 | 29, 27, 41 | sylancl 585 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) − 1) = (𝐴
/L 𝑃)) |
43 | 40, 42 | eqtrd 2778 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴
/L 𝑃) +
1) + -1) = (𝐴
/L 𝑃)) |
44 | 43 | oveq1d 7270 |
. 2
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴
/L 𝑃) +
1) + -1) mod 𝑃) = ((𝐴 /L 𝑃) mod 𝑃)) |
45 | 17 | recnd 10934 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴↑((𝑃 − 1) / 2)) + 1) ∈
ℂ) |
46 | | negsub 11199 |
. . . . 5
⊢ ((((𝐴↑((𝑃 − 1) / 2)) + 1) ∈ ℂ ∧
1 ∈ ℂ) → (((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) = (((𝐴↑((𝑃 − 1) / 2)) + 1) −
1)) |
47 | 45, 27, 46 | sylancl 585 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) =
(((𝐴↑((𝑃 − 1) / 2)) + 1) −
1)) |
48 | 15 | recnd 10934 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (𝐴↑((𝑃 − 1) / 2)) ∈
ℂ) |
49 | | pncan 11157 |
. . . . 5
⊢ (((𝐴↑((𝑃 − 1) / 2)) ∈ ℂ ∧ 1
∈ ℂ) → (((𝐴↑((𝑃 − 1) / 2)) + 1) − 1) = (𝐴↑((𝑃 − 1) / 2))) |
50 | 48, 27, 49 | sylancl 585 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) −
1) = (𝐴↑((𝑃 − 1) /
2))) |
51 | 47, 50 | eqtrd 2778 |
. . 3
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ (((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) =
(𝐴↑((𝑃 − 1) / 2))) |
52 | 51 | oveq1d 7270 |
. 2
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((((𝐴↑((𝑃 − 1) / 2)) + 1) + -1) mod
𝑃) = ((𝐴↑((𝑃 − 1) / 2)) mod 𝑃)) |
53 | 37, 44, 52 | 3eqtr3d 2786 |
1
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) mod
𝑃) = ((𝐴↑((𝑃 − 1) / 2)) mod 𝑃)) |