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;
reserve J for Nat;
reserve n for Nat;
reserve x,y,y1,y2,z,a,b for object, X,Y,Z,V1,V2 for set,
  f,g,h,h9,f1,f2 for Function,
  i for Nat,
  P for Permutation of X,
  D,D1,D2,D3 for non empty set,
  d1 for Element of D1,
  d2 for Element of D2,
  d3 for Element of D3;

theorem Th122:
  z in product <*X,Y*> iff ex x,y st x in X & y in Y & z = <*x,y*>
proof
A1: <*X,Y*>.1 = X & <*X,Y*>.2 = Y;
  len <*X,Y*> = 2 by FINSEQ_1:44;
  then
A2: dom <*X,Y*> = Seg 2 by FINSEQ_1:def 3;
A3: 1 in Seg 2 & 2 in Seg 2 by FINSEQ_1:2,TARSKI:def 2;
  thus z in product <*X,Y*> implies ex x,y st x in X & y in Y & z = <*x,y*>
  proof
    assume z in product <*X,Y*>;
    then consider f such that
A4: z = f and
A5: dom f = dom <*X,Y*> and
A6: for x being object st x in dom <*X,Y*> holds f.x in <*X,Y*>.x
by CARD_3:def 5;
    reconsider f as FinSequence by A2,A5,FINSEQ_1:def 2;
    take f.1, f.2;
    len f = 2 by A2,A5,FINSEQ_1:def 3;
    hence thesis by A2,A3,A1,A4,A6,FINSEQ_1:44;
  end;
  given x,y such that
A7: x in X & y in Y and
A8: z = <*x,y*>;
A9: now
    let a be object;
    assume a in Seg 2;
    then a = 1 or a = 2 by FINSEQ_1:2,TARSKI:def 2;
    hence <*x,y*>.a in <*X,Y*>.a by A7;
  end;
  len <*x,y*> = 2 by FINSEQ_1:44;
  then dom <*x,y*> = Seg 2 by FINSEQ_1:def 3;
  hence thesis by A2,A8,A9,CARD_3:def 5;
end;
