reserve x,y,z for set;

theorem Th5:
  for S being non void Signature for X being ManySortedSet of the
carrier of S for o being OperSymbol of S st the_arity_of o = {} holds root-tree
  [o, the carrier of S] in (the Sorts of Free(S, X)).the_result_sort_of o
proof
  let S be non void Signature;
  let X be ManySortedSet of the carrier of S;
  let o be OperSymbol of S such that
A1: the_arity_of o = {};
  set Y = X (\/) ((the carrier of S) --> {0});
A2: Args(o, FreeMSA Y) = ((the Sorts of FreeMSA Y)# * the Arity of S).o by
MSUALG_1:def 4
    .= (the Sorts of FreeMSA Y)#.((the Arity of S).o) by FUNCT_2:15
    .= (the Sorts of FreeMSA Y)#.<*>the carrier of S by A1,MSUALG_1:def 1
    .= {{}} by PRE_CIRC:2;
  then
A3: dom Den(o,FreeMSA Y) c= {{}};
A4: ex A being MSSubset of FreeMSA Y st Free(S, X) = GenMSAlg A & A = (
  Reverse Y)""X by Def1;
  then reconsider FX = the Sorts of Free(S,X) as MSSubset of FreeMSA Y by
MSUALG_2:def 9;
  (FX# * the Arity of S).o = FX#.((the Arity of S).o) by FUNCT_2:15
    .= FX#.<*>the carrier of S by A1,MSUALG_1:def 1
    .= {{}} by PRE_CIRC:2;
  then
A5: (Den(o,FreeMSA Y))|((FX# * the Arity of S).o) = Den(o,FreeMSA Y) by A3,
RELAT_1:68;
  set a = the ArgumentSeq of Sym(o, Y);
  reconsider a as Element of Args(o, FreeMSA Y) by INSTALG1:1;
  a = {} by A2,TARSKI:def 1;
  then root-tree [o, the carrier of S] = [o, the carrier of S]-tree a by
TREES_4:20;
  then Den(o,FreeMSA Y).a = root-tree [o, the carrier of S] by INSTALG1:3;
  then
A6: root-tree [o, the carrier of S] in rng Den(o,FreeMSA Y) by FUNCT_2:4;
  FX is opers_closed by A4,MSUALG_2:def 9;
  then FX is_closed_on o;
  then
A7: rng ((Den(o,FreeMSA Y))|((FX# * the Arity of S).o)) c= (FX * the
  ResultSort of S).o;
  (FX * the ResultSort of S).o = FX.((the ResultSort of S).o) by FUNCT_2:15
    .= FX.the_result_sort_of o by MSUALG_1:def 2;
  hence thesis by A7,A5,A6;
end;
