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 14460 |
. . . 4
⊢ ((𝑆 ∈ Word 𝐴 ∧ (𝐹 ∈ (0...𝑇) ∧ 𝑇 ∈ (0...(♯‘𝑆)) ∧ 𝑅 ∈ Word 𝐴)) → (𝑆 splice 〈𝐹, 𝑇, 𝑅〉) = (((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr 〈𝑇, (♯‘𝑆)〉))) |
6 | 1, 2, 3, 4, 5 | syl13anc 1371 |
. . 3
⊢ (𝜑 → (𝑆 splice 〈𝐹, 𝑇, 𝑅〉) = (((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr 〈𝑇, (♯‘𝑆)〉))) |
7 | | elfzuz3 13250 |
. . . . . . . . 9
⊢ (𝑇 ∈
(0...(♯‘𝑆))
→ (♯‘𝑆)
∈ (ℤ≥‘𝑇)) |
8 | | fzss2 13293 |
. . . . . . . . 9
⊢
((♯‘𝑆)
∈ (ℤ≥‘𝑇) → (0...𝑇) ⊆ (0...(♯‘𝑆))) |
9 | 3, 7, 8 | 3syl 18 |
. . . . . . . 8
⊢ (𝜑 → (0...𝑇) ⊆ (0...(♯‘𝑆))) |
10 | 9, 2 | sseldd 3927 |
. . . . . . 7
⊢ (𝜑 → 𝐹 ∈ (0...(♯‘𝑆))) |
11 | | pfxlen 14392 |
. . . . . . 7
⊢ ((𝑆 ∈ Word 𝐴 ∧ 𝐹 ∈ (0...(♯‘𝑆))) → (♯‘(𝑆 prefix 𝐹)) = 𝐹) |
12 | 1, 10, 11 | syl2anc 584 |
. . . . . 6
⊢ (𝜑 → (♯‘(𝑆 prefix 𝐹)) = 𝐹) |
13 | 12 | oveq1d 7284 |
. . . . 5
⊢ (𝜑 → ((♯‘(𝑆 prefix 𝐹)) + (♯‘𝑅)) = (𝐹 + (♯‘𝑅))) |
14 | | pfxcl 14386 |
. . . . . . 7
⊢ (𝑆 ∈ Word 𝐴 → (𝑆 prefix 𝐹) ∈ Word 𝐴) |
15 | 1, 14 | syl 17 |
. . . . . 6
⊢ (𝜑 → (𝑆 prefix 𝐹) ∈ Word 𝐴) |
16 | | ccatlen 14274 |
. . . . . 6
⊢ (((𝑆 prefix 𝐹) ∈ Word 𝐴 ∧ 𝑅 ∈ Word 𝐴) → (♯‘((𝑆 prefix 𝐹) ++ 𝑅)) = ((♯‘(𝑆 prefix 𝐹)) + (♯‘𝑅))) |
17 | 15, 4, 16 | syl2anc 584 |
. . . . 5
⊢ (𝜑 → (♯‘((𝑆 prefix 𝐹) ++ 𝑅)) = ((♯‘(𝑆 prefix 𝐹)) + (♯‘𝑅))) |
18 | | splfv3.k |
. . . . 5
⊢ (𝜑 → 𝐾 = (𝐹 + (♯‘𝑅))) |
19 | 13, 17, 18 | 3eqtr4rd 2791 |
. . . 4
⊢ (𝜑 → 𝐾 = (♯‘((𝑆 prefix 𝐹) ++ 𝑅))) |
20 | 19 | oveq2d 7285 |
. . 3
⊢ (𝜑 → (𝑋 + 𝐾) = (𝑋 + (♯‘((𝑆 prefix 𝐹) ++ 𝑅)))) |
21 | 6, 20 | fveq12d 6776 |
. 2
⊢ (𝜑 → ((𝑆 splice 〈𝐹, 𝑇, 𝑅〉)‘(𝑋 + 𝐾)) = ((((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr 〈𝑇, (♯‘𝑆)〉))‘(𝑋 + (♯‘((𝑆 prefix 𝐹) ++ 𝑅))))) |
22 | | ccatcl 14273 |
. . . 4
⊢ (((𝑆 prefix 𝐹) ∈ Word 𝐴 ∧ 𝑅 ∈ Word 𝐴) → ((𝑆 prefix 𝐹) ++ 𝑅) ∈ Word 𝐴) |
23 | 15, 4, 22 | syl2anc 584 |
. . 3
⊢ (𝜑 → ((𝑆 prefix 𝐹) ++ 𝑅) ∈ Word 𝐴) |
24 | | swrdcl 14354 |
. . . 4
⊢ (𝑆 ∈ Word 𝐴 → (𝑆 substr 〈𝑇, (♯‘𝑆)〉) ∈ Word 𝐴) |
25 | 1, 24 | syl 17 |
. . 3
⊢ (𝜑 → (𝑆 substr 〈𝑇, (♯‘𝑆)〉) ∈ Word 𝐴) |
26 | | splfv3.x |
. . . 4
⊢ (𝜑 → 𝑋 ∈ (0..^((♯‘𝑆) − 𝑇))) |
27 | | lencl 14232 |
. . . . . . . 8
⊢ (𝑆 ∈ Word 𝐴 → (♯‘𝑆) ∈
ℕ0) |
28 | | nn0fz0 13351 |
. . . . . . . 8
⊢
((♯‘𝑆)
∈ ℕ0 ↔ (♯‘𝑆) ∈ (0...(♯‘𝑆))) |
29 | 27, 28 | sylib 217 |
. . . . . . 7
⊢ (𝑆 ∈ Word 𝐴 → (♯‘𝑆) ∈ (0...(♯‘𝑆))) |
30 | 1, 29 | syl 17 |
. . . . . 6
⊢ (𝜑 → (♯‘𝑆) ∈
(0...(♯‘𝑆))) |
31 | | swrdlen 14356 |
. . . . . 6
⊢ ((𝑆 ∈ Word 𝐴 ∧ 𝑇 ∈ (0...(♯‘𝑆)) ∧ (♯‘𝑆) ∈
(0...(♯‘𝑆)))
→ (♯‘(𝑆
substr 〈𝑇,
(♯‘𝑆)〉)) =
((♯‘𝑆) −
𝑇)) |
32 | 1, 3, 30, 31 | syl3anc 1370 |
. . . . 5
⊢ (𝜑 → (♯‘(𝑆 substr 〈𝑇, (♯‘𝑆)〉)) = ((♯‘𝑆) − 𝑇)) |
33 | 32 | oveq2d 7285 |
. . . 4
⊢ (𝜑 → (0..^(♯‘(𝑆 substr 〈𝑇, (♯‘𝑆)〉))) = (0..^((♯‘𝑆) − 𝑇))) |
34 | 26, 33 | eleqtrrd 2844 |
. . 3
⊢ (𝜑 → 𝑋 ∈ (0..^(♯‘(𝑆 substr 〈𝑇, (♯‘𝑆)〉)))) |
35 | | ccatval3 14280 |
. . 3
⊢ ((((𝑆 prefix 𝐹) ++ 𝑅) ∈ Word 𝐴 ∧ (𝑆 substr 〈𝑇, (♯‘𝑆)〉) ∈ Word 𝐴 ∧ 𝑋 ∈ (0..^(♯‘(𝑆 substr 〈𝑇, (♯‘𝑆)〉)))) → ((((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr 〈𝑇, (♯‘𝑆)〉))‘(𝑋 + (♯‘((𝑆 prefix 𝐹) ++ 𝑅)))) = ((𝑆 substr 〈𝑇, (♯‘𝑆)〉)‘𝑋)) |
36 | 23, 25, 34, 35 | syl3anc 1370 |
. 2
⊢ (𝜑 → ((((𝑆 prefix 𝐹) ++ 𝑅) ++ (𝑆 substr 〈𝑇, (♯‘𝑆)〉))‘(𝑋 + (♯‘((𝑆 prefix 𝐹) ++ 𝑅)))) = ((𝑆 substr 〈𝑇, (♯‘𝑆)〉)‘𝑋)) |
37 | | swrdfv 14357 |
. . 3
⊢ (((𝑆 ∈ Word 𝐴 ∧ 𝑇 ∈ (0...(♯‘𝑆)) ∧ (♯‘𝑆) ∈
(0...(♯‘𝑆)))
∧ 𝑋 ∈
(0..^((♯‘𝑆)
− 𝑇))) → ((𝑆 substr 〈𝑇, (♯‘𝑆)〉)‘𝑋) = (𝑆‘(𝑋 + 𝑇))) |
38 | 1, 3, 30, 26, 37 | syl31anc 1372 |
. 2
⊢ (𝜑 → ((𝑆 substr 〈𝑇, (♯‘𝑆)〉)‘𝑋) = (𝑆‘(𝑋 + 𝑇))) |
39 | 21, 36, 38 | 3eqtrd 2784 |
1
⊢ (𝜑 → ((𝑆 splice 〈𝐹, 𝑇, 𝑅〉)‘(𝑋 + 𝐾)) = (𝑆‘(𝑋 + 𝑇))) |