Metamath Proof Explorer


Theorem gsumspl

Description: The primary purpose of the splice construction is to enable local rewrites. Thus, in any monoidal valuation, if a splice does not cause a local change it does not cause a global change. (Contributed by Stefan O'Rear, 23-Aug-2015)

Ref Expression
Hypotheses gsumspl.b B = Base M
gsumspl.m φ M Mnd
gsumspl.s φ S Word B
gsumspl.f φ F 0 T
gsumspl.t φ T 0 S
gsumspl.x φ X Word B
gsumspl.y φ Y Word B
gsumspl.eq φ M X = M Y
Assertion gsumspl φ M S splice F T X = M S splice F T Y

Proof

Step Hyp Ref Expression
1 gsumspl.b B = Base M
2 gsumspl.m φ M Mnd
3 gsumspl.s φ S Word B
4 gsumspl.f φ F 0 T
5 gsumspl.t φ T 0 S
6 gsumspl.x φ X Word B
7 gsumspl.y φ Y Word B
8 gsumspl.eq φ M X = M Y
9 8 oveq2d φ M S prefix F + M M X = M S prefix F + M M Y
10 9 oveq1d φ M S prefix F + M M X + M M S substr T S = M S prefix F + M M Y + M M S substr T S
11 splval S Word B F 0 T T 0 S X Word B S splice F T X = S prefix F ++ X ++ S substr T S
12 3 4 5 6 11 syl13anc φ S splice F T X = S prefix F ++ X ++ S substr T S
13 12 oveq2d φ M S splice F T X = M S prefix F ++ X ++ S substr T S
14 pfxcl S Word B S prefix F Word B
15 3 14 syl φ S prefix F Word B
16 ccatcl S prefix F Word B X Word B S prefix F ++ X Word B
17 15 6 16 syl2anc φ S prefix F ++ X Word B
18 swrdcl S Word B S substr T S Word B
19 3 18 syl φ S substr T S Word B
20 eqid + M = + M
21 1 20 gsumccat M Mnd S prefix F ++ X Word B S substr T S Word B M S prefix F ++ X ++ S substr T S = M S prefix F ++ X + M M S substr T S
22 2 17 19 21 syl3anc φ M S prefix F ++ X ++ S substr T S = M S prefix F ++ X + M M S substr T S
23 1 20 gsumccat M Mnd S prefix F Word B X Word B M S prefix F ++ X = M S prefix F + M M X
24 2 15 6 23 syl3anc φ M S prefix F ++ X = M S prefix F + M M X
25 24 oveq1d φ M S prefix F ++ X + M M S substr T S = M S prefix F + M M X + M M S substr T S
26 13 22 25 3eqtrd φ M S splice F T X = M S prefix F + M M X + M M S substr T S
27 splval S Word B F 0 T T 0 S Y Word B S splice F T Y = S prefix F ++ Y ++ S substr T S
28 3 4 5 7 27 syl13anc φ S splice F T Y = S prefix F ++ Y ++ S substr T S
29 28 oveq2d φ M S splice F T Y = M S prefix F ++ Y ++ S substr T S
30 ccatcl S prefix F Word B Y Word B S prefix F ++ Y Word B
31 15 7 30 syl2anc φ S prefix F ++ Y Word B
32 1 20 gsumccat M Mnd S prefix F ++ Y Word B S substr T S Word B M S prefix F ++ Y ++ S substr T S = M S prefix F ++ Y + M M S substr T S
33 2 31 19 32 syl3anc φ M S prefix F ++ Y ++ S substr T S = M S prefix F ++ Y + M M S substr T S
34 1 20 gsumccat M Mnd S prefix F Word B Y Word B M S prefix F ++ Y = M S prefix F + M M Y
35 2 15 7 34 syl3anc φ M S prefix F ++ Y = M S prefix F + M M Y
36 35 oveq1d φ M S prefix F ++ Y + M M S substr T S = M S prefix F + M M Y + M M S substr T S
37 29 33 36 3eqtrd φ M S splice F T Y = M S prefix F + M M Y + M M S substr T S
38 10 26 37 3eqtr4d φ M S splice F T X = M S splice F T Y