Metamath Proof Explorer


Theorem splfv3

Description: Symbols to the right of a splice are unaffected. (Contributed by Thierry Arnoux, 14-Dec-2023)

Ref Expression
Hypotheses splfv3.s φ S Word A
splfv3.f φ F 0 T
splfv3.t φ T 0 S
splfv3.r φ R Word A
splfv3.x φ X 0 ..^ S T
splfv3.k φ K = F + R
Assertion splfv3 φ S splice F T R X + K = S X + T

Proof

Step Hyp Ref Expression
1 splfv3.s φ S Word A
2 splfv3.f φ F 0 T
3 splfv3.t φ T 0 S
4 splfv3.r φ R Word A
5 splfv3.x φ X 0 ..^ S T
6 splfv3.k φ K = F + R
7 splval S Word A F 0 T T 0 S R Word A S splice F T R = S prefix F ++ R ++ S substr T S
8 1 2 3 4 7 syl13anc φ S splice F T R = S prefix F ++ R ++ S substr T S
9 elfzuz3 T 0 S S T
10 fzss2 S T 0 T 0 S
11 3 9 10 3syl φ 0 T 0 S
12 11 2 sseldd φ F 0 S
13 pfxlen S Word A F 0 S S prefix F = F
14 1 12 13 syl2anc φ S prefix F = F
15 14 oveq1d φ S prefix F + R = F + R
16 pfxcl S Word A S prefix F Word A
17 1 16 syl φ S prefix F Word A
18 ccatlen S prefix F Word A R Word A S prefix F ++ R = S prefix F + R
19 17 4 18 syl2anc φ S prefix F ++ R = S prefix F + R
20 15 19 6 3eqtr4rd φ K = S prefix F ++ R
21 20 oveq2d φ X + K = X + S prefix F ++ R
22 8 21 fveq12d φ S splice F T R X + K = S prefix F ++ R ++ S substr T S X + S prefix F ++ R
23 ccatcl S prefix F Word A R Word A S prefix F ++ R Word A
24 17 4 23 syl2anc φ S prefix F ++ R Word A
25 swrdcl S Word A S substr T S Word A
26 1 25 syl φ S substr T S Word A
27 lencl S Word A S 0
28 nn0fz0 S 0 S 0 S
29 27 28 sylib S Word A S 0 S
30 1 29 syl φ S 0 S
31 swrdlen S Word A T 0 S S 0 S S substr T S = S T
32 1 3 30 31 syl3anc φ S substr T S = S T
33 32 oveq2d φ 0 ..^ S substr T S = 0 ..^ S T
34 5 33 eleqtrrd φ X 0 ..^ S substr T S
35 ccatval3 S prefix F ++ R Word A S substr T S Word A X 0 ..^ S substr T S S prefix F ++ R ++ S substr T S X + S prefix F ++ R = S substr T S X
36 24 26 34 35 syl3anc φ S prefix F ++ R ++ S substr T S X + S prefix F ++ R = S substr T S X
37 swrdfv S Word A T 0 S S 0 S X 0 ..^ S T S substr T S X = S X + T
38 1 3 30 5 37 syl31anc φ S substr T S X = S X + T
39 22 36 38 3eqtrd φ S splice F T R X + K = S X + T