Metamath Proof Explorer


Theorem pfxccatin12lem2

Description: Lemma 2 for pfxccatin12 . (Contributed by AV, 30-Mar-2018) (Revised by AV, 9-May-2020)

Ref Expression
Hypothesis swrdccatin2.l L=A
Assertion pfxccatin12lem2 AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMA++BsubstrMNK=BprefixNLKAsubstrML

Proof

Step Hyp Ref Expression
1 swrdccatin2.l L=A
2 1 pfxccatin12lem2c AWordVBWordVM0LNLL+BA++BWordVM0NN0A++B
3 simprl AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMK0..^NM
4 swrdfv A++BWordVM0NN0A++BK0..^NMA++BsubstrMNK=A++BK+M
5 2 3 4 syl2an2r AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMA++BsubstrMNK=A++BK+M
6 elfzoelz K0..^NMK
7 elfz2nn0 M0LM0L0ML
8 nn0cn M0M
9 nn0cn L0L
10 8 9 anim12i M0L0ML
11 zcn KK
12 subcl LMLM
13 12 ancoms MLLM
14 13 anim1ci MLKKLM
15 subcl KLMKLM
16 14 15 syl MLKKLM
17 16 addridd MLKK-LM+0=KLM
18 simpr MLKK
19 simplr MLKL
20 simpll MLKM
21 18 19 20 subsub3d MLKKLM=K+M-L
22 17 21 eqtr2d MLKK+M-L=K-LM+0
23 10 11 22 syl2an M0L0KK+M-L=K-LM+0
24 oveq2 A=LK+M-A=K+M-L
25 24 eqcoms L=AK+M-A=K+M-L
26 25 eqeq1d L=AK+M-A=K-LM+0K+M-L=K-LM+0
27 23 26 imbitrrid L=AM0L0KK+M-A=K-LM+0
28 1 27 ax-mp M0L0KK+M-A=K-LM+0
29 28 ex M0L0KK+M-A=K-LM+0
30 29 3adant3 M0L0MLKK+M-A=K-LM+0
31 7 30 sylbi M0LKK+M-A=K-LM+0
32 31 ad2antrl AWordVBWordVM0LNLL+BKK+M-A=K-LM+0
33 6 32 syl5com K0..^NMAWordVBWordVM0LNLL+BK+M-A=K-LM+0
34 33 adantr K0..^NM¬K0..^LMAWordVBWordVM0LNLL+BK+M-A=K-LM+0
35 34 impcom AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMK+M-A=K-LM+0
36 35 fveq2d AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMBK+M-A=BK-LM+0
37 simpll AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMAWordVBWordV
38 pfxccatin12lem2a M0LNLL+BK0..^NM¬K0..^LMK+ML..^L+B
39 38 adantl AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMK+ML..^L+B
40 39 imp AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMK+ML..^L+B
41 id A=LA=L
42 oveq1 A=LA+B=L+B
43 41 42 oveq12d A=LA..^A+B=L..^L+B
44 43 eleq2d A=LK+MA..^A+BK+ML..^L+B
45 44 eqcoms L=AK+MA..^A+BK+ML..^L+B
46 1 45 ax-mp K+MA..^A+BK+ML..^L+B
47 40 46 sylibr AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMK+MA..^A+B
48 df-3an AWordVBWordVK+MA..^A+BAWordVBWordVK+MA..^A+B
49 37 47 48 sylanbrc AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMAWordVBWordVK+MA..^A+B
50 ccatval2 AWordVBWordVK+MA..^A+BA++BK+M=BK+M-A
51 49 50 syl AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMA++BK+M=BK+M-A
52 simplr AWordVBWordVM0LNLL+BBWordV
53 52 adantr AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMBWordV
54 lencl BWordVB0
55 elfzel2 M0LL
56 zsubcl NLNL
57 56 ancoms LNNL
58 57 adantr LNLNNL
59 zre NN
60 zre LL
61 subge0 NL0NLLN
62 59 60 61 syl2anr LN0NLLN
63 62 biimprd LNLN0NL
64 63 imp LNLN0NL
65 elnn0z NL0NL0NL
66 58 64 65 sylanbrc LNLNNL0
67 66 expcom LNLNNL0
68 67 adantr LNNL+BLNNL0
69 68 expcomd LNNL+BNLNL0
70 69 com12 NLNNL+BLNL0
71 70 3ad2ant3 LL+BNLNNL+BLNL0
72 71 imp LL+BNLNNL+BLNL0
73 72 com12 LLL+BNLNNL+BNL0
74 73 adantr LB0LL+BNLNNL+BNL0
75 74 imp LB0LL+BNLNNL+BNL0
76 simplr LB0LL+BNLNNL+BB0
77 59 3ad2ant3 LL+BNN
78 77 adantl LB0LL+BNN
79 60 adantr LB0L
80 79 adantr LB0LL+BNL
81 nn0re B0B
82 81 adantl LB0B
83 82 adantr LB0LL+BNB
84 lesubadd2 NLBNLBNL+B
85 84 biimprd NLBNL+BNLB
86 78 80 83 85 syl3anc LB0LL+BNNL+BNLB
87 86 ex LB0LL+BNNL+BNLB
88 87 com13 NL+BLL+BNLB0NLB
89 88 adantl LNNL+BLL+BNLB0NLB
90 89 impcom LL+BNLNNL+BLB0NLB
91 90 impcom LB0LL+BNLNNL+BNLB
92 75 76 91 3jca LB0LL+BNLNNL+BNL0B0NLB
93 92 ex LB0LL+BNLNNL+BNL0B0NLB
94 elfz2 NLL+BLL+BNLNNL+B
95 elfz2nn0 NL0BNL0B0NLB
96 93 94 95 3imtr4g LB0NLL+BNL0B
97 96 ex LB0NLL+BNL0B
98 97 com23 LNLL+BB0NL0B
99 55 98 syl M0LNLL+BB0NL0B
100 99 imp M0LNLL+BB0NL0B
101 54 100 syl5com BWordVM0LNLL+BNL0B
102 101 adantl AWordVBWordVM0LNLL+BNL0B
103 102 imp AWordVBWordVM0LNLL+BNL0B
104 103 adantr AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMNL0B
105 pfxccatin12lem1 M0LNLL+BK0..^NM¬K0..^LMKLM0..^NL
106 105 adantl AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMKLM0..^NL
107 106 imp AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMKLM0..^NL
108 pfxfv BWordVNL0BKLM0..^NLBprefixNLKLM=BKLM
109 53 104 107 108 syl3anc AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMBprefixNLKLM=BKLM
110 6 zcnd K0..^NMK
111 110 ad2antrl AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMK
112 55 zcnd M0LL
113 112 ad2antrl AWordVBWordVM0LNLL+BL
114 113 adantr AWordVBWordVM0LNLL+BK0..^NM¬K0..^LML
115 elfzelz M0LM
116 115 zcnd M0LM
117 116 ad2antrl AWordVBWordVM0LNLL+BM
118 117 adantr AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMM
119 114 118 subcld AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMLM
120 111 119 subcld AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMKLM
121 120 addridd AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMK-LM+0=KLM
122 121 eqcomd AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMKLM=K-LM+0
123 122 fveq2d AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMBKLM=BK-LM+0
124 109 123 eqtrd AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMBprefixNLKLM=BK-LM+0
125 36 51 124 3eqtr4d AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMA++BK+M=BprefixNLKLM
126 simpll AWordVBWordVM0LNLL+BAWordV
127 simprl AWordVBWordVM0LNLL+BM0L
128 lencl AWordVA0
129 elnn0uz A0A0
130 eluzfz2 A0A0A
131 129 130 sylbi A0A0A
132 1 131 eqeltrid A0L0A
133 128 132 syl AWordVL0A
134 133 adantr AWordVBWordVL0A
135 134 adantr AWordVBWordVM0LNLL+BL0A
136 126 127 135 3jca AWordVBWordVM0LNLL+BAWordVM0LL0A
137 136 adantr AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMAWordVM0LL0A
138 swrdlen AWordVM0LL0AAsubstrML=LM
139 137 138 syl AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMAsubstrML=LM
140 139 eqcomd AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMLM=AsubstrML
141 140 oveq2d AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMKLM=KAsubstrML
142 141 fveq2d AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMBprefixNLKLM=BprefixNLKAsubstrML
143 5 125 142 3eqtrd AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMA++BsubstrMNK=BprefixNLKAsubstrML
144 143 ex AWordVBWordVM0LNLL+BK0..^NM¬K0..^LMA++BsubstrMNK=BprefixNLKAsubstrML