reserve x,y for object;
reserve S for non void non empty ManySortedSign,
  o for OperSymbol of S,
  U0,U1, U2 for MSAlgebra over S;

theorem Th10:
  for S be non void non empty ManySortedSign, U0 be MSAlgebra over
  S, U1 be MSSubAlgebra of U0 holds Constants(U0) is MSSubset of U1
proof
  let S be non void non empty ManySortedSign, U0 be MSAlgebra over S, U1 be
  MSSubAlgebra of U0;
  Constants(U0) c= the Sorts of U1
  proof
    let x be object;
    assume x in the carrier of S;
    then reconsider s = x as SortSymbol of S;
    thus (Constants(U0)).x c= (the Sorts of U1).x
    proof
      let y be object;
      per cases;
      suppose
A1:     (the Sorts of U0).s = {};
        (Constants(U0)).s = Constants(U0,s) by Def4
          .= {} by A1;
        hence thesis;
      end;
      suppose
        (the Sorts of U0).s <> {};
        then
A2:     ex A being non empty set st A =(the Sorts of U0).s & Constants(U0,
s) = { b where b is Element of A : ex o be OperSymbol of S st (the Arity of S).
        o = {} & (the ResultSort of S).o = s & b in rng Den(o,U0)} by Def3;
        reconsider u1=the Sorts of U1 as MSSubset of U0 by Def9;
        assume
A3:     y in (Constants(U0)).x;
        (Constants(U0)).x = Constants(U0,s) by Def4;
        then consider b be Element of (the Sorts of U0).s such that
A4:     b=y and
A5:     ex o be OperSymbol of S st (the Arity of S).o={} & (the
        ResultSort of S).o = s & b in rng Den(o,U0) by A3,A2;
        consider o be OperSymbol of S such that
A6:     (the Arity of S).o = {} and
A7:     (the ResultSort of S).o = s and
A8:     b in rng Den(o,U0) by A5;
A9:     dom (the Arity of S) = the carrier' of S by FUNCT_2:def 1;
        then
A10:    (the Arity of S).o in rng (the Arity of S) by FUNCT_1:def 3;
        dom {} = {} & rng {} = {};
        then reconsider a = {} as Function of {},{} by FUNCT_2:1;
A11:    dom (the ResultSort of S) = the carrier' of S by FUNCT_2:def 1;
        dom (u1# qua ManySortedSet of(the carrier of S)* ) = (the carrier
        of S) * by PARTFUN1:def 2;
        then o in dom (u1# * the Arity of S) by A9,A10,FUNCT_1:11;
        then
A12:    (u1# * the Arity of S).o = u1# . ((the Arity of S).o) by FUNCT_1:12
          .= u1# . (the_arity_of o) by MSUALG_1:def 1
          .= product (u1 * (the_arity_of o)) by FINSEQ_2:def 5
          .= product (u1 * a) by A6,MSUALG_1:def 1
          .= {{}} by CARD_3:10;
        dom ((the Sorts of U0)# qua ManySortedSet of(the carrier of S)*)
        = (the carrier of S)* by PARTFUN1:def 2;
        then
A13:    o in dom ((the Sorts of U0)# * the Arity of S) by A9,A10,FUNCT_1:11;
        u1 is opers_closed by Def9;
        then u1 is_closed_on o;
        then
A14:    rng ((Den(o,U0))|((u1# * the Arity of S).o)) c=(u1*the ResultSort
        of S).o;
        rng Den(o,U0) c= Result(o,U0) by RELAT_1:def 19;
        then dom (Den (o,U0)) = Args(o,U0) by A8,FUNCT_2:def 1
          .= ((the Sorts of U0)# * the Arity of S).o by MSUALG_1:def 4
          .= (the Sorts of U0)# . ((the Arity of S).o) by A13,FUNCT_1:12
          .= (the Sorts of U0)# . (the_arity_of o) by MSUALG_1:def 1
          .= product ((the Sorts of U0) * (the_arity_of o)) by FINSEQ_2:def 5
          .= product ((the Sorts of U0) * a) by A6,MSUALG_1:def 1
          .= {{}} by CARD_3:10;
        then (Den(o,U0))|((u1# * the Arity of S).o) =(Den(o,U0)) by A12;
        then b in (u1*the ResultSort of S).o by A8,A14;
        hence thesis by A4,A7,A11,FUNCT_1:13;
      end;
    end;
  end;
  hence thesis by PBOOLE:def 18;
end;
