reserve
  a,b for object, I,J for set, f for Function, R for Relation,
  i,j,n for Nat, m for (Element of NAT),
  S for non empty non void ManySortedSign,
  s,s1,s2 for SortSymbol of S,
  o for OperSymbol of S,
  X for non-empty ManySortedSet of the carrier of S,
  x,x1,x2 for (Element of X.s), x11 for (Element of X.s1),
  T for all_vars_including inheriting_operations free_in_itself
  (X,S)-terms MSAlgebra over S,
  g for Translation of Free(S,X),s1,s2,
  h for Endomorphism of Free(S,X);
reserve
  r,r1,r2 for (Element of T),
  t,t1,t2 for (Element of Free(S,X));
reserve
  Y for infinite-yielding ManySortedSet of the carrier of S,
  y,y1 for (Element of Y.s), y11 for (Element of Y.s1),
  Q for all_vars_including inheriting_operations free_in_itself
  (Y,S)-terms MSAlgebra over S,
  q,q1 for (Element of Args(o,Free(S,Y))),
  u,u1,u2 for (Element of Q),
  v,v1,v2 for (Element of Free(S,Y)),
  Z for non-trivial ManySortedSet of the carrier of S,
  z,z1 for (Element of Z.s),
  l,l1 for (Element of Free(S,Z)),
  R for all_vars_including inheriting_operations free_in_itself
  (Z,S)-terms MSAlgebra over S,
  k,k1 for Element of Args(o,Free(S,Z));

theorem Th1:
  for I being FinSequence-membered set, p being FinSequence holds
  card (p^^I) = card I
  proof
    let I be FinSequence-membered set;
    let p be FinSequence;
    deffunc F(Element of I) = p^ $1;
    consider f such that
A1: dom f = I & for q being Element of I st q in I holds f.q = F(q)
    from CLASSES1:sch 2;
A2: rng f = p^^I
    proof
      thus rng f c= p^^I
      proof let a; reconsider x = a as set by TARSKI:1;
        assume a in rng f;
        then consider b being object such that
A3:     b in dom f & x = f.b by FUNCT_1:def 3;
        reconsider b as Element of I by A1,A3;
        a = F(b) by A1,A3;
        hence thesis by A1,A3;
      end;
      let a; reconsider x = a as set by TARSKI:1;
      assume a in p^^I;
      then consider q being Element of I such that
A4:   a = p^q & q in I;
      x = f.q by A1,A4;
      hence thesis by A1,A4,FUNCT_1:def 3;
    end;
    f is one-to-one
    proof
      let a,b be object;
      assume
A5:   a in dom f & b in dom f;
      then reconsider a,b as Element of I by A1;
      f.a = p^a & f.b = p^b by A1,A5;
      hence thesis by FINSEQ_1:33;
    end;
    hence card (p^^I) = card I by A1,A2,CARD_1:70;
  end;
