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 Th7:
  for S be non void non empty ManySortedSign, X be ManySortedSet of
  the carrier of S, t be set holds (t in Terminals DTConMSA(X) & X is non-empty
  implies ex s be SortSymbol of S, x be set st x in X.s & t = [x,s]) & for s be
  SortSymbol of S, x be set st x in X.s holds [x,s] in Terminals DTConMSA(X)
proof
  let S be non void non empty ManySortedSign, X be ManySortedSet of the
  carrier of S, t be set;
  set D = DTConMSA(X);
A1: Union (coprod X) c= Terminals (DTConMSA(X)) by Th6;
A2: Union (coprod X) = union rng (coprod X) by CARD_3:def 4;
  thus t in Terminals D & X is non-empty implies ex s be SortSymbol of S, x be
  set st x in X.s & t = [x,s]
  proof
    assume that
A3: t in Terminals D and
A4: X is non-empty;
    Terminals D = Union (coprod X) by A4,Th6;
    then consider A be set such that
A5: t in A and
A6: A in rng(coprod X) by A2,A3,TARSKI:def 4;
    consider s be object such that
A7: s in dom (coprod X) and
A8: (coprod X).s = A by A6,FUNCT_1:def 3;
    reconsider s as SortSymbol of S by A7;
    (coprod X).s = coprod(s,X) by Def3;
    then consider x be set such that
A9: x in X.s & t = [x,s] by A5,A8,Def2;
    take s;
    take x;
    thus thesis by A9;
  end;
  let s be SortSymbol of S, x be set such that
A10: x in X.s;
  set t = [x,s];
  dom(coprod X) = the carrier of S by PARTFUN1:def 2;
  then
A11: (coprod X).s in rng (coprod X) by FUNCT_1:def 3;
  t in coprod(s,X) by A10,Def2;
  then t in (coprod X).s by Def3;
  then t in Union (coprod X) by A2,A11,TARSKI:def 4;
  hence thesis by A1;
end;
