Proof of Theorem lgsdir2lem5
Step | Hyp | Ref
| Expression |
1 | | 8nn 9045 |
. . . . . . . . 9
⊢ 8 ∈
ℕ |
2 | | zmodcl 10300 |
. . . . . . . . 9
⊢ ((𝐴 ∈ ℤ ∧ 8 ∈
ℕ) → (𝐴 mod 8)
∈ ℕ0) |
3 | 1, 2 | mpan2 423 |
. . . . . . . 8
⊢ (𝐴 ∈ ℤ → (𝐴 mod 8) ∈
ℕ0) |
4 | 3 | adantr 274 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (𝐴 mod 8) ∈
ℕ0) |
5 | | elprg 3603 |
. . . . . . 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 10300 |
. . . . . . . . 9
⊢ ((𝐵 ∈ ℤ ∧ 8 ∈
ℕ) → (𝐵 mod 8)
∈ ℕ0) |
8 | 1, 7 | mpan2 423 |
. . . . . . . 8
⊢ (𝐵 ∈ ℤ → (𝐵 mod 8) ∈
ℕ0) |
9 | 8 | adantl 275 |
. . . . . . 7
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (𝐵 mod 8) ∈
ℕ0) |
10 | | elprg 3603 |
. . . . . . 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 470 |
. . . . 5
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5})
↔ (((𝐴 mod 8) = 3 ∨
(𝐴 mod 8) = 5) ∧
((𝐵 mod 8) = 3 ∨ (𝐵 mod 8) = 5)))) |
13 | | simpll 524 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → 𝐴 ∈
ℤ) |
14 | | 3z 9241 |
. . . . . . . . . 10
⊢ 3 ∈
ℤ |
15 | 14 | a1i 9 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → 3 ∈
ℤ) |
16 | | simplr 525 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → 𝐵 ∈
ℤ) |
17 | | nnq 9592 |
. . . . . . . . . . 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 8981 |
. . . . . . . . . 10
⊢ 0 <
8 |
21 | 20 | a1i 9 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → 0 <
8) |
22 | | simprl 526 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → (𝐴 mod 8) = 3) |
23 | | lgsdir2lem1 13723 |
. . . . . . . . . . . 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 2221 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → (𝐴 mod 8) = (3 mod
8)) |
27 | | simprr 527 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → (𝐵 mod 8) = 3) |
28 | 27, 25 | eqtr4di 2221 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → (𝐵 mod 8) = (3 mod
8)) |
29 | 13, 15, 16, 15, 19, 21, 26, 28 | modqmul12d 10334 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 3)) → ((𝐴 · 𝐵) mod 8) = ((3 · 3) mod
8)) |
30 | 29 | orcd 728 |
. . . . . . 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 524 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → 𝐴 ∈
ℤ) |
33 | | znegcl 9243 |
. . . . . . . . . . 11
⊢ (3 ∈
ℤ → -3 ∈ ℤ) |
34 | 14, 33 | mp1i 10 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → -3 ∈
ℤ) |
35 | | simplr 525 |
. . . . . . . . . 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 526 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → (𝐴 mod 8) = 5) |
40 | 24 | simpri 112 |
. . . . . . . . . . 11
⊢ (-3 mod
8) = 5 |
41 | 39, 40 | eqtr4di 2221 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → (𝐴 mod 8) = (-3 mod
8)) |
42 | | simprr 527 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → (𝐵 mod 8) = 3) |
43 | 42, 25 | eqtr4di 2221 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → (𝐵 mod 8) = (3 mod
8)) |
44 | 32, 34, 35, 36, 37, 38, 41, 43 | modqmul12d 10334 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → ((𝐴 · 𝐵) mod 8) = ((-3 · 3) mod
8)) |
45 | | 3cn 8953 |
. . . . . . . . . . 11
⊢ 3 ∈
ℂ |
46 | 45, 45 | mulneg1i 8323 |
. . . . . . . . . 10
⊢ (-3
· 3) = -(3 · 3) |
47 | 46 | oveq1i 5863 |
. . . . . . . . 9
⊢ ((-3
· 3) mod 8) = (-(3 · 3) mod 8) |
48 | 44, 47 | eqtrdi 2219 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 3)) → ((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8)) |
49 | 48 | olcd 729 |
. . . . . . 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 524 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → 𝐴 ∈
ℤ) |
52 | 14 | a1i 9 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → 3 ∈
ℤ) |
53 | | simplr 525 |
. . . . . . . . . 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 526 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → (𝐴 mod 8) = 3) |
58 | 57, 25 | eqtr4di 2221 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → (𝐴 mod 8) = (3 mod
8)) |
59 | | simprr 527 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → (𝐵 mod 8) = 5) |
60 | 59, 40 | eqtr4di 2221 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → (𝐵 mod 8) = (-3 mod
8)) |
61 | 51, 52, 53, 54, 55, 56, 58, 60 | modqmul12d 10334 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → ((𝐴 · 𝐵) mod 8) = ((3 · -3) mod
8)) |
62 | 45, 45 | mulneg2i 8324 |
. . . . . . . . . 10
⊢ (3
· -3) = -(3 · 3) |
63 | 62 | oveq1i 5863 |
. . . . . . . . 9
⊢ ((3
· -3) mod 8) = (-(3 · 3) mod 8) |
64 | 61, 63 | eqtrdi 2219 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 3 ∧ (𝐵 mod 8) = 5)) → ((𝐴 · 𝐵) mod 8) = (-(3 · 3) mod
8)) |
65 | 64 | olcd 729 |
. . . . . . 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 524 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → 𝐴 ∈
ℤ) |
68 | 14, 33 | mp1i 10 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → -3 ∈
ℤ) |
69 | | simplr 525 |
. . . . . . . . . 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 526 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → (𝐴 mod 8) = 5) |
73 | 72, 40 | eqtr4di 2221 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → (𝐴 mod 8) = (-3 mod
8)) |
74 | | simprr 527 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → (𝐵 mod 8) = 5) |
75 | 74, 40 | eqtr4di 2221 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → (𝐵 mod 8) = (-3 mod
8)) |
76 | 67, 68, 69, 68, 70, 71, 73, 75 | modqmul12d 10334 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → ((𝐴 · 𝐵) mod 8) = ((-3 · -3) mod
8)) |
77 | 45, 45 | mul2negi 8325 |
. . . . . . . . . 10
⊢ (-3
· -3) = (3 · 3) |
78 | 77 | oveq1i 5863 |
. . . . . . . . 9
⊢ ((-3
· -3) mod 8) = ((3 · 3) mod 8) |
79 | 76, 78 | eqtrdi 2219 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) = 5 ∧ (𝐵 mod 8) = 5)) → ((𝐴 · 𝐵) mod 8) = ((3 · 3) mod
8)) |
80 | 79 | orcd 728 |
. . . . . . 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 960 |
. . . . 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 524 |
. . . . . 6
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5}))
→ 𝐴 ∈
ℤ) |
86 | | simplr 525 |
. . . . . 6
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5}))
→ 𝐵 ∈
ℤ) |
87 | 85, 86 | zmulcld 9340 |
. . . . 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 10301 |
. . . 4
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5}))
→ ((𝐴 · 𝐵) mod 8) ∈
ℕ0) |
90 | | elprg 3603 |
. . . 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 8944 |
. . . . . . . 8
⊢ 9 = (8 +
1) |
94 | | 8cn 8964 |
. . . . . . . . 9
⊢ 8 ∈
ℂ |
95 | | ax-1cn 7867 |
. . . . . . . . 9
⊢ 1 ∈
ℂ |
96 | 94, 95 | addcomi 8063 |
. . . . . . . 8
⊢ (8 + 1) =
(1 + 8) |
97 | 93, 96 | eqtri 2191 |
. . . . . . 7
⊢ 9 = (1 +
8) |
98 | | 3t3e9 9035 |
. . . . . . 7
⊢ (3
· 3) = 9 |
99 | 94 | mulid2i 7923 |
. . . . . . . 8
⊢ (1
· 8) = 8 |
100 | 99 | oveq2i 5864 |
. . . . . . 7
⊢ (1 + (1
· 8)) = (1 + 8) |
101 | 97, 98, 100 | 3eqtr4i 2201 |
. . . . . 6
⊢ (3
· 3) = (1 + (1 · 8)) |
102 | 101 | oveq1i 5863 |
. . . . 5
⊢ ((3
· 3) mod 8) = ((1 + (1 · 8)) mod 8) |
103 | | 1nn 8889 |
. . . . . . 7
⊢ 1 ∈
ℕ |
104 | | nnq 9592 |
. . . . . . 7
⊢ (1 ∈
ℕ → 1 ∈ ℚ) |
105 | 103, 104 | ax-mp 5 |
. . . . . 6
⊢ 1 ∈
ℚ |
106 | | 1z 9238 |
. . . . . 6
⊢ 1 ∈
ℤ |
107 | | modqcyc 10315 |
. . . . . 6
⊢ (((1
∈ ℚ ∧ 1 ∈ ℤ) ∧ (8 ∈ ℚ ∧ 0 < 8))
→ ((1 + (1 · 8)) mod 8) = (1 mod 8)) |
108 | 105, 106,
18, 20, 107 | mp4an 425 |
. . . . 5
⊢ ((1 + (1
· 8)) mod 8) = (1 mod 8) |
109 | 102, 108 | eqtri 2191 |
. . . 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 2191 |
. . 3
⊢ ((3
· 3) mod 8) = 1 |
113 | | znegcl 9243 |
. . . . . . . 8
⊢ (1 ∈
ℤ → -1 ∈ ℤ) |
114 | 106, 113 | mp1i 10 |
. . . . . . 7
⊢ (⊤
→ -1 ∈ ℤ) |
115 | | 3nn 9040 |
. . . . . . . . . 10
⊢ 3 ∈
ℕ |
116 | 115, 115 | nnmulcli 8900 |
. . . . . . . . 9
⊢ (3
· 3) ∈ ℕ |
117 | 116 | nnzi 9233 |
. . . . . . . 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 2171 |
. . . . . . 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 10334 |
. . . . . 6
⊢ (⊤
→ ((-1 · (3 · 3)) mod 8) = ((-1 · 1) mod
8)) |
125 | 124 | mptru 1357 |
. . . . 5
⊢ ((-1
· (3 · 3)) mod 8) = ((-1 · 1) mod 8) |
126 | 45, 45 | mulcli 7925 |
. . . . . . 7
⊢ (3
· 3) ∈ ℂ |
127 | 126 | mulm1i 8322 |
. . . . . 6
⊢ (-1
· (3 · 3)) = -(3 · 3) |
128 | 127 | oveq1i 5863 |
. . . . 5
⊢ ((-1
· (3 · 3)) mod 8) = (-(3 · 3) mod 8) |
129 | 95 | mulm1i 8322 |
. . . . . 6
⊢ (-1
· 1) = -1 |
130 | 129 | oveq1i 5863 |
. . . . 5
⊢ ((-1
· 1) mod 8) = (-1 mod 8) |
131 | 125, 128,
130 | 3eqtr3i 2199 |
. . . 4
⊢ (-(3
· 3) mod 8) = (-1 mod 8) |
132 | 110 | simpri 112 |
. . . 4
⊢ (-1 mod
8) = 7 |
133 | 131, 132 | eqtri 2191 |
. . 3
⊢ (-(3
· 3) mod 8) = 7 |
134 | 112, 133 | preq12i 3665 |
. 2
⊢ {((3
· 3) mod 8), (-(3 · 3) mod 8)} = {1, 7} |
135 | 92, 134 | eleqtrdi 2263 |
1
⊢ (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ((𝐴 mod 8) ∈ {3, 5} ∧
(𝐵 mod 8) ∈ {3, 5}))
→ ((𝐴 · 𝐵) mod 8) ∈ {1,
7}) |