:: AUTALG_1 semantic presentation

theorem E1: :: AUTALG_1:1
for b1 being Universal_Algebra holds id the carrier of b1 is_isomorphism b1,b1
proof
let c1 be Universal_Algebra;
set c2 = id the carrier of c1;
thus id the carrier of c1 is_monomorphism c1,c1 :: according to ALG_1:def 4
proof
thus id the carrier of c1 is_homomorphism c1,c1 by ALG_1:6; :: according to ALG_1:def 2
thus id the carrier of c1 is one-to-one ;
end;
thus id the carrier of c1 is_epimorphism c1,c1
proof
thus id the carrier of c1 is_homomorphism c1,c1 by ALG_1:6; :: according to ALG_1:def 3
thus rng (id the carrier of c1) = the carrier of c1 by RELAT_1:71;
end;
end;

definition
let c1 be Universal_Algebra;
func UAAut c1 -> FUNCTION_DOMAIN of the carrier of a1,the carrier of a1 means :E2: :: AUTALG_1:def 1
( ( for b1 being Element of a2 holds
b1 is Function of a1,a1 ) & ( for b1 being Function of a1,a1 holds
( b1 in a2 iff b1 is_isomorphism a1,a1 ) ) );
existence
ex b1 being FUNCTION_DOMAIN of the carrier of c1,the carrier of c1 st
( ( for b2 being Element of b1 holds
b2 is Function of c1,c1 ) & ( for b2 being Function of c1,c1 holds
( b2 in b1 iff b2 is_isomorphism c1,c1 ) ) )
proof
set c2 = { b1 where B is Element of Funcs the carrier of c1,the carrier of c1 : b1 is_isomorphism c1,c1 } ;
E2: id the carrier of c1 in { b1 where B is Element of Funcs the carrier of c1,the carrier of c1 : b1 is_isomorphism c1,c1 }
proof
set c3 = id the carrier of c1;
E3: id the carrier of c1 in Funcs the carrier of c1,the carrier of c1 by FUNCT_2:11;
id the carrier of c1 is_isomorphism c1,c1 by E1;
hence id the carrier of c1 in { b1 where B is Element of Funcs the carrier of c1,the carrier of c1 : b1 is_isomorphism c1,c1 } by E3;
end;
reconsider c3 = { b1 where B is Element of Funcs the carrier of c1,the carrier of c1 : b1 is_isomorphism c1,c1 } as set ;
c3 is functional
proof
let c4 be set ; :: according to FRAENKEL:def 1
assume c4 in c3 ;
then consider c5 being Element of Funcs the carrier of c1,the carrier of c1 such that
E3: ( c4 = c5 & c5 is_isomorphism c1,c1 ) ;
thus c4 is set by E3;
end;
then reconsider c4 = c3 as non empty functional set by E2;
c4 is FUNCTION_DOMAIN of the carrier of c1,the carrier of c1
proof
let c5 be Element of c4; :: according to FRAENKEL:def 2
c5 in c4 ;
then consider c6 being Element of Funcs the carrier of c1,the carrier of c1 such that
E3: ( c5 = c6 & c6 is_isomorphism c1,c1 ) ;
thus c5 is M5(the carrier of c1,the carrier of c1) by E3;
end;
then reconsider c5 = c4 as FUNCTION_DOMAIN of the carrier of c1,the carrier of c1 ;
take c5 ;
thus for b1 being Element of c5 holds
b1 is Function of c1,c1 ;
let c6 be Function of c1,c1;
thus ( c6 in c5 implies c6 is_isomorphism c1,c1 )
proof
assume c6 in c5 ;
then ex b1 being Element of Funcs the carrier of c1,the carrier of c1 st
( b1 = c6 & b1 is_isomorphism c1,c1 ) ;
hence c6 is_isomorphism c1,c1 ;
end;
assume E3: c6 is_isomorphism c1,c1 ;
c6 is Element of Funcs the carrier of c1,the carrier of c1 by FUNCT_2:11;
hence c6 in c5 by E3;
end;
uniqueness
for b1, b2 being FUNCTION_DOMAIN of the carrier of c1,the carrier of c1 holds
( ( ( for b3 being Element of b1 holds
b3 is Function of c1,c1 ) & ( for b3 being Function of c1,c1 holds
( b3 in b1 iff b3 is_isomorphism c1,c1 ) ) & ( for b3 being Element of b2 holds
b3 is Function of c1,c1 ) & ( for b3 being Function of c1,c1 holds
( b3 in b2 iff b3 is_isomorphism c1,c1 ) ) ) implies ( b1 = b2 ) )
proof
let c2, c3 be FUNCTION_DOMAIN of the carrier of c1,the carrier of c1;
assume that
E2: ( ( for b1 being Element of c2 holds
b1 is Function of c1,c1 ) & ( for b1 being Function of c1,c1 holds
( b1 in c2 iff b1 is_isomorphism c1,c1 ) ) ) and
E3: ( ( for b1 being Element of c3 holds
b1 is Function of c1,c1 ) & ( for b1 being Function of c1,c1 holds
( b1 in c3 iff b1 is_isomorphism c1,c1 ) ) ) ;
E4: c2 c= c3
proof
let c4 be set ; :: according to TARSKI:def 3
assume E5: c4 in c2 ;
then reconsider c5 = c4 as Function of c1,c1 by E2;
c5 is_isomorphism c1,c1 by E2, E5;
hence c4 in c3 by E3;
end;
c3 c= c2
proof
let c4 be set ; :: according to TARSKI:def 3
assume E5: c4 in c3 ;
then reconsider c5 = c4 as Function of c1,c1 by E3;
c5 is_isomorphism c1,c1 by E3, E5;
hence c4 in c2 by E2;
end;
hence c2 = c3 by E4, XBOOLE_0:def 10;
end;
end;

