reserve x, x1, x2, y, X, D for set,
  i, j, k, l, m, n, N for Nat,
  p, q for XFinSequence of NAT,
  q9 for XFinSequence,
  pd, qd for XFinSequence of D;
reserve pN, qN for Element of NAT^omega;

theorem Th36:
  for n,m,k,j,l st j = n-2*(k+1) & l = m-(k+1) holds card {pN : pN
in Domin_0(n,m) & 2*(k+1) = min*{N:2*Sum(pN|N) = N & N > 0}} = card Domin_0(2*k
  ,k) * card Domin_0(j,l)
proof
  set q1=1-->1;
  set q0=1-->0;
  let n,m,k,j,l such that
A1: j=n-2*(k+1) & l=m-(k+1);
  defpred P[object,object] means
ex r1,r2 be XFinSequence of NAT st $1 = q0^r1^q1^r2
  & len (q0^r1^q1) = 2*(k+1) & $2 = [r1,r2];
  set Z2=Domin_0(j,l);
  set Z1=Domin_0(2*k,k);
  set F={pN:pN in Domin_0(n,m) & 2 * (k + 1) = min*{N: 2*Sum(pN|N)=N&N>0}};
  set 2k1=2*(k+1);
A2: for x being object st x in F ex y being object st y in [:Z1,Z2:] & P[x,y]
  proof
A3: dom q0=1 & Sum q0=0*1 by AFINSQ_2:58;
    let x be object;
    assume x in F;
    then consider pN such that
A4: pN=x & pN in Domin_0(n,m) & 2k1=min*{N: 2*Sum(pN|N)=N & N>0};
    2k1>2*0 by XREAL_1:68;
    then reconsider
    M={N:2*Sum(pN|N)=N & N>0} as non empty Subset of NAT by A4,NAT_1:def 1;
    consider r2 be XFinSequence of NAT such that
A5: pN = pN|2k1^r2 by Th1;
    2k1>2*0 & pN is dominated_by_0 by A4,Th20,XREAL_1:68;
    then consider r1 be XFinSequence of NAT such that
A6: pN|2k1 = q0^r1^q1 and
A7: r1 is dominated_by_0 by A4,Th14;
A8: Sum q1=1*1 by AFINSQ_2:58;
    2k1 in M by A4,NAT_1:def 1;
    then
A9: ex o be Nat st o=2k1 & 2*Sum(pN|o)=o & o>0;
    then k+1=Sum (q0^r1) + Sum q1 by A6,AFINSQ_2:55;
    then
A10: k=Sum q0+ Sum r1 by A8,AFINSQ_2:55;
    pN is dominated_by_0 by A4,Th20;
    then
A11: r2 is dominated_by_0 by A5,A9,Th12;
    pN is dominated_by_0 by A4,Th20;
    then
A12: len (pN|2k1)=2k1 by A9,Th11;
    Sum pN=m by A4,Th20;
    then
A13: m=k+1+Sum r2 by A5,A9,AFINSQ_2:55;
    take [r1,r2];
    dom pN=n by A4,Th20;
    then n=2k1+len r2 by A5,A12,AFINSQ_1:def 3;
    then
A15: r2 in Z2 by A1,A13,A11,Th20;
    2k1=len(q0^r1)+len q1 by A6,A12,AFINSQ_1:17;
    then 2*k+1=len q0+ len r1 by AFINSQ_1:17;
    then r1 in Z1 by A7,A10,A3,Th20;
    hence thesis by A4,A5,A6,A12,A15,ZFMISC_1:def 2;
  end;
  consider f being Function of F,[:Z1,Z2:] such that
A16: for x being object st x in F holds P[x,f.x] from FUNCT_2:sch 1(A2);
A17: [:Z1,Z2:]={} implies F={}
  proof
    assume [:Z1,Z2:]={};
    then Z1={} or Z2={};
    then 2*l > j by Th22;
    then 2*m-2*(k+1) > n-2*(k+1) by A1;
    then
A18: 2*m > n by XREAL_1:9;
    assume F<>{};
    then consider x being object such that
