let i be Nat; :: thesis: for D being non empty set
for f, g being FinSequence of D st i in dom f holds
Del (f ^ g),i = (Del f,i) ^ g

let D be non empty set ; :: thesis: for f, g being FinSequence of D st i in dom f holds
Del (f ^ g),i = (Del f,i) ^ g

let f, g be FinSequence of D; :: thesis: ( i in dom f implies Del (f ^ g),i = (Del f,i) ^ g )
assume A1: i in dom f ; :: thesis: Del (f ^ g),i = (Del f,i) ^ g
set Df = Del f,i;
consider m being Nat such that
A2: len f = m + 1 and
A3: len (Del f,i) = m by A1, FINSEQ_3:113;
set Dg = (Del f,i) ^ g;
set fg = f ^ g;
set Dfg = Del (f ^ g),i;
A4: Seg (len (f ^ g)) = dom (f ^ g) by FINSEQ_1:def 3;
A5: len (f ^ g) = (len f) + (len g) by FINSEQ_1:35;
then len f <= len (f ^ g) by NAT_1:12;
then A6: Seg (len f) c= Seg (len (f ^ g)) by FINSEQ_1:7;
A7: len (f ^ g) = ((len g) + m) + 1 by A2, A5;
A8: Seg (len f) = dom f by FINSEQ_1:def 3;
A9: now
let j be Nat; :: thesis: ( 1 <= j & j <= m + (len g) implies ((Del f,i) ^ g) . j = (Del (f ^ g),i) . j )
assume that
A10: 1 <= j and
A11: j <= m + (len g) ; :: thesis: ((Del f,i) ^ g) . j = (Del (f ^ g),i) . j
now
per cases ( j < i or j >= i ) ;
suppose A14: j < i ; :: thesis: (Del (f ^ g),i) . j = ((Del f,i) ^ g) . j
i <= len f by A1, FINSEQ_3:27;
then A15: j < len f by A14, XXREAL_0:2;
then A16: j in dom f by A10, FINSEQ_3:27;
j <= m by A2, A15, NAT_1:13;
then A17: j in dom (Del f,i) by A3, A10, FINSEQ_3:27;
thus (Del (f ^ g),i) . j = (f ^ g) . j by A14, FINSEQ_3:119
.= f . j by A16, FINSEQ_1:def 7
.= (Del f,i) . j by A14, FINSEQ_3:119
.= ((Del f,i) ^ g) . j by A17, FINSEQ_1:def 7 ; :: thesis: verum
end;
suppose A18: j >= i ; :: thesis: ((Del f,i) ^ g) . j = (Del (f ^ g),i) . j
now
per cases ( j <= m or j > m ) ;
suppose A19: j <= m ; :: thesis: (Del (f ^ g),i) . j = ((Del f,i) ^ g) . j
A20: 0 + 1 <= j + 1 by XREAL_1:9;
j + 1 <= len f by A2, A19, XREAL_1:9;
then A21: j + 1 in dom f by A20, FINSEQ_3:27;
A22: j in dom (Del f,i) by A3, A10, A19, FINSEQ_3:27;
thus (Del (f ^ g),i) . j = (f ^ g) . (j + 1) by A1, A6, A8, A4, A7, A11, A18, FINSEQ_3:120
.= f . (j + 1) by A21, FINSEQ_1:def 7
.= (Del f,i) . j by A1, A2, A18, A19, FINSEQ_3:120
.= ((Del f,i) ^ g) . j by A22, FINSEQ_1:def 7 ; :: thesis: verum
end;
suppose A23: j > m ; :: thesis: (Del (f ^ g),i) . j = ((Del f,i) ^ g) . j
then j >= len f by A2, NAT_1:13;
then j + 1 > len f by NAT_1:13;
then reconsider jL = (j + 1) - (len f) as Element of NAT by NAT_1:21;
j + 1 <= (m + (len g)) + 1 by A11, XREAL_1:9;
then jL + (len f) <= (len f) + (len g) by A2;
then A24: jL <= len g by XREAL_1:10;
jL <> 0 by A2, A23;
then jL >= 1 by NAT_1:14;
then A25: jL in dom g by A24, FINSEQ_3:27;
thus (Del (f ^ g),i) . j = (f ^ g) . (jL + (len f)) by A1, A6, A8, A4, A7, A11, A18, FINSEQ_3:120
.= g . jL by A25, FINSEQ_1:def 7
.= ((Del f,i) ^ g) . (m + jL) by A3, A25, FINSEQ_1:def 7
.= ((Del f,i) ^ g) . j by A2 ; :: thesis: verum
end;
end;
end;
hence ((Del f,i) ^ g) . j = (Del (f ^ g),i) . j ; :: thesis: verum
end;
end;
end;
hence ((Del f,i) ^ g) . j = (Del (f ^ g),i) . j ; :: thesis: verum
end;
A26: len ((Del f,i) ^ g) = (len (Del f,i)) + (len g) by FINSEQ_1:35;
len (Del (f ^ g),i) = m + (len g) by A1, A6, A8, A4, A7, FINSEQ_3:118;
hence Del (f ^ g),i = (Del f,i) ^ g by A3, A26, A9, FINSEQ_1:18; :: thesis: verum