reserve S for non void non empty ManySortedSign,
  U0 for MSAlgebra over S;
reserve S for non void non empty ManySortedSign,
  X for ManySortedSet of the carrier of S,
  o for OperSymbol of S,
  b for Element of ([:the carrier' of S,{the
  carrier of S}:] \/ Union (coprod X))*;
reserve x for set;

theorem Th8:
  for S be non void non empty ManySortedSign, X be non-empty
  ManySortedSet of the carrier of S, o be OperSymbol of S, x be set st x in ((
  FreeSort X)# * (the Arity of S)).o holds x is FinSequence of TS(DTConMSA(X))
proof
  let S be non void non empty ManySortedSign, X be non-empty ManySortedSet of
  the carrier of S, o be OperSymbol of S, x be set;
  set D = DTConMSA(X), ar = the_arity_of o, cr = the carrier of S;
A1: (the Arity of S).o = ar by MSUALG_1:def 1;
  rng ar c= cr & dom ((FreeSort X)) = cr by FINSEQ_1:def 4,PARTFUN1:def 2;
  then
A2: dom ((FreeSort X) * ar) = dom ar by RELAT_1:27;
  assume x in ((FreeSort X)# * (the Arity of S)).o;
  then x in product ((FreeSort X) * ar) by A1,Th1;
  then consider f be Function such that
A3: x = f and
A4: dom f = dom ((FreeSort X) * ar) and
A5: for y be object st y in dom ((FreeSort X)* ar) holds f.y in ((FreeSort
  X) * ar).y by CARD_3:def 5;
  dom ar = Seg len ar by FINSEQ_1:def 3;
  then reconsider f as FinSequence by A4,A2,FINSEQ_1:def 2;
  rng f c= TS D
  proof
    let a be object;
    assume a in rng f;
    then consider b be object such that
A6: b in dom f and
A7: f.b = a by FUNCT_1:def 3;
A8: a in ((FreeSort X) * ar).b by A4,A5,A6,A7;
    reconsider b as Nat by A6;
    ((FreeSort X) * ar).b = (FreeSort X).(ar.b) by A4,A6,FUNCT_1:12
      .= (FreeSort X). (ar/.b) by A4,A2,A6,PARTFUN1:def 6
      .= FreeSort(X,ar/.b) by Def11
      .= { s where s is Element of TS D: (ex x be set st x in X.(ar/.b) & s
= root-tree [x,ar/.b]) or ex o1 be OperSymbol of S st [o1,the carrier of S] = s
    .{} & the_result_sort_of o1=ar/.b};
    then
    ex e be Element of TS D st a = e &( (ex x be set st x in X.(ar/.b) & e
= root-tree [x,(ar/.b)]) or ex o be OperSymbol of S st [o,the carrier of S] = e
    .{} & the_result_sort_of o=ar/.b) by A8;
    hence thesis;
  end;
  then reconsider f as FinSequence of TS(D) by FINSEQ_1:def 4;
  f = x by A3;
  hence thesis;
end;
