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 Th123:
  a in product <*X,Y,Z*> iff
    ex x,y,z st x in X & y in Y & z in Z & a = <*x,y,z*>
proof
A1: 3 in Seg 3 by Th1,ENUMSET1:def 1;
A2: <*X,Y,Z*>.1 = X & <*X,Y,Z*>.2 = Y;
A3: <*X,Y,Z*>.3 = Z;
  len <*X,Y,Z*> = 3 by FINSEQ_1:45;
  then
A4: dom <*X,Y,Z*> = Seg 3 by FINSEQ_1:def 3;
A5: 1 in Seg 3 & 2 in Seg 3 by Th1,ENUMSET1:def 1;
  thus a in product <*X,Y,Z*> implies ex x,y,z st x in X & y in Y & z in Z & a
  = <*x,y,z*>
  proof
    assume a in product <*X,Y,Z*>;
    then consider f such that
A6: a = f and
A7: dom f = dom <*X,Y,Z*> and
A8: for x being object st x in dom <*X,Y,Z*> holds f.x in <*X,Y,Z*>.x
by CARD_3:def 5;
    reconsider f as FinSequence by A4,A7,FINSEQ_1:def 2;
    take f.1, f.2, f.3;
    len f = 3 by A4,A7,FINSEQ_1:def 3;
    hence thesis by A4,A5,A1,A2,A3,A6,A8,FINSEQ_1:45;
  end;
  given x,y,z such that
A9: x in X & y in Y & z in Z and
A10: a = <*x,y,z*>;
A11: now
    let a be object;
    assume a in Seg 3;
    then a = 1 or a = 2 or a = 3 by Th1,ENUMSET1:def 1;
    hence <*x,y,z*>.a in <*X,Y,Z*>.a by A9;
  end;
  len <*x,y,z*> = 3 by FINSEQ_1:45;
  then dom <*x,y,z*> = Seg 3 by FINSEQ_1:def 3;
  hence thesis by A4,A10,A11,CARD_3:def 5;
end;
