reserve v,x,x1,x2,y,z for object,
  X,X1,X2,X3 for set;

theorem Th4:
  for X,Y,Z be non empty set, D be Function
  st dom D = {1,2,3} & D.1 = X & D.2 = Y & D.3 = Z
  ex I be Function of [:X,Y,Z:],product D
  st I is one-to-one & I is onto
  & for x,y,z be object st x in X & y in Y & z in Z
    holds I.(x,y,z) = <*x,y,z*>
  proof
    let X,Y,Z be non empty set, D be Function;
    assume A1: dom D ={1,2,3} & D.1 = X & D.2 = Y & D.3 = Z;
    defpred P[object,object,object,object] means $4 = <* $1,$2,$3 *>;
    A2:for x,y,z be object st x in X & y in Y & z in Z
    ex w be object st w in product D & P[x,y,z,w]
    proof
      let x,y,z be object;
      assume A3: x in X & y in Y & z in Z;
      A4: dom <*x,y,z*> = Seg len <*x,y,z*> by FINSEQ_1:def 3
                       .= {1,2,3} by FINSEQ_1:45,FINSEQ_3:1;
      now let i be object;
        assume i in dom <*x,y,z*>; then
        i = 1 or i = 2 or i = 3 by A4,ENUMSET1:def 1;
        hence <*x,y,z*>.i in D.i by A1,A3;
      end;
      hence ex w be object st w in product D & P[x,y,z,w] by A4,A1,CARD_3:9;
    end;
    consider I be Function of [:X,Y,Z:], product D such that
    A5: for x,y,z be object st x in X & y in Y & z in Z
    holds P[x,y,z,I.(x,y,z)] from FuncEx3A(A2);
    now assume {} in rng D; then
      ex x be object st x in dom D & D.x={} by FUNCT_1:def 3;
      hence contradiction by A1,ENUMSET1:def 1;
    end; then
    A6:product D <> {} by CARD_3:26;
    now let w1,w2 be object;
      assume A7: w1 in [:X,Y,Z:] & w2 in [:X,Y,Z:] & I.w1=I.w2; then
      consider x1,y1,z1 be object such that
      A8:  x1 in X & y1 in Y & z1 in Z & w1=[x1,y1,z1] by MCART_1:68;
      consider x2,y2,z2 be object such that
      A9:  x2 in X & y2 in Y & z2 in Z & w2=[x2,y2,z2] by A7,MCART_1:68;
      <*x1,y1,z1*> = I.(x1,y1,z1) by A5,A8
      .= I.(x2,y2,z2) by A7,A8,A9
      .= <*x2,y2,z2*> by A5,A9; then
      x1 = x2 & y1 = y2 & z1 = z2 by FINSEQ_1:78;
      hence w1=w2 by A8,A9;
    end; then
    A10:I is one-to-one by A6,FUNCT_2:19;
    now let w be object;
      assume w in product D; then
      consider g be Function such that
      A11:  w = g & dom g = dom D
      & for i be object st i in dom D holds g.i in D.i by CARD_3:def 5;
      reconsider g as FinSequence by A1,A11,
      FINSEQ_3:1,FINSEQ_1:def 2;
      set x=g.1; set y=g.2;set z=g.3;
      A12: len g = 3 by A1,A11,FINSEQ_1:def 3,FINSEQ_3:1;
      1 in dom D & 2 in dom D & 3 in dom D by A1,ENUMSET1:def 1; then
      A13:x in X & y in Y & z in Z & w=<*x,y,z*>
        by A11,A12,A1,FINSEQ_1:45;
      reconsider s = [x,y,z] as Element of [:X,Y,Z:] by A13,MCART_1:69;
      w = I.(x,y,z) by A5,A13
      .= I.s;
      hence w in rng I by A6,FUNCT_2:112;
    end; then
    product D c= rng I by TARSKI:def 3; then
    I is onto by FUNCT_2:def 3,XBOOLE_0:def 10;
    hence thesis by A5,A10;
  end;
