:: CATALG_1 semantic presentation

definition
let c1 be set ;
let c2, c3 be Function;
func c3 -MSF c1,c2 -> ManySortedFunction of a1 means :Def1: :: CATALG_1:def 1
for b1 being set st b1 in a1 holds
a4 . b1 = a3 | (a2 . b1);
existence
ex b1 being ManySortedFunction of c1 st
for b2 being set st b2 in c1 holds
b1 . b2 = c3 | (c2 . b2)
proof end;
uniqueness
for b1, b2 being ManySortedFunction of c1 st ( for b3 being set st b3 in c1 holds
b1 . b3 = c3 | (c2 . b3) ) & ( for b3 being set st b3 in c1 holds
b2 . b3 = c3 | (c2 . b3) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def1 defines -MSF CATALG_1:def 1 :
for b1 being set
for b2, b3 being Function
for b4 being ManySortedFunction of b1 holds
( b4 = b3 -MSF b1,b2 iff for b5 being set st b5 in b1 holds
b4 . b5 = b3 | (b2 . b5) );

theorem Th1: :: CATALG_1:1
for b1 being set
for b2 being ManySortedSet of b1 holds (id (Union b2)) -MSF b1,b2 = id b2
proof end;

theorem Th2: :: CATALG_1:2
for b1 being set
for b2, b3 being ManySortedSet of b1
for b4, b5 being Function st rngs (b4 -MSF b1,b2) c= b3 holds
(b5 * b4) -MSF b1,b2 = (b5 -MSF b1,b3) ** (b4 -MSF b1,b2)
proof end;

theorem Th3: :: CATALG_1:3
for b1 being Function
for b2 being set
for b3, b4 being ManySortedSet of b2 st ( for b5 being set st b5 in b2 holds
( b3 . b5 c= dom b1 & b1 .: (b3 . b5) c= b4 . b5 ) ) holds
b1 -MSF b2,b3 is ManySortedFunction of b3,b4
proof end;

theorem Th4: :: CATALG_1:4
for b1 being set
for b2 being Nat
for b3 being FinSequence holds
( b3 in b2 -tuples_on b1 iff ( len b3 = b2 & rng b3 c= b1 ) )
proof end;

theorem Th5: :: CATALG_1:5
for b1 being set
for b2 being Nat
for b3 being FinSequence of b1 holds
( b3 in b2 -tuples_on b1 iff len b3 = b2 )
proof end;

theorem Th6: :: CATALG_1:6
for b1 being set
for b2 being Nat holds b2 -tuples_on b1 c= b1 *
proof end;

E4: now
let c1, c2 be set ;
assume <*c1*> = <*c2*> ;
then <*c1*> . 1 = c2 by FINSEQ_1:57;
hence c1 = c2 by FINSEQ_1:57;
end;

theorem Th7: :: CATALG_1:7
for b1 being set
for b2 being Nat holds
( ( b2 <> 0 & b1 = {} ) iff b2 -tuples_on b1 = {} )
proof end;

theorem Th8: :: CATALG_1:8
for b1, b2 being set holds
( b2 in 1 -tuples_on b1 iff ex b3 being set st
( b3 in b1 & b2 = <*b3*> ) )
proof end;

theorem Th9: :: CATALG_1:9
for b1, b2 being set st <*b2*> in 1 -tuples_on b1 holds
b2 in b1
proof end;

theorem Th10: :: CATALG_1:10
for b1, b2 being set holds
( b2 in 2 -tuples_on b1 iff ex b3, b4 being set st
( b3 in b1 & b4 in b1 & b2 = <*b3,b4*> ) )
proof end;

theorem Th11: :: CATALG_1:11
for b1, b2, b3 being set st <*b2,b3*> in 2 -tuples_on b1 holds
( b2 in b1 & b3 in b1 )
proof end;

theorem Th12: :: CATALG_1:12
for b1, b2 being set holds
( b2 in 3 -tuples_on b1 iff ex b3, b4, b5 being set st
( b3 in b1 & b4 in b1 & b5 in b1 & b2 = <*b3,b4,b5*> ) )
proof end;

theorem Th13: :: CATALG_1:13
for b1, b2, b3, b4 being set st <*b2,b3,b4*> in 3 -tuples_on b1 holds
( b2 in b1 & b3 in b1 & b4 in b1 )
proof end;

definition
let c1 be non empty ManySortedSign ;
let c2 be MSAlgebra of c1;
canceled;
attr a2 is empty means :Def3: :: CATALG_1:def 3
the Sorts of a2 is empty-yielding;
end;

:: deftheorem Def2 CATALG_1:def 2 :
canceled;

:: deftheorem Def3 defines empty CATALG_1:def 3 :
for b1 being non empty ManySortedSign
for b2 being MSAlgebra of b1 holds
( b2 is empty iff the Sorts of b2 is empty-yielding );

registration
let c1 be non empty ManySortedSign ;
cluster non-empty -> non empty MSAlgebra of a1;
coherence
for b1 being MSAlgebra of c1 st b1 is non-empty holds
not b1 is empty
proof end;
end;

registration
let c1 be non empty non void ManySortedSign ;
let c2 be V2 ManySortedSet of the carrier of c1;
cluster FreeMSA a2 -> disjoint_valued non empty ;
coherence
FreeMSA c2 is disjoint_valued
proof end;
end;

registration
let c1 be non empty non void ManySortedSign ;
cluster strict non-empty disjoint_valued non empty MSAlgebra of a1;
existence
ex b1 being MSAlgebra of c1 st
( b1 is strict & b1 is non-empty & b1 is disjoint_valued )
proof end;
end;

registration
let c1 be non empty non void ManySortedSign ;
let c2 be non empty MSAlgebra of c1;
cluster the Sorts of a2 -> V3 ;
coherence
not the Sorts of c2 is empty-yielding
by Def3;
end;

registration
cluster non empty-yielding set ;
existence
not for b1 being Function holds b1 is empty-yielding
proof end;
end;

definition
let c1 be set ;
canceled;
func CatSign c1 -> strict ManySortedSign means :Def5: :: CATALG_1:def 5
( the carrier of a2 = [:{0},(2 -tuples_on a1):] & the OperSymbols of a2 = [:{1},(1 -tuples_on a1):] \/ [:{2},(3 -tuples_on a1):] & ( for b1 being set st b1 in a1 holds
( the Arity of a2 . [1,<*b1*>] = {} & the ResultSort of a2 . [1,<*b1*>] = [0,<*b1,b1*>] ) ) & ( for b1, b2, b3 being set st b1 in a1 & b2 in a1 & b3 in a1 holds
( the Arity of a2 . [2,<*b1,b2,b3*>] = <*[0,<*b2,b3*>],[0,<*b1,b2*>]*> & the ResultSort of a2 . [2,<*b1,b2,b3*>] = [0,<*b1,b3*>] ) ) );
existence
ex b1 being strict ManySortedSign st
( the carrier of b1 = [:{0},(2 -tuples_on c1):] & the OperSymbols of b1 = [:{1},(1 -tuples_on c1):] \/ [:{2},(3 -tuples_on c1):] & ( for b2 being set st b2 in c1 holds
( the Arity of b1 . [1,<*b2*>] = {} & the ResultSort of b1 . [1,<*b2*>] = [0,<*b2,b2*>] ) ) & ( for b2, b3, b4 being set st b2 in c1 & b3 in c1 & b4 in c1 holds
( the Arity of b1 . [2,<*b2,b3,b4*>] = <*[0,<*b3,b4*>],[0,<*b2,b3*>]*> & the ResultSort of b1 . [2,<*b2,b3,b4*>] = [0,<*b2,b4*>] ) ) )
proof end;
correctness
uniqueness
for b1, b2 being strict ManySortedSign st the carrier of b1 = [:{0},(2 -tuples_on c1):] & the OperSymbols of b1 = [:{1},(1 -tuples_on c1):] \/ [:{2},(3 -tuples_on c1):] & ( for b3 being set st b3 in c1 holds
( the Arity of b1 . [1,<*b3*>] = {} & the ResultSort of b1 . [1,<*b3*>] = [0,<*b3,b3*>] ) ) & ( for b3, b4, b5 being set st b3 in c1 & b4 in c1 & b5 in c1 holds
( the Arity of b1 . [2,<*b3,b4,b5*>] = <*[0,<*b4,b5*>],[0,<*b3,b4*>]*> & the ResultSort of b1 . [2,<*b3,b4,b5*>] = [0,<*b3,b5*>] ) ) & the carrier of b2 = [:{0},(2 -tuples_on c1):] & the OperSymbols of b2 = [:{1},(1 -tuples_on c1):] \/ [:{2},(3 -tuples_on c1):] & ( for b3 being set st b3 in c1 holds
( the Arity of b2 . [1,<*b3*>] = {} & the ResultSort of b2 . [1,<*b3*>] = [0,<*b3,b3*>] ) ) & ( for b3, b4, b5 being set st b3 in c1 & b4 in c1 & b5 in c1 holds
( the Arity of b2 . [2,<*b3,b4,b5*>] = <*[0,<*b4,b5*>],[0,<*b3,b4*>]*> & the ResultSort of b2 . [2,<*b3,b4,b5*>] = [0,<*b3,b5*>] ) ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def4 CATALG_1:def 4 :
canceled;

:: deftheorem Def5 defines CatSign CATALG_1:def 5 :
for b1 being set
for b2 being strict ManySortedSign holds
( b2 = CatSign b1 iff ( the carrier of b2 = [:{0},(2 -tuples_on b1):] & the OperSymbols of b2 = [:{1},(1 -tuples_on b1):] \/ [:{2},(3 -tuples_on b1):] & ( for b3 being set st b3 in b1 holds
( the Arity of b2 . [1,<*b3*>] = {} & the ResultSort of b2 . [1,<*b3*>] = [0,<*b3,b3*>] ) ) & ( for b3, b4, b5 being set st b3 in b1 & b4 in b1 & b5 in b1 holds
( the Arity of b2 . [2,<*b3,b4,b5*>] = <*[0,<*b4,b5*>],[0,<*b3,b4*>]*> & the ResultSort of b2 . [2,<*b3,b4,b5*>] = [0,<*b3,b5*>] ) ) ) );

registration
let c1 be set ;
cluster CatSign a1 -> strict feasible ;
coherence
CatSign c1 is feasible
proof end;
end;

registration
let c1 be non empty set ;
cluster CatSign a1 -> non empty strict non void feasible ;
coherence
( not CatSign c1 is empty & not CatSign c1 is void )
proof end;
end;

definition
mode Signature is feasible ManySortedSign ;
end;

definition
let c1 be Signature;
attr a1 is Categorial means :Def6: :: CATALG_1:def 6
ex b1 being set st
( CatSign b1 is Subsignature of a1 & the carrier of a1 = [:{0},(2 -tuples_on b1):] );
end;

:: deftheorem Def6 defines Categorial CATALG_1:def 6 :
for b1 being Signature holds
( b1 is Categorial iff ex b2 being set st
( CatSign b2 is Subsignature of b1 & the carrier of b1 = [:{0},(2 -tuples_on b2):] ) );

registration
cluster non empty Categorial -> non empty non void ManySortedSign ;
coherence
for b1 being non empty Signature st b1 is Categorial holds
not b1 is void
proof end;
end;

registration
cluster non empty strict non void Categorial ManySortedSign ;
existence
ex b1 being Signature st
( b1 is Categorial & not b1 is empty & b1 is strict )
proof end;
end;

definition
mode CatSignature is Categorial Signature;
end;

definition
let c1 be set ;
mode CatSignature of c1 -> Signature means :Def7: :: CATALG_1:def 7
( CatSign a1 is Subsignature of a2 & the carrier of a2 = [:{0},(2 -tuples_on a1):] );
existence
ex b1 being Signature st
( CatSign c1 is Subsignature of b1 & the carrier of b1 = [:{0},(2 -tuples_on c1):] )
proof end;
end;

:: deftheorem Def7 defines CatSignature CATALG_1:def 7 :
for b1 being set
for b2 being Signature holds
( b2 is CatSignature of b1 iff ( CatSign b1 is Subsignature of b2 & the carrier of b2 = [:{0},(2 -tuples_on b1):] ) );

theorem Th14: :: CATALG_1:14
for b1, b2 being set
for b3 being CatSignature of b1 st b3 is CatSignature of b2 holds
b1 = b2
proof end;

registration
let c1 be set ;
cluster -> Categorial CatSignature of a1;
coherence
for b1 being CatSignature of c1 holds b1 is Categorial
proof end;
end;

registration
let c1 be non empty set ;
cluster -> non empty non void Categorial CatSignature of a1;
coherence
for b1 being CatSignature of c1 holds not b1 is empty
proof end;
end;

registration
let c1 be set ;
cluster strict Categorial CatSignature of a1;
existence
ex b1 being CatSignature of c1 st b1 is strict
proof end;
end;

definition
let c1 be set ;
redefine func CatSign as CatSign c1 -> strict CatSignature of a1;
coherence
CatSign c1 is strict CatSignature of c1
proof end;
end;

definition
let c1 be ManySortedSign ;
func underlay c1 -> set means :Def8: :: CATALG_1:def 8
for b1 being set holds
( b1 in a2 iff ex b2 being set ex b3 being Function st
( [b2,b3] in the carrier of a1 \/ the OperSymbols of a1 & b1 in rng b3 ) );
existence
ex b1 being set st
for b2 being set holds
( b2 in b1 iff ex b3 being set ex b4 being Function st
( [b3,b4] in the carrier of c1 \/ the OperSymbols of c1 & b2 in rng b4 ) )
proof end;
uniqueness
for b1, b2 being set st ( for b3 being set holds
( b3 in b1 iff ex b4 being set ex b5 being Function st
( [b4,b5] in the carrier of c1 \/ the OperSymbols of c1 & b3 in rng b5 ) ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being set ex b5 being Function st
( [b4,b5] in the carrier of c1 \/ the OperSymbols of c1 & b3 in rng b5 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def8 defines underlay CATALG_1:def 8 :
for b1 being ManySortedSign
for b2 being set holds
( b2 = underlay b1 iff for b3 being set holds
( b3 in b2 iff ex b4 being set ex b5 being Function st
( [b4,b5] in the carrier of b1 \/ the OperSymbols of b1 & b3 in rng b5 ) ) );

theorem Th15: :: CATALG_1:15
for b1 being set holds underlay (CatSign b1) = b1
proof end;

definition
let c1 be ManySortedSign ;
attr a1 is delta-concrete means :Def9: :: CATALG_1:def 9
ex b1 being Function of NAT , NAT st
( ( for b2 being set st b2 in the carrier of a1 holds
ex b3 being Natex b4 being FinSequence st
( b2 = [b3,b4] & len b4 = b1 . b3 & [:{b3},((b1 . b3) -tuples_on (underlay a1)):] c= the carrier of a1 ) ) & ( for b2 being set st b2 in the OperSymbols of a1 holds
ex b3 being Natex b4 being FinSequence st
( b2 = [b3,b4] & len b4 = b1 . b3 & [:{b3},((b1 . b3) -tuples_on (underlay a1)):] c= the OperSymbols of a1 ) ) );
end;

:: deftheorem Def9 defines delta-concrete CATALG_1:def 9 :
for b1 being ManySortedSign holds
( b1 is delta-concrete iff ex b2 being Function of NAT , NAT st
( ( for b3 being set st b3 in the carrier of b1 holds
ex b4 being Natex b5 being FinSequence st
( b3 = [b4,b5] & len b5 = b2 . b4 & [:{b4},((b2 . b4) -tuples_on (underlay b1)):] c= the carrier of b1 ) ) & ( for b3 being set st b3 in the OperSymbols of b1 holds
ex b4 being Natex b5 being FinSequence st
( b3 = [b4,b5] & len b5 = b2 . b4 & [:{b4},((b2 . b4) -tuples_on (underlay b1)):] c= the OperSymbols of b1 ) ) ) );

registration
let c1 be set ;
cluster CatSign a1 -> strict feasible delta-concrete ;
coherence
CatSign c1 is delta-concrete
proof end;
end;

registration
cluster non empty strict non void delta-concrete ManySortedSign ;
existence
ex b1 being CatSignature st
( b1 is delta-concrete & not b1 is empty & b1 is strict )
proof end;
let c1 be set ;
cluster strict Categorial delta-concrete CatSignature of a1;
existence
ex b1 being CatSignature of c1 st
( b1 is delta-concrete & b1 is strict )
proof end;
end;

theorem Th16: :: CATALG_1:16
for b1 being delta-concrete ManySortedSign
for b2 being set st ( b2 in the carrier of b1 or b2 in the OperSymbols of b1 ) holds
ex b3 being Natex b4 being FinSequence st
( b2 = [b3,b4] & rng b4 c= underlay b1 )
proof end;

theorem Th17: :: CATALG_1:17
for b1 being delta-concrete ManySortedSign
for b2 being set
for b3, b4 being FinSequence st ( ( [b2,b3] in the carrier of b1 & [b2,b4] in the carrier of b1 ) or ( [b2,b3] in the OperSymbols of b1 & [b2,b4] in the OperSymbols of b1 ) ) holds
len b3 = len b4
proof end;

theorem Th18: :: CATALG_1:18
for b1 being delta-concrete ManySortedSign
for b2 being set
for b3, b4 being FinSequence st len b4 = len b3 & rng b4 c= underlay b1 holds
( ( [b2,b3] in the carrier of b1 implies [b2,b4] in the carrier of b1 ) & ( [b2,b3] in the OperSymbols of b1 implies [b2,b4] in the OperSymbols of b1 ) )
proof end;

theorem Th19: :: CATALG_1:19
for b1 being non empty Categorial delta-concrete Signature holds b1 is CatSignature of underlay b1
proof end;

registration
let c1 be non empty CatSignature;
let c2 be SortSymbol of c1;
cluster a2 `2 -> Relation-like Function-like ;
coherence
( c2 `2 is Relation-like & c2 `2 is Function-like )
proof end;
end;

registration
let c1 be non empty delta-concrete ManySortedSign ;
let c2 be SortSymbol of c1;
cluster a2 `2 -> Relation-like Function-like ;
coherence
( c2 `2 is Relation-like & c2 `2 is Function-like )
proof end;
end;

registration
let c1 be non void delta-concrete ManySortedSign ;
let c2 be Element of the OperSymbols of c1;
cluster a2 `2 -> Relation-like Function-like ;
coherence
( c2 `2 is Relation-like & c2 `2 is Function-like )
proof end;
end;

registration
let c1 be non empty CatSignature;
let c2 be SortSymbol of c1;
cluster a2 `2 -> Relation-like Function-like FinSequence-like ;
coherence
c2 `2 is FinSequence-like
proof end;
end;

registration
let c1 be non empty delta-concrete ManySortedSign ;
let c2 be SortSymbol of c1;
cluster a2 `2 -> Relation-like Function-like FinSequence-like ;
coherence
c2 `2 is FinSequence-like
proof end;
end;

registration
let c1 be non void delta-concrete ManySortedSign ;
let c2 be Element of the OperSymbols of c1;
cluster a2 `2 -> Relation-like Function-like FinSequence-like ;
coherence
c2 `2 is FinSequence-like
proof end;
end;

definition
let c1 be set ;
func idsym c1 -> set equals :: CATALG_1:def 10
[1,<*a1*>];
correctness
coherence
[1,<*c1*>] is set
;
;
let c2 be set ;
func homsym c1,c2 -> set equals :: CATALG_1:def 11
[0,<*a1,a2*>];
correctness
coherence
[0,<*c1,c2*>] is set
;
;
let c3 be set ;
func compsym c1,c2,c3 -> set equals :: CATALG_1:def 12
[2,<*a1,a2,a3*>];
correctness
coherence
[2,<*c1,c2,c3*>] is set
;
;
end;

:: deftheorem Def10 defines idsym CATALG_1:def 10 :
for b1 being set holds idsym b1 = [1,<*b1*>];

:: deftheorem Def11 defines homsym CATALG_1:def 11 :
for b1, b2 being set holds homsym b1,b2 = [0,<*b1,b2*>];

:: deftheorem Def12 defines compsym CATALG_1:def 12 :
for b1, b2, b3 being set holds compsym b1,b2,b3 = [2,<*b1,b2,b3*>];

theorem Th20: :: CATALG_1:20
for b1 being non empty set
for b2 being CatSignature of b1
for b3 being Element of b1 holds
( idsym b3 in the OperSymbols of b2 & ( for b4 being Element of b1 holds
( homsym b3,b4 in the carrier of b2 & ( for b5 being Element of b1 holds compsym b3,b4,b5 in the OperSymbols of b2 ) ) ) )
proof end;

definition
let c1 be non empty set ;
let c2 be Element of c1;
redefine func idsym as idsym c2 -> OperSymbol of (CatSign a1);
correctness
coherence
idsym c2 is OperSymbol of (CatSign c1)
;
by Th20;
let c3 be Element of c1;
redefine func homsym as homsym c2,c3 -> SortSymbol of (CatSign a1);
correctness
coherence
homsym c2,c3 is SortSymbol of (CatSign c1)
;
by Th20;
let c4 be Element of c1;
redefine func compsym as compsym c2,c3,c4 -> OperSymbol of (CatSign a1);
correctness
coherence
compsym c2,c3,c4 is OperSymbol of (CatSign c1)
;
by Th20;
end;

theorem Th21: :: CATALG_1:21
for b1, b2 being set st idsym b1 = idsym b2 holds
b1 = b2
proof end;

theorem Th22: :: CATALG_1:22
for b1, b2, b3, b4 being set st homsym b1,b3 = homsym b2,b4 holds
( b1 = b2 & b3 = b4 )
proof end;

theorem Th23: :: CATALG_1:23
for b1, b2, b3, b4, b5, b6 being set st compsym b1,b3,b5 = compsym b2,b4,b6 holds
( b1 = b2 & b3 = b4 & b5 = b6 )
proof end;

theorem Th24: :: CATALG_1:24
for b1 being non empty set
for b2 being CatSignature of b1
for b3 being SortSymbol of b2 ex b4, b5 being Element of b1 st b3 = homsym b4,b5
proof end;

theorem Th25: :: CATALG_1:25
for b1 being non empty set
for b2 being OperSymbol of (CatSign b1) holds
( ( b2 `1 = 1 & len (b2 `2 ) = 1 ) or ( b2 `1 = 2 & len (b2 `2 ) = 3 ) )
proof end;

theorem Th26: :: CATALG_1:26
for b1 being non empty set
for b2 being OperSymbol of (CatSign b1) st ( b2 `1 = 1 or len (b2 `2 ) = 1 ) holds
ex b3 being Element of b1 st b2 = idsym b3
proof end;

theorem Th27: :: CATALG_1:27
for b1 being non empty set
for b2 being OperSymbol of (CatSign b1) st ( b2 `1 = 2 or len (b2 `2 ) = 3 ) holds
ex b3, b4, b5 being Element of b1 st b2 = compsym b3,b4,b5
proof end;

theorem Th28: :: CATALG_1:28
for b1 being non empty set
for b2 being Element of b1 holds
( the_arity_of (idsym b2) = {} & the_result_sort_of (idsym b2) = homsym b2,b2 ) by Def5;

theorem Th29: :: CATALG_1:29
for b1 being non empty set
for b2, b3, b4 being Element of b1 holds
( the_arity_of (compsym b2,b3,b4) = <*(homsym b3,b4),(homsym b2,b3)*> & the_result_sort_of (compsym b2,b3,b4) = homsym b2,b4 ) by Def5;

definition
let c1, c2 be Category;
let c3 be Functor of c1,c2;
func Upsilon c3 -> Function of the carrier of (CatSign the Objects of a1),the carrier of (CatSign the Objects of a2) means :Def13: :: CATALG_1:def 13
for b1 being SortSymbol of (CatSign the Objects of a1) holds a4 . b1 = [0,((Obj a3) * (b1 `2 ))];
uniqueness
for b1, b2 being Function of the carrier of (CatSign the Objects of c1),the carrier of (CatSign the Objects of c2) st ( for b3 being SortSymbol of (CatSign the Objects of c1) holds b1 . b3 = [0,((Obj c3) * (b3 `2 ))] ) & ( for b3 being SortSymbol of (CatSign the Objects of c1) holds b2 . b3 = [0,((Obj c3) * (b3 `2 ))] ) holds
b1 = b2
proof end;
existence
ex b1 being Function of the carrier of (CatSign the Objects of c1),the carrier of (CatSign the Objects of c2) st
for b2 being SortSymbol of (CatSign the Objects of c1) holds b1 . b2 = [0,((Obj c3) * (b2 `2 ))]
proof end;
func Psi c3 -> Function of the OperSymbols of (CatSign the Objects of a1),the OperSymbols of (CatSign the Objects of a2) means :Def14: :: CATALG_1:def 14
for b1 being OperSymbol of (CatSign the Objects of a1) holds a4 . b1 = [(b1 `1 ),((Obj a3) * (b1 `2 ))];
uniqueness
for b1, b2 being Function of the OperSymbols of (CatSign the Objects of c1),the OperSymbols of (CatSign the Objects of c2) st ( for b3 being OperSymbol of (CatSign the Objects of c1) holds b1 . b3 = [(b3 `1 ),((Obj c3) * (b3 `2 ))] ) & ( for b3 being OperSymbol of (CatSign the Objects of c1) holds b2 . b3 = [(b3 `1 ),((Obj c3) * (b3 `2 ))] ) holds
b1 = b2
proof end;
existence
ex b1 being Function of the OperSymbols of (CatSign the Objects of c1),the OperSymbols of (CatSign the Objects of c2) st
for b2 being OperSymbol of (CatSign the Objects of c1) holds b1 . b2 = [(b2 `1 ),((Obj c3) * (b2 `2 ))]
proof end;
end;

:: deftheorem Def13 defines Upsilon CATALG_1:def 13 :
for b1, b2 being Category
for b3 being Functor of b1,b2
for b4 being Function of the carrier of (CatSign the Objects of b1),the carrier of (CatSign the Objects of b2) holds
( b4 = Upsilon b3 iff for b5 being SortSymbol of (CatSign the Objects of b1) holds b4 . b5 = [0,((Obj b3) * (b5 `2 ))] );

:: deftheorem Def14 defines Psi CATALG_1:def 14 :
for b1, b2 being Category
for b3 being Functor of b1,b2
for b4 being Function of the OperSymbols of (CatSign the Objects of b1),the OperSymbols of (CatSign the Objects of b2) holds
( b4 = Psi b3 iff for b5 being OperSymbol of (CatSign the Objects of b1) holds b4 . b5 = [(b5 `1 ),((Obj b3) * (b5 `2 ))] );

E30: now
let c1 be set ;
let c2 be Function;
assume c1 in dom c2 ;
then ( rng <*c1*> = {c1} & {c1} c= dom c2 ) by FINSEQ_1:56, ZFMISC_1:37;
then E31: dom (c2 * <*c1*>) = dom <*c1*> by RELAT_1:46
.= Seg 1 by FINSEQ_1:55 ;
then reconsider c3 = c2 * <*c1*> as FinSequence by FINSEQ_1:def 2;
( 1 in {1} & <*c1*> . 1 = c1 ) by FINSEQ_1:57, TARSKI:def 1;
then ( len c3 = 1 & c3 . 1 = c2 . c1 ) by E31, FINSEQ_1:4, FINSEQ_1:def 3, FUNCT_1:22;
hence c2 * <*c1*> = <*(c2 . c1)*> by FINSEQ_1:57;
end;

theorem Th30: :: CATALG_1:30
for b1, b2 being Category
for b3 being Functor of b1,b2
for b4, b5 being Object of b1 holds (Upsilon b3) . (homsym b4,b5) = homsym (b3 . b4),(b3 . b5)
proof end;

theorem Th31: :: CATALG_1:31
for b1, b2 being Category
for b3 being Functor of b1,b2
for b4 being Object of b1 holds (Psi b3) . (idsym b4) = idsym (b3 . b4)
proof end;

theorem Th32: :: CATALG_1:32
for b1, b2 being Category
for b3 being Functor of b1,b2
for b4, b5, b6 being Object of b1 holds (Psi b3) . (compsym b4,b5,b6) = compsym (b3 . b4),(b3 . b5),(b3 . b6)
proof end;

theorem Th33: :: CATALG_1:33
for b1, b2 being Category
for b3 being Functor of b1,b2 holds Upsilon b3, Psi b3 form_morphism_between CatSign the Objects of b1, CatSign the Objects of b2
proof end;

theorem Th34: :: CATALG_1:34
for b1 being non empty set
for b2 being MSAlgebra of CatSign b1
for b3 being Element of b1 holds Args (idsym b3),b2 = {{} }
proof end;

Lemma36: for b1 being Category
for b2 being MSAlgebra of CatSign the Objects of b1 st ( for b3, b4 being Object of b1 holds the Sorts of b2 . (homsym b3,b4) = Hom b3,b4 ) holds
for b3, b4, b5 being Object of b1 holds
( Args (compsym b3,b4,b5),b2 = product <*(Hom b4,b5),(Hom b3,b4)*> & Result (compsym b3,b4,b5),b2 = Hom b3,b5 )
proof end;

scheme :: CATALG_1:sch 1
s1{ F1() -> non empty set , F2() -> non empty set , F3( set , set ) -> set , F4( set , set , set , set , set ) -> set , F5( set ) -> set } :
ex b1 being strict MSAlgebra of CatSign F1() st
( ( for b2, b3 being Element of F1() holds the Sorts of b1 . (homsym b2,b3) = F3(b2,b3) ) & ( for b2 being Element of F1() holds (Den (idsym b2),b1) . {} = F5(b2) ) & ( for b2, b3, b4 being Element of F1()
for b5, b6 being Element of F2() st b5 in F3(b2,b3) & b6 in F3(b3,b4) holds
(Den (compsym b2,b3,b4),b1) . <*b6,b5*> = F4(b2,b3,b4,b6,b5) ) )
provided
E37: for b1, b2 being Element of F1() holds F3(b1,b2) c= F2() and
E38: for b1 being Element of F1() holds F5(b1) in F3(b1,b1) and
E39: for b1, b2, b3 being Element of F1()
for b4, b5 being Element of F2() st b4 in F3(b1,b2) & b5 in F3(b2,b3) holds
F4(b1,b2,b3,b5,b4) in F3(b1,b3)
proof end;

definition
let c1 be Category;
func MSAlg c1 -> strict MSAlgebra of CatSign the Objects of a1 means :Def15: :: CATALG_1:def 15
( ( for b1, b2 being Object of a1 holds the Sorts of a2 . (homsym b1,b2) = Hom b1,b2 ) & ( for b1 being Object of a1 holds (Den (idsym b1),a2) . {} = id b1 ) & ( for b1, b2, b3 being Object of a1
for b4, b5 being Morphism of a1 st dom b4 = b1 & cod b4 = b2 & dom b5 = b2 & cod b5 = b3 holds
(Den (compsym b1,b2,b3),a2) . <*b5,b4*> = b5 * b4 ) );
uniqueness
for b1, b2 being strict MSAlgebra of CatSign the Objects of c1 st ( for b3, b4 being Object of c1 holds the Sorts of b1 . (homsym b3,b4) = Hom b3,b4 ) & ( for b3 being Object of c1 holds (Den (idsym b3),b1) . {} = id b3 ) & ( for b3, b4, b5 being Object of c1
for b6, b7 being Morphism of c1 st dom b6 = b3 & cod b6 = b4 & dom b7 = b4 & cod b7 = b5 holds
(Den (compsym b3,b4,b5),b1) . <*b7,b6*> = b7 * b6 ) & ( for b3, b4 being Object of c1 holds the Sorts of b2 . (homsym b3,b4) = Hom b3,b4 ) & ( for b3 being Object of c1 holds (Den (idsym b3),b2) . {} = id b3 ) & ( for b3, b4, b5 being Object of c1
for b6, b7 being Morphism of c1 st dom b6 = b3 & cod b6 = b4 & dom b7 = b4 & cod b7 = b5 holds
(Den (compsym b3,b4,b5),b2) . <*b7,b6*> = b7 * b6 ) holds
b1 = b2
proof end;
correctness
existence
ex b1 being strict MSAlgebra of CatSign the Objects of c1 st
( ( for b2, b3 being Object of c1 holds the Sorts of b1 . (homsym b2,b3) = Hom b2,b3 ) & ( for b2 being Object of c1 holds (Den (idsym b2),b1) . {} = id b2 ) & ( for b2, b3, b4 being Object of c1
for b5, b6 being Morphism of c1 st dom b5 = b2 & cod b5 = b3 & dom b6 = b3 & cod b6 = b4 holds
(Den (compsym b2,b3,b4),b1) . <*b6,b5*> = b6 * b5 ) )
;
proof end;
end;

:: deftheorem Def15 defines MSAlg CATALG_1:def 15 :
for b1 being Category
for b2 being strict MSAlgebra of CatSign the Objects of b1 holds
( b2 = MSAlg b1 iff ( ( for b3, b4 being Object of b1 holds the Sorts of b2 . (homsym b3,b4) = Hom b3,b4 ) & ( for b3 being Object of b1 holds (Den (idsym b3),b2) . {} = id b3 ) & ( for b3, b4, b5 being Object of b1
for b6, b7 being Morphism of b1 st dom b6 = b3 & cod b6 = b4 & dom b7 = b4 & cod b7 = b5 holds
(Den (compsym b3,b4,b5),b2) . <*b7,b6*> = b7 * b6 ) ) );

theorem Th35: :: CATALG_1:35
canceled;

theorem Th36: :: CATALG_1:36
for b1 being Category
for b2 being Object of b1 holds Result (idsym b2),(MSAlg b1) = Hom b2,b2
proof end;

theorem Th37: :: CATALG_1:37
for b1 being Category
for b2, b3, b4 being Object of b1 holds
( Args (compsym b2,b3,b4),(MSAlg b1) = product <*(Hom b3,b4),(Hom b2,b3)*> & Result (compsym b2,b3,b4),(MSAlg b1) = Hom b2,b4 )
proof end;

registration
let c1 be Category;
cluster MSAlg a1 -> strict feasible disjoint_valued ;
coherence
( MSAlg c1 is disjoint_valued & MSAlg c1 is feasible )
proof end;
end;

theorem Th38: :: CATALG_1:38
for b1, b2 being Category
for b3 being Functor of b1,b2 holds b3 -MSF the carrier of (CatSign the Objects of b1),the Sorts of (MSAlg b1) is ManySortedFunction of (MSAlg b1),((MSAlg b2) | (CatSign the Objects of b1),(Upsilon b3),(Psi b3))
proof end;

theorem Th39: :: CATALG_1:39
for b1 being Category
for b2, b3, b4 being Object of b1
for b5 being set holds
( b5 in Args (compsym b2,b3,b4),(MSAlg b1) iff ex b6, b7 being Morphism of b1 st
( b5 = <*b6,b7*> & dom b7 = b2 & cod b7 = b3 & dom b6 = b3 & cod b6 = b4 ) )
proof end;

theorem Th40: :: CATALG_1:40
for b1, b2 being Category
for b3 being Functor of b1,b2
for b4, b5, b6 being Object of b1
for b7, b8 being Morphism of b1 st b7 in Hom b4,b5 & b8 in Hom b5,b6 holds
for b9 being Element of Args (compsym b4,b5,b6),(MSAlg b1) st b9 = <*b8,b7*> holds
for b10 being ManySortedFunction of (MSAlg b1),((MSAlg b2) | (CatSign the Objects of b1),(Upsilon b3),(Psi b3)) st b10 = b3 -MSF the carrier of (CatSign the Objects of b1),the Sorts of (MSAlg b1) holds
b10 # b9 = <*(b3 . b8),(b3 . b7)*>
proof end;

theorem Th41: :: CATALG_1:41
canceled;

theorem Th42: :: CATALG_1:42
for b1 being Category
for b2, b3, b4 being Object of b1
for b5, b6 being Morphism of b1 st b5 in Hom b2,b3 & b6 in Hom b3,b4 holds
(Den (compsym b2,b3,b4),(MSAlg b1)) . <*b6,b5*> = b6 * b5
proof end;

theorem Th43: :: CATALG_1:43
for b1 being Category
for b2, b3, b4, b5 being Object of b1
for b6, b7, b8 being Morphism of b1 st b6 in Hom b2,b3 & b7 in Hom b3,b4 & b8 in Hom b4,b5 holds
(Den (compsym b2,b4,b5),(MSAlg b1)) . <*b8,((Den (compsym b2,b3,b4),(MSAlg b1)) . <*b7,b6*>)*> = (Den (compsym b2,b3,b5),(MSAlg b1)) . <*((Den (compsym b3,b4,b5),(MSAlg b1)) . <*b8,b7*>),b6*>
proof end;

theorem Th44: :: CATALG_1:44
for b1 being Category
for b2, b3 being Object of b1
for b4 being Morphism of b1 st b4 in Hom b2,b3 holds
( (Den (compsym b2,b3,b3),(MSAlg b1)) . <*(id b3),b4*> = b4 & (Den (compsym b2,b2,b3),(MSAlg b1)) . <*b4,(id b2)*> = b4 )
proof end;

theorem Th45: :: CATALG_1:45
for b1, b2 being Category
for b3 being Functor of b1,b2 ex b4 being ManySortedFunction of (MSAlg b1),((MSAlg b2) | (CatSign the Objects of b1),(Upsilon b3),(Psi b3)) st
( b4 = b3 -MSF the carrier of (CatSign the Objects of b1),the Sorts of (MSAlg b1) & b4 is_homomorphism MSAlg b1,(MSAlg b2) | (CatSign the Objects of b1),(Upsilon b3),(Psi b3) )
proof end;