Metamath Proof Explorer


Theorem addlenpfx

Description: The sum of the lengths of two parts of a word is the length of the word. (Contributed by AV, 21-Oct-2018) (Revised by AV, 3-May-2020)

Ref Expression
Assertion addlenpfx WWordVM0WWprefixM+WsubstrMW=W

Proof

Step Hyp Ref Expression
1 pfxlen WWordVM0WWprefixM=M
2 swrdrlen WWordVM0WWsubstrMW=WM
3 1 2 oveq12d WWordVM0WWprefixM+WsubstrMW=M+W-M
4 elfznn0 M0WM0
5 4 nn0cnd M0WM
6 lencl WWordVW0
7 6 nn0cnd WWordVW
8 pncan3 MWM+W-M=W
9 5 7 8 syl2anr WWordVM0WM+W-M=W
10 3 9 eqtrd WWordVM0WWprefixM+WsubstrMW=W