reserve x,y,z for set;

theorem Th38:
  for S being non void Signature for A being feasible MSAlgebra
  over S for B being MSSubAlgebra of A holds B is feasible
proof
  let S be non void Signature;
  let A be feasible MSAlgebra over S;
  let B be MSSubAlgebra of A;
  reconsider SB = the Sorts of B as MSSubset of A by MSUALG_2:def 9;
  let o be OperSymbol of S;
  set a = the Element of Args(o,B);
  assume Args(o,B) <> {};
  then
A1: a in Args(o,B);
A2: Args(o,B) c= Args(o,A) by Th37;
  then Result(o,A) <> {} by A1,MSUALG_6:def 1;
  then dom Den(o,A) = Args(o,A) by FUNCT_2:def 1;
  then a in dom (Den(o,A)|Args(o,B)) by A1,A2,RELAT_1:57;
  then
A3: Result(o,B) = (SB * the ResultSort of S).o & (Den(o,A)|Args(o,B)).a in
  rng ( Den(o,A)|Args(o,B)) by FUNCT_1:def 3,MSUALG_1:def 5;
  SB is opers_closed by MSUALG_2:def 9;
  then SB is_closed_on o;
  then
  rng ((Den(o,A))|((SB# * the Arity of S).o)) c= (SB * the ResultSort of S
  ).o;
  hence thesis by A3,MSUALG_1:def 4;
end;
