Metamath Proof Explorer


Theorem swrdco

Description: Mapping of words commutes with the substring operation. (Contributed by AV, 11-Nov-2018)

Ref Expression
Assertion swrdco WWordAM0NN0WF:ABFWsubstrMN=FWsubstrMN

Proof

Step Hyp Ref Expression
1 ffn F:ABFFnA
2 1 3ad2ant3 WWordAM0NN0WF:ABFFnA
3 swrdvalfn WWordAM0NN0WWsubstrMNFn0..^NM
4 3 3expb WWordAM0NN0WWsubstrMNFn0..^NM
5 4 3adant3 WWordAM0NN0WF:ABWsubstrMNFn0..^NM
6 swrdrn WWordAM0NN0WranWsubstrMNA
7 6 3expb WWordAM0NN0WranWsubstrMNA
8 7 3adant3 WWordAM0NN0WF:ABranWsubstrMNA
9 fnco FFnAWsubstrMNFn0..^NMranWsubstrMNAFWsubstrMNFn0..^NM
10 2 5 8 9 syl3anc WWordAM0NN0WF:ABFWsubstrMNFn0..^NM
11 wrdco WWordAF:ABFWWordB
12 11 3adant2 WWordAM0NN0WF:ABFWWordB
13 simp2l WWordAM0NN0WF:ABM0N
14 lenco WWordAF:ABFW=W
15 14 eqcomd WWordAF:ABW=FW
16 15 oveq2d WWordAF:AB0W=0FW
17 16 eleq2d WWordAF:ABN0WN0FW
18 17 biimpd WWordAF:ABN0WN0FW
19 18 expcom F:ABWWordAN0WN0FW
20 19 com13 N0WWWordAF:ABN0FW
21 20 adantl M0NN0WWWordAF:ABN0FW
22 21 3imp21 WWordAM0NN0WF:ABN0FW
23 swrdvalfn FWWordBM0NN0FWFWsubstrMNFn0..^NM
24 12 13 22 23 syl3anc WWordAM0NN0WF:ABFWsubstrMNFn0..^NM
25 3anass WWordAM0NN0WWWordAM0NN0W
26 25 biimpri WWordAM0NN0WWWordAM0NN0W
27 26 3adant3 WWordAM0NN0WF:ABWWordAM0NN0W
28 swrdfv WWordAM0NN0Wi0..^NMWsubstrMNi=Wi+M
29 28 fveq2d WWordAM0NN0Wi0..^NMFWsubstrMNi=FWi+M
30 27 29 sylan WWordAM0NN0WF:ABi0..^NMFWsubstrMNi=FWi+M
31 wrdfn WWordAWFn0..^W
32 31 3ad2ant1 WWordAM0NN0WF:ABWFn0..^W
33 elfzodifsumelfzo M0NN0Wi0..^NMi+M0..^W
34 33 3ad2ant2 WWordAM0NN0WF:ABi0..^NMi+M0..^W
35 34 imp WWordAM0NN0WF:ABi0..^NMi+M0..^W
36 fvco2 WFn0..^Wi+M0..^WFWi+M=FWi+M
37 32 35 36 syl2an2r WWordAM0NN0WF:ABi0..^NMFWi+M=FWi+M
38 30 37 eqtr4d WWordAM0NN0WF:ABi0..^NMFWsubstrMNi=FWi+M
39 fvco2 WsubstrMNFn0..^NMi0..^NMFWsubstrMNi=FWsubstrMNi
40 5 39 sylan WWordAM0NN0WF:ABi0..^NMFWsubstrMNi=FWsubstrMNi
41 14 ancoms F:ABWWordAFW=W
42 41 eqcomd F:ABWWordAW=FW
43 42 oveq2d F:ABWWordA0W=0FW
44 43 eleq2d F:ABWWordAN0WN0FW
45 44 biimpd F:ABWWordAN0WN0FW
46 45 ex F:ABWWordAN0WN0FW
47 46 com13 N0WWWordAF:ABN0FW
48 47 adantl M0NN0WWWordAF:ABN0FW
49 48 3imp21 WWordAM0NN0WF:ABN0FW
50 12 13 49 3jca WWordAM0NN0WF:ABFWWordBM0NN0FW
51 swrdfv FWWordBM0NN0FWi0..^NMFWsubstrMNi=FWi+M
52 50 51 sylan WWordAM0NN0WF:ABi0..^NMFWsubstrMNi=FWi+M
53 38 40 52 3eqtr4d WWordAM0NN0WF:ABi0..^NMFWsubstrMNi=FWsubstrMNi
54 10 24 53 eqfnfvd WWordAM0NN0WF:ABFWsubstrMN=FWsubstrMN