reserve i,i1,i2,i9,i19,j,j1,j2,j9,j19,k,l,m,n for Nat;
reserve r,s,r9,s9 for Real;
reserve D for set,
  f for FinSequence of D,
  G for Matrix of D;

theorem
  for D being non empty set, f being FinSequence of D, G being Matrix of D
  st f is_sequence_on G holds f/^m is_sequence_on G
proof
  let D be non empty set, f be FinSequence of D, G be Matrix of D such that
A1: for n st n in dom f ex i,j st [i,j] in Indices G & f/.n = G*(i,j) and
A2: for n st n in dom f & n+1 in dom f for m,k,i,j
  st [m,k] in Indices G & [i,j] in Indices G & f/.n=G*(m,k) & f/.(n+1)=G*(i,j)
  holds |.m-i.|+|.k-j.| = 1;
  set g = f/^m;
  hereby
    let n;
    assume
A3: n in dom g;
    then consider i,j such that
A4: [i,j] in Indices G and
A5: f/.(n+m) = G*(i,j) by A1,FINSEQ_5:26;
    take i,j;
    thus [i,j] in Indices G by A4;
    thus g/.n = G*(i,j) by A3,A5,FINSEQ_5:27;
  end;
  let n such that
A6: n in dom g and
A7: n+1 in dom g;
  let i1,j1,i2,j2 such that
A8: [i1,j1] in Indices G and
A9: [i2,j2] in Indices G and
A10: g/.n = G*(i1,j1) and
A11: g/.(n+1) = G*(i2,j2);
A12: n+m in dom f by A6,FINSEQ_5:26;
A13: n+1+m = n+m+1;
  then
A14: n+m+1 in dom f by A7,FINSEQ_5:26;
A15: f/.(n+m) = g/.n by A6,FINSEQ_5:27;
  f/.(n+m+1) = g/.(n+1) by A7,A13,FINSEQ_5:27;
  hence thesis by A2,A8,A9,A10,A11,A12,A14,A15;
end;
