Metamath Proof Explorer


Theorem repswpfx

Description: A prefix of a repeated symbol word is a repeated symbol word. (Contributed by AV, 11-May-2020)

Ref Expression
Assertion repswpfx S V N 0 L 0 N S repeatS N prefix L = S repeatS L

Proof

Step Hyp Ref Expression
1 repsw S V N 0 S repeatS N Word V
2 1 3adant3 S V N 0 L 0 N S repeatS N Word V
3 repswlen S V N 0 S repeatS N = N
4 3 oveq2d S V N 0 0 S repeatS N = 0 N
5 4 eleq2d S V N 0 L 0 S repeatS N L 0 N
6 5 biimp3ar S V N 0 L 0 N L 0 S repeatS N
7 pfxlen S repeatS N Word V L 0 S repeatS N S repeatS N prefix L = L
8 2 6 7 syl2anc S V N 0 L 0 N S repeatS N prefix L = L
9 elfznn0 L 0 N L 0
10 repswlen S V L 0 S repeatS L = L
11 9 10 sylan2 S V L 0 N S repeatS L = L
12 11 3adant2 S V N 0 L 0 N S repeatS L = L
13 8 12 eqtr4d S V N 0 L 0 N S repeatS N prefix L = S repeatS L
14 simpl1 S V N 0 L 0 N i 0 ..^ S repeatS N prefix L S V
15 simpl2 S V N 0 L 0 N i 0 ..^ S repeatS N prefix L N 0
16 elfzuz3 L 0 N N L
17 16 3ad2ant3 S V N 0 L 0 N N L
18 8 fveq2d S V N 0 L 0 N S repeatS N prefix L = L
19 17 18 eleqtrrd S V N 0 L 0 N N S repeatS N prefix L
20 fzoss2 N S repeatS N prefix L 0 ..^ S repeatS N prefix L 0 ..^ N
21 19 20 syl S V N 0 L 0 N 0 ..^ S repeatS N prefix L 0 ..^ N
22 21 sselda S V N 0 L 0 N i 0 ..^ S repeatS N prefix L i 0 ..^ N
23 repswsymb S V N 0 i 0 ..^ N S repeatS N i = S
24 14 15 22 23 syl3anc S V N 0 L 0 N i 0 ..^ S repeatS N prefix L S repeatS N i = S
25 2 adantr S V N 0 L 0 N i 0 ..^ S repeatS N prefix L S repeatS N Word V
26 6 adantr S V N 0 L 0 N i 0 ..^ S repeatS N prefix L L 0 S repeatS N
27 8 oveq2d S V N 0 L 0 N 0 ..^ S repeatS N prefix L = 0 ..^ L
28 27 eleq2d S V N 0 L 0 N i 0 ..^ S repeatS N prefix L i 0 ..^ L
29 28 biimpa S V N 0 L 0 N i 0 ..^ S repeatS N prefix L i 0 ..^ L
30 pfxfv S repeatS N Word V L 0 S repeatS N i 0 ..^ L S repeatS N prefix L i = S repeatS N i
31 25 26 29 30 syl3anc S V N 0 L 0 N i 0 ..^ S repeatS N prefix L S repeatS N prefix L i = S repeatS N i
32 9 3ad2ant3 S V N 0 L 0 N L 0
33 32 adantr S V N 0 L 0 N i 0 ..^ S repeatS N prefix L L 0
34 repswsymb S V L 0 i 0 ..^ L S repeatS L i = S
35 14 33 29 34 syl3anc S V N 0 L 0 N i 0 ..^ S repeatS N prefix L S repeatS L i = S
36 24 31 35 3eqtr4d S V N 0 L 0 N i 0 ..^ S repeatS N prefix L S repeatS N prefix L i = S repeatS L i
37 36 ralrimiva S V N 0 L 0 N i 0 ..^ S repeatS N prefix L S repeatS N prefix L i = S repeatS L i
38 pfxcl S repeatS N Word V S repeatS N prefix L Word V
39 2 38 syl S V N 0 L 0 N S repeatS N prefix L Word V
40 repsw S V L 0 S repeatS L Word V
41 9 40 sylan2 S V L 0 N S repeatS L Word V
42 eqwrd S repeatS N prefix L Word V S repeatS L Word V S repeatS N prefix L = S repeatS L S repeatS N prefix L = S repeatS L i 0 ..^ S repeatS N prefix L S repeatS N prefix L i = S repeatS L i
43 39 41 42 3imp3i2an S V N 0 L 0 N S repeatS N prefix L = S repeatS L S repeatS N prefix L = S repeatS L i 0 ..^ S repeatS N prefix L S repeatS N prefix L i = S repeatS L i
44 13 37 43 mpbir2and S V N 0 L 0 N S repeatS N prefix L = S repeatS L