Metamath Proof Explorer


Theorem swrdf1

Description: Condition for a subword to be injective. (Contributed by Thierry Arnoux, 12-Dec-2023)

Ref Expression
Hypotheses swrdf1.w φWWordD
swrdf1.m φM0N
swrdf1.n φN0W
swrdf1.1 φW:domW1-1D
Assertion swrdf1 φWsubstrMN:domWsubstrMN1-1D

Proof

Step Hyp Ref Expression
1 swrdf1.w φWWordD
2 swrdf1.m φM0N
3 swrdf1.n φN0W
4 swrdf1.1 φW:domW1-1D
5 swrdf WWordDM0NN0WWsubstrMN:0..^NMD
6 1 2 3 5 syl3anc φWsubstrMN:0..^NMD
7 6 ffdmd φWsubstrMN:domWsubstrMND
8 fzossz 0..^NM
9 simpllr φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjidomWsubstrMN
10 6 fdmd φdomWsubstrMN=0..^NM
11 10 ad3antrrr φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjdomWsubstrMN=0..^NM
12 9 11 eleqtrd φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNji0..^NM
13 8 12 sselid φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNji
14 13 zcnd φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNji
15 simplr φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjjdomWsubstrMN
16 15 11 eleqtrd φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjj0..^NM
17 8 16 sselid φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjj
18 17 zcnd φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjj
19 2 elfzelzd φM
20 19 ad3antrrr φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjM
21 20 zcnd φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjM
22 4 ad3antrrr φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjW:domW1-1D
23 elfzuz M0NM0
24 fzoss1 M0M..^N0..^N
25 2 23 24 3syl φM..^N0..^N
26 elfzuz3 N0WWN
27 fzoss2 WN0..^N0..^W
28 3 26 27 3syl φ0..^N0..^W
29 25 28 sstrd φM..^N0..^W
30 29 ad3antrrr φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjM..^N0..^W
31 3 elfzelzd φN
32 31 ad3antrrr φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjN
33 fzoaddel2 i0..^NMNMi+MM..^N
34 12 32 20 33 syl3anc φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNji+MM..^N
35 30 34 sseldd φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNji+M0..^W
36 wrddm WWordDdomW=0..^W
37 1 36 syl φdomW=0..^W
38 37 ad3antrrr φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjdomW=0..^W
39 35 38 eleqtrrd φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNji+MdomW
40 fzoaddel2 j0..^NMNMj+MM..^N
41 16 32 20 40 syl3anc φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjj+MM..^N
42 30 41 sseldd φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjj+M0..^W
43 42 38 eleqtrrd φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjj+MdomW
44 simpr φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjWsubstrMNi=WsubstrMNj
45 1 ad3antrrr φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjWWordD
46 2 ad3antrrr φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjM0N
47 3 ad3antrrr φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjN0W
48 swrdfv WWordDM0NN0Wi0..^NMWsubstrMNi=Wi+M
49 45 46 47 12 48 syl31anc φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjWsubstrMNi=Wi+M
50 swrdfv WWordDM0NN0Wj0..^NMWsubstrMNj=Wj+M
51 45 46 47 16 50 syl31anc φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjWsubstrMNj=Wj+M
52 44 49 51 3eqtr3d φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNjWi+M=Wj+M
53 f1veqaeq W:domW1-1Di+MdomWj+MdomWWi+M=Wj+Mi+M=j+M
54 53 anassrs W:domW1-1Di+MdomWj+MdomWWi+M=Wj+Mi+M=j+M
55 54 imp W:domW1-1Di+MdomWj+MdomWWi+M=Wj+Mi+M=j+M
56 22 39 43 52 55 syl1111anc φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNji+M=j+M
57 14 18 21 56 addcan2ad φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNji=j
58 57 ex φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNji=j
59 58 anasss φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNji=j
60 59 ralrimivva φidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNji=j
61 dff13 WsubstrMN:domWsubstrMN1-1DWsubstrMN:domWsubstrMNDidomWsubstrMNjdomWsubstrMNWsubstrMNi=WsubstrMNji=j
62 7 60 61 sylanbrc φWsubstrMN:domWsubstrMN1-1D