Metamath Proof Explorer


Theorem pfxco

Description: Mapping of words commutes with the prefix operation. (Contributed by AV, 15-May-2020)

Ref Expression
Assertion pfxco W Word A N 0 W F : A B F W prefix N = F W prefix N

Proof

Step Hyp Ref Expression
1 elfznn0 N 0 W N 0
2 1 3ad2ant2 W Word A N 0 W F : A B N 0
3 0elfz N 0 0 0 N
4 2 3 syl W Word A N 0 W F : A B 0 0 N
5 simp2 W Word A N 0 W F : A B N 0 W
6 4 5 jca W Word A N 0 W F : A B 0 0 N N 0 W
7 swrdco W Word A 0 0 N N 0 W F : A B F W substr 0 N = F W substr 0 N
8 6 7 syld3an2 W Word A N 0 W F : A B F W substr 0 N = F W substr 0 N
9 pfxval W Word A N 0 W prefix N = W substr 0 N
10 1 9 sylan2 W Word A N 0 W W prefix N = W substr 0 N
11 10 coeq2d W Word A N 0 W F W prefix N = F W substr 0 N
12 11 3adant3 W Word A N 0 W F : A B F W prefix N = F W substr 0 N
13 ffun F : A B Fun F
14 13 anim2i W Word A F : A B W Word A Fun F
15 14 ancomd W Word A F : A B Fun F W Word A
16 15 3adant2 W Word A N 0 W F : A B Fun F W Word A
17 cofunexg Fun F W Word A F W V
18 16 17 syl W Word A N 0 W F : A B F W V
19 18 2 jca W Word A N 0 W F : A B F W V N 0
20 pfxval F W V N 0 F W prefix N = F W substr 0 N
21 19 20 syl W Word A N 0 W F : A B F W prefix N = F W substr 0 N
22 8 12 21 3eqtr4d W Word A N 0 W F : A B F W prefix N = F W prefix N