:: GRCAT_1 semantic presentation

theorem Th1: :: GRCAT_1:1
canceled;

theorem Th2: :: GRCAT_1:2
for b1, b2, b3, b4 being set st b4 in b3 & b3 c= [:b1,b2:] holds
ex b5 being Element of b1ex b6 being Element of b2 st b4 = [b5,b6]
proof end;

theorem Th3: :: GRCAT_1:3
for b1 being Universe
for b2, b3, b4, b5 being Element of b1 holds
( [b2,b3,b4] is Element of b1 & [b2,b3,b4,b5] is Element of b1 )
proof end;

theorem Th4: :: GRCAT_1:4
for b1 being Universe
for b2, b3 being set st b2 in b3 & b3 in b1 holds
b2 in b1
proof end;

scheme :: GRCAT_1:sch 1
s1{ F1() -> set , F2() -> set , F3() -> set , F4( set , set ) -> set , P1[ set , set ] } :
ex b1 being PartFunc of [:F1(),F2():],F3() st
( ( for b2, b3 being set holds
( [b2,b3] in dom b1 iff ( b2 in F1() & b3 in F2() & P1[b2,b3] ) ) ) & ( for b2, b3 being set st [b2,b3] in dom b1 holds
b1 . [b2,b3] = F4(b2,b3) ) )
provided
E4: for b1, b2 being set st b1 in F1() & b2 in F2() & P1[b1,b2] holds
F4(b1,b2) in F3()
proof end;

scheme :: GRCAT_1:sch 2
s2{ F1() -> non empty set , F2() -> non empty set , F3() -> set , F4( set , set ) -> set , P1[ set , set ] } :
ex b1 being PartFunc of [:F1(),F2():],F3() st
( ( for b2 being Element of F1()
for b3 being Element of F2() holds
( [b2,b3] in dom b1 iff P1[b2,b3] ) ) & ( for b2 being Element of F1()
for b3 being Element of F2() st [b2,b3] in dom b1 holds
b1 . [b2,b3] = F4(b2,b3) ) )
provided
E4: for b1 being Element of F1()
for b2 being Element of F2() st P1[b1,b2] holds
F4(b1,b2) in F3()
proof end;

theorem Th5: :: GRCAT_1:5
( op2 . {} ,{} = {} & op1 . {} = {} & op0 = {} )
proof end;

theorem Th6: :: GRCAT_1:6
for b1 being Universe holds
( {{} } in b1 & [{{} },{{} }] in b1 & [:{{} },{{} }:] in b1 & op2 in b1 & op1 in b1 )
proof end;

