let S be non empty non void ManySortedSign ; :: thesis: for U0 being MSAlgebra over S
for A being MSSubset of U0 holds
( GenMSAlg A = U0 | (MSSubSort A) & the Sorts of (GenMSAlg A) = MSSubSort A )

let U0 be MSAlgebra over S; :: thesis: for A being MSSubset of U0 holds
( GenMSAlg A = U0 | (MSSubSort A) & the Sorts of (GenMSAlg A) = MSSubSort A )

let A be MSSubset of U0; :: thesis: ( GenMSAlg A = U0 | (MSSubSort A) & the Sorts of (GenMSAlg A) = MSSubSort A )
set a = MSSubSort A;
reconsider u1 = U0 | (MSSubSort A) as strict MSSubAlgebra of U0 ;
A1: u1 = MSAlgebra(# (MSSubSort A),(Opers (U0,(MSSubSort A))) #) by MSUALG_2:20, MSUALG_2:def 15;
A2: A c= MSSubSort A by MSUALG_2:20;
A3: ( A is MSSubset of u1 & ( for U1 being MSSubAlgebra of U0 st A is MSSubset of U1 holds
u1 is MSSubAlgebra of U1 ) )
proof
thus A is MSSubset of u1 by A2, A1, PBOOLE:def 18; :: thesis: for U1 being MSSubAlgebra of U0 st A is MSSubset of U1 holds
u1 is MSSubAlgebra of U1

let U2 be MSSubAlgebra of U0; :: thesis: ( A is MSSubset of U2 implies u1 is MSSubAlgebra of U2 )
reconsider B = the Sorts of U2 as MSSubset of U0 by MSUALG_2:def 9;
Constants U0 is MSSubset of U2 by MSUALG_2:10;
then A4: Constants U0 c= B by PBOOLE:def 18;
assume A is MSSubset of U2 ; :: thesis: u1 is MSSubAlgebra of U2
then ( B is opers_closed & A c= B ) by MSUALG_2:def 9, PBOOLE:def 18;
then A5: B in SubSort A by A4, MSUALG_2:13;
the Sorts of u1 c= the Sorts of U2
proof
let i be object ; :: according to PBOOLE:def 2 :: thesis: ( not i in the carrier of S or the Sorts of u1 . i c= the Sorts of U2 . i )
assume i in the carrier of S ; :: thesis: the Sorts of u1 . i c= the Sorts of U2 . i
then reconsider s = i as SortSymbol of S ;
( the Sorts of u1 . s = meet (SubSort (A,s)) & B . s in SubSort (A,s) ) by A1, A5, MSUALG_2:def 13, MSUALG_2:def 14;
hence the Sorts of u1 . i c= the Sorts of U2 . i by SETFAM_1:3; :: thesis: verum
end;
hence u1 is MSSubAlgebra of U2 by MSUALG_2:8; :: thesis: verum
end;
hence GenMSAlg A = U0 | (MSSubSort A) by MSUALG_2:def 17; :: thesis: the Sorts of (GenMSAlg A) = MSSubSort A
thus the Sorts of (GenMSAlg A) = MSSubSort A by A1, A3, MSUALG_2:def 17; :: thesis: verum