Skip to content

Commit f996f5c

Browse files
simplified Cartesian*UnitorInverse and Cocartesian*Unitor
1 parent 309bc9e commit f996f5c

2 files changed

Lines changed: 44 additions & 84 deletions

File tree

CartesianCategories/gap/CartesianCategoriesDerivedMethods_extra.gi

Lines changed: 22 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -86,65 +86,45 @@ end );
8686

8787
##
8888
AddDerivationToCAP( CartesianLeftUnitorInverseWithGivenDirectProduct,
89-
"CartesianLeftUnitorInverse using CartesianDiagonal and UniversalMorphismIntoTerminalObject",
90-
[ [ DirectProduct, 1 ],
91-
[ TerminalObject, 1 ],
92-
[ CartesianDiagonalWithGivenCartesianPower, 1 ],
89+
"CartesianLeftUnitorInverse using UniversalMorphismIntoTerminalObject and UniversalMorphismIntoDirectProduct",
90+
[ [ TerminalObject, 1 ],
9391
[ UniversalMorphismIntoTerminalObjectWithGivenTerminalObject, 1 ],
94-
[ DirectProductOnMorphismAndObjectWithGivenDirectProducts, 1 ],
95-
[ PreCompose, 1 ] ],
92+
[ IdentityMorphism, 1 ],
93+
[ UniversalMorphismIntoDirectProductWithGivenDirectProduct, 1 ] ],
9694

9795
function( cat, a, txa )
98-
local L, axa, t;
99-
100-
L := ListWithIdenticalEntries( 2, a );
101-
102-
axa := DirectProduct( cat, L );
96+
local t;
10397

10498
t := TerminalObject( cat );
10599

106-
return PreCompose( cat,
107-
CartesianDiagonalWithGivenCartesianPower( cat,
108-
a,
109-
2,
110-
axa ),
111-
DirectProductOnMorphismAndObjectWithGivenDirectProducts( cat,
112-
axa,
113-
UniversalMorphismIntoTerminalObjectWithGivenTerminalObject( cat, a, t ),
114-
a,
115-
txa ) );
100+
return UniversalMorphismIntoDirectProductWithGivenDirectProduct( cat,
101+
[ t, a ],
102+
a,
103+
[ UniversalMorphismIntoTerminalObjectWithGivenTerminalObject( cat, a, t ),
104+
IdentityMorphism( cat, a ) ],
105+
txa );
116106

117107
end );
118108

119109
##
120110
AddDerivationToCAP( CartesianRightUnitorInverseWithGivenDirectProduct,
121-
"CartesianRightUnitorInverse using CartesianDiagonal and UniversalMorphismIntoTerminalObject",
122-
[ [ DirectProduct, 1 ],
123-
[ TerminalObject, 1 ],
124-
[ CartesianDiagonalWithGivenCartesianPower, 1 ],
111+
"CartesianRightUnitorInverse using UniversalMorphismIntoTerminalObject and UniversalMorphismIntoDirectProduct",
112+
[ [ TerminalObject, 1 ],
113+
[ IdentityMorphism, 1 ],
125114
[ UniversalMorphismIntoTerminalObjectWithGivenTerminalObject, 1 ],
126-
[ DirectProductOnObjectAndMorphismWithGivenDirectProducts, 1 ],
127-
[ PreCompose, 1 ] ],
115+
[ UniversalMorphismIntoDirectProductWithGivenDirectProduct, 1 ] ],
128116

129117
function( cat, a, axt )
130-
local L, axa, t;
131-
132-
L := ListWithIdenticalEntries( 2, a );
133-
134-
axa := DirectProduct( cat, L );
118+
local t;
135119

136120
t := TerminalObject( cat );
137121

138-
return PreCompose( cat,
139-
CartesianDiagonalWithGivenCartesianPower( cat,
140-
a,
141-
2,
142-
axa ),
143-
DirectProductOnObjectAndMorphismWithGivenDirectProducts( cat,
144-
axa,
145-
a,
146-
UniversalMorphismIntoTerminalObjectWithGivenTerminalObject( cat, a, t ),
147-
axt ) );
122+
return UniversalMorphismIntoDirectProductWithGivenDirectProduct( cat,
123+
[ a, t ],
124+
a,
125+
[ IdentityMorphism( cat, a ),
126+
UniversalMorphismIntoTerminalObjectWithGivenTerminalObject( cat, a, t ) ],
127+
axt );
148128

149129
end );
150130

