:: MODCAT_1 semantic presentation

definition
let c1 be Ring;
mode LeftMod_DOMAIN of c1 -> non empty set means :Def1: :: MODCAT_1:def 1
for b1 being Element of a2 holds b1 is strict LeftMod of a1;
existence
ex b1 being non empty set st
for b2 being Element of b1 holds b2 is strict LeftMod of c1
proof end;
end;

:: deftheorem Def1 defines LeftMod_DOMAIN MODCAT_1:def 1 :
for b1 being Ring
for b2 being non empty set holds
( b2 is LeftMod_DOMAIN of b1 iff for b3 being Element of b2 holds b3 is strict LeftMod of b1 );

definition
let c1 be Ring;
let c2 be LeftMod_DOMAIN of c1;
redefine mode Element as Element of c2 -> LeftMod of a1;
coherence
for b1 being Element of c2 holds b1 is LeftMod of c1
by Def1;
end;

registration
let c1 be Ring;
let c2 be LeftMod_DOMAIN of c1;
cluster strict Element of a2;
existence
ex b1 being Element of c2 st b1 is strict
proof end;
end;

definition
let c1 be Ring;
mode LModMorphism_DOMAIN of c1 -> non empty set means :Def2: :: MODCAT_1:def 2
for b1 being Element of a2 holds b1 is strict LModMorphism of a1;
existence
ex b1 being non empty set st
for b2 being Element of b1 holds b2 is strict LModMorphism of c1
proof end;
end;

:: deftheorem Def2 defines LModMorphism_DOMAIN MODCAT_1:def 2 :
for b1 being Ring
for b2 being non empty set holds
( b2 is LModMorphism_DOMAIN of b1 iff for b3 being Element of b2 holds b3 is strict LModMorphism of b1 );

definition
let c1 be Ring;
let c2 be LModMorphism_DOMAIN of c1;
redefine mode Element as Element of c2 -> LModMorphism of a1;
coherence
for b1 being Element of c2 holds b1 is LModMorphism of c1
by Def2;
end;

registration
let c1 be Ring;
let c2 be LModMorphism_DOMAIN of c1;
cluster strict Element of a2;
existence
ex b1 being Element of c2 st b1 is strict
proof end;
end;

theorem Th1: :: MODCAT_1:1
canceled;

theorem Th2: :: MODCAT_1:2
canceled;

theorem Th3: :: MODCAT_1:3
for b1 being Ring
for b2 being strict LModMorphism of b1 holds {b2} is LModMorphism_DOMAIN of b1
proof end;

definition
let c1 be Ring;
let c2, c3 be LeftMod of c1;
mode LModMorphism_DOMAIN of c2,c3 -> LModMorphism_DOMAIN of a1 means :Def3: :: MODCAT_1:def 3
for b1 being Element of a4 holds b1 is strict Morphism of a2,a3;
existence
ex b1 being LModMorphism_DOMAIN of c1 st
for b2 being Element of b1 holds b2 is strict Morphism of c2,c3
proof end;
end;

:: deftheorem Def3 defines LModMorphism_DOMAIN MODCAT_1:def 3 :
for b1 being Ring
for b2, b3 being LeftMod of b1
for b4 being LModMorphism_DOMAIN of b1 holds
( b4 is LModMorphism_DOMAIN of b2,b3 iff for b5 being Element of b4 holds b5 is strict Morphism of b2,b3 );

theorem Th4: :: MODCAT_1:4
for b1 being non empty set
for b2 being Ring
for b3, b4 being LeftMod of b2 holds
( b1 is LModMorphism_DOMAIN of b3,b4 iff for b5 being Element of b1 holds b5 is strict Morphism of b3,b4 )
proof end;

theorem Th5: :: MODCAT_1:5
for b1 being Ring
for b2, b3 being LeftMod of b1
for b4 being strict Morphism of b2,b3 holds {b4} is LModMorphism_DOMAIN of b2,b3
proof end;