theorem Th7: :: GRCAT_1:7
LoopStr(# {{} },op2 ,(Extract {} ) #) is midpoint_operator
proof end;

registration
cluster L_Trivial -> midpoint_operator ;
coherence
L_Trivial is midpoint_operator
by Th7, ALGSTR_1:def 4;
end;

theorem Th8: :: GRCAT_1:8
( ( for b1 being Element of L_Trivial holds b1 = {} ) & ( for b1, b2 being Element of L_Trivial holds b1 + b2 = {} ) & ( for b1 being Element of L_Trivial holds - b1 = {} ) & 0. L_Trivial = {} ) by ALGSTR_1:def 4, TARSKI:def 1;

definition
let c1 be Category;
let c2 be non empty Subset of the Objects of c1;
canceled;
canceled;
canceled;
canceled;
func Morphs c2 -> Subset of the Morphisms of a1 equals :: GRCAT_1:def 5
union { (Hom b1,b2) where B is Object of a1, B is Object of a1 : ( b1 in a2 & b2 in a2 ) } ;
coherence
union { (Hom b1,b2) where B is Object of c1, B is Object of c1 : ( b1 in c2 & b2 in c2 ) } is Subset of the Morphisms of c1
by CAT_2:28;
end;

:: deftheorem Def1 GRCAT_1:def 1 :
canceled;

:: deftheorem Def2 GRCAT_1:def 2 :
canceled;

:: deftheorem Def3 GRCAT_1:def 3 :
canceled;

:: deftheorem Def4 GRCAT_1:def 4 :
canceled;

:: deftheorem Def5 defines Morphs GRCAT_1:def 5 :
for b1 being Category
for b2 being non empty Subset of the Objects of b1 holds Morphs b2 = union { (Hom b3,b4) where B is Object of b1, B is Object of b1 : ( b3 in b2 & b4 in b2 ) } ;

registration
let c1 be Category;
let c2 be non empty Subset of the Objects of c1;
cluster Morphs a2 -> non empty ;
coherence
not Morphs c2 is empty
by CAT_2:28;
end;

definition
let c1 be Category;
let c2 be non empty Subset of the Objects of c1;
func dom c2 -> Function of Morphs a2,a2 equals :: GRCAT_1:def 6
the Dom of a1 | (Morphs a2);
coherence
the Dom of c1 | (Morphs c2) is Function of Morphs c2,c2
by CAT_2:29;
func cod c2 -> Function of Morphs a2,a2 equals :: GRCAT_1:def 7
the Cod of a1 | (Morphs a2);
coherence
the Cod of c1 | (Morphs c2) is Function of Morphs c2,c2
by CAT_2:29;
func comp c2 -> PartFunc of [:(Morphs a2),(Morphs a2):], Morphs a2 equals :: GRCAT_1:def 8
the Comp of a1 || (Morphs a2);
coherence
the Comp of c1 || (Morphs c2) is PartFunc of [:(Morphs c2),(Morphs c2):], Morphs c2
by CAT_2:29;
func ID c2 -> Function of a2, Morphs a2 equals :: GRCAT_1:def 9
the Id of a1 | a2;
coherence
the Id of c1 | c2 is Function of c2, Morphs c2
by CAT_2:29;
end;

:: deftheorem Def6 defines dom GRCAT_1:def 6 :
for b1 being Category
for b2 being non empty Subset of the Objects of b1 holds dom b2 = the Dom of b1 | (Morphs b2);

:: deftheorem Def7 defines cod GRCAT_1:def 7 :
for b1 being Category
for b2 being non empty Subset of the Objects of b1 holds cod b2 = the Cod of b1 | (Morphs b2);

:: deftheorem Def8 defines comp GRCAT_1:def 8 :
for b1 being Category
for b2 being non empty Subset of the Objects of b1 holds comp b2 = the Comp of b1 || (Morphs b2);

:: deftheorem Def9 defines ID GRCAT_1:def 9 :
for b1 being Category
for b2 being non empty Subset of the Objects of b1 holds ID b2 = the Id of b1 | b2;

theorem Th9: :: GRCAT_1:9
for b1 being Category
for b2 being non empty Subset of the Objects of b1 holds CatStr(# b2,(Morphs b2),(dom b2),(cod b2),(comp b2),(ID b2) #) is_full_subcategory_of b1 by CAT_2:30;

definition
let c1 be Category;
let c2 be non empty Subset of the Objects of c1;
func cat c2 -> Subcategory of a1 equals :: GRCAT_1:def 10
CatStr(# a2,(Morphs a2),(dom a2),(cod a2),(comp a2),(ID a2) #);
coherence
CatStr(# c2,(Morphs c2),(dom c2),(cod c2),(comp c2),(ID c2) #) is Subcategory of c1
proof end;
end;

:: deftheorem Def10 defines cat GRCAT_1:def 10 :
for b1 being Category
for b2 being non empty Subset of the Objects of b1 holds cat b2 = CatStr(# b2,(Morphs b2),(dom b2),(cod b2),(comp b2),(ID b2) #);

registration
let c1 be Category;
let c2 be non empty Subset of the Objects of c1;
cluster cat a2 -> strict ;
coherence
cat c2 is strict
;
end;

theorem Th10: :: GRCAT_1:10
for b1 being Category
for b2 being non empty Subset of the Objects of b1 holds the Objects of (cat b2) = b2 ;

definition
let c1 be 1-sorted ;
func id c1 -> Function of a1,a1 equals :: GRCAT_1:def 11
id the carrier of a1;
coherence
id the carrier of c1 is Function of c1,c1
;
end;

:: deftheorem Def11 defines id GRCAT_1:def 11 :
for b1 being 1-sorted holds id b1 = id the carrier of b1;

theorem Th11: :: GRCAT_1:11
for b1 being non empty 1-sorted
for b2 being Element of b1 holds (id b1) . b2 = b2 by FUNCT_1:35;

theorem Th12: :: GRCAT_1:12
for b1 being 1-sorted
for b2 being non empty 1-sorted
for b3 being Function of b1,b2 holds
( b3 * (id b1) = b3 & (id b2) * b3 = b3 )
proof end;

definition
let c1, c2 be non empty ZeroStr ;
func ZeroMap c1,c2 -> Function of a1,a2 equals :: GRCAT_1:def 12
the carrier of a1 --> (0. a2);
coherence
the carrier of c1 --> (0. c2) is Function of c1,c2
proof end;
end;

:: deftheorem Def12 defines ZeroMap GRCAT_1:def 12 :
for b1, b2 being non empty ZeroStr holds ZeroMap b1,b2 = the carrier of b1 --> (0. b2);

definition
let c1, c2 be non empty LoopStr ;
let c3 be Function of c1,c2;
attr a3 is additive means :Def13: :: GRCAT_1:def 13
for b1, b2 being Element of a1 holds a3 . (b1 + b2) = (a3 . b1) + (a3 . b2);
end;

:: deftheorem Def13 defines additive GRCAT_1:def 13 :
for b1, b2 being non empty LoopStr
for b3 being Function of b1,b2 holds
( b3 is additive iff for b4, b5 being Element of b1 holds b3 . (b4 + b5) = (b3 . b4) + (b3 . b5) );

theorem Th13: :: GRCAT_1:13
comp L_Trivial = op1
proof end;

theorem Th14: :: GRCAT_1:14
for b1, b2, b3 being non empty LoopStr
for b4 being Function of b1,b2
for b5 being Function of b2,b3 st b4 is additive & b5 is additive holds
b5 * b4 is additive
proof end;

theorem Th15: :: GRCAT_1:15
for b1 being non empty ZeroStr
for b2 being non empty LoopStr
for b3 being Element of b1 holds (ZeroMap b1,b2) . b3 = 0. b2 by FUNCOP_1:13;

theorem Th16: :: GRCAT_1:16
for b1 being non empty LoopStr
for b2 being non empty right_zeroed LoopStr holds ZeroMap b1,b2 is additive
proof end;

definition
attr a1 is strict;
struct GroupMorphismStr -> ;
aggr GroupMorphismStr(# Dom, Cod, Fun #) -> GroupMorphismStr ;
sel Dom c1 -> AddGroup;
sel Cod c1 -> AddGroup;
sel Fun c1 -> Function of the Dom of a1,the Cod of a1;
end;

definition
let c1 be GroupMorphismStr ;
func dom c1 -> AddGroup equals :: GRCAT_1:def 14
the Dom of a1;
coherence
the Dom of c1 is AddGroup
;
func cod c1 -> AddGroup equals :: GRCAT_1:def 15
the Cod of a1;
coherence
the Cod of c1 is AddGroup
;
end;

:: deftheorem Def14 defines dom GRCAT_1:def 14 :
for b1 being GroupMorphismStr holds dom b1 = the Dom of b1;

:: deftheorem Def15 defines cod GRCAT_1:def 15 :
for b1 being GroupMorphismStr holds cod b1 = the Cod of b1;

definition
let c1 be GroupMorphismStr ;
func fun c1 -> Function of (dom a1),(cod a1) equals :: GRCAT_1:def 16
the Fun of a1;
coherence
the Fun of c1 is Function of (dom c1),(cod c1)
;
end;

:: deftheorem Def16 defines fun GRCAT_1:def 16 :
for b1 being GroupMorphismStr holds fun b1 = the Fun of b1;

theorem Th17: :: GRCAT_1:17
for b1 being GroupMorphismStr
for b2, b3 being AddGroup
for b4 being Function of b2,b3 st b1 = GroupMorphismStr(# b2,b3,b4 #) holds
( dom b1 = b2 & cod b1 = b3 & fun b1 = b4 ) ;

definition
let c1, c2 be AddGroup;
func ZERO c1,c2 -> GroupMorphismStr equals :: GRCAT_1:def 17
GroupMorphismStr(# a1,a2,(ZeroMap a1,a2) #);
coherence
GroupMorphismStr(# c1,c2,(ZeroMap c1,c2) #) is GroupMorphismStr
;
end;

:: deftheorem Def17 defines ZERO GRCAT_1:def 17 :
for b1, b2 being AddGroup holds ZERO b1,b2 = GroupMorphismStr(# b1,b2,(ZeroMap b1,b2) #);

registration
let c1, c2 be AddGroup;
cluster ZERO a1,a2 -> strict ;
coherence
ZERO c1,c2 is strict
;
end;

definition
let c1 be GroupMorphismStr ;
attr a1 is GroupMorphism-like means :Def18: :: GRCAT_1:def 18
fun a1 is additive;
end;

:: deftheorem Def18 defines GroupMorphism-like GRCAT_1:def 18 :
for b1 being GroupMorphismStr holds
( b1 is GroupMorphism-like iff fun b1 is additive );

registration
cluster strict GroupMorphism-like GroupMorphismStr ;
existence
ex b1 being GroupMorphismStr st
( b1 is strict & b1 is GroupMorphism-like )
proof end;
end;

definition
mode GroupMorphism is GroupMorphism-like GroupMorphismStr ;
end;

theorem Th18: :: GRCAT_1:18
for b1 being GroupMorphism holds the Fun of b1 is additive
proof end;

registration
let c1, c2 be AddGroup;
cluster ZERO a1,a2 -> strict GroupMorphism-like ;
coherence
ZERO c1,c2 is GroupMorphism-like
proof end;
end;

definition
let c1, c2 be AddGroup;
mode Morphism of c1,c2 -> GroupMorphism means :Def19: :: GRCAT_1:def 19
( dom a3 = a1 & cod a3 = a2 );
existence
ex b1 being GroupMorphism st
( dom b1 = c1 & cod b1 = c2 )
proof end;
end;

:: deftheorem Def19 defines Morphism GRCAT_1:def 19 :
for b1, b2 being AddGroup
for b3 being GroupMorphism holds
( b3 is Morphism of b1,b2 iff ( dom b3 = b1 & cod b3 = b2 ) );

registration
let c1, c2 be AddGroup;
cluster strict Morphism of a1,a2;
existence
ex b1 being Morphism of c1,c2 st b1 is strict
proof end;
end;

theorem Th19: :: GRCAT_1:19
for b1, b2 being AddGroup
for b3 being strict GroupMorphismStr st dom b3 = b1 & cod b3 = b2 & fun b3 is additive holds
b3 is strict Morphism of b1,b2
proof end;

theorem Th20: :: GRCAT_1:20
for b1, b2 being AddGroup
for b3 being Function of b1,b2 st b3 is additive holds
GroupMorphismStr(# b1,b2,b3 #) is strict Morphism of b1,b2
proof end;

theorem Th21: :: GRCAT_1:21
for b1 being non empty LoopStr holds id b1 is additive
proof end;

definition
let c1 be AddGroup;
func ID c1 -> Morphism of a1,a1 equals :: GRCAT_1:def 20
GroupMorphismStr(# a1,a1,(id a1) #);
coherence
GroupMorphismStr(# c1,c1,(id c1) #) is Morphism of c1,c1
proof end;
end;

:: deftheorem Def20 defines ID GRCAT_1:def 20 :
for b1 being AddGroup holds ID b1 = GroupMorphismStr(# b1,b1,(id b1) #);

registration
let c1 be AddGroup;
cluster ID a1 -> strict ;
coherence
ID c1 is strict
;
end;

definition
let c1, c2 be AddGroup;
redefine func ZERO as ZERO c1,c2 -> strict Morphism of a1,a2;
coherence
ZERO c1,c2 is strict Morphism of c1,c2
proof end;
end;

theorem Th22: :: GRCAT_1:22
for b1, b2 being AddGroup
for b3 being Morphism of b1,b2 ex b4 being Function of b1,b2 st
( GroupMorphismStr(# the Dom of b3,the Cod of b3,the Fun of b3 #) = GroupMorphismStr(# b1,b2,b4 #) & b4 is additive )
proof end;

theorem Th23: :: GRCAT_1:23
for b1, b2 being AddGroup
for b3 being strict Morphism of b1,b2 ex b4 being Function of b1,b2 st b3 = GroupMorphismStr(# b1,b2,b4 #)
proof end;

theorem Th24: :: GRCAT_1:24
for b1 being GroupMorphism ex b2, b3 being AddGroup st b1 is Morphism of b2,b3
proof end;

theorem Th25: :: GRCAT_1:25
for b1 being strict GroupMorphism ex b2, b3 being AddGroupex b4 being Function of b2,b3 st
( b1 is Morphism of b2,b3 & b1 = GroupMorphismStr(# b2,b3,b4 #) & b4 is additive )
proof end;

theorem Th26: :: GRCAT_1:26
for b1, b2 being GroupMorphism st dom b1 = cod b2 holds
ex b3, b4, b5 being AddGroup st
( b1 is Morphism of b4,b5 & b2 is Morphism of b3,b4 )
proof end;

definition
let c1, c2 be GroupMorphism;
assume E25: dom c1 = cod c2 ;
func c1 * c2 -> strict GroupMorphism means :Def21: :: GRCAT_1:def 21
for b1, b2, b3 being AddGroup
for b4 being Function of b2,b3
for b5 being Function of b1,b2 st GroupMorphismStr(# the Dom of a1,the Cod of a1,the Fun of a1 #) = GroupMorphismStr(# b2,b3,b4 #) & GroupMorphismStr(# the Dom of a2,the Cod of a2,the Fun of a2 #) = GroupMorphismStr(# b1,b2,b5 #) holds
a3 = GroupMorphismStr(# b1,b3,(b4 * b5) #);
existence
ex b1 being strict GroupMorphism st
for b2, b3, b4 being AddGroup
for b5 being Function of b3,b4
for b6 being Function of b2,b3 st GroupMorphismStr(# the Dom of c1,the Cod of c1,the Fun of c1 #) = GroupMorphismStr(# b3,b4,b5 #) & GroupMorphismStr(# the Dom of c2,the Cod of c2,the Fun of c2 #) = GroupMorphismStr(# b2,b3,b6 #) holds
b1 = GroupMorphismStr(# b2,b4,(b5 * b6) #)
proof end;
uniqueness
for b1, b2 being strict GroupMorphism st ( for b3, b4, b5 being AddGroup
for b6 being Function of b4,b5
for b7 being Function of b3,b4 st GroupMorphismStr(# the Dom of c1,the Cod of c1,the Fun of c1 #) = GroupMorphismStr(# b4,b5,b6 #) & GroupMorphismStr(# the Dom of c2,the Cod of c2,the Fun of c2 #) = GroupMorphismStr(# b3,b4,b7 #) holds
b1 = GroupMorphismStr(# b3,b5,(b6 * b7) #) ) & ( for b3, b4, b5 being AddGroup
for b6 being Function of b4,b5
for b7 being Function of b3,b4 st GroupMorphismStr(# the Dom of c1,the Cod of c1,the Fun of c1 #) = GroupMorphismStr(# b4,b5,b6 #) & GroupMorphismStr(# the Dom of c2,the Cod of c2,the Fun of c2 #) = GroupMorphismStr(# b3,b4,b7 #) holds
b2 = GroupMorphismStr(# b3,b5,(b6 * b7) #) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def21 defines * GRCAT_1:def 21 :
for b1, b2 being GroupMorphism st dom b1 = cod b2 holds
for b3 being strict GroupMorphism holds
( b3 = b1 * b2 iff for b4, b5, b6 being AddGroup
for b7 being Function of b5,b6
for b8 being Function of b4,b5 st GroupMorphismStr(# the Dom of b1,the Cod of b1,the Fun of b1 #) = GroupMorphismStr(# b5,b6,b7 #) & GroupMorphismStr(# the Dom of b2,the Cod of b2,the Fun of b2 #) = GroupMorphismStr(# b4,b5,b8 #) holds
b3 = GroupMorphismStr(# b4,b6,(b7 * b8) #) );

theorem Th27: :: GRCAT_1:27
canceled;

theorem Th28: :: GRCAT_1:28
for b1, b2, b3 being AddGroup
for b4 being Morphism of b2,b3
for b5 being Morphism of b1,b2 holds b4 * b5 is Morphism of b1,b3
proof end;

definition
let c1, c2, c3 be AddGroup;
let c4 be Morphism of c2,c3;
let c5 be Morphism of c1,c2;
redefine func * as c4 * c5 -> strict Morphism of a1,a3;
coherence
c4 * c5 is strict Morphism of c1,c3
by Th28;
end;

theorem Th29: :: GRCAT_1:29
for b1, b2, b3 being AddGroup
for b4 being Morphism of b2,b3
for b5 being Morphism of b1,b2
for b6 being Function of b2,b3
for b7 being Function of b1,b2 st b4 = GroupMorphismStr(# b2,b3,b6 #) & b5 = GroupMorphismStr(# b1,b2,b7 #) holds
b4 * b5 = GroupMorphismStr(# b1,b3,(b6 * b7) #)
proof end;

theorem Th30: :: GRCAT_1:30
for b1, b2 being strict GroupMorphism st dom b2 = cod b1 holds
ex b3, b4, b5 being AddGroupex b6 being Function of b3,b4ex b7 being Function of b4,b5 st
( b1 = GroupMorphismStr(# b3,b4,b6 #) & b2 = GroupMorphismStr(# b4,b5,b7 #) & b2 * b1 = GroupMorphismStr(# b3,b5,(b7 * b6) #) )
proof end;

theorem Th31: :: GRCAT_1:31
for b1, b2 being strict GroupMorphism st dom b2 = cod b1 holds
( dom (b2 * b1) = dom b1 & cod (b2 * b1) = cod b2 )
proof end;

theorem Th32: :: GRCAT_1:32
for b1, b2, b3, b4 being AddGroup
for b5 being strict Morphism of b1,b2
for b6 being strict Morphism of b2,b3
for b7 being strict Morphism of b3,b4 holds b7 * (b6 * b5) = (b7 * b6) * b5
proof end;

theorem Th33: :: GRCAT_1:33
for b1, b2, b3 being strict GroupMorphism st dom b3 = cod b2 & dom b2 = cod b1 holds
b3 * (b2 * b1) = (b3 * b2) * b1
proof end;

theorem Th34: :: GRCAT_1:34
for b1 being AddGroup holds
( dom (ID b1) = b1 & cod (ID b1) = b1 & ( for b2 being strict GroupMorphism st cod b2 = b1 holds
(ID b1) * b2 = b2 ) & ( for b2 being strict GroupMorphism st dom b2 = b1 holds
b2 * (ID b1) = b2 ) )
proof end;

definition
let c1 be set ;
attr a1 is Group_DOMAIN-like means :Def22: :: GRCAT_1:def 22
for b1 being set st b1 in a1 holds
b1 is strict AddGroup;
end;

:: deftheorem Def22 defines Group_DOMAIN-like GRCAT_1:def 22 :
for b1 being set holds
( b1 is Group_DOMAIN-like iff for b2 being set st b2 in b1 holds
b2 is strict AddGroup );

registration
cluster non empty Group_DOMAIN-like set ;
existence
ex b1 being set st
( b1 is Group_DOMAIN-like & not b1 is empty )
proof end;
end;

definition
mode Group_DOMAIN is non empty Group_DOMAIN-like set ;
end;

definition
let c1 be Group_DOMAIN;
redefine mode Element as Element of c1 -> AddGroup;
coherence
for b1 being Element of c1 holds b1 is AddGroup
by Def22;
end;

registration
let c1 be Group_DOMAIN;
cluster strict Element of a1;
existence
ex b1 being Element of c1 st b1 is strict
proof end;
end;

definition
let c1 be set ;
attr a1 is GroupMorphism_DOMAIN-like means :Def23: :: GRCAT_1:def 23
for b1 being set st b1 in a1 holds
b1 is strict GroupMorphism;
end;

:: deftheorem Def23 defines GroupMorphism_DOMAIN-like GRCAT_1:def 23 :
for b1 being set holds
( b1 is GroupMorphism_DOMAIN-like iff for b2 being set st b2 in b1 holds
b2 is strict GroupMorphism );

registration
cluster non empty GroupMorphism_DOMAIN-like set ;
existence
ex b1 being set st
( b1 is GroupMorphism_DOMAIN-like & not b1 is empty )
proof end;
end;

definition
mode GroupMorphism_DOMAIN is non empty GroupMorphism_DOMAIN-like set ;
end;

definition
let c1 be GroupMorphism_DOMAIN;
redefine mode Element as Element of c1 -> GroupMorphism;
coherence
for b1 being Element of c1 holds b1 is GroupMorphism
by Def23;
end;

registration
let c1 be GroupMorphism_DOMAIN;
cluster strict Element of a1;
existence
ex b1 being Element of c1 st b1 is strict
proof end;
end;

theorem Th35: :: GRCAT_1:35
canceled;

theorem Th36: :: GRCAT_1:36
canceled;

theorem Th37: :: GRCAT_1:37
for b1 being strict GroupMorphism holds {b1} is GroupMorphism_DOMAIN
proof end;

definition
let c1, c2 be AddGroup;
mode GroupMorphism_DOMAIN of c1,c2 -> GroupMorphism_DOMAIN means :Def24: :: GRCAT_1:def 24
for b1 being Element of a3 holds b1 is strict Morphism of a1,a2;
existence
ex b1 being GroupMorphism_DOMAIN st
for b2 being Element of b1 holds b2 is strict Morphism of c1,c2
proof end;
end;

:: deftheorem Def24 defines GroupMorphism_DOMAIN GRCAT_1:def 24 :
for b1, b2 being AddGroup
for b3 being GroupMorphism_DOMAIN holds
( b3 is GroupMorphism_DOMAIN of b1,b2 iff for b4 being Element of b3 holds b4 is strict Morphism of b1,b2 );

theorem Th38: :: GRCAT_1:38
for b1 being non empty set
for b2, b3 being AddGroup holds
( b1 is GroupMorphism_DOMAIN of b2,b3 iff for b4 being Element of b1 holds b4 is strict Morphism of b2,b3 )
proof end;

theorem Th39: :: GRCAT_1:39
for b1, b2 being AddGroup
for b3 being strict Morphism of b1,b2 holds {b3} is GroupMorphism_DOMAIN of b1,b2
proof end;

definition
let c1, c2 be 1-sorted ;
mode MapsSet of c1,c2 -> set means :Def25: :: GRCAT_1:def 25
for b1 being set st b1 in a3 holds
b1 is Function of a1,a2;
existence
ex b1 being set st
for b2 being set st b2 in b1 holds
b2 is Function of c1,c2
proof end;
end;

:: deftheorem Def25 defines MapsSet GRCAT_1:def 25 :
for b1, b2 being 1-sorted
for b3 being set holds
( b3 is MapsSet of b1,b2 iff for b4 being set st b4 in b3 holds
b4 is Function of b1,b2 );

definition
let c1, c2 be 1-sorted ;
func Maps c1,c2 -> MapsSet of a1,a2 equals :: GRCAT_1:def 26
Funcs the carrier of a1,the carrier of a2;
coherence
Funcs the carrier of c1,the carrier of c2 is MapsSet of c1,c2
proof end;
end;

:: deftheorem Def26 defines Maps GRCAT_1:def 26 :
for b1, b2 being 1-sorted holds Maps b1,b2 = Funcs the carrier of b1,the carrier of b2;

registration
let c1 be 1-sorted ;
let c2 be non empty 1-sorted ;
cluster Maps a1,a2 -> non empty ;
coherence
not Maps c1,c2 is empty
;
end;

registration
let c1 be 1-sorted ;
let c2 be non empty 1-sorted ;
cluster non empty MapsSet of a1,a2;
existence
not for b1 being MapsSet of c1,c2 holds b1 is empty
proof end;
end;

definition
let c1 be 1-sorted ;
let c2 be non empty 1-sorted ;
let c3 be non empty MapsSet of c1,c2;
redefine mode Element as Element of c3 -> Function of a1,a2;
coherence
for b1 being Element of c3 holds b1 is Function of c1,c2
by Def25;
end;

definition
let c1, c2 be AddGroup;
func Morphs c1,c2 -> GroupMorphism_DOMAIN of a1,a2 means :Def27: :: GRCAT_1:def 27
for b1 being set holds
( b1 in a3 iff b1 is strict Morphism of a1,a2 );
existence
ex b1 being GroupMorphism_DOMAIN of c1,c2 st
for b2 being set holds
( b2 in b1 iff b2 is strict Morphism of c1,c2 )
proof end;
uniqueness
for b1, b2 being GroupMorphism_DOMAIN of c1,c2 st ( for b3 being set holds
( b3 in b1 iff b3 is strict Morphism of c1,c2 ) ) & ( for b3 being set holds
( b3 in b2 iff b3 is strict Morphism of c1,c2 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def27 defines Morphs GRCAT_1:def 27 :
for b1, b2 being AddGroup
for b3 being GroupMorphism_DOMAIN of b1,b2 holds
( b3 = Morphs b1,b2 iff for b4 being set holds
( b4 in b3 iff b4 is strict Morphism of b1,b2 ) );

definition
let c1, c2 be AddGroup;
let c3 be GroupMorphism_DOMAIN of c1,c2;
redefine mode Element as Element of c3 -> Morphism of a1,a2;
coherence
for b1 being Element of c3 holds b1 is Morphism of c1,c2
by Def24;
end;

registration
let c1, c2 be AddGroup;
let c3 be GroupMorphism_DOMAIN of c1,c2;
cluster strict Element of a3;
existence
ex b1 being Element of c3 st b1 is strict
proof end;
end;

definition
let c1, c2 be set ;
pred GO c1,c2 means :Def28: :: GRCAT_1:def 28
ex b1, b2, b3, b4 being set st
( a1 = [b1,b2,b3,b4] & ex b5 being strict AddGroup st
( a2 = b5 & b1 = the carrier of b5 & b2 = the add of b5 & b3 = comp b5 & b4 = the Zero of b5 ) );
end;

:: deftheorem Def28 defines GO GRCAT_1:def 28 :
for b1, b2 being set holds
( GO b1,b2 iff ex b3, b4, b5, b6 being set st
( b1 = [b3,b4,b5,b6] & ex b7 being strict AddGroup st
( b2 = b7 & b3 = the carrier of b7 & b4 = the add of b7 & b5 = comp b7 & b6 = the Zero of b7 ) ) );

theorem Th40: :: GRCAT_1:40
for b1, b2, b3 being set st GO b1,b2 & GO b1,b3 holds
b2 = b3
proof end;

theorem Th41: :: GRCAT_1:41
for b1 being Universe ex b2 being set st
( b2 in b1 & GO b2, L_Trivial )
proof end;

definition
let c1 be Universe;
func GroupObjects c1 -> set means :Def29: :: GRCAT_1:def 29
for b1 being set holds
( b1 in a2 iff ex b2 being set st
( b2 in a1 & GO b2,b1 ) );
existence
ex b1 being set st
for b2 being set holds
( b2 in b1 iff ex b3 being set st
( b3 in c1 & GO b3,b2 ) )
proof end;
uniqueness
for b1, b2 being set st ( for b3 being set holds
( b3 in b1 iff ex b4 being set st
( b4 in c1 & GO b4,b3 ) ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being set st
( b4 in c1 & GO b4,b3 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def29 defines GroupObjects GRCAT_1:def 29 :
for b1 being Universe
for b2 being set holds
( b2 = GroupObjects b1 iff for b3 being set holds
( b3 in b2 iff ex b4 being set st
( b4 in b1 & GO b4,b3 ) ) );

theorem Th42: :: GRCAT_1:42
for b1 being Universe holds L_Trivial in GroupObjects b1
proof end;

registration
let c1 be Universe;
cluster GroupObjects a1 -> non empty ;
coherence
not GroupObjects c1 is empty
by Th42;
end;

theorem Th43: :: GRCAT_1:43
for b1 being Universe
for b2 being Element of GroupObjects b1 holds b2 is strict AddGroup
proof end;

registration
let c1 be Universe;
cluster GroupObjects a1 -> non empty Group_DOMAIN-like ;
coherence
GroupObjects c1 is Group_DOMAIN-like
proof end;
end;

definition
let c1 be Group_DOMAIN;
func Morphs c1 -> GroupMorphism_DOMAIN means :Def30: :: GRCAT_1:def 30
for b1 being set holds
( b1 in a2 iff ex b2, b3 being strict Element of a1 st b1 is strict Morphism of b2,b3 );
existence
ex b1 being GroupMorphism_DOMAIN st
for b2 being set holds
( b2 in b1 iff ex b3, b4 being strict Element of c1 st b2 is strict Morphism of b3,b4 )
proof end;
uniqueness
for b1, b2 being GroupMorphism_DOMAIN st ( for b3 being set holds
( b3 in b1 iff ex b4, b5 being strict Element of c1 st b3 is strict Morphism of b4,b5 ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4, b5 being strict Element of c1 st b3 is strict Morphism of b4,b5 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def30 defines Morphs GRCAT_1:def 30 :
for b1 being Group_DOMAIN
for b2 being GroupMorphism_DOMAIN holds
( b2 = Morphs b1 iff for b3 being set holds
( b3 in b2 iff ex b4, b5 being strict Element of b1 st b3 is strict Morphism of b4,b5 ) );

definition
let c1 be Group_DOMAIN;
let c2 be Element of Morphs c1;
redefine func dom as dom c2 -> strict Element of a1;
coherence
dom c2 is strict Element of c1
proof end;
redefine func cod as cod c2 -> strict Element of a1;
coherence
cod c2 is strict Element of c1
proof end;
end;

definition
let c1 be Group_DOMAIN;
let c2 be Element of c1;
func ID c2 -> strict Element of Morphs a1 equals :: GRCAT_1:def 31
ID a2;
coherence
ID c2 is strict Element of Morphs c1
proof end;
end;

:: deftheorem Def31 defines ID GRCAT_1:def 31 :
for b1 being Group_DOMAIN
for b2 being Element of b1 holds ID b2 = ID b2;

definition
let c1 be Group_DOMAIN;
func dom c1 -> Function of Morphs a1,a1 means :Def32: :: GRCAT_1:def 32
for b1 being Element of Morphs a1 holds a2 . b1 = dom b1;
existence
ex b1 being Function of Morphs c1,c1 st
for b2 being Element of Morphs c1 holds b1 . b2 = dom b2
proof end;
uniqueness
for b1, b2 being Function of Morphs c1,c1 st ( for b3 being Element of Morphs c1 holds b1 . b3 = dom b3 ) & ( for b3 being Element of Morphs c1 holds b2 . b3 = dom b3 ) holds
b1 = b2
proof end;
func cod c1 -> Function of Morphs a1,a1 means :Def33: :: GRCAT_1:def 33
for b1 being Element of Morphs a1 holds a2 . b1 = cod b1;
existence
ex b1 being Function of Morphs c1,c1 st
for b2 being Element of Morphs c1 holds b1 . b2 = cod b2
proof end;
uniqueness
for b1, b2 being Function of Morphs c1,c1 st ( for b3 being Element of Morphs c1 holds b1 . b3 = cod b3 ) & ( for b3 being Element of Morphs c1 holds b2 . b3 = cod b3 ) holds
b1 = b2
proof end;
func ID c1 -> Function of a1, Morphs a1 means :Def34: :: GRCAT_1:def 34
for b1 being Element of a1 holds a2 . b1 = ID b1;
existence
ex b1 being Function of c1, Morphs c1 st
for b2 being Element of c1 holds b1 . b2 = ID b2
proof end;
uniqueness
for b1, b2 being Function of c1, Morphs c1 st ( for b3 being Element of c1 holds b1 . b3 = ID b3 ) & ( for b3 being Element of c1 holds b2 . b3 = ID b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def32 defines dom GRCAT_1:def 32 :
for b1 being Group_DOMAIN
for b2 being Function of Morphs b1,b1 holds
( b2 = dom b1 iff for b3 being Element of Morphs b1 holds b2 . b3 = dom b3 );

:: deftheorem Def33 defines cod GRCAT_1:def 33 :
for b1 being Group_DOMAIN
for b2 being Function of Morphs b1,b1 holds
( b2 = cod b1 iff for b3 being Element of Morphs b1 holds b2 . b3 = cod b3 );

:: deftheorem Def34 defines ID GRCAT_1:def 34 :
for b1 being Group_DOMAIN
for b2 being Function of b1, Morphs b1 holds
( b2 = ID b1 iff for b3 being Element of b1 holds b2 . b3 = ID b3 );

theorem Th44: :: GRCAT_1:44
for b1 being Group_DOMAIN
for b2, b3 being Element of Morphs b1 st dom b2 = cod b3 holds
ex b4, b5, b6 being strict Element of b1 st
( b2 is Morphism of b5,b6 & b3 is Morphism of b4,b5 )
proof end;

theorem Th45: :: GRCAT_1:45
for b1 being Group_DOMAIN
for b2, b3 being Element of Morphs b1 st dom b2 = cod b3 holds
b2 * b3 in Morphs b1
proof end;

definition
let c1 be Group_DOMAIN;
func comp c1 -> PartFunc of [:(Morphs a1),(Morphs a1):], Morphs a1 means :Def35: :: GRCAT_1:def 35
( ( for b1, b2 being Element of Morphs a1 holds
( [b1,b2] in dom a2 iff dom b1 = cod b2 ) ) & ( for b1, b2 being Element of Morphs a1 st [b1,b2] in dom a2 holds
a2 . [b1,b2] = b1 * b2 ) );
existence
ex b1 being PartFunc of [:(Morphs c1),(Morphs c1):], Morphs c1 st
( ( for b2, b3 being Element of Morphs c1 holds
( [b2,b3] in dom b1 iff dom b2 = cod b3 ) ) & ( for b2, b3 being Element of Morphs c1 st [b2,b3] in dom b1 holds
b1 . [b2,b3] = b2 * b3 ) )
proof end;
uniqueness
for b1, b2 being PartFunc of [:(Morphs c1),(Morphs c1):], Morphs c1 st ( for b3, b4 being Element of Morphs c1 holds
( [b3,b4] in dom b1 iff dom b3 = cod b4 ) ) & ( for b3, b4 being Element of Morphs c1 st [b3,b4] in dom b1 holds
b1 . [b3,b4] = b3 * b4 ) & ( for b3, b4 being Element of Morphs c1 holds
( [b3,b4] in dom b2 iff dom b3 = cod b4 ) ) & ( for b3, b4 being Element of Morphs c1 st [b3,b4] in dom b2 holds
b2 . [b3,b4] = b3 * b4 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def35 defines comp GRCAT_1:def 35 :
for b1 being Group_DOMAIN
for b2 being PartFunc of [:(Morphs b1),(Morphs b1):], Morphs b1 holds
( b2 = comp b1 iff ( ( for b3, b4 being Element of Morphs b1 holds
( [b3,b4] in dom b2 iff dom b3 = cod b4 ) ) & ( for b3, b4 being Element of Morphs b1 st [b3,b4] in dom b2 holds
b2 . [b3,b4] = b3 * b4 ) ) );

definition
let c1 be Universe;
func GroupCat c1 -> CatStr equals :: GRCAT_1:def 36
CatStr(# (GroupObjects a1),(Morphs (GroupObjects a1)),(dom (GroupObjects a1)),(cod (GroupObjects a1)),(comp (GroupObjects a1)),(ID (GroupObjects a1)) #);
coherence
CatStr(# (GroupObjects c1),(Morphs (GroupObjects c1)),(dom (GroupObjects c1)),(cod (GroupObjects c1)),(comp (GroupObjects c1)),(ID (GroupObjects c1)) #) is CatStr
;
end;

:: deftheorem Def36 defines GroupCat GRCAT_1:def 36 :
for b1 being Universe holds GroupCat b1 = CatStr(# (GroupObjects b1),(Morphs (GroupObjects b1)),(dom (GroupObjects b1)),(cod (GroupObjects b1)),(comp (GroupObjects b1)),(ID (GroupObjects b1)) #);

registration
let c1 be Universe;
cluster GroupCat a1 -> strict ;
coherence
GroupCat c1 is strict
;
end;

theorem Th46: :: GRCAT_1:46
for b1 being Universe
for b2, b3 being Morphism of (GroupCat b1) holds
( [b3,b2] in dom the Comp of (GroupCat b1) iff dom b3 = cod b2 )
proof end;

theorem Th47: :: GRCAT_1:47
for b1 being Universe
for b2 being Morphism of (GroupCat b1)
for b3 being Element of Morphs (GroupObjects b1)
for b4 being Object of (GroupCat b1)
for b5 being Element of GroupObjects b1 holds
( b2 is strict Element of Morphs (GroupObjects b1) & b3 is Morphism of (GroupCat b1) & b4 is strict Element of GroupObjects b1 & b5 is Object of (GroupCat b1) )
proof end;

theorem Th48: :: GRCAT_1:48
for b1 being Universe
for b2 being Object of (GroupCat b1)
for b3 being Element of GroupObjects b1 st b2 = b3 holds
id b2 = ID b3
proof end;

theorem Th49: :: GRCAT_1:49
for b1 being Universe
for b2 being Morphism of (GroupCat b1)
for b3 being Element of Morphs (GroupObjects b1) st b2 = b3 holds
( dom b2 = dom b3 & cod b2 = cod b3 )
proof end;

theorem Th50: :: GRCAT_1:50
for b1 being Universe
for b2, b3 being Morphism of (GroupCat b1)
for b4, b5 being Element of Morphs (GroupObjects b1) st b2 = b4 & b3 = b5 holds
( ( dom b3 = cod b2 implies dom b5 = cod b4 ) & ( dom b5 = cod b4 implies dom b3 = cod b2 ) & ( dom b3 = cod b2 implies [b5,b4] in dom (comp (GroupObjects b1)) ) & ( [b5,b4] in dom (comp (GroupObjects b1)) implies dom b3 = cod b2 ) & ( dom b3 = cod b2 implies b3 * b2 = b5 * b4 ) & ( dom b2 = dom b3 implies dom b4 = dom b5 ) & ( dom b4 = dom b5 implies dom b2 = dom b3 ) & ( cod b2 = cod b3 implies cod b4 = cod b5 ) & ( cod b4 = cod b5 implies cod b2 = cod b3 ) )
proof end;

Lemma58: for b1 being Universe
for b2, b3 being Morphism of (GroupCat b1) st dom b3 = cod b2 holds
( dom (b3 * b2) = dom b2 & cod (b3 * b2) = cod b3 )
proof end;

Lemma59: for b1 being Universe
for b2, b3, b4 being Morphism of (GroupCat b1) st dom b4 = cod b3 & dom b3 = cod b2 holds
b4 * (b3 * b2) = (b4 * b3) * b2
proof end;

Lemma60: for b1 being Universe
for b2 being Object of (GroupCat b1) holds
( dom (id b2) = b2 & cod (id b2) = b2 & ( for b3 being Morphism of (GroupCat b1) st cod b3 = b2 holds
(id b2) * b3 = b3 ) & ( for b3 being Morphism of (GroupCat b1) st dom b3 = b2 holds
b3 * (id b2) = b3 ) )
proof end;

registration
let c1 be Universe;
cluster GroupCat a1 -> strict Category-like ;
coherence
GroupCat c1 is Category-like
proof end;
end;

definition
let c1 be Universe;
func AbGroupObjects c1 -> Subset of the Objects of (GroupCat a1) equals :: GRCAT_1:def 37
{ b1 where B is Element of the Objects of (GroupCat a1) : ex b1 being AbGroup st b1 = b2 } ;
coherence
{ b1 where B is Element of the Objects of (GroupCat c1) : ex b1 being AbGroup st b1 = b2 } is Subset of the Objects of (GroupCat c1)
proof end;
end;

:: deftheorem Def37 defines AbGroupObjects GRCAT_1:def 37 :
for b1 being Universe holds AbGroupObjects b1 = { b2 where B is Element of the Objects of (GroupCat b1) : ex b1 being AbGroup st b2 = b3 } ;

theorem Th51: :: GRCAT_1:51
for b1 being Universe holds L_Trivial in AbGroupObjects b1
proof end;

registration
let c1 be Universe;
cluster AbGroupObjects a1 -> non empty ;
coherence
not AbGroupObjects c1 is empty
by Th51;
end;

definition
let c1 be Universe;
func AbGroupCat c1 -> Subcategory of GroupCat a1 equals :: GRCAT_1:def 38
cat (AbGroupObjects a1);
coherence
cat (AbGroupObjects c1) is Subcategory of GroupCat c1
;
end;

:: deftheorem Def38 defines AbGroupCat GRCAT_1:def 38 :
for b1 being Universe holds AbGroupCat b1 = cat (AbGroupObjects b1);

registration
let c1 be Universe;
cluster AbGroupCat a1 -> strict ;
coherence
AbGroupCat c1 is strict
;
end;

theorem Th52: :: GRCAT_1:52
for b1 being Universe holds the Objects of (AbGroupCat b1) = AbGroupObjects b1 ;

definition
let c1 be Universe;
func MidOpGroupObjects c1 -> Subset of the Objects of (AbGroupCat a1) equals :: GRCAT_1:def 39
{ b1 where B is Element of the Objects of (AbGroupCat a1) : ex b1 being midpoint_operator AbGroup st b1 = b2 } ;
coherence
{ b1 where B is Element of the Objects of (AbGroupCat c1) : ex b1 being midpoint_operator AbGroup st b1 = b2 } is Subset of the Objects of (AbGroupCat c1)
proof end;
end;

:: deftheorem Def39 defines MidOpGroupObjects GRCAT_1:def 39 :
for b1 being Universe holds MidOpGroupObjects b1 = { b2 where B is Element of the Objects of (AbGroupCat b1) : ex b1 being midpoint_operator AbGroup st b2 = b3 } ;

registration
let c1 be Universe;
cluster MidOpGroupObjects a1 -> non empty ;
coherence
not MidOpGroupObjects c1 is empty
proof end;
end;

definition
let c1 be Universe;
func MidOpGroupCat c1 -> Subcategory of AbGroupCat a1 equals :: GRCAT_1:def 40
cat (MidOpGroupObjects a1);
coherence
cat (MidOpGroupObjects c1) is Subcategory of AbGroupCat c1
;
end;

:: deftheorem Def40 defines MidOpGroupCat GRCAT_1:def 40 :
for b1 being Universe holds MidOpGroupCat b1 = cat (MidOpGroupObjects b1);

registration
let c1 be Universe;
cluster MidOpGroupCat a1 -> strict ;
coherence
MidOpGroupCat c1 is strict
;
end;

theorem Th53: :: GRCAT_1:53
for b1 being Universe holds the Objects of (MidOpGroupCat b1) = MidOpGroupObjects b1 ;

theorem Th54: :: GRCAT_1:54
for b1 being Universe holds L_Trivial in MidOpGroupObjects b1
proof end;