Proof of Theorem lgsdir2lem5
Step | Hyp | Ref
| Expression |
1 | | 8nn 9020 |
. . . . . . . . 9
⊢ 8 ∈
ℕ |
2 | | zmodcl 10275 |
. . . . . . . . 9
⊢ ((𝐴 ∈ ℤ ∧ 8 ∈
ℕ) → (𝐴 mod 8)
∈ ℕ0) |
3 | 1, 2 | mpan2 422 |
. . . . . . . 8
⊢ (𝐴 ∈ ℤ → (𝐴 mod 8) ∈
ℕ0) |
4 | 3 | adantr 274 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (𝐴 mod 8) ∈
ℕ0) |
5 | | elprg 3595 |
. . . . . . 7
⊢ ((𝐴 mod 8) ∈
ℕ0 → ((𝐴 mod 8) ∈ {3, 5} ↔ ((𝐴 mod 8) = 3 ∨ (𝐴 mod 8) = 5))) |
6 | 4, 5 | syl 14 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → ((𝐴 mod 8) ∈ {3, 5} ↔
((𝐴 mod 8) = 3 ∨ (𝐴 mod 8) = 5))) |
7 | | zmodcl 10275 |
. . . . . . . . 9
⊢ ((𝐵 ∈ ℤ ∧ 8 ∈
ℕ) → (𝐵 mod 8)
∈ ℕ0) |
8 | 1, 7 | mpan2 422 |
. . . . . . . 8
⊢ (𝐵 ∈ ℤ → (𝐵 mod 8) ∈
ℕ0) |
9 | 8 | adantl 275 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (𝐵 mod 8) ∈
ℕ0) |
10 | | elprg 3595 |
. . . . . . 7
⊢ ((𝐵 mod 8) ∈
ℕ0 → ((𝐵 mod 8) ∈ {3, 5} ↔ ((𝐵 mod 8) = 3 ∨ (𝐵 mod 8) = 5))) |
11 | 9, 10 | syl 14 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → ((𝐵 mod 8) ∈ {3, 5} ↔
((𝐵 mod 8) = 3 ∨ (𝐵 mod 8) = 5))) |
12 | 6, 11 | anbi12d 465 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5})
↔ (((𝐴 mod 8) = 3 ∨
(𝐴 mod 8) = 5) ∧
((𝐵 mod 8) = 3 ∨ (𝐵 mod 8) = 5)))) |
13 | | simpll 519 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → 𝐴 ∈
ℤ) |
14 | | 3z 9216 |
. . . . . . . . . 10
⊢ 3 ∈
ℤ |
15 | 14 | a1i 9 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → 3 ∈
ℤ) |
16 | | simplr 520 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → 𝐵 ∈
ℤ) |
17 | | nnq 9567 |
. . . . . . . . . . 11
⊢ (8 ∈
ℕ → 8 ∈ ℚ) |
18 | 1, 17 | ax-mp 5 |
. . . . . . . . . 10
⊢ 8 ∈
ℚ |
19 | 18 | a1i 9 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → 8 ∈
ℚ) |
20 | | 8pos 8956 |
. . . . . . . . . 10
⊢ 0 <
8 |
21 | 20 | a1i 9 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → 0 <
8) |
22 | | simprl 521 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → (𝐴 mod 8) = 3) |
23 | | lgsdir2lem1 13529 |
. . . . . . . . . . . 12
⊢ (((1 mod
8) = 1 ∧ (-1 mod 8) = 7) ∧ ((3 mod 8) = 3 ∧ (-3 mod 8) =
5)) |
24 | 23 | simpri 112 |
. . . . . . . . . . 11
⊢ ((3 mod
8) = 3 ∧ (-3 mod 8) = 5) |
25 | 24 | simpli 110 |
. . . . . . . . . 10
⊢ (3 mod 8)
= 3 |
26 | 22, 25 | eqtr4di 2216 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → (𝐴 mod 8) = (3 mod
8)) |
27 | | simprr 522 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → (𝐵 mod 8) = 3) |
28 | 27, 25 | eqtr4di 2216 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → (𝐵 mod 8) = (3 mod
8)) |
29 | 13, 15, 16, 15, 19, 21, 26, 28 | modqmul12d 10309 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → ((𝐴 · 𝐵) mod 8) = ((3 · 3) mod
8)) |
30 | 29 | orcd 723 |
. . . . . . 7
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → (((𝐴 · 𝐵) mod 8) = ((3 · 3) mod 8) ∨
((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8))) |
31 | 30 | ex 114 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3) → (((𝐴 · 𝐵) mod 8) = ((3 · 3) mod 8) ∨
((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8)))) |
32 | | simpll 519 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → 𝐴 ∈
ℤ) |
33 | | znegcl 9218 |
. . . . . . . . . . 11
⊢ (3 ∈
ℤ → -3 ∈ ℤ) |
34 | 14, 33 | mp1i 10 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → -3 ∈
ℤ) |
35 | | simplr 520 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → 𝐵 ∈
ℤ) |
36 | 14 | a1i 9 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → 3 ∈
ℤ) |
37 | 18 | a1i 9 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → 8 ∈
ℚ) |
38 | 20 | a1i 9 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → 0 <
8) |
39 | | simprl 521 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → (𝐴 mod 8) = 5) |
40 | 24 | simpri 112 |
. . . . . . . . . . 11
⊢ (-3 mod
8) = 5 |
41 | 39, 40 | eqtr4di 2216 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → (𝐴 mod 8) = (-3 mod
8)) |
42 | | simprr 522 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → (𝐵 mod 8) = 3) |
43 | 42, 25 | eqtr4di 2216 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → (𝐵 mod 8) = (3 mod
8)) |
44 | 32, 34, 35, 36, 37, 38, 41, 43 | modqmul12d 10309 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → ((𝐴 · 𝐵) mod 8) = ((-3 · 3) mod
8)) |
45 | | 3cn 8928 |
. . . . . . . . . . 11
⊢ 3 ∈
ℂ |
46 | 45, 45 | mulneg1i 8298 |
. . . . . . . . . 10
⊢ (-3
· 3) = -(3 · 3) |
47 | 46 | oveq1i 5851 |
. . . . . . . . 9
⊢ ((-3
· 3) mod 8) = (-(3 · 3) mod 8) |
48 | 44, 47 | eqtrdi 2214 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → ((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8)) |
49 | 48 | olcd 724 |
. . . . . . 7
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → (((𝐴 · 𝐵) mod 8) = ((3 · 3) mod 8) ∨
((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8))) |
50 | 49 | ex 114 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3) → (((𝐴 · 𝐵) mod 8) = ((3 · 3) mod 8) ∨
((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8)))) |
51 | | simpll 519 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → 𝐴 ∈
ℤ) |
52 | 14 | a1i 9 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → 3 ∈
ℤ) |
53 | | simplr 520 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → 𝐵 ∈
ℤ) |
54 | 14, 33 | mp1i 10 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → -3 ∈
ℤ) |
55 | 18 | a1i 9 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → 8 ∈
ℚ) |
56 | 20 | a1i 9 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → 0 <
8) |
57 | | simprl 521 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → (𝐴 mod 8) = 3) |
58 | 57, 25 | eqtr4di 2216 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → (𝐴 mod 8) = (3 mod
8)) |
59 | | simprr 522 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → (𝐵 mod 8) = 5) |
60 | 59, 40 | eqtr4di 2216 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → (𝐵 mod 8) = (-3 mod
8)) |
61 | 51, 52, 53, 54, 55, 56, 58, 60 | modqmul12d 10309 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → ((𝐴 · 𝐵) mod 8) = ((3 · -3) mod
8)) |
62 | 45, 45 | mulneg2i 8299 |
. . . . . . . . . 10
⊢ (3
· -3) = -(3 · 3) |
63 | 62 | oveq1i 5851 |
. . . . . . . . 9
⊢ ((3
· -3) mod 8) = (-(3 · 3) mod 8) |
64 | 61, 63 | eqtrdi 2214 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → ((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8)) |
65 | 64 | olcd 724 |
. . . . . . 7
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → (((𝐴 · 𝐵) mod 8) = ((3 · 3) mod 8) ∨
((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8))) |
66 | 65 | ex 114 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5) → (((𝐴 · 𝐵) mod 8) = ((3 · 3) mod 8) ∨
((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8)))) |
67 | | simpll 519 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → 𝐴 ∈
ℤ) |
68 | 14, 33 | mp1i 10 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → -3 ∈
ℤ) |
69 | | simplr 520 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → 𝐵 ∈
ℤ) |
70 | 18 | a1i 9 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → 8 ∈
ℚ) |
71 | 20 | a1i 9 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → 0 <
8) |
72 | | simprl 521 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → (𝐴 mod 8) = 5) |
73 | 72, 40 | eqtr4di 2216 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → (𝐴 mod 8) = (-3 mod
8)) |
74 | | simprr 522 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → (𝐵 mod 8) = 5) |
75 | 74, 40 | eqtr4di 2216 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → (𝐵 mod 8) = (-3 mod
8)) |
76 | 67, 68, 69, 68, 70, 71, 73, 75 | modqmul12d 10309 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → ((𝐴 · 𝐵) mod 8) = ((-3 · -3) mod
8)) |
77 | 45, 45 | mul2negi 8300 |
. . . . . . . . . 10
⊢ (-3
· -3) = (3 · 3) |
78 | 77 | oveq1i 5851 |
. . . . . . . . 9
⊢ ((-3
· -3) mod 8) = ((3 · 3) mod 8) |
79 | 76, 78 | eqtrdi 2214 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → ((𝐴 · 𝐵) mod 8) = ((3 · 3) mod
8)) |
80 | 79 | orcd 723 |
. . . . . . 7
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → (((𝐴 · 𝐵) mod 8) = ((3 · 3) mod 8) ∨
((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8))) |
81 | 80 | ex 114 |
. . . . . 6
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5) → (((𝐴 · 𝐵) mod 8) = ((3 · 3) mod 8) ∨
((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8)))) |
82 | 31, 50, 66, 81 | ccased 955 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) →
((((𝐴 mod 8) = 3 ∨
(𝐴 mod 8) = 5) ∧
((𝐵 mod 8) = 3 ∨ (𝐵 mod 8) = 5)) → (((𝐴 · 𝐵) mod 8) = ((3 · 3) mod 8) ∨
((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8)))) |
83 | 12, 82 | sylbid 149 |
. . . 4
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5})
→ (((𝐴 · 𝐵) mod 8) = ((3 · 3) mod
8) ∨ ((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8)))) |
84 | 83 | imp 123 |
. . 3
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5}))
→ (((𝐴 · 𝐵) mod 8) = ((3 · 3) mod
8) ∨ ((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8))) |
85 | | simpll 519 |
. . . . . 6
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5}))
→ 𝐴 ∈
ℤ) |
86 | | simplr 520 |
. . . . . 6
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5}))
→ 𝐵 ∈
ℤ) |
87 | 85, 86 | zmulcld 9315 |
. . . . 5
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5}))
→ (𝐴 · 𝐵) ∈
ℤ) |
88 | 1 | a1i 9 |
. . . . 5
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5}))
→ 8 ∈ ℕ) |
89 | 87, 88 | zmodcld 10276 |
. . . 4
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5}))
→ ((𝐴 · 𝐵) mod 8) ∈
ℕ0) |
90 | | elprg 3595 |
. . . 4
⊢ (((𝐴 · 𝐵) mod 8) ∈ ℕ0 →
(((𝐴 · 𝐵) mod 8) ∈ {((3 · 3)
mod 8), (-(3 · 3) mod 8)} ↔ (((𝐴 · 𝐵) mod 8) = ((3 · 3) mod 8) ∨
((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8)))) |
91 | 89, 90 | syl 14 |
. . 3
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5}))
→ (((𝐴 · 𝐵) mod 8) ∈ {((3 · 3)
mod 8), (-(3 · 3) mod 8)} ↔ (((𝐴 · 𝐵) mod 8) = ((3 · 3) mod 8) ∨
((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8)))) |
92 | 84, 91 | mpbird 166 |
. 2
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5}))
→ ((𝐴 · 𝐵) mod 8) ∈ {((3 · 3)
mod 8), (-(3 · 3) mod 8)}) |
93 | | df-9 8919 |
. . . . . . . 8
⊢ 9 = (8 +
1) |
94 | | 8cn 8939 |
. . . . . . . . 9
⊢ 8 ∈
ℂ |
95 | | ax-1cn 7842 |
. . . . . . . . 9
⊢ 1 ∈
ℂ |
96 | 94, 95 | addcomi 8038 |
. . . . . . . 8
⊢ (8 + 1) =
(1 + 8) |
97 | 93, 96 | eqtri 2186 |
. . . . . . 7
⊢ 9 = (1 +
8) |
98 | | 3t3e9 9010 |
. . . . . . 7
⊢ (3
· 3) = 9 |
99 | 94 | mulid2i 7898 |
. . . . . . . 8
⊢ (1
· 8) = 8 |
100 | 99 | oveq2i 5852 |
. . . . . . 7
⊢ (1 + (1
· 8)) = (1 + 8) |
101 | 97, 98, 100 | 3eqtr4i 2196 |
. . . . . 6
⊢ (3
· 3) = (1 + (1 · 8)) |
102 | 101 | oveq1i 5851 |
. . . . 5
⊢ ((3
· 3) mod 8) = ((1 + (1 · 8)) mod 8) |
103 | | 1nn 8864 |
. . . . . . 7
⊢ 1 ∈
ℕ |
104 | | nnq 9567 |
. . . . . . 7
⊢ (1 ∈
ℕ → 1 ∈ ℚ) |
105 | 103, 104 | ax-mp 5 |
. . . . . 6
⊢ 1 ∈
ℚ |
106 | | 1z 9213 |
. . . . . 6
⊢ 1 ∈
ℤ |
107 | | modqcyc 10290 |
. . . . . 6
⊢ (((1
∈ ℚ ∧ 1 ∈ ℤ) ∧ (8 ∈ ℚ ∧ 0 < 8))
→ ((1 + (1 · 8)) mod 8) = (1 mod 8)) |
108 | 105, 106,
18, 20, 107 | mp4an 424 |
. . . . 5
⊢ ((1 + (1
· 8)) mod 8) = (1 mod 8) |
109 | 102, 108 | eqtri 2186 |
. . . 4
⊢ ((3
· 3) mod 8) = (1 mod 8) |
110 | 23 | simpli 110 |
. . . . 5
⊢ ((1 mod
8) = 1 ∧ (-1 mod 8) = 7) |
111 | 110 | simpli 110 |
. . . 4
⊢ (1 mod 8)
= 1 |
112 | 109, 111 | eqtri 2186 |
. . 3
⊢ ((3
· 3) mod 8) = 1 |
113 | | znegcl 9218 |
. . . . . . . 8
⊢ (1 ∈
ℤ → -1 ∈ ℤ) |
114 | 106, 113 | mp1i 10 |
. . . . . . 7
⊢ (⊤
→ -1 ∈ ℤ) |
115 | | 3nn 9015 |
. . . . . . . . . 10
⊢ 3 ∈
ℕ |
116 | 115, 115 | nnmulcli 8875 |
. . . . . . . . 9
⊢ (3
· 3) ∈ ℕ |
117 | 116 | nnzi 9208 |
. . . . . . . 8
⊢ (3
· 3) ∈ ℤ |
118 | 117 | a1i 9 |
. . . . . . 7
⊢ (⊤
→ (3 · 3) ∈ ℤ) |
119 | 106 | a1i 9 |
. . . . . . 7
⊢ (⊤
→ 1 ∈ ℤ) |
120 | 18 | a1i 9 |
. . . . . . 7
⊢ (⊤
→ 8 ∈ ℚ) |
121 | 20 | a1i 9 |
. . . . . . 7
⊢ (⊤
→ 0 < 8) |
122 | | eqidd 2166 |
. . . . . . 7
⊢ (⊤
→ (-1 mod 8) = (-1 mod 8)) |
123 | 109 | a1i 9 |
. . . . . . 7
⊢ (⊤
→ ((3 · 3) mod 8) = (1 mod 8)) |
124 | 114, 114,
118, 119, 120, 121, 122, 123 | modqmul12d 10309 |
. . . . . 6
⊢ (⊤
→ ((-1 · (3 · 3)) mod 8) = ((-1 · 1) mod
8)) |
125 | 124 | mptru 1352 |
. . . . 5
⊢ ((-1
· (3 · 3)) mod 8) = ((-1 · 1) mod 8) |
126 | 45, 45 | mulcli 7900 |
. . . . . . 7
⊢ (3
· 3) ∈ ℂ |
127 | 126 | mulm1i 8297 |
. . . . . 6
⊢ (-1
· (3 · 3)) = -(3 · 3) |
128 | 127 | oveq1i 5851 |
. . . . 5
⊢ ((-1
· (3 · 3)) mod 8) = (-(3 · 3) mod 8) |
129 | 95 | mulm1i 8297 |
. . . . . 6
⊢ (-1
· 1) = -1 |
130 | 129 | oveq1i 5851 |
. . . . 5
⊢ ((-1
· 1) mod 8) = (-1 mod 8) |
131 | 125, 128,
130 | 3eqtr3i 2194 |
. . . 4
⊢ (-(3
· 3) mod 8) = (-1 mod 8) |
132 | 110 | simpri 112 |
. . . 4
⊢ (-1 mod
8) = 7 |
133 | 131, 132 | eqtri 2186 |
. . 3
⊢ (-(3
· 3) mod 8) = 7 |
134 | 112, 133 | preq12i 3657 |
. 2
⊢ {((3
· 3) mod 8), (-(3 · 3) mod 8)} = {1, 7} |
135 | 92, 134 | eleqtrdi 2258 |
1
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5}))
→ ((𝐴 · 𝐵) mod 8) ∈ {1,
7}) |