:: deftheorem E2 defines UAAut AUTALG_1:def 1 :
for b1 being Universal_Algebra
for b2 being FUNCTION_DOMAIN of the carrier of b1,the carrier of b1 holds
( b2 = UAAut b1 iff ( ( for b3 being Element of b2 holds
b3 is Function of b1,b1 ) & ( for b3 being Function of b1,b1 holds
( b3 in b2 iff b3 is_isomorphism b1,b1 ) ) ) );

theorem :: AUTALG_1:2
for b1 being Universal_Algebra holds UAAut b1 c= Funcs the carrier of b1,the carrier of b1
proof
let c1 be Universal_Algebra;
let c2 be set ; :: according to TARSKI:def 3
assume c2 in UAAut c1 ;
then consider c3 being Element of UAAut c1 such that
E3: c3 = c2 ;
thus c2 in Funcs the carrier of c1,the carrier of c1 by E3, FUNCT_2:12;
end;

theorem :: AUTALG_1:3
canceled;

theorem E3: :: AUTALG_1:4
for b1 being Universal_Algebra holds id the carrier of b1 in UAAut b1
proof
let c1 be Universal_Algebra;
id the carrier of c1 is_isomorphism c1,c1 by E1;
hence id the carrier of c1 in UAAut c1 by E2;
end;

