Proof of Theorem repswcshw
Step | Hyp | Ref
| Expression |
1 | | 0csh0 14434 |
. . . . 5
⊢ (∅
cyclShift 𝐼) =
∅ |
2 | | repsw0 14418 |
. . . . . 6
⊢ (𝑆 ∈ 𝑉 → (𝑆 repeatS 0) = ∅) |
3 | 2 | oveq1d 7270 |
. . . . 5
⊢ (𝑆 ∈ 𝑉 → ((𝑆 repeatS 0) cyclShift 𝐼) = (∅ cyclShift 𝐼)) |
4 | 1, 3, 2 | 3eqtr4a 2805 |
. . . 4
⊢ (𝑆 ∈ 𝑉 → ((𝑆 repeatS 0) cyclShift 𝐼) = (𝑆 repeatS 0)) |
5 | 4 | 3ad2ant1 1131 |
. . 3
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ0 ∧ 𝐼 ∈ ℤ) → ((𝑆 repeatS 0) cyclShift 𝐼) = (𝑆 repeatS 0)) |
6 | | oveq2 7263 |
. . . . 5
⊢ (𝑁 = 0 → (𝑆 repeatS 𝑁) = (𝑆 repeatS 0)) |
7 | 6 | oveq1d 7270 |
. . . 4
⊢ (𝑁 = 0 → ((𝑆 repeatS 𝑁) cyclShift 𝐼) = ((𝑆 repeatS 0) cyclShift 𝐼)) |
8 | 7, 6 | eqeq12d 2754 |
. . 3
⊢ (𝑁 = 0 → (((𝑆 repeatS 𝑁) cyclShift 𝐼) = (𝑆 repeatS 𝑁) ↔ ((𝑆 repeatS 0) cyclShift 𝐼) = (𝑆 repeatS 0))) |
9 | 5, 8 | syl5ibr 245 |
. 2
⊢ (𝑁 = 0 → ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ0 ∧ 𝐼 ∈ ℤ) → ((𝑆 repeatS 𝑁) cyclShift 𝐼) = (𝑆 repeatS 𝑁))) |
10 | | idd 24 |
. . . 4
⊢ (¬
𝑁 = 0 → (𝑆 ∈ 𝑉 → 𝑆 ∈ 𝑉)) |
11 | | df-ne 2943 |
. . . . 5
⊢ (𝑁 ≠ 0 ↔ ¬ 𝑁 = 0) |
12 | | elnnne0 12177 |
. . . . . 6
⊢ (𝑁 ∈ ℕ ↔ (𝑁 ∈ ℕ0
∧ 𝑁 ≠
0)) |
13 | 12 | simplbi2com 502 |
. . . . 5
⊢ (𝑁 ≠ 0 → (𝑁 ∈ ℕ0
→ 𝑁 ∈
ℕ)) |
14 | 11, 13 | sylbir 234 |
. . . 4
⊢ (¬
𝑁 = 0 → (𝑁 ∈ ℕ0
→ 𝑁 ∈
ℕ)) |
15 | | idd 24 |
. . . 4
⊢ (¬
𝑁 = 0 → (𝐼 ∈ ℤ → 𝐼 ∈
ℤ)) |
16 | 10, 14, 15 | 3anim123d 1441 |
. . 3
⊢ (¬
𝑁 = 0 → ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ0 ∧ 𝐼 ∈ ℤ) → (𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ))) |
17 | | nnnn0 12170 |
. . . . . . 7
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℕ0) |
18 | 17 | anim2i 616 |
. . . . . 6
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ) → (𝑆 ∈ 𝑉 ∧ 𝑁 ∈
ℕ0)) |
19 | | repsw 14416 |
. . . . . 6
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ0) → (𝑆 repeatS 𝑁) ∈ Word 𝑉) |
20 | 18, 19 | syl 17 |
. . . . 5
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ) → (𝑆 repeatS 𝑁) ∈ Word 𝑉) |
21 | | cshword 14432 |
. . . . 5
⊢ (((𝑆 repeatS 𝑁) ∈ Word 𝑉 ∧ 𝐼 ∈ ℤ) → ((𝑆 repeatS 𝑁) cyclShift 𝐼) = (((𝑆 repeatS 𝑁) substr 〈(𝐼 mod (♯‘(𝑆 repeatS 𝑁))), (♯‘(𝑆 repeatS 𝑁))〉) ++ ((𝑆 repeatS 𝑁) prefix (𝐼 mod (♯‘(𝑆 repeatS 𝑁)))))) |
22 | 20, 21 | stoic3 1780 |
. . . 4
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → ((𝑆 repeatS 𝑁) cyclShift 𝐼) = (((𝑆 repeatS 𝑁) substr 〈(𝐼 mod (♯‘(𝑆 repeatS 𝑁))), (♯‘(𝑆 repeatS 𝑁))〉) ++ ((𝑆 repeatS 𝑁) prefix (𝐼 mod (♯‘(𝑆 repeatS 𝑁)))))) |
23 | | repswlen 14417 |
. . . . . . . . . 10
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ0) →
(♯‘(𝑆 repeatS
𝑁)) = 𝑁) |
24 | 18, 23 | syl 17 |
. . . . . . . . 9
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ) →
(♯‘(𝑆 repeatS
𝑁)) = 𝑁) |
25 | 24 | oveq2d 7271 |
. . . . . . . 8
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ) → (𝐼 mod (♯‘(𝑆 repeatS 𝑁))) = (𝐼 mod 𝑁)) |
26 | 25, 24 | opeq12d 4809 |
. . . . . . 7
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ) → 〈(𝐼 mod (♯‘(𝑆 repeatS 𝑁))), (♯‘(𝑆 repeatS 𝑁))〉 = 〈(𝐼 mod 𝑁), 𝑁〉) |
27 | 26 | oveq2d 7271 |
. . . . . 6
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ) → ((𝑆 repeatS 𝑁) substr 〈(𝐼 mod (♯‘(𝑆 repeatS 𝑁))), (♯‘(𝑆 repeatS 𝑁))〉) = ((𝑆 repeatS 𝑁) substr 〈(𝐼 mod 𝑁), 𝑁〉)) |
28 | 25 | oveq2d 7271 |
. . . . . 6
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ) → ((𝑆 repeatS 𝑁) prefix (𝐼 mod (♯‘(𝑆 repeatS 𝑁)))) = ((𝑆 repeatS 𝑁) prefix (𝐼 mod 𝑁))) |
29 | 27, 28 | oveq12d 7273 |
. . . . 5
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ) → (((𝑆 repeatS 𝑁) substr 〈(𝐼 mod (♯‘(𝑆 repeatS 𝑁))), (♯‘(𝑆 repeatS 𝑁))〉) ++ ((𝑆 repeatS 𝑁) prefix (𝐼 mod (♯‘(𝑆 repeatS 𝑁))))) = (((𝑆 repeatS 𝑁) substr 〈(𝐼 mod 𝑁), 𝑁〉) ++ ((𝑆 repeatS 𝑁) prefix (𝐼 mod 𝑁)))) |
30 | 29 | 3adant3 1130 |
. . . 4
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (((𝑆 repeatS 𝑁) substr 〈(𝐼 mod (♯‘(𝑆 repeatS 𝑁))), (♯‘(𝑆 repeatS 𝑁))〉) ++ ((𝑆 repeatS 𝑁) prefix (𝐼 mod (♯‘(𝑆 repeatS 𝑁))))) = (((𝑆 repeatS 𝑁) substr 〈(𝐼 mod 𝑁), 𝑁〉) ++ ((𝑆 repeatS 𝑁) prefix (𝐼 mod 𝑁)))) |
31 | 18 | 3adant3 1130 |
. . . . . . 7
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (𝑆 ∈ 𝑉 ∧ 𝑁 ∈
ℕ0)) |
32 | | zmodcl 13539 |
. . . . . . . . . 10
⊢ ((𝐼 ∈ ℤ ∧ 𝑁 ∈ ℕ) → (𝐼 mod 𝑁) ∈
ℕ0) |
33 | 32 | ancoms 458 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (𝐼 mod 𝑁) ∈
ℕ0) |
34 | 17 | adantr 480 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → 𝑁 ∈
ℕ0) |
35 | 33, 34 | jca 511 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → ((𝐼 mod 𝑁) ∈ ℕ0 ∧ 𝑁 ∈
ℕ0)) |
36 | 35 | 3adant1 1128 |
. . . . . . 7
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → ((𝐼 mod 𝑁) ∈ ℕ0 ∧ 𝑁 ∈
ℕ0)) |
37 | | nnre 11910 |
. . . . . . . . 9
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℝ) |
38 | 37 | leidd 11471 |
. . . . . . . 8
⊢ (𝑁 ∈ ℕ → 𝑁 ≤ 𝑁) |
39 | 38 | 3ad2ant2 1132 |
. . . . . . 7
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → 𝑁 ≤ 𝑁) |
40 | | repswswrd 14425 |
. . . . . . 7
⊢ (((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ0) ∧ ((𝐼 mod 𝑁) ∈ ℕ0 ∧ 𝑁 ∈ ℕ0)
∧ 𝑁 ≤ 𝑁) → ((𝑆 repeatS 𝑁) substr 〈(𝐼 mod 𝑁), 𝑁〉) = (𝑆 repeatS (𝑁 − (𝐼 mod 𝑁)))) |
41 | 31, 36, 39, 40 | syl3anc 1369 |
. . . . . 6
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → ((𝑆 repeatS 𝑁) substr 〈(𝐼 mod 𝑁), 𝑁〉) = (𝑆 repeatS (𝑁 − (𝐼 mod 𝑁)))) |
42 | | simp1 1134 |
. . . . . . 7
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → 𝑆 ∈ 𝑉) |
43 | 17 | 3ad2ant2 1132 |
. . . . . . 7
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → 𝑁 ∈
ℕ0) |
44 | | zmodfzp1 13543 |
. . . . . . . . 9
⊢ ((𝐼 ∈ ℤ ∧ 𝑁 ∈ ℕ) → (𝐼 mod 𝑁) ∈ (0...𝑁)) |
45 | 44 | ancoms 458 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (𝐼 mod 𝑁) ∈ (0...𝑁)) |
46 | 45 | 3adant1 1128 |
. . . . . . 7
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (𝐼 mod 𝑁) ∈ (0...𝑁)) |
47 | | repswpfx 14426 |
. . . . . . 7
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ0 ∧ (𝐼 mod 𝑁) ∈ (0...𝑁)) → ((𝑆 repeatS 𝑁) prefix (𝐼 mod 𝑁)) = (𝑆 repeatS (𝐼 mod 𝑁))) |
48 | 42, 43, 46, 47 | syl3anc 1369 |
. . . . . 6
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → ((𝑆 repeatS 𝑁) prefix (𝐼 mod 𝑁)) = (𝑆 repeatS (𝐼 mod 𝑁))) |
49 | 41, 48 | oveq12d 7273 |
. . . . 5
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (((𝑆 repeatS 𝑁) substr 〈(𝐼 mod 𝑁), 𝑁〉) ++ ((𝑆 repeatS 𝑁) prefix (𝐼 mod 𝑁))) = ((𝑆 repeatS (𝑁 − (𝐼 mod 𝑁))) ++ (𝑆 repeatS (𝐼 mod 𝑁)))) |
50 | 32 | nn0red 12224 |
. . . . . . . . . 10
⊢ ((𝐼 ∈ ℤ ∧ 𝑁 ∈ ℕ) → (𝐼 mod 𝑁) ∈ ℝ) |
51 | 50 | ancoms 458 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (𝐼 mod 𝑁) ∈ ℝ) |
52 | 37 | adantr 480 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → 𝑁 ∈
ℝ) |
53 | | zre 12253 |
. . . . . . . . . 10
⊢ (𝐼 ∈ ℤ → 𝐼 ∈
ℝ) |
54 | | nnrp 12670 |
. . . . . . . . . 10
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℝ+) |
55 | | modlt 13528 |
. . . . . . . . . 10
⊢ ((𝐼 ∈ ℝ ∧ 𝑁 ∈ ℝ+)
→ (𝐼 mod 𝑁) < 𝑁) |
56 | 53, 54, 55 | syl2anr 596 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (𝐼 mod 𝑁) < 𝑁) |
57 | 51, 52, 56 | ltled 11053 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (𝐼 mod 𝑁) ≤ 𝑁) |
58 | 57 | 3adant1 1128 |
. . . . . . 7
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (𝐼 mod 𝑁) ≤ 𝑁) |
59 | 33 | 3adant1 1128 |
. . . . . . . 8
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (𝐼 mod 𝑁) ∈
ℕ0) |
60 | | nn0sub 12213 |
. . . . . . . 8
⊢ (((𝐼 mod 𝑁) ∈ ℕ0 ∧ 𝑁 ∈ ℕ0)
→ ((𝐼 mod 𝑁) ≤ 𝑁 ↔ (𝑁 − (𝐼 mod 𝑁)) ∈
ℕ0)) |
61 | 59, 43, 60 | syl2anc 583 |
. . . . . . 7
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → ((𝐼 mod 𝑁) ≤ 𝑁 ↔ (𝑁 − (𝐼 mod 𝑁)) ∈
ℕ0)) |
62 | 58, 61 | mpbid 231 |
. . . . . 6
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (𝑁 − (𝐼 mod 𝑁)) ∈
ℕ0) |
63 | | repswccat 14427 |
. . . . . 6
⊢ ((𝑆 ∈ 𝑉 ∧ (𝑁 − (𝐼 mod 𝑁)) ∈ ℕ0 ∧ (𝐼 mod 𝑁) ∈ ℕ0) → ((𝑆 repeatS (𝑁 − (𝐼 mod 𝑁))) ++ (𝑆 repeatS (𝐼 mod 𝑁))) = (𝑆 repeatS ((𝑁 − (𝐼 mod 𝑁)) + (𝐼 mod 𝑁)))) |
64 | 42, 62, 59, 63 | syl3anc 1369 |
. . . . 5
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → ((𝑆 repeatS (𝑁 − (𝐼 mod 𝑁))) ++ (𝑆 repeatS (𝐼 mod 𝑁))) = (𝑆 repeatS ((𝑁 − (𝐼 mod 𝑁)) + (𝐼 mod 𝑁)))) |
65 | | nncn 11911 |
. . . . . . . . . 10
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℂ) |
66 | 65 | adantl 481 |
. . . . . . . . 9
⊢ ((𝐼 ∈ ℤ ∧ 𝑁 ∈ ℕ) → 𝑁 ∈
ℂ) |
67 | 32 | nn0cnd 12225 |
. . . . . . . . 9
⊢ ((𝐼 ∈ ℤ ∧ 𝑁 ∈ ℕ) → (𝐼 mod 𝑁) ∈ ℂ) |
68 | 66, 67 | npcand 11266 |
. . . . . . . 8
⊢ ((𝐼 ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝑁 − (𝐼 mod 𝑁)) + (𝐼 mod 𝑁)) = 𝑁) |
69 | 68 | ancoms 458 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → ((𝑁 − (𝐼 mod 𝑁)) + (𝐼 mod 𝑁)) = 𝑁) |
70 | 69 | 3adant1 1128 |
. . . . . 6
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → ((𝑁 − (𝐼 mod 𝑁)) + (𝐼 mod 𝑁)) = 𝑁) |
71 | 70 | oveq2d 7271 |
. . . . 5
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (𝑆 repeatS ((𝑁 − (𝐼 mod 𝑁)) + (𝐼 mod 𝑁))) = (𝑆 repeatS 𝑁)) |
72 | 49, 64, 71 | 3eqtrd 2782 |
. . . 4
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → (((𝑆 repeatS 𝑁) substr 〈(𝐼 mod 𝑁), 𝑁〉) ++ ((𝑆 repeatS 𝑁) prefix (𝐼 mod 𝑁))) = (𝑆 repeatS 𝑁)) |
73 | 22, 30, 72 | 3eqtrd 2782 |
. . 3
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ ∧ 𝐼 ∈ ℤ) → ((𝑆 repeatS 𝑁) cyclShift 𝐼) = (𝑆 repeatS 𝑁)) |
74 | 16, 73 | syl6 35 |
. 2
⊢ (¬
𝑁 = 0 → ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ0 ∧ 𝐼 ∈ ℤ) → ((𝑆 repeatS 𝑁) cyclShift 𝐼) = (𝑆 repeatS 𝑁))) |
75 | 9, 74 | pm2.61i 182 |
1
⊢ ((𝑆 ∈ 𝑉 ∧ 𝑁 ∈ ℕ0 ∧ 𝐼 ∈ ℤ) → ((𝑆 repeatS 𝑁) cyclShift 𝐼) = (𝑆 repeatS 𝑁)) |