Step |
Hyp |
Ref |
Expression |
1 |
|
pfxfn |
⊢ ( ( 𝑆 ∈ Word 𝐴 ∧ 𝐿 ∈ ( 0 ... ( ♯ ‘ 𝑆 ) ) ) → ( 𝑆 prefix 𝐿 ) Fn ( 0 ..^ 𝐿 ) ) |
2 |
|
hashfn |
⊢ ( ( 𝑆 prefix 𝐿 ) Fn ( 0 ..^ 𝐿 ) → ( ♯ ‘ ( 𝑆 prefix 𝐿 ) ) = ( ♯ ‘ ( 0 ..^ 𝐿 ) ) ) |
3 |
1 2
|
syl |
⊢ ( ( 𝑆 ∈ Word 𝐴 ∧ 𝐿 ∈ ( 0 ... ( ♯ ‘ 𝑆 ) ) ) → ( ♯ ‘ ( 𝑆 prefix 𝐿 ) ) = ( ♯ ‘ ( 0 ..^ 𝐿 ) ) ) |
4 |
|
elfznn0 |
⊢ ( 𝐿 ∈ ( 0 ... ( ♯ ‘ 𝑆 ) ) → 𝐿 ∈ ℕ0 ) |
5 |
4
|
adantl |
⊢ ( ( 𝑆 ∈ Word 𝐴 ∧ 𝐿 ∈ ( 0 ... ( ♯ ‘ 𝑆 ) ) ) → 𝐿 ∈ ℕ0 ) |
6 |
|
hashfzo0 |
⊢ ( 𝐿 ∈ ℕ0 → ( ♯ ‘ ( 0 ..^ 𝐿 ) ) = 𝐿 ) |
7 |
5 6
|
syl |
⊢ ( ( 𝑆 ∈ Word 𝐴 ∧ 𝐿 ∈ ( 0 ... ( ♯ ‘ 𝑆 ) ) ) → ( ♯ ‘ ( 0 ..^ 𝐿 ) ) = 𝐿 ) |
8 |
3 7
|
eqtrd |
⊢ ( ( 𝑆 ∈ Word 𝐴 ∧ 𝐿 ∈ ( 0 ... ( ♯ ‘ 𝑆 ) ) ) → ( ♯ ‘ ( 𝑆 prefix 𝐿 ) ) = 𝐿 ) |