reserve S for non void non empty ManySortedSign,
  V for non-empty ManySortedSet of the carrier of S;
reserve A for MSAlgebra over S,
  t for Term of S,V;

theorem Th17:
  for o being OperSymbol of S st t.{} = [o,the carrier of S] holds
  the_sort_of t = the_result_sort_of o
proof
  let o be OperSymbol of S;
  set X = V, G = DTConMSA X;
  set tst = the_sort_of t;
A1: FreeSort (X, tst) = {a where a is Element of TS G: (ex x be set st x in
X.tst & a = root-tree [x,tst]) or ex o be OperSymbol of S st [o,the carrier of
  S] = a.{} & the_result_sort_of o = tst} by MSAFREE:def 10;
  t in FreeSort (V, the_sort_of t) by Def5;
  then consider a being Element of TS G such that
A2: t = a and
A3: (ex x be set st x in X.tst & a = root-tree [x,tst]) or ex o be
OperSymbol of S st [o,the carrier of S] = a.{} & the_result_sort_of o = tst by
A1;
  assume
A4: t.{} = [o,the carrier of S];
  per cases by A3;
  suppose
    ex x be set st x in X.tst & a = root-tree [x,tst];
    then consider x being set such that
    x in X.tst and
A5: a = root-tree [x,tst];
    [o,the carrier of S] = [x,tst] by A2,A4,A5,TREES_4:3;
    then the carrier of S = tst by XTUPLE_0:1;
    hence thesis by Lm7;
  end;
  suppose
    ex o be OperSymbol of S st [o,the carrier of S] = a.{} &
    the_result_sort_of o = tst;
    hence thesis by A2,A4,XTUPLE_0:1;
  end;
end;
