reserve S for 1-sorted,
  i for Element of NAT,
  p for FinSequence,
  X for set;

theorem
  for X,x,y being set holds X@x = X@y iff (x in X iff y in X)
proof
  let X,x,y be set;
  thus X@x = X@y implies (x in X iff y in X)
  proof
    assume
A1: X@x = X@y;
    thus x in X implies y in X
    proof
      assume x in X;
      then X@x = 1.Z_2 by Def3;
      hence thesis by A1,Def3;
    end;
    assume y in X;
    then X@y = 1.Z_2 by Def3;
    hence thesis by A1,Def3;
  end;
  assume
A2: x in X iff y in X;
  per cases by Th5,Th6,CARD_1:50,TARSKI:def 2;
  suppose
    X@x = 0.Z_2;
    hence thesis by A2,Def3;
  end;
  suppose
    X@x = 1.Z_2;
    hence thesis by A2,Def3;
  end;
end;