CartesianCategories/gap/CocartesianCategoriesDerivedMethods_extra.gi

Lines changed: 22 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -86,65 +86,45 @@ end );
8686

8787
##
8888
AddDerivationToCAP( CocartesianLeftUnitorWithGivenCoproduct,
89-
"CocartesianLeftUnitor using CocartesianCodiagonal and UniversalMorphismIntoInitialObject",
90-
[ [ Coproduct, 1 ],
91-
[ InitialObject, 1 ],
92-
[ CocartesianCodiagonalWithGivenCocartesianMultiple, 1 ],
89+
"CocartesianLeftUnitor using UniversalMorphismIntoInitialObject and UniversalMorphismFromCoproduct",
90+
[ [ InitialObject, 1 ],
9391
[ UniversalMorphismFromInitialObjectWithGivenInitialObject, 1 ],
94-
[ CoproductOnMorphismAndObjectWithGivenCoproducts, 1 ],
95-
[ PreCompose, 1 ] ],
92+
[ IdentityMorphism, 1 ],
93+
[ UniversalMorphismFromCoproductWithGivenCoproduct, 1 ] ],
9694

9795
function( cat, a, ixa )
98-
local L, axa, i;
99-
100-
L := ListWithIdenticalEntries( 2, a );
101-
102-
axa := Coproduct( cat, L );
96+
local i;
10397

10498
i := InitialObject( cat );
10599

106-
return PreCompose( cat,
107-
CoproductOnMorphismAndObjectWithGivenCoproducts( cat,
108-
ixa,
109-
UniversalMorphismFromInitialObjectWithGivenInitialObject( cat, a, i ),
110-
a,
111-
axa ),
112-
CocartesianCodiagonalWithGivenCocartesianMultiple( cat,
113-
a,
114-
2,
115-
axa ) );
100+
return UniversalMorphismFromCoproductWithGivenCoproduct( cat,
101+
[ i, a ],
102+
a,
103+
[ UniversalMorphismFromInitialObjectWithGivenInitialObject( cat, a, i ),
104+
IdentityMorphism( cat, a ) ],
105+
ixa );
116106

117107
end );
118108

119109
##
120110
AddDerivationToCAP( CocartesianRightUnitorWithGivenCoproduct,
121-
"CocartesianRightUnitor using CocartesianCodiagonal and UniversalMorphismIntoInitialObject",
122-
[ [ Coproduct, 1 ],
123-
[ InitialObject, 1 ],
124-
[ CocartesianCodiagonalWithGivenCocartesianMultiple, 1 ],
111+
"CocartesianRightUnitor using UniversalMorphismIntoInitialObject and UniversalMorphismFromCoproduct",
112+
[ [ InitialObject, 1 ],
113+
[ IdentityMorphism, 1 ],
125114
[ UniversalMorphismFromInitialObjectWithGivenInitialObject, 1 ],
126-
[ CoproductOnObjectAndMorphismWithGivenCoproducts, 1 ],
127-
[ PreCompose, 1 ] ],
115+
[ UniversalMorphismFromCoproductWithGivenCoproduct, 1 ] ],
128116

129117
function( cat, a, axi )
130-
local L, axa, i;
131-
132-
L := ListWithIdenticalEntries( 2, a );
133-
134-
axa := Coproduct( cat, L );
118+
local i;
135119

136120
i := InitialObject( cat );
137121

138-
return PreCompose( cat,
139-
CoproductOnObjectAndMorphismWithGivenCoproducts( cat,
140-
axi,
141-
a,
142-
UniversalMorphismFromInitialObjectWithGivenInitialObject( cat, a, i ),
143-
axa ),
144-
CocartesianCodiagonalWithGivenCocartesianMultiple( cat,
145-
a,
146-
2,
147-
axa ) );
122+
return UniversalMorphismFromCoproductWithGivenCoproduct( cat,
123+
[ a, i ],
124+
a,
125+
[ IdentityMorphism( cat, a ),
126+
UniversalMorphismFromInitialObjectWithGivenInitialObject( cat, a, i ) ],
127+
axi );
148128

149129
end );
150130

0 commit comments

Comments
 (0)