Step | Hyp | Ref
| Expression |
1 | | modqexp.c |
. 2
⊢ (𝜑 → 𝐶 ∈
ℕ0) |
2 | | oveq2 5849 |
. . . . . 6
⊢ (𝑤 = 0 → (𝐴↑𝑤) = (𝐴↑0)) |
3 | 2 | oveq1d 5856 |
. . . . 5
⊢ (𝑤 = 0 → ((𝐴↑𝑤) mod 𝐷) = ((𝐴↑0) mod 𝐷)) |
4 | | oveq2 5849 |
. . . . . 6
⊢ (𝑤 = 0 → (𝐵↑𝑤) = (𝐵↑0)) |
5 | 4 | oveq1d 5856 |
. . . . 5
⊢ (𝑤 = 0 → ((𝐵↑𝑤) mod 𝐷) = ((𝐵↑0) mod 𝐷)) |
6 | 3, 5 | eqeq12d 2180 |
. . . 4
⊢ (𝑤 = 0 → (((𝐴↑𝑤) mod 𝐷) = ((𝐵↑𝑤) mod 𝐷) ↔ ((𝐴↑0) mod 𝐷) = ((𝐵↑0) mod 𝐷))) |
7 | 6 | imbi2d 229 |
. . 3
⊢ (𝑤 = 0 → ((𝜑 → ((𝐴↑𝑤) mod 𝐷) = ((𝐵↑𝑤) mod 𝐷)) ↔ (𝜑 → ((𝐴↑0) mod 𝐷) = ((𝐵↑0) mod 𝐷)))) |
8 | | oveq2 5849 |
. . . . . 6
⊢ (𝑤 = 𝑘 → (𝐴↑𝑤) = (𝐴↑𝑘)) |
9 | 8 | oveq1d 5856 |
. . . . 5
⊢ (𝑤 = 𝑘 → ((𝐴↑𝑤) mod 𝐷) = ((𝐴↑𝑘) mod 𝐷)) |
10 | | oveq2 5849 |
. . . . . 6
⊢ (𝑤 = 𝑘 → (𝐵↑𝑤) = (𝐵↑𝑘)) |
11 | 10 | oveq1d 5856 |
. . . . 5
⊢ (𝑤 = 𝑘 → ((𝐵↑𝑤) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) |
12 | 9, 11 | eqeq12d 2180 |
. . . 4
⊢ (𝑤 = 𝑘 → (((𝐴↑𝑤) mod 𝐷) = ((𝐵↑𝑤) mod 𝐷) ↔ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷))) |
13 | 12 | imbi2d 229 |
. . 3
⊢ (𝑤 = 𝑘 → ((𝜑 → ((𝐴↑𝑤) mod 𝐷) = ((𝐵↑𝑤) mod 𝐷)) ↔ (𝜑 → ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)))) |
14 | | oveq2 5849 |
. . . . . 6
⊢ (𝑤 = (𝑘 + 1) → (𝐴↑𝑤) = (𝐴↑(𝑘 + 1))) |
15 | 14 | oveq1d 5856 |
. . . . 5
⊢ (𝑤 = (𝑘 + 1) → ((𝐴↑𝑤) mod 𝐷) = ((𝐴↑(𝑘 + 1)) mod 𝐷)) |
16 | | oveq2 5849 |
. . . . . 6
⊢ (𝑤 = (𝑘 + 1) → (𝐵↑𝑤) = (𝐵↑(𝑘 + 1))) |
17 | 16 | oveq1d 5856 |
. . . . 5
⊢ (𝑤 = (𝑘 + 1) → ((𝐵↑𝑤) mod 𝐷) = ((𝐵↑(𝑘 + 1)) mod 𝐷)) |
18 | 15, 17 | eqeq12d 2180 |
. . . 4
⊢ (𝑤 = (𝑘 + 1) → (((𝐴↑𝑤) mod 𝐷) = ((𝐵↑𝑤) mod 𝐷) ↔ ((𝐴↑(𝑘 + 1)) mod 𝐷) = ((𝐵↑(𝑘 + 1)) mod 𝐷))) |
19 | 18 | imbi2d 229 |
. . 3
⊢ (𝑤 = (𝑘 + 1) → ((𝜑 → ((𝐴↑𝑤) mod 𝐷) = ((𝐵↑𝑤) mod 𝐷)) ↔ (𝜑 → ((𝐴↑(𝑘 + 1)) mod 𝐷) = ((𝐵↑(𝑘 + 1)) mod 𝐷)))) |
20 | | oveq2 5849 |
. . . . . 6
⊢ (𝑤 = 𝐶 → (𝐴↑𝑤) = (𝐴↑𝐶)) |
21 | 20 | oveq1d 5856 |
. . . . 5
⊢ (𝑤 = 𝐶 → ((𝐴↑𝑤) mod 𝐷) = ((𝐴↑𝐶) mod 𝐷)) |
22 | | oveq2 5849 |
. . . . . 6
⊢ (𝑤 = 𝐶 → (𝐵↑𝑤) = (𝐵↑𝐶)) |
23 | 22 | oveq1d 5856 |
. . . . 5
⊢ (𝑤 = 𝐶 → ((𝐵↑𝑤) mod 𝐷) = ((𝐵↑𝐶) mod 𝐷)) |
24 | 21, 23 | eqeq12d 2180 |
. . . 4
⊢ (𝑤 = 𝐶 → (((𝐴↑𝑤) mod 𝐷) = ((𝐵↑𝑤) mod 𝐷) ↔ ((𝐴↑𝐶) mod 𝐷) = ((𝐵↑𝐶) mod 𝐷))) |
25 | 24 | imbi2d 229 |
. . 3
⊢ (𝑤 = 𝐶 → ((𝜑 → ((𝐴↑𝑤) mod 𝐷) = ((𝐵↑𝑤) mod 𝐷)) ↔ (𝜑 → ((𝐴↑𝐶) mod 𝐷) = ((𝐵↑𝐶) mod 𝐷)))) |
26 | | modqexp.a |
. . . . . . 7
⊢ (𝜑 → 𝐴 ∈ ℤ) |
27 | 26 | zcnd 9310 |
. . . . . 6
⊢ (𝜑 → 𝐴 ∈ ℂ) |
28 | | exp0 10455 |
. . . . . 6
⊢ (𝐴 ∈ ℂ → (𝐴↑0) = 1) |
29 | 27, 28 | syl 14 |
. . . . 5
⊢ (𝜑 → (𝐴↑0) = 1) |
30 | | modqexp.b |
. . . . . . 7
⊢ (𝜑 → 𝐵 ∈ ℤ) |
31 | 30 | zcnd 9310 |
. . . . . 6
⊢ (𝜑 → 𝐵 ∈ ℂ) |
32 | | exp0 10455 |
. . . . . 6
⊢ (𝐵 ∈ ℂ → (𝐵↑0) = 1) |
33 | 31, 32 | syl 14 |
. . . . 5
⊢ (𝜑 → (𝐵↑0) = 1) |
34 | 29, 33 | eqtr4d 2201 |
. . . 4
⊢ (𝜑 → (𝐴↑0) = (𝐵↑0)) |
35 | 34 | oveq1d 5856 |
. . 3
⊢ (𝜑 → ((𝐴↑0) mod 𝐷) = ((𝐵↑0) mod 𝐷)) |
36 | | zexpcl 10466 |
. . . . . . . . . 10
⊢ ((𝐴 ∈ ℤ ∧ 𝑘 ∈ ℕ0)
→ (𝐴↑𝑘) ∈
ℤ) |
37 | 26, 36 | sylan 281 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑘 ∈ ℕ0) → (𝐴↑𝑘) ∈ ℤ) |
38 | 37 | adantr 274 |
. . . . . . . 8
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → (𝐴↑𝑘) ∈ ℤ) |
39 | | zexpcl 10466 |
. . . . . . . . . 10
⊢ ((𝐵 ∈ ℤ ∧ 𝑘 ∈ ℕ0)
→ (𝐵↑𝑘) ∈
ℤ) |
40 | 30, 39 | sylan 281 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑘 ∈ ℕ0) → (𝐵↑𝑘) ∈ ℤ) |
41 | 40 | adantr 274 |
. . . . . . . 8
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → (𝐵↑𝑘) ∈ ℤ) |
42 | 26 | ad2antrr 480 |
. . . . . . . 8
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → 𝐴 ∈ ℤ) |
43 | 30 | ad2antrr 480 |
. . . . . . . 8
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → 𝐵 ∈ ℤ) |
44 | | modqexp.dq |
. . . . . . . . 9
⊢ (𝜑 → 𝐷 ∈ ℚ) |
45 | 44 | ad2antrr 480 |
. . . . . . . 8
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → 𝐷 ∈ ℚ) |
46 | | modqexp.dgt0 |
. . . . . . . . 9
⊢ (𝜑 → 0 < 𝐷) |
47 | 46 | ad2antrr 480 |
. . . . . . . 8
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → 0 < 𝐷) |
48 | | simpr 109 |
. . . . . . . 8
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) |
49 | | modqexp.mod |
. . . . . . . . 9
⊢ (𝜑 → (𝐴 mod 𝐷) = (𝐵 mod 𝐷)) |
50 | 49 | ad2antrr 480 |
. . . . . . . 8
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → (𝐴 mod 𝐷) = (𝐵 mod 𝐷)) |
51 | 38, 41, 42, 43, 45, 47, 48, 50 | modqmul12d 10309 |
. . . . . . 7
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → (((𝐴↑𝑘) · 𝐴) mod 𝐷) = (((𝐵↑𝑘) · 𝐵) mod 𝐷)) |
52 | 27 | ad2antrr 480 |
. . . . . . . . 9
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → 𝐴 ∈ ℂ) |
53 | | simpr 109 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑘 ∈ ℕ0) → 𝑘 ∈
ℕ0) |
54 | 53 | adantr 274 |
. . . . . . . . 9
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → 𝑘 ∈ ℕ0) |
55 | | expp1 10458 |
. . . . . . . . 9
⊢ ((𝐴 ∈ ℂ ∧ 𝑘 ∈ ℕ0)
→ (𝐴↑(𝑘 + 1)) = ((𝐴↑𝑘) · 𝐴)) |
56 | 52, 54, 55 | syl2anc 409 |
. . . . . . . 8
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → (𝐴↑(𝑘 + 1)) = ((𝐴↑𝑘) · 𝐴)) |
57 | 56 | oveq1d 5856 |
. . . . . . 7
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → ((𝐴↑(𝑘 + 1)) mod 𝐷) = (((𝐴↑𝑘) · 𝐴) mod 𝐷)) |
58 | 31 | ad2antrr 480 |
. . . . . . . . 9
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → 𝐵 ∈ ℂ) |
59 | | expp1 10458 |
. . . . . . . . 9
⊢ ((𝐵 ∈ ℂ ∧ 𝑘 ∈ ℕ0)
→ (𝐵↑(𝑘 + 1)) = ((𝐵↑𝑘) · 𝐵)) |
60 | 58, 54, 59 | syl2anc 409 |
. . . . . . . 8
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → (𝐵↑(𝑘 + 1)) = ((𝐵↑𝑘) · 𝐵)) |
61 | 60 | oveq1d 5856 |
. . . . . . 7
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → ((𝐵↑(𝑘 + 1)) mod 𝐷) = (((𝐵↑𝑘) · 𝐵) mod 𝐷)) |
62 | 51, 57, 61 | 3eqtr4d 2208 |
. . . . . 6
⊢ (((𝜑 ∧ 𝑘 ∈ ℕ0) ∧ ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → ((𝐴↑(𝑘 + 1)) mod 𝐷) = ((𝐵↑(𝑘 + 1)) mod 𝐷)) |
63 | 62 | ex 114 |
. . . . 5
⊢ ((𝜑 ∧ 𝑘 ∈ ℕ0) → (((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷) → ((𝐴↑(𝑘 + 1)) mod 𝐷) = ((𝐵↑(𝑘 + 1)) mod 𝐷))) |
64 | 63 | expcom 115 |
. . . 4
⊢ (𝑘 ∈ ℕ0
→ (𝜑 → (((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷) → ((𝐴↑(𝑘 + 1)) mod 𝐷) = ((𝐵↑(𝑘 + 1)) mod 𝐷)))) |
65 | 64 | a2d 26 |
. . 3
⊢ (𝑘 ∈ ℕ0
→ ((𝜑 → ((𝐴↑𝑘) mod 𝐷) = ((𝐵↑𝑘) mod 𝐷)) → (𝜑 → ((𝐴↑(𝑘 + 1)) mod 𝐷) = ((𝐵↑(𝑘 + 1)) mod 𝐷)))) |
66 | 7, 13, 19, 25, 35, 65 | nn0ind 9301 |
. 2
⊢ (𝐶 ∈ ℕ0
→ (𝜑 → ((𝐴↑𝐶) mod 𝐷) = ((𝐵↑𝐶) mod 𝐷))) |
67 | 1, 66 | mpcom 36 |
1
⊢ (𝜑 → ((𝐴↑𝐶) mod 𝐷) = ((𝐵↑𝐶) mod 𝐷)) |