definition
let c1 be Ring;
let c2, c3 be LeftMod of c1;
func Morphs c2,c3 -> LModMorphism_DOMAIN of a2,a3 means :Def4: :: MODCAT_1:def 4
for b1 being set holds
( b1 in a4 iff b1 is strict Morphism of a2,a3 );
existence
ex b1 being LModMorphism_DOMAIN of c2,c3 st
for b2 being set holds
( b2 in b1 iff b2 is strict Morphism of c2,c3 )
proof end;
uniqueness
for b1, b2 being LModMorphism_DOMAIN of c2,c3 st ( for b3 being set holds
( b3 in b1 iff b3 is strict Morphism of c2,c3 ) ) & ( for b3 being set holds
( b3 in b2 iff b3 is strict Morphism of c2,c3 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def4 defines Morphs MODCAT_1:def 4 :
for b1 being Ring
for b2, b3 being LeftMod of b1
for b4 being LModMorphism_DOMAIN of b2,b3 holds
( b4 = Morphs b2,b3 iff for b5 being set holds
( b5 in b4 iff b5 is strict Morphism of b2,b3 ) );

definition
let c1 be Ring;
let c2, c3 be LeftMod of c1;
let c4 be LModMorphism_DOMAIN of c2,c3;
redefine mode Element as Element of c4 -> Morphism of a2,a3;
coherence
for b1 being Element of c4 holds b1 is Morphism of c2,c3
by Def3;
end;

definition
let c1, c2 be set ;
let c3 be Ring;
pred GO c1,c2,c3 means :Def5: :: MODCAT_1:def 5
ex b1, b2 being set st
( a1 = [b1,b2] & ex b3 being strict LeftMod of a3 st
( a2 = b3 & b1 = LoopStr(# the carrier of b3,the add of b3,the Zero of b3 #) & b2 = the lmult of b3 ) );
end;

:: deftheorem Def5 defines GO MODCAT_1:def 5 :
for b1, b2 being set
for b3 being Ring holds
( GO b1,b2,b3 iff ex b4, b5 being set st
( b1 = [b4,b5] & ex b6 being strict LeftMod of b3 st
( b2 = b6 & b4 = LoopStr(# the carrier of b6,the add of b6,the Zero of b6 #) & b5 = the lmult of b6 ) ) );

theorem Th6: :: MODCAT_1:6
for b1 being Ring
for b2, b3, b4 being set st GO b2,b3,b1 & GO b2,b4,b1 holds
b3 = b4
proof end;

theorem Th7: :: MODCAT_1:7
for b1 being Ring
for b2 being Universe ex b3 being set st
( b3 in { [b4,b5] where B is Element of GroupObjects b2, B is Element of Funcs [:the carrier of b1,{{} }:],{{} } : verum } & GO b3, TrivialLMod b1,b1 )
proof end;

definition
let c1 be Universe;
let c2 be Ring;
func LModObjects c1,c2 -> set means :Def6: :: MODCAT_1:def 6
for b1 being set holds
( b1 in a3 iff ex b2 being set st
( b2 in { [b3,b4] where B is Element of GroupObjects a1, B is Element of Funcs [:the carrier of a2,{{} }:],{{} } : verum } & GO b2,b1,a2 ) );
existence
ex b1 being set st
for b2 being set holds
( b2 in b1 iff ex b3 being set st
( b3 in { [b4,b5] where B is Element of GroupObjects c1, B is Element of Funcs [:the carrier of c2,{{} }:],{{} } : verum } & GO b3,b2,c2 ) )
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 { [b5,b6] where B is Element of GroupObjects c1, B is Element of Funcs [:the carrier of c2,{{} }:],{{} } : verum } & GO b4,b3,c2 ) ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being set st
( b4 in { [b5,b6] where B is Element of GroupObjects c1, B is Element of Funcs [:the carrier of c2,{{} }:],{{} } : verum } & GO b4,b3,c2 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def6 defines LModObjects MODCAT_1:def 6 :
for b1 being Universe
for b2 being Ring
for b3 being set holds
( b3 = LModObjects b1,b2 iff for b4 being set holds
( b4 in b3 iff ex b5 being set st
( b5 in { [b6,b7] where B is Element of GroupObjects b1, B is Element of Funcs [:the carrier of b2,{{} }:],{{} } : verum } & GO b5,b4,b2 ) ) );

theorem Th8: :: MODCAT_1:8
for b1 being Universe
for b2 being Ring holds TrivialLMod b2 in LModObjects b1,b2
proof end;

registration
let c1 be Universe;
let c2 be Ring;
cluster LModObjects a1,a2 -> non empty ;
coherence
not LModObjects c1,c2 is empty
by Th8;
end;

theorem Th9: :: MODCAT_1:9
for b1 being Universe
for b2 being Ring
for b3 being Element of LModObjects b1,b2 holds b3 is strict LeftMod of b2
proof end;

definition
let c1 be Universe;
let c2 be Ring;
redefine func LModObjects as LModObjects c1,c2 -> LeftMod_DOMAIN of a2;
coherence
LModObjects c1,c2 is LeftMod_DOMAIN of c2
proof end;
end;

definition
let c1 be Ring;
let c2 be LeftMod_DOMAIN of c1;
func Morphs c2 -> LModMorphism_DOMAIN of a1 means :Def7: :: MODCAT_1:def 7
for b1 being set holds
( b1 in a3 iff ex b2, b3 being strict Element of a2 st b1 is strict Morphism of b2,b3 );
existence
ex b1 being LModMorphism_DOMAIN of c1 st
for b2 being set holds
( b2 in b1 iff ex b3, b4 being strict Element of c2 st b2 is strict Morphism of b3,b4 )
proof end;
uniqueness
for b1, b2 being LModMorphism_DOMAIN of c1 st ( for b3 being set holds
( b3 in b1 iff ex b4, b5 being strict Element of c2 st b3 is strict Morphism of b4,b5 ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4, b5 being strict Element of c2 st b3 is strict Morphism of b4,b5 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def7 defines Morphs MODCAT_1:def 7 :
for b1 being Ring
for b2 being LeftMod_DOMAIN of b1
for b3 being LModMorphism_DOMAIN of b1 holds
( b3 = Morphs b2 iff for b4 being set holds
( b4 in b3 iff ex b5, b6 being strict Element of b2 st b4 is strict Morphism of b5,b6 ) );

definition
let c1 be Ring;
let c2 be LeftMod_DOMAIN of c1;
let c3 be Element of Morphs c2;
func dom' c3 -> Element of a2 equals :: MODCAT_1:def 8
dom a3;
coherence
dom c3 is Element of c2
proof end;
func cod' c3 -> Element of a2 equals :: MODCAT_1:def 9
cod a3;
coherence
cod c3 is Element of c2
proof end;
end;

:: deftheorem Def8 defines dom' MODCAT_1:def 8 :
for b1 being Ring
for b2 being LeftMod_DOMAIN of b1
for b3 being Element of Morphs b2 holds dom' b3 = dom b3;

:: deftheorem Def9 defines cod' MODCAT_1:def 9 :
for b1 being Ring
for b2 being LeftMod_DOMAIN of b1
for b3 being Element of Morphs b2 holds cod' b3 = cod b3;

definition
let c1 be Ring;
let c2 be LeftMod_DOMAIN of c1;
let c3 be Element of c2;
func ID c3 -> strict Element of Morphs a2 equals :: MODCAT_1:def 10
ID a3;
coherence
ID c3 is strict Element of Morphs c2
proof end;
end;

:: deftheorem Def10 defines ID MODCAT_1:def 10 :
for b1 being Ring
for b2 being LeftMod_DOMAIN of b1
for b3 being Element of b2 holds ID b3 = ID b3;

definition
let c1 be Ring;
let c2 be LeftMod_DOMAIN of c1;
func dom c2 -> Function of Morphs a2,a2 means :Def11: :: MODCAT_1:def 11
for b1 being Element of Morphs a2 holds a3 . b1 = dom' b1;
existence
ex b1 being Function of Morphs c2,c2 st
for b2 being Element of Morphs c2 holds b1 . b2 = dom' b2
proof end;
uniqueness
for b1, b2 being Function of Morphs c2,c2 st ( for b3 being Element of Morphs c2 holds b1 . b3 = dom' b3 ) & ( for b3 being Element of Morphs c2 holds b2 . b3 = dom' b3 ) holds
b1 = b2
proof end;
func cod c2 -> Function of Morphs a2,a2 means :Def12: :: MODCAT_1:def 12
for b1 being Element of Morphs a2 holds a3 . b1 = cod' b1;
existence
ex b1 being Function of Morphs c2,c2 st
for b2 being Element of Morphs c2 holds b1 . b2 = cod' b2
proof end;
uniqueness
for b1, b2 being Function of Morphs c2,c2 st ( for b3 being Element of Morphs c2 holds b1 . b3 = cod' b3 ) & ( for b3 being Element of Morphs c2 holds b2 . b3 = cod' b3 ) holds
b1 = b2
proof end;
func ID c2 -> Function of a2, Morphs a2 means :Def13: :: MODCAT_1:def 13
for b1 being Element of a2 holds a3 . b1 = ID b1;
existence
ex b1 being Function of c2, Morphs c2 st
for b2 being Element of c2 holds b1 . b2 = ID b2
proof end;
uniqueness
for b1, b2 being Function of c2, Morphs c2 st ( for b3 being Element of c2 holds b1 . b3 = ID b3 ) & ( for b3 being Element of c2 holds b2 . b3 = ID b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def11 defines dom MODCAT_1:def 11 :
for b1 being Ring
for b2 being LeftMod_DOMAIN of b1
for b3 being Function of Morphs b2,b2 holds
( b3 = dom b2 iff for b4 being Element of Morphs b2 holds b3 . b4 = dom' b4 );

:: deftheorem Def12 defines cod MODCAT_1:def 12 :
for b1 being Ring
for b2 being LeftMod_DOMAIN of b1
for b3 being Function of Morphs b2,b2 holds
( b3 = cod b2 iff for b4 being Element of Morphs b2 holds b3 . b4 = cod' b4 );

:: deftheorem Def13 defines ID MODCAT_1:def 13 :
for b1 being Ring
for b2 being LeftMod_DOMAIN of b1
for b3 being Function of b2, Morphs b2 holds
( b3 = ID b2 iff for b4 being Element of b2 holds b3 . b4 = ID b4 );

theorem Th10: :: MODCAT_1:10
for b1 being Ring
for b2 being LeftMod_DOMAIN of b1
for b3, b4 being Element of Morphs b2 st dom' b3 = cod' b4 holds
ex b5, b6, b7 being strict Element of b2 st
( b3 is Morphism of b6,b7 & b4 is Morphism of b5,b6 )
proof end;

theorem Th11: :: MODCAT_1:11
for b1 being Ring
for b2 being LeftMod_DOMAIN of b1
for b3, b4 being Element of Morphs b2 st dom' b3 = cod' b4 holds
b3 * b4 in Morphs b2
proof end;

theorem Th12: :: MODCAT_1:12
for b1 being Ring
for b2 being LeftMod_DOMAIN of b1
for b3, b4 being Element of Morphs b2 st dom b3 = cod b4 holds
b3 * b4 in Morphs b2
proof end;

definition
let c1 be Ring;
let c2 be LeftMod_DOMAIN of c1;
func comp c2 -> PartFunc of [:(Morphs a2),(Morphs a2):], Morphs a2 means :Def14: :: MODCAT_1:def 14
( ( for b1, b2 being Element of Morphs a2 holds
( [b1,b2] in dom a3 iff dom' b1 = cod' b2 ) ) & ( for b1, b2 being Element of Morphs a2 st [b1,b2] in dom a3 holds
a3 . [b1,b2] = b1 * b2 ) );
existence
ex b1 being PartFunc of [:(Morphs c2),(Morphs c2):], Morphs c2 st
( ( for b2, b3 being Element of Morphs c2 holds
( [b2,b3] in dom b1 iff dom' b2 = cod' b3 ) ) & ( for b2, b3 being Element of Morphs c2 st [b2,b3] in dom b1 holds
b1 . [b2,b3] = b2 * b3 ) )
proof end;
uniqueness
for b1, b2 being PartFunc of [:(Morphs c2),(Morphs c2):], Morphs c2 st ( for b3, b4 being Element of Morphs c2 holds
( [b3,b4] in dom b1 iff dom' b3 = cod' b4 ) ) & ( for b3, b4 being Element of Morphs c2 st [b3,b4] in dom b1 holds
b1 . [b3,b4] = b3 * b4 ) & ( for b3, b4 being Element of Morphs c2 holds
( [b3,b4] in dom b2 iff dom' b3 = cod' b4 ) ) & ( for b3, b4 being Element of Morphs c2 st [b3,b4] in dom b2 holds
b2 . [b3,b4] = b3 * b4 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def14 defines comp MODCAT_1:def 14 :
for b1 being Ring
for b2 being LeftMod_DOMAIN of b1
for b3 being PartFunc of [:(Morphs b2),(Morphs b2):], Morphs b2 holds
( b3 = comp b2 iff ( ( for b4, b5 being Element of Morphs b2 holds
( [b4,b5] in dom b3 iff dom' b4 = cod' b5 ) ) & ( for b4, b5 being Element of Morphs b2 st [b4,b5] in dom b3 holds
b3 . [b4,b5] = b4 * b5 ) ) );

theorem Th13: :: MODCAT_1:13
for b1 being Ring
for b2 being LeftMod_DOMAIN of b1
for b3, b4 being Element of Morphs b2 holds
( [b3,b4] in dom (comp b2) iff dom b3 = cod b4 )
proof end;

definition
let c1 be Universe;
let c2 be Ring;
func LModCat c1,c2 -> strict CatStr equals :: MODCAT_1:def 15
CatStr(# (LModObjects a1,a2),(Morphs (LModObjects a1,a2)),(dom (LModObjects a1,a2)),(cod (LModObjects a1,a2)),(comp (LModObjects a1,a2)),(ID (LModObjects a1,a2)) #);
coherence
CatStr(# (LModObjects c1,c2),(Morphs (LModObjects c1,c2)),(dom (LModObjects c1,c2)),(cod (LModObjects c1,c2)),(comp (LModObjects c1,c2)),(ID (LModObjects c1,c2)) #) is strict CatStr
;
end;

:: deftheorem Def15 defines LModCat MODCAT_1:def 15 :
for b1 being Universe
for b2 being Ring holds LModCat b1,b2 = CatStr(# (LModObjects b1,b2),(Morphs (LModObjects b1,b2)),(dom (LModObjects b1,b2)),(cod (LModObjects b1,b2)),(comp (LModObjects b1,b2)),(ID (LModObjects b1,b2)) #);

theorem Th14: :: MODCAT_1:14
for b1 being Universe
for b2 being Ring
for b3, b4 being Morphism of (LModCat b1,b2) holds
( [b4,b3] in dom the Comp of (LModCat b1,b2) iff dom b4 = cod b3 )
proof end;

theorem Th15: :: MODCAT_1:15
for b1 being Universe
for b2 being Ring
for b3 being Morphism of (LModCat b1,b2)
for b4 being Element of Morphs (LModObjects b1,b2)
for b5 being Object of (LModCat b1,b2)
for b6 being Element of LModObjects b1,b2 holds
( b3 is strict Element of Morphs (LModObjects b1,b2) & b4 is Morphism of (LModCat b1,b2) & b5 is strict Element of LModObjects b1,b2 & b6 is Object of (LModCat b1,b2) )
proof end;

theorem Th16: :: MODCAT_1:16
for b1 being Universe
for b2 being Ring
for b3 being Object of (LModCat b1,b2)
for b4 being Element of LModObjects b1,b2 st b3 = b4 holds
id b3 = ID b4
proof end;

theorem Th17: :: MODCAT_1:17
for b1 being Universe
for b2 being Ring
for b3 being Morphism of (LModCat b1,b2)
for b4 being Element of Morphs (LModObjects b1,b2) st b3 = b4 holds
( dom b3 = dom b4 & cod b3 = cod b4 )
proof end;

theorem Th18: :: MODCAT_1:18
for b1 being Universe
for b2 being Ring
for b3, b4 being Morphism of (LModCat b1,b2)
for b5, b6 being Element of Morphs (LModObjects b1,b2) st b3 = b5 & b4 = b6 holds
( ( dom b4 = cod b3 implies dom b6 = cod b5 ) & ( dom b6 = cod b5 implies dom b4 = cod b3 ) & ( dom b4 = cod b3 implies [b6,b5] in dom (comp (LModObjects b1,b2)) ) & ( [b6,b5] in dom (comp (LModObjects b1,b2)) implies dom b4 = cod b3 ) & ( dom b4 = cod b3 implies b4 * b3 = b6 * b5 ) & ( dom b3 = dom b4 implies dom b5 = dom b6 ) & ( dom b5 = dom b6 implies dom b3 = dom b4 ) & ( cod b3 = cod b4 implies cod b5 = cod b6 ) & ( cod b5 = cod b6 implies cod b3 = cod b4 ) )
proof end;

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

Lemma28: for b1 being Universe
for b2 being Ring
for b3, b4, b5 being Morphism of (LModCat b1,b2) st dom b5 = cod b4 & dom b4 = cod b3 holds
b5 * (b4 * b3) = (b5 * b4) * b3
proof end;

Lemma29: for b1 being Universe
for b2 being Ring
for b3 being Object of (LModCat b1,b2) holds
( dom (id b3) = b3 & cod (id b3) = b3 & ( for b4 being Morphism of (LModCat b1,b2) st cod b4 = b3 holds
(id b3) * b4 = b4 ) & ( for b4 being Morphism of (LModCat b1,b2) st dom b4 = b3 holds
b4 * (id b3) = b4 ) )
proof end;

registration
let c1 be Universe;
let c2 be Ring;
cluster LModCat a1,a2 -> strict Category-like ;
coherence
LModCat c1,c2 is Category-like
proof end;
end;