reserve S for OrderSortedSign;
reserve S for OrderSortedSign,
  X for ManySortedSet 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 Th30:
  for S be locally_directed OrderSortedSign, X be non-empty
  ManySortedSet of S, s be Element of S holds OSFreeGen(s,X) = { (OSNat_Hom(
ParsedTermsOSA(X),LCongruence(X)).s).root-tree t where t is Symbol of DTConOSA(
  X): t in Terminals DTConOSA(X) & t`2 = s}
proof
  let S be locally_directed OrderSortedSign, X be non-empty ManySortedSet of S
  , s be Element of S;
  set D = DTConOSA(X), NH = OSNat_Hom(ParsedTermsOSA(X),LCongruence(X)), A = {
  (NH.s).root-tree t where t is Symbol of D : t in Terminals D & t`2 = s};
  thus OSFreeGen(s,X) c= A
  proof
    let x be object;
    assume x in OSFreeGen(s,X);
    then consider a be object such that
A1: a in X.s and
A2: x = (NH.s).root-tree [a,s] by Def25;
A3: [a,s] in Terminals D by A1,Th4;
    then reconsider t = [a,s] as Symbol of D;
    t`2 = s;
    hence thesis by A2,A3;
  end;
  let x be object;
  assume x in A;
  then consider t be Symbol of D such that
A4: x = (NH.s).root-tree t and
A5: t in Terminals D and
A6: t`2 = s;
  consider s1 be Element of S, a be set such that
A7: a in X.s1 and
A8: t = [a,s1] by A5,Th4;
  s = s1 by A6,A8;
  hence thesis by A4,A7,A8,Def25;
end;
