Step |
Hyp |
Ref |
Expression |
1 |
|
swrdrlen |
⊢ ( ( 𝑊 ∈ Word 𝑉 ∧ 𝑀 ∈ ( 0 ... ( ♯ ‘ 𝑊 ) ) ) → ( ♯ ‘ ( 𝑊 substr 〈 𝑀 , ( ♯ ‘ 𝑊 ) 〉 ) ) = ( ( ♯ ‘ 𝑊 ) − 𝑀 ) ) |
2 |
|
pfxlen |
⊢ ( ( 𝑊 ∈ Word 𝑉 ∧ 𝑀 ∈ ( 0 ... ( ♯ ‘ 𝑊 ) ) ) → ( ♯ ‘ ( 𝑊 prefix 𝑀 ) ) = 𝑀 ) |
3 |
1 2
|
oveq12d |
⊢ ( ( 𝑊 ∈ Word 𝑉 ∧ 𝑀 ∈ ( 0 ... ( ♯ ‘ 𝑊 ) ) ) → ( ( ♯ ‘ ( 𝑊 substr 〈 𝑀 , ( ♯ ‘ 𝑊 ) 〉 ) ) + ( ♯ ‘ ( 𝑊 prefix 𝑀 ) ) ) = ( ( ( ♯ ‘ 𝑊 ) − 𝑀 ) + 𝑀 ) ) |
4 |
|
lencl |
⊢ ( 𝑊 ∈ Word 𝑉 → ( ♯ ‘ 𝑊 ) ∈ ℕ0 ) |
5 |
|
elfzelz |
⊢ ( 𝑀 ∈ ( 0 ... ( ♯ ‘ 𝑊 ) ) → 𝑀 ∈ ℤ ) |
6 |
|
nn0cn |
⊢ ( ( ♯ ‘ 𝑊 ) ∈ ℕ0 → ( ♯ ‘ 𝑊 ) ∈ ℂ ) |
7 |
|
zcn |
⊢ ( 𝑀 ∈ ℤ → 𝑀 ∈ ℂ ) |
8 |
|
npcan |
⊢ ( ( ( ♯ ‘ 𝑊 ) ∈ ℂ ∧ 𝑀 ∈ ℂ ) → ( ( ( ♯ ‘ 𝑊 ) − 𝑀 ) + 𝑀 ) = ( ♯ ‘ 𝑊 ) ) |
9 |
6 7 8
|
syl2an |
⊢ ( ( ( ♯ ‘ 𝑊 ) ∈ ℕ0 ∧ 𝑀 ∈ ℤ ) → ( ( ( ♯ ‘ 𝑊 ) − 𝑀 ) + 𝑀 ) = ( ♯ ‘ 𝑊 ) ) |
10 |
4 5 9
|
syl2an |
⊢ ( ( 𝑊 ∈ Word 𝑉 ∧ 𝑀 ∈ ( 0 ... ( ♯ ‘ 𝑊 ) ) ) → ( ( ( ♯ ‘ 𝑊 ) − 𝑀 ) + 𝑀 ) = ( ♯ ‘ 𝑊 ) ) |
11 |
3 10
|
eqtrd |
⊢ ( ( 𝑊 ∈ Word 𝑉 ∧ 𝑀 ∈ ( 0 ... ( ♯ ‘ 𝑊 ) ) ) → ( ( ♯ ‘ ( 𝑊 substr 〈 𝑀 , ( ♯ ‘ 𝑊 ) 〉 ) ) + ( ♯ ‘ ( 𝑊 prefix 𝑀 ) ) ) = ( ♯ ‘ 𝑊 ) ) |