Metamath Proof Explorer


Theorem swrdccat3blem

Description: Lemma for swrdccat3b . (Contributed by AV, 30-May-2018)

Ref Expression
Hypothesis swrdccatin2.l L = A
Assertion swrdccat3blem A Word V B Word V M 0 L + B L + B L if L M B substr M L B A substr M L ++ B = A substr M L + B

Proof

Step Hyp Ref Expression
1 swrdccatin2.l L = A
2 lencl B Word V B 0
3 nn0le0eq0 B 0 B 0 B = 0
4 3 biimpd B 0 B 0 B = 0
5 2 4 syl B Word V B 0 B = 0
6 5 adantl A Word V B Word V B 0 B = 0
7 hasheq0 B Word V B = 0 B =
8 7 biimpd B Word V B = 0 B =
9 8 adantl A Word V B Word V B = 0 B =
10 9 imp A Word V B Word V B = 0 B =
11 lencl A Word V A 0
12 1 eqcomi A = L
13 12 eleq1i A 0 L 0
14 nn0re L 0 L
15 elfz2nn0 M 0 L + 0 M 0 L + 0 0 M L + 0
16 recn L L
17 16 addid1d L L + 0 = L
18 17 breq2d L M L + 0 M L
19 nn0re M 0 M
20 19 anim1i M 0 L M L
21 20 ancoms L M 0 M L
22 letri3 M L M = L M L L M
23 21 22 syl L M 0 M = L M L L M
24 23 biimprd L M 0 M L L M M = L
25 24 exp4b L M 0 M L L M M = L
26 25 com23 L M L M 0 L M M = L
27 18 26 sylbid L M L + 0 M 0 L M M = L
28 27 com3l M L + 0 M 0 L L M M = L
29 28 impcom M 0 M L + 0 L L M M = L
30 29 3adant2 M 0 L + 0 0 M L + 0 L L M M = L
31 30 com12 L M 0 L + 0 0 M L + 0 L M M = L
32 15 31 syl5bi L M 0 L + 0 L M M = L
33 14 32 syl L 0 M 0 L + 0 L M M = L
34 13 33 sylbi A 0 M 0 L + 0 L M M = L
35 11 34 syl A Word V M 0 L + 0 L M M = L
36 35 imp A Word V M 0 L + 0 L M M = L
37 elfznn0 M 0 L + 0 M 0
38 swrd00 substr 0 0 =
39 swrd00 A substr L L =
40 38 39 eqtr4i substr 0 0 = A substr L L
41 nn0cn L 0 L
42 41 subidd L 0 L L = 0
43 42 opeq1d L 0 L L 0 = 0 0
44 43 oveq2d L 0 substr L L 0 = substr 0 0
45 41 addid1d L 0 L + 0 = L
46 45 opeq2d L 0 L L + 0 = L L
47 46 oveq2d L 0 A substr L L + 0 = A substr L L
48 40 44 47 3eqtr4a L 0 substr L L 0 = A substr L L + 0
49 48 a1i M = L L 0 substr L L 0 = A substr L L + 0
50 eleq1 M = L M 0 L 0
51 oveq1 M = L M L = L L
52 51 opeq1d M = L M L 0 = L L 0
53 52 oveq2d M = L substr M L 0 = substr L L 0
54 opeq1 M = L M L + 0 = L L + 0
55 54 oveq2d M = L A substr M L + 0 = A substr L L + 0
56 53 55 eqeq12d M = L substr M L 0 = A substr M L + 0 substr L L 0 = A substr L L + 0
57 49 50 56 3imtr4d M = L M 0 substr M L 0 = A substr M L + 0
58 57 com12 M 0 M = L substr M L 0 = A substr M L + 0
59 58 a1d M 0 A Word V M = L substr M L 0 = A substr M L + 0
60 37 59 syl M 0 L + 0 A Word V M = L substr M L 0 = A substr M L + 0
61 60 impcom A Word V M 0 L + 0 M = L substr M L 0 = A substr M L + 0
62 36 61 syld A Word V M 0 L + 0 L M substr M L 0 = A substr M L + 0
63 62 imp A Word V M 0 L + 0 L M substr M L 0 = A substr M L + 0
64 swrdcl A Word V A substr M L Word V
65 ccatrid A substr M L Word V A substr M L ++ = A substr M L
66 64 65 syl A Word V A substr M L ++ = A substr M L
67 13 41 sylbi A 0 L
68 11 67 syl A Word V L
69 addid1 L L + 0 = L
70 69 eqcomd L L = L + 0
71 68 70 syl A Word V L = L + 0
72 71 opeq2d A Word V M L = M L + 0
73 72 oveq2d A Word V A substr M L = A substr M L + 0
74 66 73 eqtrd A Word V A substr M L ++ = A substr M L + 0
75 74 adantr A Word V M 0 L + 0 A substr M L ++ = A substr M L + 0
76 75 adantr A Word V M 0 L + 0 ¬ L M A substr M L ++ = A substr M L + 0
77 63 76 ifeqda A Word V M 0 L + 0 if L M substr M L 0 A substr M L ++ = A substr M L + 0
78 77 ex A Word V M 0 L + 0 if L M substr M L 0 A substr M L ++ = A substr M L + 0
79 78 ad3antrrr A Word V B Word V B = 0 B = M 0 L + 0 if L M substr M L 0 A substr M L ++ = A substr M L + 0
80 oveq2 B = 0 L + B = L + 0
81 80 oveq2d B = 0 0 L + B = 0 L + 0
82 81 eleq2d B = 0 M 0 L + B M 0 L + 0
83 82 adantr B = 0 B = M 0 L + B M 0 L + 0
84 simpr B = 0 B = B =
85 opeq2 B = 0 M L B = M L 0
86 85 adantr B = 0 B = M L B = M L 0
87 84 86 oveq12d B = 0 B = B substr M L B = substr M L 0
88 oveq2 B = A substr M L ++ B = A substr M L ++
89 88 adantl B = 0 B = A substr M L ++ B = A substr M L ++
90 87 89 ifeq12d B = 0 B = if L M B substr M L B A substr M L ++ B = if L M substr M L 0 A substr M L ++
91 80 opeq2d B = 0 M L + B = M L + 0
92 91 oveq2d B = 0 A substr M L + B = A substr M L + 0
93 92 adantr B = 0 B = A substr M L + B = A substr M L + 0
94 90 93 eqeq12d B = 0 B = if L M B substr M L B A substr M L ++ B = A substr M L + B if L M substr M L 0 A substr M L ++ = A substr M L + 0
95 83 94 imbi12d B = 0 B = M 0 L + B if L M B substr M L B A substr M L ++ B = A substr M L + B M 0 L + 0 if L M substr M L 0 A substr M L ++ = A substr M L + 0
96 95 adantll A Word V B Word V B = 0 B = M 0 L + B if L M B substr M L B A substr M L ++ B = A substr M L + B M 0 L + 0 if L M substr M L 0 A substr M L ++ = A substr M L + 0
97 79 96 mpbird A Word V B Word V B = 0 B = M 0 L + B if L M B substr M L B A substr M L ++ B = A substr M L + B
98 10 97 mpdan A Word V B Word V B = 0 M 0 L + B if L M B substr M L B A substr M L ++ B = A substr M L + B
99 98 ex A Word V B Word V B = 0 M 0 L + B if L M B substr M L B A substr M L ++ B = A substr M L + B
100 6 99 syld A Word V B Word V B 0 M 0 L + B if L M B substr M L B A substr M L ++ B = A substr M L + B
101 100 com23 A Word V B Word V M 0 L + B B 0 if L M B substr M L B A substr M L ++ B = A substr M L + B
102 101 imp A Word V B Word V M 0 L + B B 0 if L M B substr M L B A substr M L ++ B = A substr M L + B
103 102 adantr A Word V B Word V M 0 L + B L + B L B 0 if L M B substr M L B A substr M L ++ B = A substr M L + B
104 1 eleq1i L 0 A 0
105 104 14 sylbir A 0 L
106 11 105 syl A Word V L
107 2 nn0red B Word V B
108 leaddle0 L B L + B L B 0
109 106 107 108 syl2an A Word V B Word V L + B L B 0
110 pm2.24 B 0 ¬ B 0 if L M B substr M L B A substr M L ++ B = A substr M L + B
111 109 110 syl6bi A Word V B Word V L + B L ¬ B 0 if L M B substr M L B A substr M L ++ B = A substr M L + B
112 111 adantr A Word V B Word V M 0 L + B L + B L ¬ B 0 if L M B substr M L B A substr M L ++ B = A substr M L + B
113 112 imp A Word V B Word V M 0 L + B L + B L ¬ B 0 if L M B substr M L B A substr M L ++ B = A substr M L + B
114 103 113 pm2.61d A Word V B Word V M 0 L + B L + B L if L M B substr M L B A substr M L ++ B = A substr M L + B