
theorem Th14:
  for m,n be non zero Element of NAT
  ex f be Function of [:REAL m,REAL n:], REAL(m+n)
  st ( for x be Element of REAL m, y be Element of REAL n
        holds f.(x,y) = x ^ y )
    & f is one-to-one & f is onto
proof
  let m,n be non zero Element of NAT;

  defpred S1[object, object, object] means
  ex x be Element of REAL m,
      y be Element of REAL n
  st x = $1 & y = $2 & $3 = x ^ y;

  A1: for x, y be object st x in REAL m & y in REAL n
      holds ex z be object st z in REAL(m+n) & S1[x,y,z]
  proof
    let x, y be object;
    assume
    A2: x in REAL m & y in REAL n;
    then
    reconsider x0 = x as Element of REAL m;
    reconsider y0 = y as Element of REAL n by A2;
    set z0 = x0 ^ y0;
    A4: len z0 = m + n by CARD_1:def 7;

    z0 in REAL* by FINSEQ_1:def 11;
    then z0 in (m+n) -tuples_on REAL by A4;
    then reconsider z = z0 as Element of REAL(m+n);

    take z;
    thus thesis;
  end;

  consider f be Function of [:REAL m,REAL n:],REAL(m+n) such that
  A5: for x, y be object st x in REAL m & y in REAL n
      holds S1[x,y,f.(x,y)] from BINOP_1:sch 1(A1);

  take f;

  thus
  A6: for x be Element of REAL m, y be Element of REAL n
      holds f.(x,y) = x ^ y
  proof
    let x be Element of REAL m,
        y be Element of REAL n;

    ex x0 be Element of REAL m,
        y0 be Element of REAL n
    st x0 = x & y0 = y & f.(x,y) = x0 ^ y0 by A5;
    hence thesis;
  end;

  now
    let z1, z2 be object;
    assume
    A7: z1 in [:REAL m,REAL n:]
      & z2 in [:REAL m,REAL n:]
      & f.z1 = f.z2; then

    consider x1, y1 be object such that
    A8: x1 in REAL m & y1 in REAL n & z1 = [x1,y1] by ZFMISC_1:def 2;

    consider x2, y2 be object such that
    A9: x2 in REAL m & y2 in REAL n & z2 = [x2,y2] by A7,ZFMISC_1:def 2;

    consider xx1 be Element of REAL m,
              yy1 be Element of REAL n such that
    A10: xx1 = x1 & yy1 = y1 & f.(x1,y1) = xx1 ^ yy1 by A5,A8;

    consider xx2 be Element of REAL m,
              yy2 be Element of REAL n such that
    A11: xx2 = x2 & yy2 = y2 & f.(x2,y2) = xx2 ^ yy2 by A5,A9;

    len xx1
      = m by CARD_1:def 7
    .= len xx2 by CARD_1:def 7;

    then
    A12: dom xx1 = dom xx2 by FINSEQ_3:29;

    xx1
      = (xx1 ^ yy1) | (dom xx1) by FINSEQ_1:21
    .= xx2 by A7,A8,A9,A10,A11,A12,FINSEQ_1:21;
    hence z1 = z2 by A7,A8,A9,A10,A11,FINSEQ_1:33;
  end;
  hence f is one-to-one by FUNCT_2:19;

  now
    let w be object;
    assume w in REAL(m+n);
    then
    A13: ex s be Element of REAL * st w=s & len s = m+n;
    then
    reconsider w0 = w as FinSequence of REAL;

    set x = w0 | m;
    set y = w0 /^ m;

    m <= m+n by NAT_1:11; then
    A16: len y = m+n -m by A13,RFINSEQ:def 1;
    A15: len x = m by A13,NAT_1:11,FINSEQ_1:59;

    x in REAL* by FINSEQ_1:def 11;
    then x in { s where s is Element of REAL * : len s = m } by A15;
    then reconsider x0 = x as Element of REAL m;

    y in REAL* by FINSEQ_1:def 11;
    then y in { s where s is Element of REAL * : len s = n } by A16;
    then reconsider y0 = y as Element of REAL n;

    set z = [x0,y0];

    A17: z in [:REAL m,REAL n:] by ZFMISC_1:87;

    f.z
      = f.(x0,y0)
    .= x0 ^ y0 by A6
    .= w by RFINSEQ:8;

    hence w in rng f by FUNCT_2:4,A17;
  end;

  then REAL(m+n) c= rng f;
  hence f is onto by XBOOLE_0:def 10;
end;
