Metamath Proof Explorer


Theorem lenpfxcctswrd

Description: The length of the concatenation of the prefix of a word and the rest of the word is the length of the word. (Contributed by AV, 21-Oct-2018) (Revised by AV, 9-May-2020)

Ref Expression
Assertion lenpfxcctswrd ( ( 𝑊 ∈ Word 𝑉𝑀 ∈ ( 0 ... ( ♯ ‘ 𝑊 ) ) ) → ( ♯ ‘ ( ( 𝑊 prefix 𝑀 ) ++ ( 𝑊 substr ⟨ 𝑀 , ( ♯ ‘ 𝑊 ) ⟩ ) ) ) = ( ♯ ‘ 𝑊 ) )

Proof

Step Hyp Ref Expression
1 pfxcctswrd ( ( 𝑊 ∈ Word 𝑉𝑀 ∈ ( 0 ... ( ♯ ‘ 𝑊 ) ) ) → ( ( 𝑊 prefix 𝑀 ) ++ ( 𝑊 substr ⟨ 𝑀 , ( ♯ ‘ 𝑊 ) ⟩ ) ) = 𝑊 )
2 1 fveq2d ( ( 𝑊 ∈ Word 𝑉𝑀 ∈ ( 0 ... ( ♯ ‘ 𝑊 ) ) ) → ( ♯ ‘ ( ( 𝑊 prefix 𝑀 ) ++ ( 𝑊 substr ⟨ 𝑀 , ( ♯ ‘ 𝑊 ) ⟩ ) ) ) = ( ♯ ‘ 𝑊 ) )