reserve X for MetrSpace,
  x,y,z for Element of X,
  A for non empty set,
  G for Function of [:A,A:],REAL,
  f for Function,
  k,n,m,m1,m2 for Nat,
  q,r for Real;
reserve X for non empty MetrSpace,
  x,y for Element of X,
  V for Subset of X,
  S,S1,T for sequence of X,
  Nseq for increasing sequence of NAT;

theorem Th21:
  S is convergent & T is convergent implies dist(lim S,lim T) =
  lim sequence_of_dist(S,T)
proof
  assume that
A1: S is convergent and
A2: T is convergent;
  consider x such that
A3: S is_convergent_in_metrspace_to x and
A4: lim S = x by A1,Th13;
  consider y such that
A5: T is_convergent_in_metrspace_to y and
A6: lim T = y by A2,Th13;
A7: for r be Real st 0 < r
 ex m being Nat st for n being Nat st m <= n holds |.
  sequence_of_dist(S,T).n - dist(x,y).| < r
  proof
    let r be Real;
    assume
A8: 0 < r;
    reconsider r as Real;
A9: 0 < r/2 by A8,XREAL_1:215;
    then consider m1 such that
A10: for n st m1 <= n holds dist(S.n,x) < r/2 by A3;
    consider m2 such that
A11: for n st m2 <= n holds dist(T.n,y) < r/2 by A5,A9;
     reconsider k = m1 + m2 as Nat;
    take k;
    let n be Nat such that
A12: k <= n;
    |.dist(S.n,T.n) - dist(x,T.n).| <= dist(S.n,x) & |.dist(T.n,x) -
    dist(y,x ).| <= dist(T.n,y) by Th1;
    then
A13: |.dist(S.n,T.n) - dist(T.n,x).| + |.dist(T.n,x) - dist(x,y).| <=
    dist(S.n,x) + dist(T.n,y) by XREAL_1:7;
    |.sequence_of_dist(S,T).n - dist(lim S,lim T).| = |.dist(S.n,T.n)
    - dist(x,y).| by A4,A6,Def7
      .= |.(dist(S.n,T.n) - dist(T.n,x)) + (dist(T.n,x) - dist(x,y)).|;
    then
    |.sequence_of_dist(S,T).n - dist(lim S,lim T).| <= |.dist(S.n,T.n)
    - dist(T.n,x).| + |.dist(T.n,x) - dist(x,y).| by COMPLEX1:56;
    then
A14: |.sequence_of_dist(S,T).n - dist(lim S,lim T).| <= dist(S.n,x) +
    dist(T.n,y) by A13,XXREAL_0:2;
    m2 <= k by NAT_1:12;
    then m2 <= n by A12,XXREAL_0:2;
    then
A15: dist(T.n,y) < r/2 by A11;
    m1 <= k by NAT_1:11;
    then m1 <= n by A12,XXREAL_0:2;
    then dist(S.n,x) < r/2 by A10;
    then dist(S.n,x) + dist(T.n,y) < r/2 + r/2 by A15,XREAL_1:8;
    hence thesis by A4,A6,A14,XXREAL_0:2;
  end;
  then sequence_of_dist(S,T) is convergent by SEQ_2:def 6;
  hence thesis by A4,A6,A7,SEQ_2:def 7;
end;
