:: RINGCAT1 semantic presentation

definition
let c1, c2 be non empty doubleLoopStr ;
let c3 be Function of c1,c2;
canceled;
attr a3 is linear means :Def2: :: RINGCAT1:def 2
( ( for b1, b2 being Scalar of a1 holds a3 . (b1 + b2) = (a3 . b1) + (a3 . b2) ) & ( for b1, b2 being Scalar of a1 holds a3 . (b1 * b2) = (a3 . b1) * (a3 . b2) ) & a3 . (1. a1) = 1. a2 );
end;

:: deftheorem Def1 RINGCAT1:def 1 :
canceled;

:: deftheorem Def2 defines linear RINGCAT1:def 2 :
for b1, b2 being non empty doubleLoopStr
for b3 being Function of b1,b2 holds
( b3 is linear iff ( ( for b4, b5 being Scalar of b1 holds b3 . (b4 + b5) = (b3 . b4) + (b3 . b5) ) & ( for b4, b5 being Scalar of b1 holds b3 . (b4 * b5) = (b3 . b4) * (b3 . b5) ) & b3 . (1. b1) = 1. b2 ) );

theorem Th1: :: RINGCAT1:1
canceled;

theorem Th2: :: RINGCAT1:2
canceled;

theorem Th3: :: RINGCAT1:3
for b1, b2, b3 being non empty doubleLoopStr
for b4 being Function of b1,b2
for b5 being Function of b2,b3 st b4 is linear & b5 is linear holds
b5 * b4 is linear
proof end;

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

definition
let c1 be RingMorphismStr ;
func dom c1 -> Ring equals :: RINGCAT1:def 3
the Dom of a1;
coherence
the Dom of c1 is Ring
;
func cod c1 -> Ring equals :: RINGCAT1:def 4
the Cod of a1;
coherence
the Cod of c1 is Ring
;
func fun c1 -> Function of the Dom of a1,the Cod of a1 equals :: RINGCAT1:def 5
the Fun of a1;
coherence
the Fun of c1 is Function of the Dom of c1,the Cod of c1
;
end;

:: deftheorem Def3 defines dom RINGCAT1:def 3 :
for b1 being RingMorphismStr holds dom b1 = the Dom of b1;

:: deftheorem Def4 defines cod RINGCAT1:def 4 :
for b1 being RingMorphismStr holds cod b1 = the Cod of b1;

:: deftheorem Def5 defines fun RINGCAT1:def 5 :
for b1 being RingMorphismStr holds fun b1 = the Fun of b1;

Lemma3: for b1 being non empty doubleLoopStr holds id b1 is linear
proof end;

registration
let c1 be non empty doubleLoopStr ;
cluster id a1 -> linear ;
coherence
id c1 is linear
by Lemma3;
end;

definition
let c1 be RingMorphismStr ;
attr a1 is RingMorphism-like means :Def6: :: RINGCAT1:def 6
fun a1 is linear;
end;

:: deftheorem Def6 defines RingMorphism-like RINGCAT1:def 6 :
for b1 being RingMorphismStr holds
( b1 is RingMorphism-like iff fun b1 is linear );

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

definition
mode RingMorphism is RingMorphism-like RingMorphismStr ;
end;