theorem :: AUTALG_1:5
for b1 being Universal_Algebra
for b2, b3 being Function of b1,b1 holds
( ( b2 is Element of UAAut b1 & b3 = b2 " ) implies ( b3 is_isomorphism b1,b1 ) )
proof
let c1 be Universal_Algebra;
let c2, c3 be Function of c1,c1;
assume E4: ( c2 is Element of UAAut c1 & c3 = c2 " ) ;
then c2 is_isomorphism c1,c1 by E2;
hence c3 is_isomorphism c1,c1 by E4, ALG_1:11;
end;

E4: for b1 being Universal_Algebra
for b2 being Function of b1,b1 holds
( b2 is_isomorphism b1,b1 implies b2 " is Function of b1,b1 )
proof
let c1 be Universal_Algebra;
let c2 be Function of c1,c1;
assume E5: c2 is_isomorphism c1,c1 ;
then E6: c2 is one-to-one by ALG_1:8;
c2 is_epimorphism c1,c1 by E5, ALG_1:def 4;
then rng c2 = the carrier of c1 by ALG_1:def 3;
hence c2 " is Function of c1,c1 by E6, FUNCT_2:31;
end;

theorem E5: :: AUTALG_1:6
for b1 being Universal_Algebra
for b2 being Element of UAAut b1 holds b2 " in UAAut b1
proof
let c1 be Universal_Algebra;
let c2 be Element of UAAut c1;
E6: c2 is_isomorphism c1,c1 by E2;
then c2 " is Function of c1,c1 by E4;
then consider c3 being Function of c1,c1 such that
E7: c3 = c2 " ;
c3 is_isomorphism c1,c1 by E6, E7, ALG_1:11;
hence c2 " in UAAut c1 by E7, E2;
end;

theorem E6: :: AUTALG_1:7
for b1 being Universal_Algebra
for b2, b3 being Element of UAAut b1 holds b2 * b3 in UAAut b1
proof
let c1 be Universal_Algebra;
let c2, c3 be Element of UAAut c1;
( c2 is_isomorphism c1,c1 & c3 is_isomorphism c1,c1 ) by E2;
then c2 * c3 is_isomorphism c1,c1 by ALG_1:12;
hence c2 * c3 in UAAut c1 by E2;
end;

definition
let c1 be Universal_Algebra;
func UAAutComp c1 -> BinOp of UAAut a1 means :E7: :: AUTALG_1:def 2
for b1, b2 being Element of UAAut a1 holds a2 . b1,b2 = b2 * b1;
existence
ex b1 being BinOp of UAAut c1 st
for b2, b3 being Element of UAAut c1 holds b1 . b2,b3 = b3 * b2
proof
defpred S1[ Element of UAAut c1, Element of UAAut c1, set ] means a3 = a2 * a1;
E7: for b1, b2 being Element of UAAut c1 holds
ex b3 being Element of UAAut c1 st
S1[b1,b2,b3]
proof
let c2, c3 be Element of UAAut c1;
reconsider c4 = c2, c5 = c3 as Function of c1,c1 ;
reconsider c6 = c5 * c4 as Element of UAAut c1 by E6;
take c6 ;
thus S1[c2,c3,c6] ;
end;
thus ex b1 being BinOp of UAAut c1 st
for b2, b3 being Element of UAAut c1 holds
S1[b2,b3,b1 . b2,b3] from BINOP_1:sch 3(E7);
end;
uniqueness
for b1, b2 being BinOp of UAAut c1 holds
( ( ( for b3, b4 being Element of UAAut c1 holds b1 . b3,b4 = b4 * b3 ) & ( for b3, b4 being Element of UAAut c1 holds b2 . b3,b4 = b4 * b3 ) ) implies ( b1 = b2 ) )
proof
let c2, c3 be BinOp of UAAut c1;
assume that
E7: for b1, b2 being Element of UAAut c1 holds c2 . b1,b2 = b2 * b1 and
E8: for b1, b2 being Element of UAAut c1 holds c3 . b1,b2 = b2 * b1 ;
for b1, b2 being Element of UAAut c1 holds c2 . b1,b2 = c3 . b1,b2
proof
let c4, c5 be Element of UAAut c1;
thus c2 . c4,c5 = c5 * c4 by E7
.= c3 . c4,c5 by E8 ;
end;
hence c2 = c3 by BINOP_1:2;
end;
end;

:: deftheorem E7 defines UAAutComp AUTALG_1:def 2 :
for b1 being Universal_Algebra
for b2 being BinOp of UAAut b1 holds
( b2 = UAAutComp b1 iff for b3, b4 being Element of UAAut b1 holds b2 . b3,b4 = b4 * b3 );

definition
let c1 be Universal_Algebra;
func UAAutGroup c1 -> Group equals :: AUTALG_1:def 3
HGrStr(# (UAAut a1),(UAAutComp a1) #);
coherence
HGrStr(# (UAAut c1),(UAAutComp c1) #) is Group
proof
set c2 = HGrStr(# (UAAut c1),(UAAutComp c1) #);
( HGrStr(# (UAAut c1),(UAAutComp c1) #) is associative & HGrStr(# (UAAut c1),(UAAutComp c1) #) is Group-like )
proof
E8: for b1, b2 being Element of HGrStr(# (UAAut c1),(UAAutComp c1) #)
for b3, b4 being Element of UAAut c1 holds
( ( b1 = b3 & b2 = b4 ) implies ( b1 * b2 = b4 * b3 ) ) by E7;
thus for b1, b2, b3 being Element of HGrStr(# (UAAut c1),(UAAutComp c1) #) holds (b1 * b2) * b3 = b1 * (b2 * b3) :: according to GROUP_1:def 4
proof
let c3, c4, c5 be Element of HGrStr(# (UAAut c1),(UAAutComp c1) #);
reconsider c6 = c3, c7 = c4, c8 = c5 as Element of UAAut c1 ;
E9: c3 * c4 = c7 * c6 by E8;
E10: c4 * c5 = c8 * c7 by E8;
thus (c3 * c4) * c5 = c8 * (c7 * c6) by E8, E9
.= (c8 * c7) * c6 by RELAT_1:55
.= c3 * (c4 * c5) by E8, E10 ;
end;
thus ex b1 being Element of HGrStr(# (UAAut c1),(UAAutComp c1) #) st
for b2 being Element of HGrStr(# (UAAut c1),(UAAutComp c1) #) holds
( b2 * b1 = b2 & b1 * b2 = b2 & ex b3 being Element of HGrStr(# (UAAut c1),(UAAutComp c1) #) st
( b2 * b3 = b1 & b3 * b2 = b1 ) ) :: according to GROUP_1:def 3
proof
reconsider c3 = id the carrier of c1 as Element of HGrStr(# (UAAut c1),(UAAutComp c1) #) by E3;
take c3 ;
let c4 be Element of HGrStr(# (UAAut c1),(UAAutComp c1) #);
consider c5 being Element of UAAut c1 such that
E9: c5 = c4 ;
c4 * c3 = (id the carrier of c1) * c5 by E8, E9
.= c5 by FUNCT_2:74 ;
hence c4 * c3 = c4 by E9;
c3 * c4 = c5 * (id the carrier of c1) by E8, E9
.= c5 by FUNCT_2:74 ;
hence c3 * c4 = c4 by E9;
reconsider c6 = c5 " as Element of HGrStr(# (UAAut c1),(UAAutComp c1) #) by E5;
take c6 ;
E10: c5 is_isomorphism c1,c1 by E2;
then E11: c5 is one-to-one by ALG_1:8;
c5 is_epimorphism c1,c1 by E10, ALG_1:def 4;
then E12: rng c5 = the carrier of c1 by ALG_1:def 3;
thus c4 * c6 = (c5 " ) * c5 by E8, E9
.= c3 by E11, E12, FUNCT_2:35 ;
thus c6 * c4 = c5 * (c5 " ) by E8, E9
.= c3 by E11, E12, FUNCT_2:35 ;
end;
end;
hence HGrStr(# (UAAut c1),(UAAutComp c1) #) is Group ;
end;
end;

:: deftheorem defines UAAutGroup AUTALG_1:def 3 :
for b1 being Universal_Algebra holds UAAutGroup b1 = HGrStr(# (UAAut b1),(UAAutComp b1) #);

registration
let c1 be Universal_Algebra;
cluster UAAutGroup a1 -> strict ;
coherence
UAAutGroup c1 is strict
;
end;

E8: for b1 being Universal_Algebra
for b2 being Element of UAAut b1 holds
( dom b2 = rng b2 & dom b2 = the carrier of b1 )
proof
let c1 be Universal_Algebra;
let c2 be Element of UAAut c1;
c2 is_isomorphism c1,c1 by E2;
then ( dom c2 = the carrier of c1 & rng c2 = the carrier of c1 ) by ALG_1:9;
hence ( dom c2 = rng c2 & dom c2 = the carrier of c1 ) ;
end;

theorem E9: :: AUTALG_1:8
for b1 being Universal_Algebra
for b2, b3 being Element of (UAAutGroup b1)
for b4, b5 being Element of UAAut b1 holds
( ( b2 = b4 & b3 = b5 ) implies ( b2 * b3 = b5 * b4 ) ) by E7;

theorem E10: :: AUTALG_1:9
for b1 being Universal_Algebra holds id the carrier of b1 = 1. (UAAutGroup b1)
proof
let c1 be Universal_Algebra;
reconsider c2 = id the carrier of c1 as Element of (UAAutGroup c1) by E3;
consider c3 being Function of the carrier of c1,the carrier of c1 such that
E11: c3 = c2 ;
consider c4 being Element of (UAAutGroup c1);
c4 is Element of UAAut c1 ;
then consider c5 being Function of the carrier of c1,the carrier of c1 such that
E12: c5 = c4 ;
c2 * c4 = c5 * c3 by E11, E12, E9
.= c4 by E11, E12, FUNCT_2:74 ;
hence id the carrier of c1 = 1. (UAAutGroup c1) by GROUP_1:15;
end;

theorem :: AUTALG_1:10
for b1 being Universal_Algebra
for b2 being Element of UAAut b1
for b3 being Element of (UAAutGroup b1) holds
( b2 = b3 implies b2 " = b3 " )
proof
let c1 be Universal_Algebra;
let c2 be Element of UAAut c1;
let c3 be Element of (UAAutGroup c1);
assume E11: c2 = c3 ;
consider c4 being Element of UAAut c1 such that
E12: c4 = c3 " ;
E13: rng c2 = dom c2 by E8
.= the carrier of c1 by E8 ;
c2 is_isomorphism c1,c1 by E2;
then c2 is_monomorphism c1,c1 by ALG_1:def 4;
then E14: c2 is one-to-one by ALG_1:def 2;
c4 * c2 = c3 * (c3 " ) by E11, E12, E9;
then c4 * c2 = 1. (UAAutGroup c1) by GROUP_1:def 6;
then c4 * c2 = id the carrier of c1 by E10;
hence c2 " = c3 " by E12, E13, E14, FUNCT_2:36;
end;

theorem :: AUTALG_1:11
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
( ( b2 is_transformable_to b3 & b3 is_transformable_to b4 ) implies ( b2 is_transformable_to b4 ) )
proof
let c1 be set ;
let c2, c3, c4 be ManySortedSet of c1;
assume E11: ( c2 is_transformable_to c3 & c3 is_transformable_to c4 ) ;
thus c2 is_transformable_to c4
proof
let c5 be set ; :: according to PZFMISC1:def 3
assume c5 in c1 ;
then ( ( c3 . c5 = {} implies c2 . c5 = {} ) & ( c4 . c5 = {} implies c3 . c5 = {} ) ) by E11, PZFMISC1:def 3;
hence ( c4 . c5 = {} implies c2 . c5 = {} ) ;
end;
end;

theorem E11: :: AUTALG_1:12
for b1 being set
for b2 being ManySortedSet of {b1} holds b2 = b1 .--> (b2 . b1)
proof
let c1 be set ;
let c2 be ManySortedSet of {c1};
E12: dom c2 = {c1} by PBOOLE:def 3;
then rng c2 = {(c2 . c1)} by FUNCT_1:14;
hence c2 = c1 .--> (c2 . c1) by E12, FUNCOP_1:15;
end;

theorem E12: :: AUTALG_1:13
for b1, b2, b3 being Function-yielding Function holds (b3 ** b2) ** b1 = b3 ** (b2 ** b1)
proof
let c1, c2, c3 be Function-yielding Function;
set c4 = (c3 ** c2) ** c1;
set c5 = c3 ** (c2 ** c1);
now
E13: dom ((c3 ** c2) ** c1) = (dom (c3 ** c2)) /\ (dom c1) by PBOOLE:def 24
.= ((dom c3) /\ (dom c2)) /\ (dom c1) by PBOOLE:def 24 ;
then E14: dom ((c3 ** c2) ** c1) = (dom c3) /\ ((dom c2) /\ (dom c1)) by XBOOLE_1:16;
hence E15: dom ((c3 ** c2) ** c1) = (dom c3) /\ (dom (c2 ** c1)) by PBOOLE:def 24
.= dom (c3 ** (c2 ** c1)) by PBOOLE:def 24 ;

let c6 be set ;
assume E16: c6 in dom ((c3 ** c2) ** c1) ;
then c6 in (dom c3) /\ (dom c2) by E13, XBOOLE_0:def 3;
then E17: c6 in dom (c3 ** c2) by PBOOLE:def 24;
c6 in (dom c2) /\ (dom c1) by E14, E16, XBOOLE_0:def 3;
then E18: c6 in dom (c2 ** c1) by PBOOLE:def 24;
thus ((c3 ** c2) ** c1) . c6 = ((c3 ** c2) . c6) * (c1 . c6) by E16, PBOOLE:def 24
.= ((c3 . c6) * (c2 . c6)) * (c1 . c6) by E17, PBOOLE:def 24
.= (c3 . c6) * ((c2 . c6) * (c1 . c6)) by RELAT_1:55
.= (c3 . c6) * ((c2 ** c1) . c6) by E18, PBOOLE:def 24
.= (c3 ** (c2 ** c1)) . c6 by E15, E16, PBOOLE:def 24 ;
end;
hence (c3 ** c2) ** c1 = c3 ** (c2 ** c1) by FUNCT_1:9;
end;

theorem E13: :: AUTALG_1:14
for b1 being set
for b2, b3 being V2 ManySortedSet of b1
for b4 being ManySortedFunction of b2,b3 holds
( ( b4 is "1-1" & b4 is "onto" ) implies ( ( b4 "" is "1-1" & b4 "" is "onto" ) ) )
proof
let c1 be set ;
let c2, c3 be V2 ManySortedSet of c1;
let c4 be ManySortedFunction of c2,c3;
assume E14: ( c4 is "1-1" & c4 is "onto" ) ;
now
let c5 be set ;
assume E15: c5 in c1 ;
then reconsider c6 = c4 . c5 as Function of c2 . c5,c3 . c5 by PBOOLE:def 18;
c6 is one-to-one by E14, E15, MSUALG_3:1;
then c6 " is one-to-one by FUNCT_1:62;
hence (c4 "" ) . c5 is one-to-one by E14, E15, MSUALG_3:def 5;
end;
hence c4 "" is "1-1" by MSUALG_3:1;
thus c4 "" is "onto"
proof
let c5 be set ; :: according to MSUALG_3:def 3
assume E15: c5 in c1 ;
then E16: ( c2 . c5 <> {} & c3 . c5 <> {} ) by PBOOLE:def 16;
reconsider c6 = c4 . c5 as Function of c2 . c5,c3 . c5 by E15, PBOOLE:def 18;
E17: c6 is one-to-one by E14, E15, MSUALG_3:1;
c2 . c5 = dom c6 by E16, FUNCT_2:def 1
.= rng (c6 " ) by E17, FUNCT_1:55 ;
hence rng ((c4 "" ) . c5) = c2 . c5 by E14, E15, MSUALG_3:def 5;
end;
end;

theorem :: AUTALG_1:15
for b1 being set
for b2, b3 being V2 ManySortedSet of b1
for b4 being ManySortedFunction of b2,b3 holds
( ( b4 is "1-1" & b4 is "onto" ) implies ( (b4 "" ) "" = b4 ) )
proof
let c1 be set ;
let c2, c3 be V2 ManySortedSet of c1;
let c4 be ManySortedFunction of c2,c3;
assume E14: ( c4 is "1-1" & c4 is "onto" ) ;
now
let c5 be set ;
assume E15: c5 in c1 ;
then reconsider c6 = (c4 "" ) . c5 as Function of c3 . c5,c2 . c5 by PBOOLE:def 18;
reconsider c7 = c4 . c5 as Function of c2 . c5,c3 . c5 by E15, PBOOLE:def 18;
( c4 "" is "1-1" & c4 "" is "onto" ) by E14, E13;
then E16: ((c4 "" ) "" ) . c5 = c6 " by E15, MSUALG_3:def 5;
c7 is one-to-one by E14, E15, MSUALG_3:1;
then (c7 " ) " = c7 by FUNCT_1:65;
hence ((c4 "" ) "" ) . c5 = c4 . c5 by E14, E15, E16, MSUALG_3:def 5;
end;
hence (c4 "" ) "" = c4 by PBOOLE:3;
end;

theorem E14: :: AUTALG_1:16
for b1, b2 being Function-yielding Function holds
( ( b1 is "1-1" & b2 is "1-1" ) implies ( b2 ** b1 is "1-1" ) )
proof
let c1, c2 be Function-yielding Function;
assume E15: ( c1 is "1-1" & c2 is "1-1" ) ;
let c3 be set ; :: according to MSUALG_3:def 2
let c4 be Function;
assume that
E16: c3 in dom (c2 ** c1) and
E17: (c2 ** c1) . c3 = c4 ;
dom (c2 ** c1) = (dom c2) /\ (dom c1) by PBOOLE:def 24;
then ( c3 in dom c2 & c3 in dom c1 ) by E16, XBOOLE_0:def 3;
then ( c2 . c3 is one-to-one & c1 . c3 is one-to-one ) by E15, MSUALG_3:def 2;
then (c2 . c3) * (c1 . c3) is one-to-one by FUNCT_1:46;
hence c4 is one-to-one by E16, E17, PBOOLE:def 24;
end;

theorem E15: :: AUTALG_1:17
for b1 being set
for b2 being ManySortedSet of b1
for b3, b4 being V2 ManySortedSet of b1
for b5 being ManySortedFunction of b2,b3
for b6 being ManySortedFunction of b3,b4 holds
( ( b5 is "onto" & b6 is "onto" ) implies ( b6 ** b5 is "onto" ) )
proof
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3, c4 be V2 ManySortedSet of c1;
let c5 be ManySortedFunction of c2,c3;
let c6 be ManySortedFunction of c3,c4;
assume that
E16: c5 is "onto" and
E17: c6 is "onto" ;
now
let c7 be set ;
assume E18: c7 in c1 ;
then reconsider c8 = c5 . c7 as Function of c2 . c7,c3 . c7 by PBOOLE:def 18;
reconsider c9 = c6 . c7 as Function of c3 . c7,c4 . c7 by E18, PBOOLE:def 18;
E19: c3 . c7 <> {} by E18, PBOOLE:def 16;
E20: c4 . c7 <> {} by E18, PBOOLE:def 16;
( rng c8 = c3 . c7 & rng c9 = c4 . c7 ) by E16, E17, E18, MSUALG_3:def 3;
then rng (c9 * c8) = c4 . c7 by E19, E20, FUNCT_2:20;
hence rng ((c6 ** c5) . c7) = c4 . c7 by E18, MSUALG_3:2;
end;
hence c6 ** c5 is "onto" by MSUALG_3:def 3;
end;

theorem :: AUTALG_1:18
for b1 being set
for b2, b3, b4 being V2 ManySortedSet of b1
for b5 being ManySortedFunction of b2,b3
for b6 being ManySortedFunction of b3,b4 holds
( ( b5 is "1-1" & b5 is "onto" & b6 is "1-1" & b6 is "onto" ) implies ( (b6 ** b5) "" = (b5 "" ) ** (b6 "" ) ) )
proof
let c1 be set ;
let c2, c3, c4 be V2 ManySortedSet of c1;
let c5 be ManySortedFunction of c2,c3;
let c6 be ManySortedFunction of c3,c4;
assume that
E16: ( c5 is "1-1" & c5 is "onto" ) and
E17: ( c6 is "1-1" & c6 is "onto" ) ;
now
let c7 be set ;
assume E18: c7 in c1 ;
then reconsider c8 = c5 . c7 as Function of c2 . c7,c3 . c7 by PBOOLE:def 18;
reconsider c9 = c6 . c7 as Function of c3 . c7,c4 . c7 by E18, PBOOLE:def 18;
E19: (c5 "" ) . c7 = c8 " by E16, E18, MSUALG_3:def 5;
E20: (c6 "" ) . c7 = c9 " by E17, E18, MSUALG_3:def 5;
E21: ( c6 ** c5 is "1-1" & c6 ** c5 is "onto" ) by E16, E17, E14, E15;
E22: c8 is one-to-one by E16, E18, MSUALG_3:1;
E23: c9 is one-to-one by E17, E18, MSUALG_3:1;
(c6 ** c5) . c7 = c9 * c8 by E18, MSUALG_3:2;
then E24: ((c6 ** c5) "" ) . c7 = (c9 * c8) " by E18, E21, MSUALG_3:def 5;
rng c8 = c3 . c7 by E16, E18, MSUALG_3:def 3;
then reconsider c10 = (c5 "" ) . c7 as Function of c3 . c7,c2 . c7 by E19, E22, FUNCT_2:31;
rng c9 = c4 . c7 by E17, E18, MSUALG_3:def 3;
then reconsider c11 = (c6 "" ) . c7 as Function of c4 . c7,c3 . c7 by E20, E23, FUNCT_2:31;
((c5 "" ) ** (c6 "" )) . c7 = c10 * c11 by E18, MSUALG_3:2
.= c10 * (c9 " ) by E17, E18, MSUALG_3:def 5
.= (c8 " ) * (c9 " ) by E16, E18, MSUALG_3:def 5 ;
hence ((c6 ** c5) "" ) . c7 = ((c5 "" ) ** (c6 "" )) . c7 by E22, E23, E24, FUNCT_1:66;
end;
hence (c6 ** c5) "" = (c5 "" ) ** (c6 "" ) by PBOOLE:3;
end;

theorem E16: :: AUTALG_1:19
for b1 being set
for b2, b3 being V2 ManySortedSet of b1
for b4 being ManySortedFunction of b2,b3
for b5 being ManySortedFunction of b3,b2 holds
( ( b4 is "1-1" & b4 is "onto" & b5 ** b4 = id b2 ) implies ( b5 = b4 "" ) )
proof
let c1 be set ;
let c2, c3 be V2 ManySortedSet of c1;
let c4 be ManySortedFunction of c2,c3;
let c5 be ManySortedFunction of c3,c2;
assume E17: ( c4 is "1-1" & c4 is "onto" & c5 ** c4 = id c2 ) ;
now
let c6 be set ;
assume E18: c6 in c1 ;
then reconsider c7 = c4 . c6 as Function of c2 . c6,c3 . c6 by PBOOLE:def 18;
reconsider c8 = c5 . c6 as Function of c3 . c6,c2 . c6 by E18, PBOOLE:def 18;
E19: (c4 "" ) . c6 = c7 " by E17, E18, MSUALG_3:def 5;
now
thus c2 . c6 <> {} by E18, PBOOLE:def 16;
thus c3 . c6 <> {} by E18, PBOOLE:def 16;
thus rng c7 = c3 . c6 by E17, E18, MSUALG_3:def 3;
(c5 ** c4) . c6 = id (c2 . c6) by E17, E18, MSUALG_3:def 1;
hence c8 * c7 = id (c2 . c6) by E18, MSUALG_3:2;
thus c7 is one-to-one by E17, E18, MSUALG_3:1;
end;
hence c5 . c6 = (c4 "" ) . c6 by E19, FUNCT_2:36;
end;
hence c5 = c4 "" by PBOOLE:3;
end;

theorem :: AUTALG_1:20
canceled;

theorem E17: :: AUTALG_1:21
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 is_transformable_to b3 implies for b4 being set holds
( b4 in product (MSFuncs b2,b3) implies b4 is ManySortedFunction of b2,b3 ) )
proof
let c1 be set ;
let c2, c3 be ManySortedSet of c1;
assume E18: c2 is_transformable_to c3 ;
let c4 be set ;
assume E19: c4 in product (MSFuncs c2,c3) ;
set c5 = MSFuncs c2,c3;
consider c6 being Function such that
E20: ( c4 = c6 & dom c6 = dom (MSFuncs c2,c3) & ( for b1 being set holds
( b1 in dom (MSFuncs c2,c3) implies c6 . b1 in (MSFuncs c2,c3) . b1 ) ) ) by E19, CARD_3:def 5;
E21: ( dom (MSFuncs c2,c3) = c1 & dom c6 = c1 ) by E20, PBOOLE:def 3;
E22: for b1 being set holds
( b1 in c1 implies c6 . b1 in Funcs (c2 . b1),(c3 . b1) )
proof
let c7 be set ;
assume E23: c7 in c1 ;
then (MSFuncs c2,c3) . c7 = Funcs (c2 . c7),(c3 . c7) by PBOOLE:def 22;
hence c6 . c7 in Funcs (c2 . c7),(c3 . c7) by E20, E21, E23;
end;
E23: for b1 being set holds
not ( b1 in c1 & ( for b2 being Function holds
not ( b2 = c6 . b1 & dom b2 = c2 . b1 & rng b2 c= c3 . b1 ) ) )
proof
let c7 be set ;
assume c7 in c1 ;
then c6 . c7 in Funcs (c2 . c7),(c3 . c7) by E22;
hence ex b1 being Function st
( b1 = c6 . c7 & dom b1 = c2 . c7 & rng b1 c= c3 . c7 ) by FUNCT_2:def 2;
end;
E24: for b1 being set holds
( b1 in c1 implies c6 . b1 is Function of c2 . b1,c3 . b1 )
proof
let c7 be set ;
assume E25: c7 in c1 ;
then consider c8 being Function such that
E26: ( c8 = c6 . c7 & dom c8 = c2 . c7 & rng c8 c= c3 . c7 ) by E23;
( c3 . c7 = {} implies c2 . c7 = {} ) by E18, E25, PZFMISC1:def 3;
hence c6 . c7 is Function of c2 . c7,c3 . c7 by E26, FUNCT_2:def 1, RELSET_1:11;
end;
c6 is ManySortedSet of c1 by E21, PBOOLE:def 3;
hence c4 is ManySortedFunction of c2,c3 by E20, E24, PBOOLE:def 18;
end;

theorem E18: :: AUTALG_1:22
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 is_transformable_to b3 implies for b4 being ManySortedFunction of b2,b3 holds b4 in product (MSFuncs b2,b3) )
proof
let c1 be set ;
let c2, c3 be ManySortedSet of c1;
assume E19: c2 is_transformable_to c3 ;
let c4 be ManySortedFunction of c2,c3;
set c5 = MSFuncs c2,c3;
E20: ( dom c4 = c1 & dom (MSFuncs c2,c3) = c1 ) by PBOOLE:def 3;
now
let c6 be set ;
assume E21: c6 in dom (MSFuncs c2,c3) ;
then reconsider c7 = c6 as Element of c1 by PBOOLE:def 3;
E22: c4 . c7 is Function of c2 . c7,c3 . c7 by E20, E21, PBOOLE:def 18;
( c3 . c7 = {} implies c2 . c7 = {} ) by E19, E20, E21, PZFMISC1:def 3;
then c4 . c7 in Funcs (c2 . c7),(c3 . c7) by E22, FUNCT_2:11;
hence c4 . c6 in (MSFuncs c2,c3) . c6 by E20, E21, PBOOLE:def 22;
end;
hence c4 in product (MSFuncs c2,c3) by E20, CARD_3:18;
end;

theorem E19: :: AUTALG_1:23
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 is_transformable_to b3 implies MSFuncs b2,b3 is non-empty )
proof
let c1 be set ;
let c2, c3 be ManySortedSet of c1;
assume E20: c2 is_transformable_to c3 ;
E21: for b1 being set holds
not ( b1 in c1 & not Funcs (c2 . b1),(c3 . b1) <> {} )
proof
let c4 be set ;
assume c4 in c1 ;
then ( c3 . c4 = {} implies c2 . c4 = {} ) by E20, PZFMISC1:def 3;
hence Funcs (c2 . c4),(c3 . c4) <> {} by FUNCT_2:11;
end;
for b1 being set holds
not ( b1 in c1 & not (MSFuncs c2,c3) . b1 <> {} )
proof
let c4 be set ;
assume E22: c4 in c1 ;
then (MSFuncs c2,c3) . c4 = Funcs (c2 . c4),(c3 . c4) by PBOOLE:def 22;
hence (MSFuncs c2,c3) . c4 <> {} by E21, E22;
end;
then for b1 being set holds
not ( b1 in c1 & (MSFuncs c2,c3) . b1 is empty ) ;
hence MSFuncs c2,c3 is non-empty by PBOOLE:def 16;
end;

definition
let c1 be set ;
let c2, c3 be ManySortedSet of c1;
assume E20: c2 is_transformable_to c3 ;
canceled;
canceled;
mode MSFunctionSet of c2,c3 -> non empty set means :E20: :: AUTALG_1:def 6
for b1 being set holds
( b1 in a4 implies b1 is ManySortedFunction of a2,a3 );
existence
ex b1 being non empty set st
for b2 being set holds
( b2 in b1 implies b2 is ManySortedFunction of c2,c3 )
proof
MSFuncs c2,c3 is non-empty by E20, E19;
then not {} in rng (MSFuncs c2,c3) by PBOOLE:149;
then reconsider c4 = product (MSFuncs c2,c3) as non empty set by CARD_3:37;
take c4 ;
let c5 be set ;
assume c5 in c4 ;
hence c5 is ManySortedFunction of c2,c3 by E20, E17;
end;
end;

:: deftheorem AUTALG_1:def 4 :
canceled;

:: deftheorem AUTALG_1:def 5 :
canceled;

:: deftheorem E20 defines MSFunctionSet AUTALG_1:def 6 :
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 is_transformable_to b3 implies for b4 being non empty set holds
( b4 is MSFunctionSet of b2,b3 iff for b5 being set holds
( b5 in b4 implies b5 is ManySortedFunction of b2,b3 ) ) );

registration
let c1 be set ;
let c2 be ManySortedSet of c1;
cluster MSFuncs a2,a2 -> V2 ;
coherence
MSFuncs c2,c2 is non-empty
proof
for b1 being set holds
not ( b1 in c1 & (MSFuncs c2,c2) . b1 is empty )
proof
let c3 be set ;
assume E21: c3 in c1 ;
then (id c2) . c3 is Function of c2 . c3,c2 . c3 by PBOOLE:def 18;
then (id c2) . c3 in Funcs (c2 . c3),(c2 . c3) by FUNCT_2:12;
hence not (MSFuncs c2,c2) . c3 is empty by E21, PBOOLE:def 22;
end;
hence MSFuncs c2,c2 is non-empty by PBOOLE:def 16;
end;
end;

definition
let c1 be non empty non void ManySortedSign ;
let c2, c3 be non-empty MSAlgebra of c1;
mode MSFunctionSet is MSFunctionSet of the Sorts of a2,the Sorts of a3;
end;

registration
let c1 be set ;
let c2 be ManySortedSet of c1;
cluster non empty MSFunctionSet of a2,a2;
existence
not for b1 being MSFunctionSet of c2,c2 holds b1 is empty
proof
not {} in rng (MSFuncs c2,c2) by PBOOLE:149;
then reconsider c3 = product (MSFuncs c2,c2) as non empty set by CARD_3:37;
c3 is MSFunctionSet of c2,c2
proof
thus c2 is_transformable_to c2 ; :: according to