A19: x in F by XBOOLE_0:def 1;
    ex pN st pN=x & pN in Domin_0(n,m) & 2k1=min*{N:2*Sum(pN|N)=N&N>0} by A19;
    hence thesis by A18,Th22;
  end;
  then
A20: dom f=F by FUNCT_2:def 1;
A21: rng f=[:Z1,Z2:]
  proof
A22: Sum q0=1*0 & Sum q1 = 1*1 by AFINSQ_2:58;
    thus rng f c= [:Z1,Z2:];
    let x be object;
    assume x in [:Z1,Z2:];
    then consider x1,x2 being object such that
A24: x1 in Z1 and
A25: x2 in Z2 and
A26: x=[x1,x2] by ZFMISC_1:def 2;
    consider p such that
A27: p=x1 and
A28: p is dominated_by_0 and
A29: dom p = 2*k and
A30: Sum p = k by A24,Def2;
    consider q such that
A31: q=x2 and
A32: q is dominated_by_0 and
A33: dom q = j and
A34: Sum q = l by A25,Def2;
    set 0p1=q0^p^q1;
A35: dom (0p1^q)=len 0p1+len q by AFINSQ_1:def 3;
    dom 0p1=len (q0^p)+ len q1 & dom q1=1 by AFINSQ_1:def 3;
    then
A36: dom 0p1 = len q0+len p+1 by AFINSQ_1:17;
    then (0p1^q)|(2*1+len p)=0p1 by AFINSQ_1:57;
    then
A37: min*{N:2*Sum((0p1^q)|N)=N & N>0}=2*1+len p by A28,A29,A30,Th16;
    1<= 1+len p - 2 * Sum p by A29,A30;
    then 0p1 is dominated_by_0 by A28,Th10;
    then
A38: 0p1^q is dominated_by_0 by A32,Th7;
A39: 0p1^q in NAT^omega by AFINSQ_1:def 7;
    0p1=q0^(p^q1) by AFINSQ_1:27;
    then Sum 0p1=Sum q0+ Sum (p^q1) by AFINSQ_2:55;
    then Sum 0p1=(0 qua Nat)+ (Sum p+ 1) by A22,AFINSQ_2:55;
    then Sum (0p1^q)=k+1+l by A30,A34,AFINSQ_2:55;
    then 0p1^q in Domin_0(n,m) by A1,A29,A33,A38,A36,A35,Th20;
    then
A40: 0p1^q in F by A29,A37,A39;
    then consider r1,r2 be XFinSequence of NAT such that
A41: 0p1^q = q0^r1^q1^r2 and
A42: len (q0^r1^q1) = 2k1 and
A43: f.(0p1^q) = [r1,r2] by A16;
A44: (0p1^q)|2k1=0p1 by A29,A36,AFINSQ_1:57;
    then q0^p=q0^r1 by A41,A42,AFINSQ_1:28,57;
    then
A45: p=r1 by AFINSQ_1:28;
    (q0^r1^q1^r2)|2k1=(q0^r1^q1) by A42,AFINSQ_1:57;
    then q=r2 by A41,A44,AFINSQ_1:28;
    hence thesis by A20,A26,A27,A31,A40,A43,A45,FUNCT_1:3;
  end;
  for x,y being object st x in F & y in F & f.x = f.y holds x = y
  proof
    let x,y being object such that
A46: x in F and
A47: y in F and
A48: f.x = f.y;
    consider y1,y2 be XFinSequence of NAT such that
A49: y = q0^y1^q1^y2 and
    len (q0^y1^q1) = 2k1 and
A50: f.y = [y1,y2] by A16,A47;
    consider x1,x2 be XFinSequence of NAT such that
A51: x = q0^x1^q1^x2 and
    len (q0^x1^q1) = 2k1 and
A52: f.x = [x1,x2] by A16,A46;
    x1=y1 by A48,A52,A50,XTUPLE_0:1;
    hence thesis by A48,A51,A52,A49,A50,XTUPLE_0:1;
  end;
  then f is one-to-one by A17,FUNCT_2:19;
  then F,[:Z1,Z2:] are_equipotent by A20,A21,WELLORD2:def 4;
  then card F=card [:Z1,Z2:] by CARD_1:5;
  hence thesis by CARD_2:46;
end;
