Step |
Hyp |
Ref |
Expression |
1 |
|
lpadlen.1 |
⊢ ( 𝜑 → 𝐿 ∈ ℕ0 ) |
2 |
|
lpadlen.2 |
⊢ ( 𝜑 → 𝑊 ∈ Word 𝑆 ) |
3 |
|
lpadlen.3 |
⊢ ( 𝜑 → 𝐶 ∈ 𝑆 ) |
4 |
|
lpadlen2.1 |
⊢ ( 𝜑 → ( ♯ ‘ 𝑊 ) ≤ 𝐿 ) |
5 |
1 2 3
|
lpadval |
⊢ ( 𝜑 → ( ( 𝐶 leftpad 𝑊 ) ‘ 𝐿 ) = ( ( ( 0 ..^ ( 𝐿 − ( ♯ ‘ 𝑊 ) ) ) × { 𝐶 } ) ++ 𝑊 ) ) |
6 |
5
|
fveq2d |
⊢ ( 𝜑 → ( ♯ ‘ ( ( 𝐶 leftpad 𝑊 ) ‘ 𝐿 ) ) = ( ♯ ‘ ( ( ( 0 ..^ ( 𝐿 − ( ♯ ‘ 𝑊 ) ) ) × { 𝐶 } ) ++ 𝑊 ) ) ) |
7 |
3
|
lpadlem1 |
⊢ ( 𝜑 → ( ( 0 ..^ ( 𝐿 − ( ♯ ‘ 𝑊 ) ) ) × { 𝐶 } ) ∈ Word 𝑆 ) |
8 |
|
ccatlen |
⊢ ( ( ( ( 0 ..^ ( 𝐿 − ( ♯ ‘ 𝑊 ) ) ) × { 𝐶 } ) ∈ Word 𝑆 ∧ 𝑊 ∈ Word 𝑆 ) → ( ♯ ‘ ( ( ( 0 ..^ ( 𝐿 − ( ♯ ‘ 𝑊 ) ) ) × { 𝐶 } ) ++ 𝑊 ) ) = ( ( ♯ ‘ ( ( 0 ..^ ( 𝐿 − ( ♯ ‘ 𝑊 ) ) ) × { 𝐶 } ) ) + ( ♯ ‘ 𝑊 ) ) ) |
9 |
7 2 8
|
syl2anc |
⊢ ( 𝜑 → ( ♯ ‘ ( ( ( 0 ..^ ( 𝐿 − ( ♯ ‘ 𝑊 ) ) ) × { 𝐶 } ) ++ 𝑊 ) ) = ( ( ♯ ‘ ( ( 0 ..^ ( 𝐿 − ( ♯ ‘ 𝑊 ) ) ) × { 𝐶 } ) ) + ( ♯ ‘ 𝑊 ) ) ) |
10 |
1 2 3 4
|
lpadlem2 |
⊢ ( 𝜑 → ( ♯ ‘ ( ( 0 ..^ ( 𝐿 − ( ♯ ‘ 𝑊 ) ) ) × { 𝐶 } ) ) = ( 𝐿 − ( ♯ ‘ 𝑊 ) ) ) |
11 |
10
|
oveq1d |
⊢ ( 𝜑 → ( ( ♯ ‘ ( ( 0 ..^ ( 𝐿 − ( ♯ ‘ 𝑊 ) ) ) × { 𝐶 } ) ) + ( ♯ ‘ 𝑊 ) ) = ( ( 𝐿 − ( ♯ ‘ 𝑊 ) ) + ( ♯ ‘ 𝑊 ) ) ) |
12 |
1
|
nn0cnd |
⊢ ( 𝜑 → 𝐿 ∈ ℂ ) |
13 |
|
lencl |
⊢ ( 𝑊 ∈ Word 𝑆 → ( ♯ ‘ 𝑊 ) ∈ ℕ0 ) |
14 |
2 13
|
syl |
⊢ ( 𝜑 → ( ♯ ‘ 𝑊 ) ∈ ℕ0 ) |
15 |
14
|
nn0cnd |
⊢ ( 𝜑 → ( ♯ ‘ 𝑊 ) ∈ ℂ ) |
16 |
12 15
|
npcand |
⊢ ( 𝜑 → ( ( 𝐿 − ( ♯ ‘ 𝑊 ) ) + ( ♯ ‘ 𝑊 ) ) = 𝐿 ) |
17 |
9 11 16
|
3eqtrd |
⊢ ( 𝜑 → ( ♯ ‘ ( ( ( 0 ..^ ( 𝐿 − ( ♯ ‘ 𝑊 ) ) ) × { 𝐶 } ) ++ 𝑊 ) ) = 𝐿 ) |
18 |
6 17
|
eqtrd |
⊢ ( 𝜑 → ( ♯ ‘ ( ( 𝐶 leftpad 𝑊 ) ‘ 𝐿 ) ) = 𝐿 ) |