:: AUTALG_1 semantic presentation

theorem Th1: :: AUTALG_1:1
for b1 being Universal_Algebra holds id the carrier of b1 is_isomorphism b1,b1
proof end;

definition
let c1 be Universal_Algebra;
func UAAut c1 -> FUNCTION_DOMAIN of the carrier of a1,the carrier of a1 means :Def1: :: 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 end;
uniqueness
for b1, b2 being FUNCTION_DOMAIN of the carrier of c1,the carrier of c1 st ( 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 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def1 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 Th2: :: AUTALG_1:2
for b1 being Universal_Algebra holds UAAut b1 c= Funcs the carrier of b1,the carrier of b1
proof end;

theorem Th3: :: AUTALG_1:3
canceled;

theorem Th4: :: AUTALG_1:4
for b1 being Universal_Algebra holds id the carrier of b1 in UAAut b1
proof end;

theorem Th5: :: AUTALG_1:5
for b1 being Universal_Algebra
for b2, b3 being Function of b1,b1 st b2 is Element of UAAut b1 & b3 = b2 " holds
b3 is_isomorphism b1,b1
proof end;

Lemma4: for b1 being Universal_Algebra
for b2 being Function of b1,b1 st b2 is_isomorphism b1,b1 holds
b2 " is Function of b1,b1
proof end;

theorem Th6: :: AUTALG_1:6
for b1 being Universal_Algebra
for b2 being Element of UAAut b1 holds b2 " in UAAut b1
proof end;

theorem Th7: :: AUTALG_1:7
for b1 being Universal_Algebra
for b2, b3 being Element of UAAut b1 holds b2 * b3 in UAAut b1
proof end;

definition
let c1 be Universal_Algebra;
func UAAutComp c1 -> BinOp of UAAut a1 means :Def2: :: 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 end;
uniqueness
for b1, b2 being BinOp of UAAut c1 st ( 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 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def2 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 end;
end;

:: deftheorem Def3 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;

Lemma8: for b1 being Universal_Algebra
for b2 being Element of UAAut b1 holds
( dom b2 = rng b2 & dom b2 = the carrier of b1 )
proof end;

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

theorem Th9: :: AUTALG_1:9
for b1 being Universal_Algebra holds id the carrier of b1 = 1. (UAAutGroup b1)
proof end;

theorem Th10: :: AUTALG_1:10
for b1 being Universal_Algebra
for b2 being Element of UAAut b1
for b3 being Element of (UAAutGroup b1) st b2 = b3 holds
b2 " = b3 "
proof end;

theorem Th11: :: AUTALG_1:11
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 is_transformable_to b3 & b3 is_transformable_to b4 holds
b2 is_transformable_to b4
proof end;

theorem Th12: :: AUTALG_1:12
for b1 being set
for b2 being ManySortedSet of {b1} holds b2 = b1 .--> (b2 . b1)
proof end;

theorem Th13: :: AUTALG_1:13
for b1, b2, b3 being Function-yielding Function holds (b3 ** b2) ** b1 = b3 ** (b2 ** b1)
proof end;

theorem Th14: :: AUTALG_1:14
for b1 being set
for b2, b3 being V2 ManySortedSet of b1
for b4 being ManySortedFunction of b2,b3 st b4 is "1-1" & b4 is "onto" holds
( b4 "" is "1-1" & b4 "" is "onto" )
proof end;

theorem Th15: :: AUTALG_1:15
for b1 being set
for b2, b3 being V2 ManySortedSet of b1
for b4 being ManySortedFunction of b2,b3 st b4 is "1-1" & b4 is "onto" holds
(b4 "" ) "" = b4
proof end;

theorem Th16: :: AUTALG_1:16
for b1, b2 being Function-yielding Function st b1 is "1-1" & b2 is "1-1" holds
b2 ** b1 is "1-1"
proof end;

theorem Th17: :: 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 st b5 is "onto" & b6 is "onto" holds
b6 ** b5 is "onto"
proof end;

theorem Th18: :: 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 st b5 is "1-1" & b5 is "onto" & b6 is "1-1" & b6 is "onto" holds
(b6 ** b5) "" = (b5 "" ) ** (b6 "" )
proof end;

theorem Th19: :: 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 st b4 is "1-1" & b4 is "onto" & b5 ** b4 = id b2 holds
b5 = b4 ""
proof end;

theorem Th20: :: AUTALG_1:20
canceled;

theorem Th21: :: AUTALG_1:21
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 is_transformable_to b3 holds
for b4 being set st b4 in product (MSFuncs b2,b3) holds
b4 is ManySortedFunction of b2,b3
proof end;

theorem Th22: :: AUTALG_1:22
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 is_transformable_to b3 holds
for b4 being ManySortedFunction of b2,b3 holds b4 in product (MSFuncs b2,b3)
proof end;

theorem Th23: :: AUTALG_1:23
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 is_transformable_to b3 holds
MSFuncs b2,b3 is non-empty
proof 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 :Def6: :: AUTALG_1:def 6
for b1 being set st b1 in a4 holds
b1 is ManySortedFunction of a2,a3;
existence
ex b1 being non empty set st
for b2 being set st b2 in b1 holds
b2 is ManySortedFunction of c2,c3
proof end;
end;

:: deftheorem Def4 AUTALG_1:def 4 :
canceled;

:: deftheorem Def5 AUTALG_1:def 5 :
canceled;

:: deftheorem Def6 defines MSFunctionSet AUTALG_1:def 6 :
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 is_transformable_to b3 holds
for b4 being non empty set holds
( b4 is MSFunctionSet of b2,b3 iff for b5 being set st b5 in b4 holds
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 end;
end;

definition
let c1 be non empty non void ManySortedSign ;
let c2, c3 be non-empty MSAlgebra of c1;
mode MSFunctionSet of a2,a3 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 end;
end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3 be non empty MSFunctionSet of c2,c2;
redefine mode Element as Element of c3 -> ManySortedFunction of a2,a2;
coherence
for b1 being Element of c3 holds b1 is ManySortedFunction of c2,c2
by Def6;
end;

theorem Th24: :: AUTALG_1:24
for b1 being set
for b2 being ManySortedSet of b1 holds id b2 is "onto"
proof end;

theorem Th25: :: AUTALG_1:25
for b1 being set
for b2 being ManySortedSet of b1 holds id b2 is "1-1"
proof end;

theorem Th26: :: AUTALG_1:26
canceled;

theorem Th27: :: AUTALG_1:27
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1 holds id the Sorts of b2 in product (MSFuncs the Sorts of b2,the Sorts of b2) by Th22;

definition
let c1 be non empty non void ManySortedSign ;
let c2 be non-empty MSAlgebra of c1;
func MSAAut c2 -> MSFunctionSet of the Sorts of a2,the Sorts of a2 means :Def7: :: AUTALG_1:def 7
( ( for b1 being Element of a3 holds b1 is ManySortedFunction of a2,a2 ) & ( for b1 being ManySortedFunction of a2,a2 holds
( b1 in a3 iff b1 is_isomorphism a2,a2 ) ) );
existence
ex b1 being MSFunctionSet of the Sorts of c2,the Sorts of c2 st
( ( for b2 being Element of b1 holds b2 is ManySortedFunction of c2,c2 ) & ( for b2 being ManySortedFunction of c2,c2 holds
( b2 in b1 iff b2 is_isomorphism c2,c2 ) ) )
proof end;
uniqueness
for b1, b2 being MSFunctionSet of the Sorts of c2,the Sorts of c2 st ( for b3 being Element of b1 holds b3 is ManySortedFunction of c2,c2 ) & ( for b3 being ManySortedFunction of c2,c2 holds
( b3 in b1 iff b3 is_isomorphism c2,c2 ) ) & ( for b3 being Element of b2 holds b3 is ManySortedFunction of c2,c2 ) & ( for b3 being ManySortedFunction of c2,c2 holds
( b3 in b2 iff b3 is_isomorphism c2,c2 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def7 defines MSAAut AUTALG_1:def 7 :
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1
for b3 being MSFunctionSet of the Sorts of b2,the Sorts of b2 holds
( b3 = MSAAut b2 iff ( ( for b4 being Element of b3 holds b4 is ManySortedFunction of b2,b2 ) & ( for b4 being ManySortedFunction of b2,b2 holds
( b4 in b3 iff b4 is_isomorphism b2,b2 ) ) ) );

theorem Th28: :: AUTALG_1:28
canceled;

theorem Th29: :: AUTALG_1:29
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1
for b3 being Element of MSAAut b2 holds b3 in product (MSFuncs the Sorts of b2,the Sorts of b2) by Th22;

theorem Th30: :: AUTALG_1:30
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1 holds MSAAut b2 c= product (MSFuncs the Sorts of b2,the Sorts of b2)
proof end;

Lemma22: for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1
for b3 being Element of MSAAut b2 holds
( b3 is "1-1" & b3 is "onto" )
proof end;

theorem Th31: :: AUTALG_1:31
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1 holds id the Sorts of b2 in MSAAut b2
proof end;

theorem Th32: :: AUTALG_1:32
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1
for b3 being Element of MSAAut b2 holds b3 "" in MSAAut b2
proof end;

theorem Th33: :: AUTALG_1:33
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1
for b3, b4 being Element of MSAAut b2 holds b3 ** b4 in MSAAut b2
proof end;

theorem Th34: :: AUTALG_1:34
for b1 being Universal_Algebra
for b2 being ManySortedFunction of (MSAlg b1),(MSAlg b1)
for b3 being Element of UAAut b1 st b2 = 0 .--> b3 holds
b2 in MSAAut (MSAlg b1)
proof end;

definition
let c1 be non empty non void ManySortedSign ;
let c2 be non-empty MSAlgebra of c1;
func MSAAutComp c2 -> BinOp of MSAAut a2 means :Def8: :: AUTALG_1:def 8
for b1, b2 being Element of MSAAut a2 holds a3 . b1,b2 = b2 ** b1;
existence
ex b1 being BinOp of MSAAut c2 st
for b2, b3 being Element of MSAAut c2 holds b1 . b2,b3 = b3 ** b2
proof end;
uniqueness
for b1, b2 being BinOp of MSAAut c2 st ( for b3, b4 being Element of MSAAut c2 holds b1 . b3,b4 = b4 ** b3 ) & ( for b3, b4 being Element of MSAAut c2 holds b2 . b3,b4 = b4 ** b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def8 defines MSAAutComp AUTALG_1:def 8 :
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1
for b3 being BinOp of MSAAut b2 holds
( b3 = MSAAutComp b2 iff for b4, b5 being Element of MSAAut b2 holds b3 . b4,b5 = b5 ** b4 );

definition
let c1 be non empty non void ManySortedSign ;
let c2 be non-empty MSAlgebra of c1;
func MSAAutGroup c2 -> Group equals :: AUTALG_1:def 9
HGrStr(# (MSAAut a2),(MSAAutComp a2) #);
coherence
HGrStr(# (MSAAut c2),(MSAAutComp c2) #) is Group
proof end;
end;

:: deftheorem Def9 defines MSAAutGroup AUTALG_1:def 9 :
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1 holds MSAAutGroup b2 = HGrStr(# (MSAAut b2),(MSAAutComp b2) #);

registration
let c1 be non empty non void ManySortedSign ;
let c2 be non-empty MSAlgebra of c1;
cluster MSAAutGroup a2 -> strict ;
coherence
MSAAutGroup c2 is strict
;
end;

theorem Th35: :: AUTALG_1:35
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1
for b3, b4 being Element of (MSAAutGroup b2)
for b5, b6 being Element of MSAAut b2 st b3 = b5 & b4 = b6 holds
b3 * b4 = b6 ** b5 by Def8;

theorem Th36: :: AUTALG_1:36
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1 holds id the Sorts of b2 = 1. (MSAAutGroup b2)
proof end;

theorem Th37: :: AUTALG_1:37
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1
for b3 being Element of MSAAut b2
for b4 being Element of (MSAAutGroup b2) st b3 = b4 holds
b3 "" = b4 "
proof end;

theorem Th38: :: AUTALG_1:38
for b1, b2 being Universal_Algebra st b1,b2 are_similar holds
for b3 being ManySortedFunction of (MSAlg b1),((MSAlg b2) Over (MSSign b1)) holds b3 . 0 is Function of b1,b2
proof end;

theorem Th39: :: AUTALG_1:39
for b1 being Universal_Algebra
for b2 being Element of UAAut b1 holds 0 .--> b2 is ManySortedFunction of (MSAlg b1),(MSAlg b1)
proof end;

Lemma32: for b1 being Universal_Algebra
for b2 being Function st dom b2 = UAAut b1 & ( for b3 being set st b3 in UAAut b1 holds
b2 . b3 = 0 .--> b3 ) holds
rng b2 = MSAAut (MSAlg b1)
proof end;

theorem Th40: :: AUTALG_1:40
for b1 being Universal_Algebra
for b2 being Function st dom b2 = UAAut b1 & ( for b3 being set st b3 in UAAut b1 holds
b2 . b3 = 0 .--> b3 ) holds
b2 is Homomorphism of (UAAutGroup b1),(MSAAutGroup (MSAlg b1))
proof end;

theorem Th41: :: AUTALG_1:41
for b1 being Universal_Algebra
for b2 being Homomorphism of (UAAutGroup b1),(MSAAutGroup (MSAlg b1)) st ( for b3 being set st b3 in UAAut b1 holds
b2 . b3 = 0 .--> b3 ) holds
b2 is_isomorphism
proof end;

theorem Th42: :: AUTALG_1:42
for b1 being Universal_Algebra holds UAAutGroup b1, MSAAutGroup (MSAlg b1) are_isomorphic
proof end;