Metamath Proof Explorer


Theorem swrdccatin1

Description: The subword of a concatenation of two words within the first of the concatenated words. (Contributed by Alexander van der Vekens, 28-Mar-2018)

Ref Expression
Assertion swrdccatin1 A Word V B Word V M 0 N N 0 A A ++ B substr M N = A substr M N

Proof

Step Hyp Ref Expression
1 oveq2 A = 0 0 A = 0 0
2 1 eleq2d A = 0 N 0 A N 0 0
3 elfz1eq N 0 0 N = 0
4 elfz1eq M 0 0 M = 0
5 swrd00 A ++ B substr 0 0 =
6 swrd00 A substr 0 0 =
7 5 6 eqtr4i A ++ B substr 0 0 = A substr 0 0
8 opeq1 M = 0 M 0 = 0 0
9 8 oveq2d M = 0 A ++ B substr M 0 = A ++ B substr 0 0
10 8 oveq2d M = 0 A substr M 0 = A substr 0 0
11 7 9 10 3eqtr4a M = 0 A ++ B substr M 0 = A substr M 0
12 4 11 syl M 0 0 A ++ B substr M 0 = A substr M 0
13 oveq2 N = 0 0 N = 0 0
14 13 eleq2d N = 0 M 0 N M 0 0
15 opeq2 N = 0 M N = M 0
16 15 oveq2d N = 0 A ++ B substr M N = A ++ B substr M 0
17 15 oveq2d N = 0 A substr M N = A substr M 0
18 16 17 eqeq12d N = 0 A ++ B substr M N = A substr M N A ++ B substr M 0 = A substr M 0
19 14 18 imbi12d N = 0 M 0 N A ++ B substr M N = A substr M N M 0 0 A ++ B substr M 0 = A substr M 0
20 12 19 mpbiri N = 0 M 0 N A ++ B substr M N = A substr M N
21 3 20 syl N 0 0 M 0 N A ++ B substr M N = A substr M N
22 2 21 syl6bi A = 0 N 0 A M 0 N A ++ B substr M N = A substr M N
23 22 impcomd A = 0 M 0 N N 0 A A ++ B substr M N = A substr M N
24 23 adantl A Word V B Word V A = 0 M 0 N N 0 A A ++ B substr M N = A substr M N
25 ccatcl A Word V B Word V A ++ B Word V
26 25 ad2antrr A Word V B Word V A 0 M 0 N N 0 A A ++ B Word V
27 simprl A Word V B Word V A 0 M 0 N N 0 A M 0 N
28 elfzelfzccat A Word V B Word V N 0 A N 0 A ++ B
29 28 imp A Word V B Word V N 0 A N 0 A ++ B
30 29 ad2ant2rl A Word V B Word V A 0 M 0 N N 0 A N 0 A ++ B
31 swrdvalfn A ++ B Word V M 0 N N 0 A ++ B A ++ B substr M N Fn 0 ..^ N M
32 26 27 30 31 syl3anc A Word V B Word V A 0 M 0 N N 0 A A ++ B substr M N Fn 0 ..^ N M
33 3anass A Word V M 0 N N 0 A A Word V M 0 N N 0 A
34 33 simplbi2 A Word V M 0 N N 0 A A Word V M 0 N N 0 A
35 34 ad2antrr A Word V B Word V A 0 M 0 N N 0 A A Word V M 0 N N 0 A
36 35 imp A Word V B Word V A 0 M 0 N N 0 A A Word V M 0 N N 0 A
37 swrdvalfn A Word V M 0 N N 0 A A substr M N Fn 0 ..^ N M
38 36 37 syl A Word V B Word V A 0 M 0 N N 0 A A substr M N Fn 0 ..^ N M
39 simp-4l A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M A Word V
40 simp-4r A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M B Word V
41 elfznn0 M 0 N M 0
42 nn0addcl k 0 M 0 k + M 0
43 42 expcom M 0 k 0 k + M 0
44 41 43 syl M 0 N k 0 k + M 0
45 44 ad2antrl A Word V B Word V A 0 M 0 N N 0 A k 0 k + M 0
46 elfzonn0 k 0 ..^ N M k 0
47 45 46 impel A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M k + M 0
48 lencl A Word V A 0
49 elnnne0 A A 0 A 0
50 49 simplbi2 A 0 A 0 A
51 48 50 syl A Word V A 0 A
52 51 adantr A Word V B Word V A 0 A
53 52 imp A Word V B Word V A 0 A
54 53 ad2antrr A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M A
55 elfzo0 k 0 ..^ N M k 0 N M k < N M
56 elfz2nn0 N 0 A N 0 A 0 N A
57 nn0re k 0 k
58 57 ad2antrl N 0 A 0 k 0 M 0 k
59 nn0re M 0 M
60 59 ad2antll N 0 A 0 k 0 M 0 M
61 nn0re N 0 N
62 61 ad2antrr N 0 A 0 k 0 M 0 N
63 58 60 62 ltaddsubd N 0 A 0 k 0 M 0 k + M < N k < N M
64 nn0readdcl k 0 M 0 k + M
65 64 adantl N 0 A 0 k 0 M 0 k + M
66 nn0re A 0 A
67 66 ad2antlr N 0 A 0 k 0 M 0 A
68 ltletr k + M N A k + M < N N A k + M < A
69 65 62 67 68 syl3anc N 0 A 0 k 0 M 0 k + M < N N A k + M < A
70 69 expd N 0 A 0 k 0 M 0 k + M < N N A k + M < A
71 63 70 sylbird N 0 A 0 k 0 M 0 k < N M N A k + M < A
72 71 ex N 0 A 0 k 0 M 0 k < N M N A k + M < A
73 72 com24 N 0 A 0 N A k < N M k 0 M 0 k + M < A
74 73 3impia N 0 A 0 N A k < N M k 0 M 0 k + M < A
75 74 com13 k 0 M 0 k < N M N 0 A 0 N A k + M < A
76 75 impancom k 0 k < N M M 0 N 0 A 0 N A k + M < A
77 76 3adant2 k 0 N M k < N M M 0 N 0 A 0 N A k + M < A
78 77 com13 N 0 A 0 N A M 0 k 0 N M k < N M k + M < A
79 56 78 sylbi N 0 A M 0 k 0 N M k < N M k + M < A
80 41 79 mpan9 M 0 N N 0 A k 0 N M k < N M k + M < A
81 80 adantl A Word V B Word V A 0 M 0 N N 0 A k 0 N M k < N M k + M < A
82 55 81 syl5bi A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M k + M < A
83 82 imp A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M k + M < A
84 elfzo0 k + M 0 ..^ A k + M 0 A k + M < A
85 47 54 83 84 syl3anbrc A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M k + M 0 ..^ A
86 ccatval1 A Word V B Word V k + M 0 ..^ A A ++ B k + M = A k + M
87 39 40 85 86 syl3anc A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M A ++ B k + M = A k + M
88 25 ad5ant12 A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M A ++ B Word V
89 simplrl A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M M 0 N
90 30 adantr A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M N 0 A ++ B
91 simpr A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M k 0 ..^ N M
92 swrdfv A ++ B Word V M 0 N N 0 A ++ B k 0 ..^ N M A ++ B substr M N k = A ++ B k + M
93 88 89 90 91 92 syl31anc A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M A ++ B substr M N k = A ++ B k + M
94 swrdfv A Word V M 0 N N 0 A k 0 ..^ N M A substr M N k = A k + M
95 36 94 sylan A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M A substr M N k = A k + M
96 87 93 95 3eqtr4d A Word V B Word V A 0 M 0 N N 0 A k 0 ..^ N M A ++ B substr M N k = A substr M N k
97 32 38 96 eqfnfvd A Word V B Word V A 0 M 0 N N 0 A A ++ B substr M N = A substr M N
98 97 ex A Word V B Word V A 0 M 0 N N 0 A A ++ B substr M N = A substr M N
99 24 98 pm2.61dane A Word V B Word V M 0 N N 0 A A ++ B substr M N = A substr M N