reserve i,j,n,k,m for Nat,
     a,b,x,y,z for object,
     F,G for FinSequence-yielding FinSequence,
     f,g,p,q for FinSequence,
     X,Y for set,
     D for non empty set;
reserve
  B,A,M for BinOp of D,
  F,G for D* -valued FinSequence,
  f for FinSequence of D,
  d,d1,d2 for Element of D;
reserve
  F,G for non-empty non empty FinSequence of D*,
  f for non empty FinSequence of D;
reserve f,g for FinSequence of D,
        a,b,c for set,
        F,F1,F2 for finite set;

theorem Th97:
  for E1 be Enumeration of F1
    for p be Function st union F1 c= dom p & p|union F1 is one-to-one holds
     (.:p)*E1 is Enumeration of .:p.:F1 & card E1 = card ((.:p)*E1)
proof
  let E1 be Enumeration of F1;
  let f be Function such that
A1: union F1 c= dom f & f|union F1 is one-to-one;
  set fu=f|union F1,If = .:f;
A2: rng E1 = F1 by RLAFFIN3:def 1;
  F1 c= bool union F1 c= bool dom f by A1,ZFMISC_1:67,82;
  then F1 c= bool dom f;
  then F1 c= dom If by FUNCT_3:def 1;
  then
A3:dom (If*E1) = dom E1 =Seg len E1 by A2,RELAT_1:27,FINSEQ_1:def 3;
  then reconsider fE1 = If*E1 as FinSequence by FINSEQ_1:def 2;
A4: dom fu = union F1 by A1,RELAT_1:62;
A5:fE1 is one-to-one
  proof
    let x1,x2 be object such that
A6:   x1 in dom fE1 & x2 in dom fE1 & fE1.x1 = fE1.x2;
A7:   x1 in dom E1 & E1.x1 in dom (.:f) & fE1.x1 = If.(E1.x1)
    by A6,FUNCT_1:11,12;
    then
A8:   fE1.x1 = f.:(E1.x1) & E1.x1 in F1 by A2,FUNCT_3:7,FUNCT_1:def 3;
    then
A9:   fE1.x1 = fu.:(E1.x1) by RELAT_1:129,ZFMISC_1:74;
A10: x2 in dom E1 & E1.x2 in dom (.:f) & fE1.x2 = If.(E1.x2)
    by A6,FUNCT_1:11,12;
    then fE1.x2 = f.:(E1.x2) & E1.x2 in F1 by A2,FUNCT_3:7,FUNCT_1:def 3;
    then E1.x2 = fu".:(fu.:(E1.x2)) = fu".:(fu.:(E1.x1)) = E1.x1
    by A1,FUNCT_1:107,A4,A6,A8,A9,RELAT_1:129,ZFMISC_1:74;
    hence thesis by A7,A10,FUNCT_1:def 4;
  end;
A11: rng fE1 c= .:f.:F1
  proof
    let y;
    assume  y in rng fE1;
    then consider x such that
A12: x in dom fE1 & fE1.x=y by FUNCT_1:def 3;
A13: x in dom E1 & E1.x in dom (.:f) & fE1.x = If.(E1.x)
      by A12,FUNCT_1:11,12;
    then fE1.x = f.:(E1.x) & E1.x in F1 by A2,FUNCT_3:7,FUNCT_1:def 3;
    hence thesis by A13,A12,FUNCT_1:def 6;
  end;
  .:f.:F1 c= rng fE1
  proof
    let y be object;
    assume y in .:f.:F1;
    then consider x such that
A14:  x in dom If & x in F1 & y = If.x by FUNCT_1:def 6;
    consider z be object such that
A15:  z in dom E1 & E1.z =x by A2,A14,FUNCT_1:def 3;
    fE1.z = y & z in dom fE1 by A15,A14,FUNCT_1:11,13;
    hence thesis by FUNCT_1:def 3;
  end;
  then rng fE1 = .:f.:F1 by A11;
  hence thesis by A5,RLAFFIN3:def 1,A3,FINSEQ_3:29;
end;
