Metamath Proof Explorer


Theorem ccatsymb

Description: The symbol at a given position in a concatenated word. (Contributed by AV, 26-May-2018) (Proof shortened by AV, 24-Nov-2018)

Ref Expression
Assertion ccatsymb A Word V B Word V I A ++ B I = if I < A A I B I A

Proof

Step Hyp Ref Expression
1 simprll 0 I A Word V B Word V I I < A A Word V B Word V
2 simpr A Word V B Word V I I < A I < A
3 2 anim2i 0 I A Word V B Word V I I < A 0 I I < A
4 simpr A Word V B Word V I I
5 0zd A Word V B Word V I 0
6 lencl A Word V A 0
7 6 nn0zd A Word V A
8 7 ad2antrr A Word V B Word V I A
9 elfzo I 0 A I 0 ..^ A 0 I I < A
10 4 5 8 9 syl3anc A Word V B Word V I I 0 ..^ A 0 I I < A
11 10 ad2antrl 0 I A Word V B Word V I I < A I 0 ..^ A 0 I I < A
12 3 11 mpbird 0 I A Word V B Word V I I < A I 0 ..^ A
13 df-3an A Word V B Word V I 0 ..^ A A Word V B Word V I 0 ..^ A
14 1 12 13 sylanbrc 0 I A Word V B Word V I I < A A Word V B Word V I 0 ..^ A
15 ccatval1 A Word V B Word V I 0 ..^ A A ++ B I = A I
16 15 eqcomd A Word V B Word V I 0 ..^ A A I = A ++ B I
17 14 16 syl 0 I A Word V B Word V I I < A A I = A ++ B I
18 17 ex 0 I A Word V B Word V I I < A A I = A ++ B I
19 zre I I
20 0red I 0
21 19 20 ltnled I I < 0 ¬ 0 I
22 21 adantl A Word V B Word V I I < 0 ¬ 0 I
23 simpl A Word V B Word V A Word V
24 23 anim1i A Word V B Word V I A Word V I
25 24 adantr A Word V B Word V I I < 0 A Word V I
26 animorrl A Word V B Word V I I < 0 I < 0 A I
27 wrdsymb0 A Word V I I < 0 A I A I =
28 25 26 27 sylc A Word V B Word V I I < 0 A I =
29 ccatcl A Word V B Word V A ++ B Word V
30 29 anim1i A Word V B Word V I A ++ B Word V I
31 30 adantr A Word V B Word V I I < 0 A ++ B Word V I
32 animorrl A Word V B Word V I I < 0 I < 0 A ++ B I
33 wrdsymb0 A ++ B Word V I I < 0 A ++ B I A ++ B I =
34 31 32 33 sylc A Word V B Word V I I < 0 A ++ B I =
35 28 34 eqtr4d A Word V B Word V I I < 0 A I = A ++ B I
36 35 ex A Word V B Word V I I < 0 A I = A ++ B I
37 22 36 sylbird A Word V B Word V I ¬ 0 I A I = A ++ B I
38 37 com12 ¬ 0 I A Word V B Word V I A I = A ++ B I
39 38 adantrd ¬ 0 I A Word V B Word V I I < A A I = A ++ B I
40 18 39 pm2.61i A Word V B Word V I I < A A I = A ++ B I
41 simprll I < A + B A Word V B Word V I ¬ I < A A Word V B Word V
42 id I < A + B I < A + B
43 6 nn0red A Word V A
44 lenlt A I A I ¬ I < A
45 43 19 44 syl2an A Word V I A I ¬ I < A
46 45 adantlr A Word V B Word V I A I ¬ I < A
47 46 biimpar A Word V B Word V I ¬ I < A A I
48 42 47 anim12ci I < A + B A Word V B Word V I ¬ I < A A I I < A + B
49 lencl B Word V B 0
50 49 nn0zd B Word V B
51 zaddcl A B A + B
52 7 50 51 syl2an A Word V B Word V A + B
53 52 adantr A Word V B Word V I A + B
54 elfzo I A A + B I A ..^ A + B A I I < A + B
55 4 8 53 54 syl3anc A Word V B Word V I I A ..^ A + B A I I < A + B
56 55 ad2antrl I < A + B A Word V B Word V I ¬ I < A I A ..^ A + B A I I < A + B
57 48 56 mpbird I < A + B A Word V B Word V I ¬ I < A I A ..^ A + B
58 df-3an A Word V B Word V I A ..^ A + B A Word V B Word V I A ..^ A + B
59 41 57 58 sylanbrc I < A + B A Word V B Word V I ¬ I < A A Word V B Word V I A ..^ A + B
60 ccatval2 A Word V B Word V I A ..^ A + B A ++ B I = B I A
61 60 eqcomd A Word V B Word V I A ..^ A + B B I A = A ++ B I
62 59 61 syl I < A + B A Word V B Word V I ¬ I < A B I A = A ++ B I
63 62 ex I < A + B A Word V B Word V I ¬ I < A B I A = A ++ B I
64 49 nn0red B Word V B
65 readdcl A B A + B
66 43 64 65 syl2an A Word V B Word V A + B
67 lenlt A + B I A + B I ¬ I < A + B
68 66 19 67 syl2an A Word V B Word V I A + B I ¬ I < A + B
69 simplr A Word V B Word V I B Word V
70 simpr A Word V I I
71 7 adantr A Word V I A
72 70 71 zsubcld A Word V I I A
73 72 adantlr A Word V B Word V I I A
74 69 73 jca A Word V B Word V I B Word V I A
75 74 adantr A Word V B Word V I A + B I B Word V I A
76 43 ad2antrr A Word V B Word V I A
77 64 ad2antlr A Word V B Word V I B
78 19 adantl A Word V B Word V I I
79 76 77 78 leaddsub2d A Word V B Word V I A + B I B I A
80 79 biimpa A Word V B Word V I A + B I B I A
81 80 olcd A Word V B Word V I A + B I I A < 0 B I A
82 wrdsymb0 B Word V I A I A < 0 B I A B I A =
83 75 81 82 sylc A Word V B Word V I A + B I B I A =
84 30 adantr A Word V B Word V I A + B I A ++ B Word V I
85 ccatlen A Word V B Word V A ++ B = A + B
86 85 ad2antrr A Word V B Word V I A + B I A ++ B = A + B
87 simpr A Word V B Word V I A + B I A + B I
88 86 87 eqbrtrd A Word V B Word V I A + B I A ++ B I
89 88 olcd A Word V B Word V I A + B I I < 0 A ++ B I
90 84 89 33 sylc A Word V B Word V I A + B I A ++ B I =
91 83 90 eqtr4d A Word V B Word V I A + B I B I A = A ++ B I
92 91 ex A Word V B Word V I A + B I B I A = A ++ B I
93 68 92 sylbird A Word V B Word V I ¬ I < A + B B I A = A ++ B I
94 93 com12 ¬ I < A + B A Word V B Word V I B I A = A ++ B I
95 94 adantrd ¬ I < A + B A Word V B Word V I ¬ I < A B I A = A ++ B I
96 63 95 pm2.61i A Word V B Word V I ¬ I < A B I A = A ++ B I
97 40 96 ifeqda A Word V B Word V I if I < A A I B I A = A ++ B I
98 97 eqcomd A Word V B Word V I A ++ B I = if I < A A I B I A
99 98 3impa A Word V B Word V I A ++ B I = if I < A A I B I A