Metamath Proof Explorer


Theorem addlenrevpfx

Description: The sum of the lengths of two reversed parts of a word is the length of the word. (Contributed by Alexander van der Vekens, 1-Apr-2018) (Revised by AV, 3-May-2020)

Ref Expression
Assertion addlenrevpfx WWordVM0WWsubstrMW+WprefixM=W

Proof

Step Hyp Ref Expression
1 swrdrlen WWordVM0WWsubstrMW=WM
2 pfxlen WWordVM0WWprefixM=M
3 1 2 oveq12d WWordVM0WWsubstrMW+WprefixM=W-M+M
4 lencl WWordVW0
5 elfzelz M0WM
6 nn0cn W0W
7 zcn MM
8 npcan WMW-M+M=W
9 6 7 8 syl2an W0MW-M+M=W
10 4 5 9 syl2an WWordVM0WW-M+M=W
11 3 10 eqtrd WWordVM0WWsubstrMW+WprefixM=W