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;
