reserve i,n,m for Nat,
  x,y,X,Y for set,
  r,s for Real;

theorem Th37:
  for M be MetrStruct, a be Point of M,x holds x in [:X,(the
carrier of M)\{a}:]\/{[X,a]} iff ex y be set,b be Point of M st x=[y,b] & (y in
  X & b<>a or y = X & b = a)
proof
  let M be MetrStruct,a be Point of M, x;
  thus x in [:X,(the carrier of M)\{a}:]\/{[X,a]} implies ex y be set,b be
  Point of M st x=[y,b] & (y in X & b<>a or y = X & b = a)
  proof
    assume
A1: x in [:X,(the carrier of M)\{a}:]\/{[X,a]};
    per cases by A1,XBOOLE_0:def 3;
    suppose
      x in [:X,(the carrier of M)\{a}:];
      then consider x1,x2 be object such that
A2:   x1 in X and
A3:   x2 in (the carrier of M)\{a} and
A4:   x=[x1,x2] by ZFMISC_1:def 2;
      reconsider x2 as Point of M by A3;
      reconsider x1 as set by TARSKI:1;
      take x1,x2;
      thus thesis by A2,A3,A4,ZFMISC_1:56;
    end;
    suppose
      x in {[X,a]};
      then x=[X,a] by TARSKI:def 1;
      hence thesis;
    end;
  end;
  given y be set,b be Point of M such that
A5: x=[y,b] and
A6: y in X & b<>a or y = X & b = a;
  per cases by A6;
  suppose
A7: y in X & b<>a;
    the carrier of M is non empty
    proof
      assume
A8:   the carrier of M is empty;
      then a={} by SUBSET_1:def 1;
      hence thesis by A7,A8,SUBSET_1:def 1;
    end;
    then b in (the carrier of M)\{a} by A7,ZFMISC_1:56;
    then x in [:X,(the carrier of M)\{a}:] by A5,A7,ZFMISC_1:87;
    hence thesis by XBOOLE_0:def 3;
  end;
  suppose
    y = X & b = a;
    then x in {[X,a]} by A5,TARSKI:def 1;
    hence thesis by XBOOLE_0:def 3;
  end;
end;
