reserve p,q,r for FinSequence;
reserve u,v,x,y,y1,y2,z for object, A,D,X,Y for set;
reserve i,j,k,l,m,n for Nat;

theorem
  p is one-to-one & rng p = {x,y} & x <> y implies
    p = <* x,y *> or p = <* y,x *>
proof
  assume that
A1: p is one-to-one and
A2: rng p = {x,y} and
A3: x <> y;
A4: len p = 2 by A1,A2,A3,Th96;
  then
A5: dom p = {1,2} by FINSEQ_1:2,def 3;
  then
A6: 2 in dom p by TARSKI:def 2;
  then
A7: p.2 in rng p by FUNCT_1:def 3;
A8: 1 in dom p by A5,TARSKI:def 2;
  then p.1 in rng p by FUNCT_1:def 3;
  then p.1 = x & p.2 = x or p.1 = x & p.2 = y or p.1 = y & p.2 = x or p.1 = y
  & p.2 = y by A2,A7,TARSKI:def 2;
  hence thesis by A1,A4,A8,A6,FINSEQ_1:44;
end;
