Proof of Theorem swrds1
Step | Hyp | Ref
| Expression |
1 | | swrdcl 14286 |
. . 3
⊢ (𝑊 ∈ Word 𝐴 → (𝑊 substr 〈𝐼, (𝐼 + 1)〉) ∈ Word 𝐴) |
2 | | simpl 482 |
. . . . 5
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → 𝑊 ∈ Word 𝐴) |
3 | | elfzouz 13320 |
. . . . . . 7
⊢ (𝐼 ∈
(0..^(♯‘𝑊))
→ 𝐼 ∈
(ℤ≥‘0)) |
4 | 3 | adantl 481 |
. . . . . 6
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → 𝐼 ∈
(ℤ≥‘0)) |
5 | | elfzoelz 13316 |
. . . . . . . 8
⊢ (𝐼 ∈
(0..^(♯‘𝑊))
→ 𝐼 ∈
ℤ) |
6 | 5 | adantl 481 |
. . . . . . 7
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → 𝐼 ∈ ℤ) |
7 | | uzid 12526 |
. . . . . . 7
⊢ (𝐼 ∈ ℤ → 𝐼 ∈
(ℤ≥‘𝐼)) |
8 | | peano2uz 12570 |
. . . . . . 7
⊢ (𝐼 ∈
(ℤ≥‘𝐼) → (𝐼 + 1) ∈
(ℤ≥‘𝐼)) |
9 | 6, 7, 8 | 3syl 18 |
. . . . . 6
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → (𝐼 + 1) ∈
(ℤ≥‘𝐼)) |
10 | | elfzuzb 13179 |
. . . . . 6
⊢ (𝐼 ∈ (0...(𝐼 + 1)) ↔ (𝐼 ∈ (ℤ≥‘0)
∧ (𝐼 + 1) ∈
(ℤ≥‘𝐼))) |
11 | 4, 9, 10 | sylanbrc 582 |
. . . . 5
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → 𝐼 ∈ (0...(𝐼 + 1))) |
12 | | fzofzp1 13412 |
. . . . . 6
⊢ (𝐼 ∈
(0..^(♯‘𝑊))
→ (𝐼 + 1) ∈
(0...(♯‘𝑊))) |
13 | 12 | adantl 481 |
. . . . 5
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → (𝐼 + 1) ∈ (0...(♯‘𝑊))) |
14 | | swrdlen 14288 |
. . . . 5
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0...(𝐼 + 1)) ∧ (𝐼 + 1) ∈ (0...(♯‘𝑊))) → (♯‘(𝑊 substr 〈𝐼, (𝐼 + 1)〉)) = ((𝐼 + 1) − 𝐼)) |
15 | 2, 11, 13, 14 | syl3anc 1369 |
. . . 4
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → (♯‘(𝑊 substr 〈𝐼, (𝐼 + 1)〉)) = ((𝐼 + 1) − 𝐼)) |
16 | 6 | zcnd 12356 |
. . . . 5
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → 𝐼 ∈ ℂ) |
17 | | ax-1cn 10860 |
. . . . 5
⊢ 1 ∈
ℂ |
18 | | pncan2 11158 |
. . . . 5
⊢ ((𝐼 ∈ ℂ ∧ 1 ∈
ℂ) → ((𝐼 + 1)
− 𝐼) =
1) |
19 | 16, 17, 18 | sylancl 585 |
. . . 4
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → ((𝐼 + 1) − 𝐼) = 1) |
20 | 15, 19 | eqtrd 2778 |
. . 3
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → (♯‘(𝑊 substr 〈𝐼, (𝐼 + 1)〉)) = 1) |
21 | | eqs1 14245 |
. . 3
⊢ (((𝑊 substr 〈𝐼, (𝐼 + 1)〉) ∈ Word 𝐴 ∧ (♯‘(𝑊 substr 〈𝐼, (𝐼 + 1)〉)) = 1) → (𝑊 substr 〈𝐼, (𝐼 + 1)〉) = 〈“((𝑊 substr 〈𝐼, (𝐼 +
1)〉)‘0)”〉) |
22 | 1, 20, 21 | syl2an2r 681 |
. 2
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → (𝑊 substr 〈𝐼, (𝐼 + 1)〉) = 〈“((𝑊 substr 〈𝐼, (𝐼 +
1)〉)‘0)”〉) |
23 | | 0z 12260 |
. . . . . . 7
⊢ 0 ∈
ℤ |
24 | | snidg 4592 |
. . . . . . 7
⊢ (0 ∈
ℤ → 0 ∈ {0}) |
25 | 23, 24 | ax-mp 5 |
. . . . . 6
⊢ 0 ∈
{0} |
26 | 19 | oveq2d 7271 |
. . . . . . 7
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → (0..^((𝐼 + 1) − 𝐼)) = (0..^1)) |
27 | | fzo01 13397 |
. . . . . . 7
⊢ (0..^1) =
{0} |
28 | 26, 27 | eqtrdi 2795 |
. . . . . 6
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → (0..^((𝐼 + 1) − 𝐼)) = {0}) |
29 | 25, 28 | eleqtrrid 2846 |
. . . . 5
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → 0 ∈ (0..^((𝐼 + 1) − 𝐼))) |
30 | | swrdfv 14289 |
. . . . 5
⊢ (((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0...(𝐼 + 1)) ∧ (𝐼 + 1) ∈ (0...(♯‘𝑊))) ∧ 0 ∈ (0..^((𝐼 + 1) − 𝐼))) → ((𝑊 substr 〈𝐼, (𝐼 + 1)〉)‘0) = (𝑊‘(0 + 𝐼))) |
31 | 2, 11, 13, 29, 30 | syl31anc 1371 |
. . . 4
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → ((𝑊 substr 〈𝐼, (𝐼 + 1)〉)‘0) = (𝑊‘(0 + 𝐼))) |
32 | | addid2 11088 |
. . . . . . 7
⊢ (𝐼 ∈ ℂ → (0 +
𝐼) = 𝐼) |
33 | 32 | eqcomd 2744 |
. . . . . 6
⊢ (𝐼 ∈ ℂ → 𝐼 = (0 + 𝐼)) |
34 | 16, 33 | syl 17 |
. . . . 5
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → 𝐼 = (0 + 𝐼)) |
35 | 34 | fveq2d 6760 |
. . . 4
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → (𝑊‘𝐼) = (𝑊‘(0 + 𝐼))) |
36 | 31, 35 | eqtr4d 2781 |
. . 3
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → ((𝑊 substr 〈𝐼, (𝐼 + 1)〉)‘0) = (𝑊‘𝐼)) |
37 | 36 | s1eqd 14234 |
. 2
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → 〈“((𝑊 substr 〈𝐼, (𝐼 + 1)〉)‘0)”〉 =
〈“(𝑊‘𝐼)”〉) |
38 | 22, 37 | eqtrd 2778 |
1
⊢ ((𝑊 ∈ Word 𝐴 ∧ 𝐼 ∈ (0..^(♯‘𝑊))) → (𝑊 substr 〈𝐼, (𝐼 + 1)〉) = 〈“(𝑊‘𝐼)”〉) |