Proof of Theorem lgsqrmodndvds
Step | Hyp | Ref
| Expression |
1 | | lgsqrmod 26405 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) = 1
→ ∃𝑥 ∈
ℤ ((𝑥↑2) mod
𝑃) = (𝐴 mod 𝑃))) |
2 | 1 | imp 406 |
. . 3
⊢ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) → ∃𝑥 ∈
ℤ ((𝑥↑2) mod
𝑃) = (𝐴 mod 𝑃)) |
3 | | eldifi 4057 |
. . . . . . . . 9
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℙ) |
4 | | prmnn 16307 |
. . . . . . . . 9
⊢ (𝑃 ∈ ℙ → 𝑃 ∈
ℕ) |
5 | 3, 4 | syl 17 |
. . . . . . . 8
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℕ) |
6 | 5 | ad3antlr 727 |
. . . . . . 7
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ 𝑃 ∈
ℕ) |
7 | | zsqcl 13776 |
. . . . . . . 8
⊢ (𝑥 ∈ ℤ → (𝑥↑2) ∈
ℤ) |
8 | 7 | adantl 481 |
. . . . . . 7
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ (𝑥↑2) ∈
ℤ) |
9 | | simplll 771 |
. . . . . . 7
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ 𝐴 ∈
ℤ) |
10 | | moddvds 15902 |
. . . . . . 7
⊢ ((𝑃 ∈ ℕ ∧ (𝑥↑2) ∈ ℤ ∧
𝐴 ∈ ℤ) →
(((𝑥↑2) mod 𝑃) = (𝐴 mod 𝑃) ↔ 𝑃 ∥ ((𝑥↑2) − 𝐴))) |
11 | 6, 8, 9, 10 | syl3anc 1369 |
. . . . . 6
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ (((𝑥↑2) mod
𝑃) = (𝐴 mod 𝑃) ↔ 𝑃 ∥ ((𝑥↑2) − 𝐴))) |
12 | 5 | nnzd 12354 |
. . . . . . . . . . . . . 14
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℤ) |
13 | 12 | ad3antlr 727 |
. . . . . . . . . . . . 13
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ 𝑃 ∈
ℤ) |
14 | 13, 8, 9 | 3jca 1126 |
. . . . . . . . . . . 12
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ (𝑃 ∈ ℤ
∧ (𝑥↑2) ∈
ℤ ∧ 𝐴 ∈
ℤ)) |
15 | 14 | adantl 481 |
. . . . . . . . . . 11
⊢ ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → (𝑃 ∈ ℤ ∧ (𝑥↑2) ∈ ℤ ∧ 𝐴 ∈
ℤ)) |
16 | | dvdssub2 15938 |
. . . . . . . . . . 11
⊢ (((𝑃 ∈ ℤ ∧ (𝑥↑2) ∈ ℤ ∧
𝐴 ∈ ℤ) ∧
𝑃 ∥ ((𝑥↑2) − 𝐴)) → (𝑃 ∥ (𝑥↑2) ↔ 𝑃 ∥ 𝐴)) |
17 | 15, 16 | sylan 579 |
. . . . . . . . . 10
⊢ (((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) ∧ 𝑃 ∥ ((𝑥↑2) − 𝐴)) → (𝑃 ∥ (𝑥↑2) ↔ 𝑃 ∥ 𝐴)) |
18 | 17 | ex 412 |
. . . . . . . . 9
⊢ ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → (𝑃 ∥ ((𝑥↑2) − 𝐴) → (𝑃 ∥ (𝑥↑2) ↔ 𝑃 ∥ 𝐴))) |
19 | | bicom 221 |
. . . . . . . . . 10
⊢ ((𝑃 ∥ (𝑥↑2) ↔ 𝑃 ∥ 𝐴) ↔ (𝑃 ∥ 𝐴 ↔ 𝑃 ∥ (𝑥↑2))) |
20 | 3 | ad3antlr 727 |
. . . . . . . . . . . . 13
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ 𝑃 ∈
ℙ) |
21 | | simpr 484 |
. . . . . . . . . . . . 13
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ 𝑥 ∈
ℤ) |
22 | | 2nn 11976 |
. . . . . . . . . . . . . 14
⊢ 2 ∈
ℕ |
23 | 22 | a1i 11 |
. . . . . . . . . . . . 13
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ 2 ∈ ℕ) |
24 | | prmdvdsexp 16348 |
. . . . . . . . . . . . 13
⊢ ((𝑃 ∈ ℙ ∧ 𝑥 ∈ ℤ ∧ 2 ∈
ℕ) → (𝑃 ∥
(𝑥↑2) ↔ 𝑃 ∥ 𝑥)) |
25 | 20, 21, 23, 24 | syl3anc 1369 |
. . . . . . . . . . . 12
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ (𝑃 ∥ (𝑥↑2) ↔ 𝑃 ∥ 𝑥)) |
26 | 25 | biimparc 479 |
. . . . . . . . . . 11
⊢ ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → 𝑃 ∥ (𝑥↑2)) |
27 | | bianir 1055 |
. . . . . . . . . . . . . 14
⊢ ((𝑃 ∥ (𝑥↑2) ∧ (𝑃 ∥ 𝐴 ↔ 𝑃 ∥ (𝑥↑2))) → 𝑃 ∥ 𝐴) |
28 | 5 | ad2antlr 723 |
. . . . . . . . . . . . . . . . 17
⊢ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) → 𝑃 ∈
ℕ) |
29 | | dvdsmod0 15897 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝑃 ∈ ℕ ∧ 𝑃 ∥ 𝐴) → (𝐴 mod 𝑃) = 0) |
30 | 29 | ex 412 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑃 ∈ ℕ → (𝑃 ∥ 𝐴 → (𝐴 mod 𝑃) = 0)) |
31 | 28, 30 | syl 17 |
. . . . . . . . . . . . . . . 16
⊢ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) → (𝑃 ∥ 𝐴 → (𝐴 mod 𝑃) = 0)) |
32 | | lgsprme0 26392 |
. . . . . . . . . . . . . . . . . . . 20
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ ℙ) → ((𝐴 /L 𝑃) = 0 ↔ (𝐴 mod 𝑃) = 0)) |
33 | 3, 32 | sylan2 592 |
. . . . . . . . . . . . . . . . . . 19
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) = 0
↔ (𝐴 mod 𝑃) = 0)) |
34 | | eqeq1 2742 |
. . . . . . . . . . . . . . . . . . . 20
⊢ ((𝐴 /L 𝑃) = 0 → ((𝐴 /L 𝑃) = 1 ↔ 0 = 1)) |
35 | | 0ne1 11974 |
. . . . . . . . . . . . . . . . . . . . 21
⊢ 0 ≠
1 |
36 | | eqneqall 2953 |
. . . . . . . . . . . . . . . . . . . . 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 406 |
. . . . . . . . . . . . . . . 16
⊢ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) → ((𝐴 mod 𝑃) = 0 → ¬ 𝑃 ∥ 𝑥)) |
42 | 31, 41 | syld 47 |
. . . . . . . . . . . . . . 15
⊢ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) → (𝑃 ∥ 𝐴 → ¬ 𝑃 ∥ 𝑥)) |
43 | 42 | ad2antrl 724 |
. . . . . . . . . . . . . 14
⊢ ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → (𝑃 ∥ 𝐴 → ¬ 𝑃 ∥ 𝑥)) |
44 | 27, 43 | syl5com 31 |
. . . . . . . . . . . . 13
⊢ ((𝑃 ∥ (𝑥↑2) ∧ (𝑃 ∥ 𝐴 ↔ 𝑃 ∥ (𝑥↑2))) → ((𝑃 ∥ 𝑥 ∧ (((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2})) ∧ (𝐴 /L 𝑃) = 1) ∧ 𝑥 ∈ ℤ)) → ¬ 𝑃 ∥ 𝑥)) |
45 | 44 | ex 412 |
. . . . . . . . . . . 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 412 |
. . . . . . 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 550 |
. . . 4
⊢ ((((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
∧ (𝐴
/L 𝑃) =
1) ∧ 𝑥 ∈ ℤ)
→ (((𝑥↑2) mod
𝑃) = (𝐴 mod 𝑃) → (((𝑥↑2) mod 𝑃) = (𝐴 mod 𝑃) ∧ ¬ 𝑃 ∥ 𝑥))) |
55 | 54 | reximdva 3202 |
. . 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 412 |
1
⊢ ((𝐴 ∈ ℤ ∧ 𝑃 ∈ (ℙ ∖ {2}))
→ ((𝐴
/L 𝑃) = 1
→ ∃𝑥 ∈
ℤ (((𝑥↑2) mod
𝑃) = (𝐴 mod 𝑃) ∧ ¬ 𝑃 ∥ 𝑥))) |