definition
let c1 be Ring;
func ID c1 -> RingMorphism equals :: RINGCAT1:def 7
RingMorphismStr(# a1,a1,(id a1) #);
coherence
RingMorphismStr(# c1,c1,(id c1) #) is RingMorphism
proof end;
end;

:: deftheorem Def7 defines ID RINGCAT1:def 7 :
for b1 being Ring holds ID b1 = RingMorphismStr(# b1,b1,(id b1) #);

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

definition
let c1, c2 be Ring;
pred c1 <= c2 means :Def8: :: RINGCAT1:def 8
ex b1 being RingMorphism st
( dom b1 = a1 & cod b1 = a2 );
reflexivity
for b1 being Ring ex b2 being RingMorphism st
( dom b2 = b1 & cod b2 = b1 )
proof end;
end;

:: deftheorem Def8 defines <= RINGCAT1:def 8 :
for b1, b2 being Ring holds
( b1 <= b2 iff ex b3 being RingMorphism st
( dom b3 = b1 & cod b3 = b2 ) );

Lemma6: for b1 being RingMorphism holds RingMorphismStr(# the Dom of b1,the Cod of b1,the Fun of b1 #) is RingMorphism-like
proof end;

definition
let c1, c2 be Ring;
assume E7: c1 <= c2 ;
mode Morphism of c1,c2 -> strict RingMorphism means :Def9: :: RINGCAT1:def 9
( dom a3 = a1 & cod a3 = a2 );
existence
ex b1 being strict RingMorphism st
( dom b1 = c1 & cod b1 = c2 )
proof end;
end;

:: deftheorem Def9 defines Morphism RINGCAT1:def 9 :
for b1, b2 being Ring st b1 <= b2 holds
for b3 being strict RingMorphism holds
( b3 is Morphism of b1,b2 iff ( dom b3 = b1 & cod b3 = b2 ) );

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

definition
let c1 be Ring;
redefine func ID as ID c1 -> strict Morphism of a1,a1;
coherence
ID c1 is strict Morphism of c1,c1
proof end;
end;

Lemma8: for b1 being RingMorphism holds the Fun of b1 is linear
proof end;

Lemma9: for b1, b2 being Ring
for b3 being strict RingMorphismStr st dom b3 = b1 & cod b3 = b2 & fun b3 is linear holds
b3 is Morphism of b1,b2
proof end;

Lemma10: for b1, b2 being Ring
for b3 being Function of b1,b2 st b3 is linear holds
RingMorphismStr(# b1,b2,b3 #) is Morphism of b1,b2
proof end;

Lemma11: for b1 being RingMorphism ex b2, b3 being Ring st
( b2 <= b3 & dom b1 = b2 & cod b1 = b3 & RingMorphismStr(# the Dom of b1,the Cod of b1,the Fun of b1 #) is Morphism of b2,b3 )
proof end;

theorem Th4: :: RINGCAT1:4
canceled;

theorem Th5: :: RINGCAT1:5
for b1, b2 being RingMorphism st dom b1 = cod b2 holds
ex b3, b4, b5 being Ring st
( b3 <= b4 & b4 <= b5 & RingMorphismStr(# the Dom of b1,the Cod of b1,the Fun of b1 #) is Morphism of b4,b5 & RingMorphismStr(# the Dom of b2,the Cod of b2,the Fun of b2 #) is Morphism of b3,b4 )
proof end;

theorem Th6: :: RINGCAT1:6
for b1 being strict RingMorphism holds
( b1 is Morphism of dom b1, cod b1 & dom b1 <= cod b1 )
proof end;

Lemma14: for b1, b2 being Ring
for b3 being Morphism of b1,b2 st b1 <= b2 holds
ex b4 being Function of b1,b2 st
( b3 = RingMorphismStr(# b1,b2,b4 #) & b4 is linear )
proof end;

Lemma15: for b1, b2 being Ring
for b3 being Morphism of b1,b2 st b1 <= b2 holds
ex b4 being Function of b1,b2 st b3 = RingMorphismStr(# b1,b2,b4 #)
proof end;

theorem Th7: :: RINGCAT1:7
for b1 being strict RingMorphism ex b2, b3 being Ringex b4 being Function of b2,b3 st
( b1 is Morphism of b2,b3 & b1 = RingMorphismStr(# b2,b3,b4 #) & b4 is linear )
proof end;

definition
let c1, c2 be RingMorphism;
assume E16: dom c1 = cod c2 ;
func c1 * c2 -> strict RingMorphism means :Def10: :: RINGCAT1:def 10
for b1, b2, b3 being Ring
for b4 being Function of b2,b3
for b5 being Function of b1,b2 st RingMorphismStr(# the Dom of a1,the Cod of a1,the Fun of a1 #) = RingMorphismStr(# b2,b3,b4 #) & RingMorphismStr(# the Dom of a2,the Cod of a2,the Fun of a2 #) = RingMorphismStr(# b1,b2,b5 #) holds
a3 = RingMorphismStr(# b1,b3,(b4 * b5) #);
existence
ex b1 being strict RingMorphism st
for b2, b3, b4 being Ring
for b5 being Function of b3,b4
for b6 being Function of b2,b3 st RingMorphismStr(# the Dom of c1,the Cod of c1,the Fun of c1 #) = RingMorphismStr(# b3,b4,b5 #) & RingMorphismStr(# the Dom of c2,the Cod of c2,the Fun of c2 #) = RingMorphismStr(# b2,b3,b6 #) holds
b1 = RingMorphismStr(# b2,b4,(b5 * b6) #)
proof end;
uniqueness
for b1, b2 being strict RingMorphism st ( for b3, b4, b5 being Ring
for b6 being Function of b4,b5
for b7 being Function of b3,b4 st RingMorphismStr(# the Dom of c1,the Cod of c1,the Fun of c1 #) = RingMorphismStr(# b4,b5,b6 #) & RingMorphismStr(# the Dom of c2,the Cod of c2,the Fun of c2 #) = RingMorphismStr(# b3,b4,b7 #) holds
b1 = RingMorphismStr(# b3,b5,(b6 * b7) #) ) & ( for b3, b4, b5 being Ring
for b6 being Function of b4,b5
for b7 being Function of b3,b4 st RingMorphismStr(# the Dom of c1,the Cod of c1,the Fun of c1 #) = RingMorphismStr(# b4,b5,b6 #) & RingMorphismStr(# the Dom of c2,the Cod of c2,the Fun of c2 #) = RingMorphismStr(# b3,b4,b7 #) holds
b2 = RingMorphismStr(# b3,b5,(b6 * b7) #) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def10 defines * RINGCAT1:def 10 :
for b1, b2 being RingMorphism st dom b1 = cod b2 holds
for b3 being strict RingMorphism holds
( b3 = b1 * b2 iff for b4, b5, b6 being Ring
for b7 being Function of b5,b6
for b8 being Function of b4,b5 st RingMorphismStr(# the Dom of b1,the Cod of b1,the Fun of b1 #) = RingMorphismStr(# b5,b6,b7 #) & RingMorphismStr(# the Dom of b2,the Cod of b2,the Fun of b2 #) = RingMorphismStr(# b4,b5,b8 #) holds
b3 = RingMorphismStr(# b4,b6,(b7 * b8) #) );

theorem Th8: :: RINGCAT1:8
for b1, b2, b3 being Ring st b1 <= b2 & b2 <= b3 holds
b1 <= b3
proof end;

theorem Th9: :: RINGCAT1:9
for b1, b2, b3 being Ring
for b4 being Morphism of b1,b2
for b5 being Morphism of b3,b1 st b3 <= b1 & b1 <= b2 holds
b4 * b5 is Morphism of b3,b2
proof end;

definition
let c1, c2, c3 be Ring;
let c4 be Morphism of c2,c3;
let c5 be Morphism of c1,c2;
assume E19: ( c1 <= c2 & c2 <= c3 ) ;
func c4 *' c5 -> strict Morphism of a1,a3 equals :Def11: :: RINGCAT1:def 11
a4 * a5;
coherence
c4 * c5 is strict Morphism of c1,c3
by E19, Th9;
end;

:: deftheorem Def11 defines *' RINGCAT1:def 11 :
for b1, b2, b3 being Ring
for b4 being Morphism of b2,b3
for b5 being Morphism of b1,b2 st b1 <= b2 & b2 <= b3 holds
b4 *' b5 = b4 * b5;

theorem Th10: :: RINGCAT1:10
for b1, b2 being strict RingMorphism st dom b2 = cod b1 holds
ex b3, b4, b5 being Ringex b6 being Function of b3,b4ex b7 being Function of b4,b5 st
( b1 = RingMorphismStr(# b3,b4,b6 #) & b2 = RingMorphismStr(# b4,b5,b7 #) & b2 * b1 = RingMorphismStr(# b3,b5,(b7 * b6) #) )
proof end;

theorem Th11: :: RINGCAT1:11
for b1, b2 being strict RingMorphism st dom b2 = cod b1 holds
( dom (b2 * b1) = dom b1 & cod (b2 * b1) = cod b2 )
proof end;

theorem Th12: :: RINGCAT1:12
for b1, b2, b3, b4 being Ring
for b5 being Morphism of b1,b2
for b6 being Morphism of b2,b3
for b7 being Morphism of b3,b4 st b1 <= b2 & b2 <= b3 & b3 <= b4 holds
b7 * (b6 * b5) = (b7 * b6) * b5
proof end;

theorem Th13: :: RINGCAT1:13
for b1, b2, b3 being strict RingMorphism st dom b3 = cod b2 & dom b2 = cod b1 holds
b3 * (b2 * b1) = (b3 * b2) * b1
proof end;

theorem Th14: :: RINGCAT1:14
for b1 being Ring holds
( dom (ID b1) = b1 & cod (ID b1) = b1 & ( for b2 being strict RingMorphism st cod b2 = b1 holds
(ID b1) * b2 = b2 ) & ( for b2 being strict RingMorphism st dom b2 = b1 holds
b2 * (ID b1) = b2 ) )
proof end;

definition
let c1 be set ;
attr a1 is Ring_DOMAIN-like means :Def12: :: RINGCAT1:def 12
for b1 being Element of a1 holds b1 is strict Ring;
end;

:: deftheorem Def12 defines Ring_DOMAIN-like RINGCAT1:def 12 :
for b1 being set holds
( b1 is Ring_DOMAIN-like iff for b2 being Element of b1 holds b2 is strict Ring );

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

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

definition
let c1 be Ring_DOMAIN;
redefine mode Element as Element of c1 -> Ring;
coherence
for b1 being Element of c1 holds b1 is Ring
by Def12;
end;

registration
let c1 be Ring_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 RingMorphism_DOMAIN-like means :Def13: :: RINGCAT1:def 13
for b1 being set st b1 in a1 holds
b1 is strict RingMorphism;
end;

:: deftheorem Def13 defines RingMorphism_DOMAIN-like RINGCAT1:def 13 :
for b1 being set holds
( b1 is RingMorphism_DOMAIN-like iff for b2 being set st b2 in b1 holds
b2 is strict RingMorphism );

registration
cluster non empty RingMorphism_DOMAIN-like set ;
existence
ex b1 being non empty set st b1 is RingMorphism_DOMAIN-like
proof end;
end;

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

definition
let c1 be RingMorphism_DOMAIN;
redefine mode Element as Element of c1 -> RingMorphism;
coherence
for b1 being Element of c1 holds b1 is RingMorphism
by Def13;
end;

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

theorem Th15: :: RINGCAT1:15
canceled;

theorem Th16: :: RINGCAT1:16
canceled;

theorem Th17: :: RINGCAT1:17
for b1 being strict RingMorphism holds {b1} is RingMorphism_DOMAIN
proof end;

definition
let c1, c2 be Ring;
mode RingMorphism_DOMAIN of c1,c2 -> RingMorphism_DOMAIN means :Def14: :: RINGCAT1:def 14
for b1 being Element of a3 holds b1 is Morphism of a1,a2;
existence
ex b1 being RingMorphism_DOMAIN st
for b2 being Element of b1 holds b2 is Morphism of c1,c2
proof end;
end;

:: deftheorem Def14 defines RingMorphism_DOMAIN RINGCAT1:def 14 :
for b1, b2 being Ring
for b3 being RingMorphism_DOMAIN holds
( b3 is RingMorphism_DOMAIN of b1,b2 iff for b4 being Element of b3 holds b4 is Morphism of b1,b2 );

theorem Th18: :: RINGCAT1:18
for b1 being non empty set
for b2, b3 being Ring holds
( b1 is RingMorphism_DOMAIN of b2,b3 iff for b4 being Element of b1 holds b4 is Morphism of b2,b3 )
proof end;

theorem Th19: :: RINGCAT1:19
for b1, b2 being Ring
for b3 being Morphism of b1,b2 holds {b3} is RingMorphism_DOMAIN of b1,b2
proof end;

definition
let c1, c2 be Ring;
assume E30: c1 <= c2 ;
func Morphs c1,c2 -> RingMorphism_DOMAIN of a1,a2 means :Def15: :: RINGCAT1:def 15
for b1 being set holds
( b1 in a3 iff b1 is Morphism of a1,a2 );
existence
ex b1 being RingMorphism_DOMAIN of c1,c2 st
for b2 being set holds
( b2 in b1 iff b2 is Morphism of c1,c2 )
proof end;
uniqueness
for b1, b2 being RingMorphism_DOMAIN of c1,c2 st ( for b3 being set holds
( b3 in b1 iff b3 is Morphism of c1,c2 ) ) & ( for b3 being set holds
( b3 in b2 iff b3 is Morphism of c1,c2 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def15 defines Morphs RINGCAT1:def 15 :
for b1, b2 being Ring st b1 <= b2 holds
for b3 being RingMorphism_DOMAIN of b1,b2 holds
( b3 = Morphs b1,b2 iff for b4 being set holds
( b4 in b3 iff b4 is Morphism of b1,b2 ) );

definition
let c1, c2 be Ring;
let c3 be RingMorphism_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 Def14;
end;

registration
let c1, c2 be Ring;
let c3 be RingMorphism_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 :Def16: :: RINGCAT1:def 16
ex b1, b2, b3, b4, b5, b6 being set st
( a1 = [[b1,b2,b3,b4],b5,b6] & ex b7 being strict Ring st
( a2 = b7 & b1 = the carrier of b7 & b2 = the add of b7 & b3 = comp b7 & b4 = the Zero of b7 & b5 = the mult of b7 & b6 = the unity of b7 ) );
end;

:: deftheorem Def16 defines GO RINGCAT1:def 16 :
for b1, b2 being set holds
( GO b1,b2 iff ex b3, b4, b5, b6, b7, b8 being set st
( b1 = [[b3,b4,b5,b6],b7,b8] & ex b9 being strict Ring st
( b2 = b9 & b3 = the carrier of b9 & b4 = the add of b9 & b5 = comp b9 & b6 = the Zero of b9 & b7 = the mult of b9 & b8 = the unity of b9 ) ) );

theorem Th20: :: RINGCAT1:20
for b1, b2, b3 being set st GO b1,b2 & GO b1,b3 holds
b2 = b3
proof end;

theorem Th21: :: RINGCAT1:21
for b1 being Universe ex b2 being set st
( b2 in b1 & GO b2, Z3 )
proof end;

definition
let c1 be Universe;
func RingObjects c1 -> set means :Def17: :: RINGCAT1:def 17
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 Def17 defines RingObjects RINGCAT1:def 17 :
for b1 being Universe
for b2 being set holds
( b2 = RingObjects b1 iff for b3 being set holds
( b3 in b2 iff ex b4 being set st
( b4 in b1 & GO b4,b3 ) ) );

theorem Th22: :: RINGCAT1:22
for b1 being Universe holds Z3 in RingObjects b1
proof end;

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

theorem Th23: :: RINGCAT1:23
for b1 being Universe
for b2 being Element of RingObjects b1 holds b2 is strict Ring
proof end;

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

definition
let c1 be Ring_DOMAIN;
func Morphs c1 -> RingMorphism_DOMAIN means :Def18: :: RINGCAT1:def 18
for b1 being set holds
( b1 in a2 iff ex b2, b3 being Element of a1 st
( b2 <= b3 & b1 is Morphism of b2,b3 ) );
existence
ex b1 being RingMorphism_DOMAIN st
for b2 being set holds
( b2 in b1 iff ex b3, b4 being Element of c1 st
( b3 <= b4 & b2 is Morphism of b3,b4 ) )
proof end;
uniqueness
for b1, b2 being RingMorphism_DOMAIN st ( for b3 being set holds
( b3 in b1 iff ex b4, b5 being Element of c1 st
( b4 <= b5 & b3 is Morphism of b4,b5 ) ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4, b5 being Element of c1 st
( b4 <= b5 & b3 is Morphism of b4,b5 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def18 defines Morphs RINGCAT1:def 18 :
for b1 being Ring_DOMAIN
for b2 being RingMorphism_DOMAIN holds
( b2 = Morphs b1 iff for b3 being set holds
( b3 in b2 iff ex b4, b5 being Element of b1 st
( b4 <= b5 & b3 is Morphism of b4,b5 ) ) );

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

definition
let c1 be Ring_DOMAIN;
let c2 be Element of c1;
func ID c2 -> strict Element of Morphs a1 equals :: RINGCAT1:def 19
ID a2;
coherence
ID c2 is strict Element of Morphs c1
by Def18;
end;

:: deftheorem Def19 defines ID RINGCAT1:def 19 :
for b1 being Ring_DOMAIN
for b2 being Element of b1 holds ID b2 = ID b2;

definition
let c1 be Ring_DOMAIN;
func dom c1 -> Function of Morphs a1,a1 means :Def20: :: RINGCAT1:def 20
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 :Def21: :: RINGCAT1:def 21
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 :Def22: :: RINGCAT1:def 22
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 Def20 defines dom RINGCAT1:def 20 :
for b1 being Ring_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 Def21 defines cod RINGCAT1:def 21 :
for b1 being Ring_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 Def22 defines ID RINGCAT1:def 22 :
for b1 being Ring_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 Th24: :: RINGCAT1:24
for b1 being Ring_DOMAIN
for b2, b3 being Element of Morphs b1 st dom b2 = cod b3 holds
ex b4, b5, b6 being Element of b1 st
( b4 <= b5 & b5 <= b6 & b2 is Morphism of b5,b6 & b3 is Morphism of b4,b5 )
proof end;

theorem Th25: :: RINGCAT1:25
for b1 being Ring_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 Ring_DOMAIN;
func comp c1 -> PartFunc of [:(Morphs a1),(Morphs a1):], Morphs a1 means :Def23: :: RINGCAT1:def 23
( ( 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 Def23 defines comp RINGCAT1:def 23 :
for b1 being Ring_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 RingCat c1 -> CatStr equals :: RINGCAT1:def 24
CatStr(# (RingObjects a1),(Morphs (RingObjects a1)),(dom (RingObjects a1)),(cod (RingObjects a1)),(comp (RingObjects a1)),(ID (RingObjects a1)) #);
coherence
CatStr(# (RingObjects c1),(Morphs (RingObjects c1)),(dom (RingObjects c1)),(cod (RingObjects c1)),(comp (RingObjects c1)),(ID (RingObjects c1)) #) is CatStr
;
end;

:: deftheorem Def24 defines RingCat RINGCAT1:def 24 :
for b1 being Universe holds RingCat b1 = CatStr(# (RingObjects b1),(Morphs (RingObjects b1)),(dom (RingObjects b1)),(cod (RingObjects b1)),(comp (RingObjects b1)),(ID (RingObjects b1)) #);

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

theorem Th26: :: RINGCAT1:26
for b1 being Universe
for b2, b3 being Morphism of (RingCat b1) holds
( [b3,b2] in dom the Comp of (RingCat b1) iff dom b3 = cod b2 )
proof end;

theorem Th27: :: RINGCAT1:27
for b1 being Universe
for b2 being Morphism of (RingCat b1)
for b3 being Element of Morphs (RingObjects b1)
for b4 being Object of (RingCat b1)
for b5 being Element of RingObjects b1 holds
( b2 is strict Element of Morphs (RingObjects b1) & b3 is Morphism of (RingCat b1) & b4 is strict Element of RingObjects b1 & b5 is Object of (RingCat b1) )
proof end;

theorem Th28: :: RINGCAT1:28
for b1 being Universe
for b2 being Object of (RingCat b1)
for b3 being Element of RingObjects b1 st b2 = b3 holds
id b2 = ID b3
proof end;

theorem Th29: :: RINGCAT1:29
for b1 being Universe
for b2 being Morphism of (RingCat b1)
for b3 being Element of Morphs (RingObjects b1) st b2 = b3 holds
( dom b2 = dom b3 & cod b2 = cod b3 )
proof end;

theorem Th30: :: RINGCAT1:30
for b1 being Universe
for b2, b3 being Morphism of (RingCat b1)
for b4, b5 being Element of Morphs (RingObjects 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 (RingObjects b1)) ) & ( [b5,b4] in dom (comp (RingObjects 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;

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

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

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

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