reserve i,j,k,n for Nat;

theorem Th10:
  for f,g being FinSequence st n+1 in dom f & g = f|Seg n holds
  f|Seg(n+1) = g^<*f.(n+1)*>
proof
  let f,g be FinSequence such that
A1: n+1 in dom f and
A2: g = f|Seg n;
  reconsider h = f|Seg(n+1) as FinSequence by FINSEQ_1:15;
  n+1 <= len f by A1,FINSEQ_3:25;
  then
A3: len h = n+1 by FINSEQ_1:17;
  Seg n c= Seg(n+1) by FINSEQ_1:5,NAT_1:11;
  then h.(n+1) = f.(n+1) & g = h|Seg n by A2,FINSEQ_1:4,FUNCT_1:49,51;
  hence thesis by A3,FINSEQ_3:55;
end;
