Proof of Theorem splfv3
Step | Hyp | Ref
| Expression |
1 | | splfv3.s |
. . . 4
⊢ (𝜑 → 𝑆 ∈ Word 𝐴) |
2 | | splfv3.f |
. . . 4
⊢ (𝜑 → 𝐹 ∈ (0...𝑇)) |
3 | | splfv3.t |
. . . 4
⊢ (𝜑 → 𝑇 ∈ (0...(♯‘𝑆))) |
4 | | splfv3.r |
. . . 4
⊢ (𝜑 → 𝑅 ∈ Word 𝐴) |
5 | | splval 14392 |
. . . 4
⊢ ((𝑆 ∈ Word 𝐴 ∧ (𝐹 ∈ (0...𝑇) ∧ 𝑇 ∈ (0...(♯‘𝑆)) ∧ 𝑅 ∈ Word 𝐴)) → (𝑆 splice 〈𝐹, 𝑇, 𝑅〉) = (((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr 〈𝑇, (♯‘𝑆)〉))) |
6 | 1, 2, 3, 4, 5 | syl13anc 1370 |
. . 3
⊢ (𝜑 → (𝑆 splice 〈𝐹, 𝑇, 𝑅〉) = (((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr 〈𝑇, (♯‘𝑆)〉))) |
7 | | elfzuz3 13182 |
. . . . . . . . 9
⊢ (𝑇 ∈
(0...(♯‘𝑆))
→ (♯‘𝑆)
∈ (ℤ≥‘𝑇)) |
8 | | fzss2 13225 |
. . . . . . . . 9
⊢
((♯‘𝑆)
∈ (ℤ≥‘𝑇) → (0...𝑇) ⊆ (0...(♯‘𝑆))) |
9 | 3, 7, 8 | 3syl 18 |
. . . . . . . 8
⊢ (𝜑 → (0...𝑇) ⊆ (0...(♯‘𝑆))) |
10 | 9, 2 | sseldd 3918 |
. . . . . . 7
⊢ (𝜑 → 𝐹 ∈ (0...(♯‘𝑆))) |
11 | | pfxlen 14324 |
. . . . . . 7
⊢ ((𝑆 ∈ Word 𝐴 ∧ 𝐹 ∈ (0...(♯‘𝑆))) → (♯‘(𝑆 prefix 𝐹)) = 𝐹) |
12 | 1, 10, 11 | syl2anc 583 |
. . . . . 6
⊢ (𝜑 → (♯‘(𝑆 prefix 𝐹)) = 𝐹) |
13 | 12 | oveq1d 7270 |
. . . . 5
⊢ (𝜑 → ((♯‘(𝑆 prefix 𝐹)) + (♯‘𝑅)) = (𝐹 + (♯‘𝑅))) |
14 | | pfxcl 14318 |
. . . . . . 7
⊢ (𝑆 ∈ Word 𝐴 → (𝑆 prefix 𝐹) ∈ Word 𝐴) |
15 | 1, 14 | syl 17 |
. . . . . 6
⊢ (𝜑 → (𝑆 prefix 𝐹) ∈ Word 𝐴) |
16 | | ccatlen 14206 |
. . . . . 6
⊢ (((𝑆 prefix 𝐹) ∈ Word 𝐴 ∧ 𝑅 ∈ Word 𝐴) → (♯‘((𝑆 prefix 𝐹) ++ 𝑅)) = ((♯‘(𝑆 prefix 𝐹)) + (♯‘𝑅))) |
17 | 15, 4, 16 | syl2anc 583 |
. . . . 5
⊢ (𝜑 → (♯‘((𝑆 prefix 𝐹) ++ 𝑅)) = ((♯‘(𝑆 prefix 𝐹)) + (♯‘𝑅))) |
18 | | splfv3.k |
. . . . 5
⊢ (𝜑 → 𝐾 = (𝐹 + (♯‘𝑅))) |
19 | 13, 17, 18 | 3eqtr4rd 2789 |
. . . 4
⊢ (𝜑 → 𝐾 = (♯‘((𝑆 prefix 𝐹) ++ 𝑅))) |
20 | 19 | oveq2d 7271 |
. . 3
⊢ (𝜑 → (𝑋 + 𝐾) = (𝑋 + (♯‘((𝑆 prefix 𝐹) ++ 𝑅)))) |
21 | 6, 20 | fveq12d 6763 |
. 2
⊢ (𝜑 → ((𝑆 splice 〈𝐹, 𝑇, 𝑅〉)‘(𝑋 + 𝐾)) = ((((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr 〈𝑇, (♯‘𝑆)〉))‘(𝑋 + (♯‘((𝑆 prefix 𝐹) ++ 𝑅))))) |
22 | | ccatcl 14205 |
. . . 4
⊢ (((𝑆 prefix 𝐹) ∈ Word 𝐴 ∧ 𝑅 ∈ Word 𝐴) → ((𝑆 prefix 𝐹) ++ 𝑅) ∈ Word 𝐴) |
23 | 15, 4, 22 | syl2anc 583 |
. . 3
⊢ (𝜑 → ((𝑆 prefix 𝐹) ++ 𝑅) ∈ Word 𝐴) |
24 | | swrdcl 14286 |
. . . 4
⊢ (𝑆 ∈ Word 𝐴 → (𝑆 substr 〈𝑇, (♯‘𝑆)〉) ∈ Word 𝐴) |
25 | 1, 24 | syl 17 |
. . 3
⊢ (𝜑 → (𝑆 substr 〈𝑇, (♯‘𝑆)〉) ∈ Word 𝐴) |
26 | | splfv3.x |
. . . 4
⊢ (𝜑 → 𝑋 ∈ (0..^((♯‘𝑆) − 𝑇))) |
27 | | lencl 14164 |
. . . . . . . 8
⊢ (𝑆 ∈ Word 𝐴 → (♯‘𝑆) ∈
ℕ0) |
28 | | nn0fz0 13283 |
. . . . . . . 8
⊢
((♯‘𝑆)
∈ ℕ0 ↔ (♯‘𝑆) ∈ (0...(♯‘𝑆))) |
29 | 27, 28 | sylib 217 |
. . . . . . 7
⊢ (𝑆 ∈ Word 𝐴 → (♯‘𝑆) ∈ (0...(♯‘𝑆))) |
30 | 1, 29 | syl 17 |
. . . . . 6
⊢ (𝜑 → (♯‘𝑆) ∈
(0...(♯‘𝑆))) |
31 | | swrdlen 14288 |
. . . . . 6
⊢ ((𝑆 ∈ Word 𝐴 ∧ 𝑇 ∈ (0...(♯‘𝑆)) ∧ (♯‘𝑆) ∈
(0...(♯‘𝑆)))
→ (♯‘(𝑆
substr 〈𝑇,
(♯‘𝑆)〉)) =
((♯‘𝑆) −
𝑇)) |
32 | 1, 3, 30, 31 | syl3anc 1369 |
. . . . 5
⊢ (𝜑 → (♯‘(𝑆 substr 〈𝑇, (♯‘𝑆)〉)) = ((♯‘𝑆) − 𝑇)) |
33 | 32 | oveq2d 7271 |
. . . 4
⊢ (𝜑 → (0..^(♯‘(𝑆 substr 〈𝑇, (♯‘𝑆)〉))) = (0..^((♯‘𝑆) − 𝑇))) |
34 | 26, 33 | eleqtrrd 2842 |
. . 3
⊢ (𝜑 → 𝑋 ∈ (0..^(♯‘(𝑆 substr 〈𝑇, (♯‘𝑆)〉)))) |
35 | | ccatval3 14212 |
. . 3
⊢ ((((𝑆 prefix 𝐹) ++ 𝑅) ∈ Word 𝐴 ∧ (𝑆 substr 〈𝑇, (♯‘𝑆)〉) ∈ Word 𝐴 ∧ 𝑋 ∈ (0..^(♯‘(𝑆 substr 〈𝑇, (♯‘𝑆)〉)))) → ((((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr 〈𝑇, (♯‘𝑆)〉))‘(𝑋 + (♯‘((𝑆 prefix 𝐹) ++ 𝑅)))) = ((𝑆 substr 〈𝑇, (♯‘𝑆)〉)‘𝑋)) |
36 | 23, 25, 34, 35 | syl3anc 1369 |
. 2
⊢ (𝜑 → ((((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr 〈𝑇, (♯‘𝑆)〉))‘(𝑋 + (♯‘((𝑆 prefix 𝐹) ++ 𝑅)))) = ((𝑆 substr 〈𝑇, (♯‘𝑆)〉)‘𝑋)) |
37 | | swrdfv 14289 |
. . 3
⊢ (((𝑆 ∈ Word 𝐴 ∧ 𝑇 ∈ (0...(♯‘𝑆)) ∧ (♯‘𝑆) ∈
(0...(♯‘𝑆)))
∧ 𝑋 ∈
(0..^((♯‘𝑆)
− 𝑇))) → ((𝑆 substr 〈𝑇, (♯‘𝑆)〉)‘𝑋) = (𝑆‘(𝑋 + 𝑇))) |
38 | 1, 3, 30, 26, 37 | syl31anc 1371 |
. 2
⊢ (𝜑 → ((𝑆 substr 〈𝑇, (♯‘𝑆)〉)‘𝑋) = (𝑆‘(𝑋 + 𝑇))) |
39 | 21, 36, 38 | 3eqtrd 2782 |
1
⊢ (𝜑 → ((𝑆 splice 〈𝐹, 𝑇, 𝑅〉)‘(𝑋 + 𝐾)) = (𝑆‘(𝑋 + 𝑇))) |