reserve i for Nat,
  j for Element of NAT,
  X,Y,x,y,z for set;
reserve C for initialized ConstructorSignature,
  s for SortSymbol of C,
  o for OperSymbol of C,
  c for constructor OperSymbol of C;
reserve a,b for expression of C, an_Adj C;
reserve t, t1,t2 for expression of C, a_Type C;
reserve p for FinSequence of QuasiTerms C;

theorem Th52:
  len p = len the_arity_of c implies
  c-trm p is expression of C, the_result_sort_of c
proof
  set X = MSVars C;
  set V = X(\/)((the carrier of C)-->{0});
  assume len p = len the_arity_of c;
  then
A1: Sym(c,V)-tree p = c-trm p by Def35;
A2: the Sorts of Free(C,X) = C-Terms(X,V) by MSAFREE3:24;
  c-trm p is Term of C,V by MSAFREE3:8;
  then reconsider q = p as ArgumentSeq of Sym(c,V) by A1,MSATERM:1;
  rng q c= Union the Sorts of Free(C,X) by FINSEQ_1:def 4;
  then c-trm p in (C-Terms(X,V)).the_result_sort_of c by A1,A2,MSAFREE3:19;
  hence thesis by A2,Def28;
end;
