reserve X,Y,Z,x,y,y1,y2 for set,
  D for non empty set,
  k,n,n1,n2,m2,m1 for Nat,

  L,K,M,N for Cardinal,
  f,g for Function;
reserve r for Real;
reserve p,q for FinSequence,
  k,m,n,n1,n2,n3 for Nat;

theorem Th9:
  [:n-tuples_on D, m-tuples_on D:],(n+m)-tuples_on D
are_equipotent & card [:n-tuples_on D, m-tuples_on D:] = card ((n+m)-tuples_on
  D)
proof
  defpred P[object,object] means
ex p be Element of n-tuples_on D,q be Element of m
  -tuples_on D st $1 = [p,q] & $2 = p^q;
  set A = [:n-tuples_on D, m-tuples_on D:];
  set B = (n+m)-tuples_on D;
A1: for x being object st x in A ex y being object st P[x,y]
  proof
    let x be object;
    assume
A2: x in A;
    then reconsider p = x`1 as Element of n-tuples_on D by MCART_1:10;
    reconsider q = x`2 as Element of m-tuples_on D by A2,MCART_1:10;
    reconsider y = p^q as set;
    take y;
    x = [x`1,x`2] by A2,MCART_1:21;
    hence thesis;
  end;
  consider f such that
A3: dom f = A &
  for x being object st x in A holds P[x,f.x] from CLASSES1:sch 1(A1);
  thus [:n-tuples_on D, m-tuples_on D:],(n+m)-tuples_on D are_equipotent
  proof
    take f;
    thus f is one-to-one
    proof
      let x,y be object;
      assume x in dom f;
      then consider
      p1 be Element of n-tuples_on D, q1 be Element of m-tuples_on D
      such that
A4:   x = [p1,q1] and
A5:   f.x = p1^q1 by A3;
      assume y in dom f;
      then consider
      p2 be Element of n-tuples_on D, q2 be Element of m-tuples_on D
      such that
A6:   y = [p2,q2] and
A7:   f.y = p2^q2 by A3;
      assume
A8:   f.x = f.y;
A9:   len p1 = n & len p2 = n by CARD_1:def 7;
      then consider p such that
A10:  p1^p = p2 by A5,A7,A8,FINSEQ_1:47;
      consider q such that
A11:  p2^q = p1 by A5,A7,A8,A9,FINSEQ_1:47;
      len p1+0 = len(p1^p)+len q by A10,A11,FINSEQ_1:22
        .= len p1+len p+len q by FINSEQ_1:22
        .= len p1+(len p+len q);
      then p = {};
      then p1 = p2 by A10,FINSEQ_1:34;
      hence thesis by A4,A5,A6,A7,A8,FINSEQ_1:33;
    end;
    thus dom f = A by A3;
    thus rng f c= B
    proof
      let x be object;
      assume x in rng f;
      then consider y being object such that
A12:  y in dom f & x = f.y by FUNCT_1:def 3;
      ex p being Element of n-tuples_on D, q being Element of m-tuples_on
      D st y = [p,q] & x = p^q by A3,A12;
      then x is Tuple of n+m, D;
      then x is Element of (n+m)-tuples_on D by FINSEQ_2:131;
      hence thesis;
    end;
    let x be object;
    assume x in B;
    then reconsider x as Element of B;
    consider p being Element of n-tuples_on D, q being Element of m-tuples_on
    D such that
A13: x = p^q by FINSEQ_2:106;
    consider p1 being Element of n-tuples_on D, q1 being Element of m
    -tuples_on D such that
A14: [p,q] = [p1,q1] and
A15: f.[p,q] = p1^q1 by A3;
    p1 = p & q1 = q by A14,XTUPLE_0:1;
    hence thesis by A3,A13,A15,FUNCT_1:def 3;
  end;
  hence thesis by CARD_1:5;
end;
