Proof of Theorem lgsqrmodndvds
Step | Hyp | Ref
| Expression |
1 | | lgsqrmod 26500 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) = 1
→ ∃𝑥 ∈
ℤ ((𝑥↑2) mod
𝑃) = (𝐴 mod 𝑃))) |
2 | 1 | imp 407 |
. . 3
⊢ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) → ∃𝑥 ∈
ℤ ((𝑥↑2) mod
𝑃) = (𝐴 mod 𝑃)) |
3 | | eldifi 4061 |
. . . . . . . . 9
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℙ) |
4 | | prmnn 16379 |
. . . . . . . . 9
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℕ) |
5 | 3, 4 | syl 17 |
. . . . . . . 8
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℕ) |
6 | 5 | ad3antlr 728 |
. . . . . . 7
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ 𝑃 ∈
ℕ) |
7 | | zsqcl 13848 |
. . . . . . . 8
⊢ (𝑥 ∈ ℤ → (𝑥↑2) ∈
ℤ) |
8 | 7 | adantl 482 |
. . . . . . 7
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ (𝑥↑2) ∈
ℤ) |
9 | | simplll 772 |
. . . . . . 7
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ 𝐴 ∈
ℤ) |
10 | | moddvds 15974 |
. . . . . . 7
⊢ ((𝑃 ∈ ℕ ∧ (𝑥↑2) ∈ ℤ ∧
𝐴 ∈ ℤ) →
(((𝑥↑2) mod 𝑃) = (𝐴 mod 𝑃) ↔ 𝑃 ∥ ((𝑥↑2) − 𝐴))) |
11 | 6, 8, 9, 10 | syl3anc 1370 |
. . . . . 6
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ (((𝑥↑2) mod
𝑃) = (𝐴 mod 𝑃) ↔ 𝑃 ∥ ((𝑥↑2) − 𝐴))) |
12 | 5 | nnzd 12425 |
. . . . . . . . . . . . . 14
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℤ) |
13 | 12 | ad3antlr 728 |
. . . . . . . . . . . . 13
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ 𝑃 ∈
ℤ) |
14 | 13, 8, 9 | 3jca 1127 |
. . . . . . . . . . . 12
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ (𝑃 ∈ ℤ
∧ (𝑥↑2) ∈
ℤ ∧ 𝐴 ∈
ℤ)) |
15 | 14 | adantl 482 |
. . . . . . . . . . 11
⊢ ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → (𝑃 ∈ ℤ ∧ (𝑥↑2) ∈ ℤ ∧ 𝐴 ∈
ℤ)) |
16 | | dvdssub2 16010 |
. . . . . . . . . . 11
⊢ (((𝑃 ∈ ℤ ∧ (𝑥↑2) ∈ ℤ ∧
𝐴 ∈ ℤ) ∧
𝑃 ∥ ((𝑥↑2) − 𝐴)) → (𝑃 ∥ (𝑥↑2) ↔ 𝑃 ∥ 𝐴)) |
17 | 15, 16 | sylan 580 |
. . . . . . . . . 10
⊢ (((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) ∧ 𝑃 ∥ ((𝑥↑2) − 𝐴)) → (𝑃 ∥ (𝑥↑2) ↔ 𝑃 ∥ 𝐴)) |
18 | 17 | ex 413 |
. . . . . . . . 9
⊢ ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → (𝑃 ∥ ((𝑥↑2) − 𝐴) → (𝑃 ∥ (𝑥↑2) ↔ 𝑃 ∥ 𝐴))) |
19 | | bicom 221 |
. . . . . . . . . 10
⊢ ((𝑃 ∥ (𝑥↑2) ↔ 𝑃 ∥ 𝐴) ↔ (𝑃 ∥ 𝐴 ↔ 𝑃 ∥ (𝑥↑2))) |
20 | 3 | ad3antlr 728 |
. . . . . . . . . . . . 13
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ 𝑃 ∈
ℙ) |
21 | | simpr 485 |
. . . . . . . . . . . . 13
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ 𝑥 ∈
ℤ) |
22 | | 2nn 12046 |
. . . . . . . . . . . . . 14
⊢ 2 ∈
ℕ |
23 | 22 | a1i 11 |
. . . . . . . . . . . . 13
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ 2 ∈ ℕ) |
24 | | prmdvdsexp 16420 |
. . . . . . . . . . . . 13
⊢ ((𝑃 ∈ ℙ ∧ 𝑥 ∈ ℤ ∧ 2 ∈
ℕ) → (𝑃 ∥
(𝑥↑2) ↔ 𝑃 ∥ 𝑥)) |
25 | 20, 21, 23, 24 | syl3anc 1370 |
. . . . . . . . . . . 12
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ (𝑃 ∥ (𝑥↑2) ↔ 𝑃 ∥ 𝑥)) |
26 | 25 | biimparc 480 |
. . . . . . . . . . 11
⊢ ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → 𝑃 ∥ (𝑥↑2)) |
27 | | bianir 1056 |
. . . . . . . . . . . . . 14
⊢ ((𝑃 ∥ (𝑥↑2) ∧ (𝑃 ∥ 𝐴 ↔ 𝑃 ∥ (𝑥↑2))) → 𝑃 ∥ 𝐴) |
28 | 5 | ad2antlr 724 |
. . . . . . . . . . . . . . . . 17
⊢ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) → 𝑃 ∈
ℕ) |
29 | | dvdsmod0 15969 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝑃 ∈ ℕ ∧ 𝑃 ∥ 𝐴) → (𝐴 mod 𝑃) = 0) |
30 | 29 | ex 413 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑃 ∈ ℕ → (𝑃 ∥ 𝐴 → (𝐴 mod 𝑃) = 0)) |
31 | 28, 30 | syl 17 |
. . . . . . . . . . . . . . . 16
⊢ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) → (𝑃 ∥ 𝐴 → (𝐴 mod 𝑃) = 0)) |
32 | | lgsprme0 26487 |
. . . . . . . . . . . . . . . . . . . 20
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ ℙ) → ((𝐴 /L 𝑃) = 0 ↔ (𝐴 mod 𝑃) = 0)) |
33 | 3, 32 | sylan2 593 |
. . . . . . . . . . . . . . . . . . 19
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) = 0
↔ (𝐴 mod 𝑃) = 0)) |
34 | | eqeq1 2742 |
. . . . . . . . . . . . . . . . . . . 20
⊢ ((𝐴 /L 𝑃) = 0 → ((𝐴 /L 𝑃) = 1 ↔ 0 = 1)) |
35 | | 0ne1 12044 |
. . . . . . . . . . . . . . . . . . . . 21
⊢ 0 ≠
1 |
36 | | eqneqall 2954 |
. . . . . . . . . . . . . . . . . . . . 21
⊢ (0 = 1
→ (0 ≠ 1 → ¬ 𝑃 ∥ 𝑥)) |
37 | 35, 36 | mpi 20 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (0 = 1
→ ¬ 𝑃 ∥
𝑥) |
38 | 34, 37 | syl6bi 252 |
. . . . . . . . . . . . . . . . . . 19
⊢ ((𝐴 /L 𝑃) = 0 → ((𝐴 /L 𝑃) = 1 → ¬ 𝑃 ∥ 𝑥)) |
39 | 33, 38 | syl6bir 253 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴 mod 𝑃) = 0 → ((𝐴 /L 𝑃) = 1 → ¬ 𝑃 ∥ 𝑥))) |
40 | 39 | com23 86 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) = 1
→ ((𝐴 mod 𝑃) = 0 → ¬ 𝑃 ∥ 𝑥))) |
41 | 40 | imp 407 |
. . . . . . . . . . . . . . . 16
⊢ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) → ((𝐴 mod 𝑃) = 0 → ¬ 𝑃 ∥ 𝑥)) |
42 | 31, 41 | syld 47 |
. . . . . . . . . . . . . . 15
⊢ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) → (𝑃 ∥ 𝐴 → ¬ 𝑃 ∥ 𝑥)) |
43 | 42 | ad2antrl 725 |
. . . . . . . . . . . . . 14
⊢ ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → (𝑃 ∥ 𝐴 → ¬ 𝑃 ∥ 𝑥)) |
44 | 27, 43 | syl5com 31 |
. . . . . . . . . . . . 13
⊢ ((𝑃 ∥ (𝑥↑2) ∧ (𝑃 ∥ 𝐴 ↔ 𝑃 ∥ (𝑥↑2))) → ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → ¬ 𝑃 ∥ 𝑥)) |
45 | 44 | ex 413 |
. . . . . . . . . . . 12
⊢ (𝑃 ∥ (𝑥↑2) → ((𝑃 ∥ 𝐴 ↔ 𝑃 ∥ (𝑥↑2)) → ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → ¬ 𝑃 ∥ 𝑥))) |
46 | 45 | com23 86 |
. . . . . . . . . . 11
⊢ (𝑃 ∥ (𝑥↑2) → ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → ((𝑃 ∥ 𝐴 ↔ 𝑃 ∥ (𝑥↑2)) → ¬ 𝑃 ∥ 𝑥))) |
47 | 26, 46 | mpcom 38 |
. . . . . . . . . 10
⊢ ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → ((𝑃 ∥ 𝐴 ↔ 𝑃 ∥ (𝑥↑2)) → ¬ 𝑃 ∥ 𝑥)) |
48 | 19, 47 | syl5bi 241 |
. . . . . . . . 9
⊢ ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → ((𝑃 ∥ (𝑥↑2) ↔ 𝑃 ∥ 𝐴) → ¬ 𝑃 ∥ 𝑥)) |
49 | 18, 48 | syld 47 |
. . . . . . . 8
⊢ ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → (𝑃 ∥ ((𝑥↑2) − 𝐴) → ¬ 𝑃 ∥ 𝑥)) |
50 | 49 | ex 413 |
. . . . . . 7
⊢ (𝑃 ∥ 𝑥 → ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ) → (𝑃 ∥ ((𝑥↑2) − 𝐴) → ¬ 𝑃 ∥ 𝑥))) |
51 | | 2a1 28 |
. . . . . . 7
⊢ (¬
𝑃 ∥ 𝑥 → ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ) → (𝑃 ∥ ((𝑥↑2) − 𝐴) → ¬ 𝑃 ∥ 𝑥))) |
52 | 50, 51 | pm2.61i 182 |
. . . . . 6
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ (𝑃 ∥ ((𝑥↑2) − 𝐴) → ¬ 𝑃 ∥ 𝑥)) |
53 | 11, 52 | sylbid 239 |
. . . . 5
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ (((𝑥↑2) mod
𝑃) = (𝐴 mod 𝑃) → ¬ 𝑃 ∥ 𝑥)) |
54 | 53 | ancld 551 |
. . . 4
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ (((𝑥↑2) mod
𝑃) = (𝐴 mod 𝑃) → (((𝑥↑2) mod 𝑃) = (𝐴 mod 𝑃) ∧ ¬ 𝑃 ∥ 𝑥))) |
55 | 54 | reximdva 3203 |
. . 3
⊢ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) → (∃𝑥 ∈
ℤ ((𝑥↑2) mod
𝑃) = (𝐴 mod 𝑃) → ∃𝑥 ∈ ℤ (((𝑥↑2) mod 𝑃) = (𝐴 mod 𝑃) ∧ ¬ 𝑃 ∥ 𝑥))) |
56 | 2, 55 | mpd 15 |
. 2
⊢ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) → ∃𝑥 ∈
ℤ (((𝑥↑2) mod
𝑃) = (𝐴 mod 𝑃) ∧ ¬ 𝑃 ∥ 𝑥)) |
57 | 56 | ex 413 |
1
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) = 1
→ ∃𝑥 ∈
ℤ (((𝑥↑2) mod
𝑃) = (𝐴 mod 𝑃) ∧ ¬ 𝑃 ∥ 𝑥))) |