Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AdditiveClosuresForCAP/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "AdditiveClosuresForCAP",
Subtitle := "Additive closures for pre-additive categories",
Version := "2026.07-02",
Version := "2026.07-03",
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
License := "GPL-2.0-or-later",

Expand Down Expand Up @@ -131,7 +131,7 @@ PackageDoc := rec(

Dependencies := rec(
GAP := ">= 4.13.0",
NeededOtherPackages := [ [ "CAP", ">= 2026.07-01" ],
NeededOtherPackages := [ [ "CAP", ">= 2026.07-03" ],
[ "GradedRingForHomalg", ">= 2026.04-01" ],
[ "MonoidalCategories", ">= 2026.06-01" ],
],
Expand Down
69 changes: 35 additions & 34 deletions AdditiveClosuresForCAP/gap/AdditiveClosure.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,6 @@ InstallMethod( DisplayString,

end );

#= comment for Julia
##
InstallMethod( LaTeXOutput,
[ IsAdditiveClosureObject ],
Expand All @@ -1757,9 +1756,9 @@ InstallMethod( LaTeXOutput,
List( objs,
function( pair )
local s;
s := Concatenation( "{", LaTeXOutput( pair[ 1 ] ), "}" );
s := Concatenation( LATEX_LBRACE, LaTeXOutput( pair[ 1 ] ), LATEX_RBRACE );
if pair[ 2 ] <> 1 then
s := Concatenation( s, "^{\\oplus ", String( pair[ 2 ] ), "}" );
s := Concatenation( s, "^", LATEX_LBRACE, "\\oplus ", String( pair[ 2 ] ), LATEX_RBRACE );
fi;
return s;
end ),
Expand All @@ -1771,37 +1770,39 @@ end );
##
InstallMethod( LaTeXOutput,
[ IsAdditiveClosureMorphism ],

function( morphism )
local matrix, str;

matrix := MorphismMatrix( morphism );

if ForAny( List( [ Source( morphism ), Range( morphism ) ], ObjectList ), IsEmpty ) then
str := "\\\\";
else
str := JoinStringsWithSeparator(
List( matrix, row -> JoinStringsWithSeparator(
List( row, m -> LaTeXOutput( m : OnlyDatum := true ) ),
"\&" ) ),
"\\\\ \n"
);
fi;

str := Concatenation( "\\begin{pmatrix}", str, "\\end{pmatrix}" );

if ValueOption( "OnlyDatum" ) = true then
return str;
fi;

return Concatenation(
LaTeXOutput( Source( morphism ) ),
"\\xrightarrow{", str, "}",
LaTeXOutput( Range( morphism ) )
);

end );
# =#
FunctionWithNamedArguments(
[ [ "OnlyDatum", false ] ],
function( CAP_NAMED_ARGUMENTS, morphism )
local matrix, str;

matrix := MorphismMatrix( morphism );

if ForAny( List( [ Source( morphism ), Range( morphism ) ], ObjectList ), IsEmpty ) then
str := "\\\\";
else
str := JoinStringsWithSeparator(
List( matrix, row -> JoinStringsWithSeparator(
List( row, m -> LaTeXOutput( m : OnlyDatum := true ) ),
"&" ) ),
"\\\\ \n"
);
fi;

str := Concatenation( "\\begin", LATEX_LBRACE, "pmatrix", LATEX_RBRACE, str, "\\end", LATEX_LBRACE, "pmatrix", LATEX_RBRACE );

if CAP_NAMED_ARGUMENTS.OnlyDatum = true then
return str;
fi;

return Concatenation(
LaTeXOutput( Source( morphism ) ),
"\\xrightarrow", LATEX_LBRACE, str, LATEX_RBRACE,
LaTeXOutput( Range( morphism ) )
);

end
)
);

####################################
##
Expand Down
55 changes: 28 additions & 27 deletions AdditiveClosuresForCAP/gap/CategoryOfRows.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1493,48 +1493,49 @@ InstallMethod( DisplayString,

end );

#= comment for Julia
##
InstallMethod( LaTeXOutput,
[ IsCategoryOfRowsObject ],

function( obj )

return Concatenation( LaTeXOutput( UnderlyingRing( CapCategory( obj ) ) ), "^{1 \\times ", String( RankOfObject( obj ) ), "}" );
return Concatenation( LaTeXOutput( UnderlyingRing( CapCategory( obj ) ) ), "^", LATEX_LBRACE, "1 \\times ", String( RankOfObject( obj ) ), LATEX_RBRACE );

end );

##
InstallMethod( LaTeXOutput,
[ IsCategoryOfRowsMorphism ],

function( mor )
local matrix;

matrix := LaTeXOutput( UnderlyingMatrix( mor ) );

if ValueOption( "OnlyDatum" ) = true then

return Concatenation(
"""{\color{blue}{""",
matrix,
"""}}"""
);
FunctionWithNamedArguments(
[ [ "OnlyDatum", false ] ],
function( CAP_NAMED_ARGUMENTS, mor )
local matrix;

else
matrix := LaTeXOutput( UnderlyingMatrix( mor ) );

return Concatenation(
LaTeXOutput( Source( mor ) ),
"""{\color{blue}{\xrightarrow{""",
matrix,
"""}}}""",
LaTeXOutput( Range( mor ) )
);
if CAP_NAMED_ARGUMENTS.OnlyDatum = true then

return Concatenation(
LATEX_LBRACE, "\\color", LATEX_LBRACE, "blue", LATEX_RBRACE, LATEX_LBRACE,
matrix,
LATEX_RBRACE, LATEX_RBRACE
);

else

return Concatenation(
LaTeXOutput( Source( mor ) ),
LATEX_LBRACE, "\\color", LATEX_LBRACE, "blue", LATEX_RBRACE, LATEX_LBRACE, "\\xrightarrow", LATEX_LBRACE,
matrix,
LATEX_RBRACE, LATEX_RBRACE, LATEX_RBRACE,
LaTeXOutput( Range( mor ) )
);

fi;

fi;

end );
# =#
end
)
);

####################################
##
Expand Down
2 changes: 1 addition & 1 deletion CAP/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "CAP",
Subtitle := "Categories, Algorithms, Programming",
Version := "2026.07-02",
Version := "2026.07-03",
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
License := "GPL-2.0-or-later",

Expand Down
6 changes: 6 additions & 0 deletions CAP/gap/ToolsForCategories.gi
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
# some options should affect the whole function stack and should hence not be consumed by FunctionWithNamedArguments
BindGlobal( "CAP_INTERNAL_GLOBAL_OPTIONS", [ "no_precompiled_code" ] );

## LaTeX bracket constants: used in Concatenation to avoid transpiler { -> [ conversion in Julia
#= comment for Julia
BindGlobal( "LATEX_LBRACE", "{" );
BindGlobal( "LATEX_RBRACE", "}" );
# =#

InstallGlobalFunction( "FunctionWithNamedArguments", function ( specification, func )

Assert( 0, IsList( specification ) );
Expand Down
4 changes: 2 additions & 2 deletions FreydCategoriesForCAP/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "FreydCategoriesForCAP",
Subtitle := "Freyd categories - Formal (co)kernels for additive categories",
Version := "2026.06-04",
Version := "2026.07-01",
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
License := "GPL-2.0-or-later",

Expand Down Expand Up @@ -101,7 +101,7 @@ PackageDoc := rec(

Dependencies := rec(
GAP := ">= 4.13.0",
NeededOtherPackages := [ [ "CAP", ">= 2026.05-07" ],
NeededOtherPackages := [ [ "CAP", ">= 2026.07-03" ],
[ "MatricesForHomalg", ">= 2026.04-01" ],
[ "GradedRingForHomalg", ">= 2026.04-01" ],
[ "AdditiveClosuresForCAP", ">= 2026.06-02" ],
Expand Down
20 changes: 10 additions & 10 deletions FreydCategoriesForCAP/gap/AdelmanCategory.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,7 @@ InstallMethod( Display,
Display( CorelationMorphism( object ) );

end );
# =#

##
InstallMethod( LaTeXOutput,
Expand All @@ -1426,20 +1427,20 @@ InstallMethod( LaTeXOutput,

corel_dat := LaTeXOutput( corel : OnlyDatum := true );

m := Concatenation( """{ \color{blue}{""", m, "} }" );
m := Concatenation( LATEX_LBRACE, " \\color", LATEX_LBRACE, "blue", LATEX_RBRACE, LATEX_LBRACE, m, LATEX_RBRACE, " ", LATEX_RBRACE );

return Concatenation(
"""{ \big(""",
LATEX_LBRACE, " \\big(",
r,
"\\xrightarrow{",
"\\xrightarrow", LATEX_LBRACE,
rel_dat,
"}",
LATEX_RBRACE,
m,
"\\xrightarrow{",
"\\xrightarrow", LATEX_LBRACE,
corel_dat,
"}",
LATEX_RBRACE,
c,
"""\big)}"""
"\\big)", LATEX_RBRACE
);

end );
Expand All @@ -1454,14 +1455,13 @@ InstallMethod( LaTeXOutput,

return Concatenation(
LaTeXOutput( Source( mor ) ),
"""{\color{blue}{\xrightarrow{""",
LATEX_LBRACE, "\\color", LATEX_LBRACE, "blue", LATEX_RBRACE, LATEX_LBRACE, "\\xrightarrow", LATEX_LBRACE,
datum,
"""}}}""",
LATEX_RBRACE, LATEX_RBRACE, LATEX_RBRACE,
LaTeXOutput( Range( mor ) )
);

end );
# =#

####################################
##
Expand Down
60 changes: 31 additions & 29 deletions FreydCategoriesForCAP/gap/FreydCategory.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2000,12 +2000,11 @@ InstallMethod( DisplayString,

end );

#= comment for Julia
##
InstallMethod( LaTeXOutput,
[ IsFreydCategoryObject ],
function( object )
local rel, corel, r, m, c, rel_dat, corel_dat;
local rel, r, m, rel_dat;

rel := ObjectDatum( object );

Expand All @@ -2018,45 +2017,48 @@ InstallMethod( LaTeXOutput,
return Concatenation(
"\\big(",
r,
"\\xrightarrow{",
"\\xrightarrow", LATEX_LBRACE,
rel_dat,
"}",
LATEX_RBRACE,
m,
"\\big)_{\\mathcal{A}}"
"\\big)_", LATEX_LBRACE, "\\mathcal", LATEX_LBRACE, "A", LATEX_RBRACE, LATEX_RBRACE
);

end );

##
InstallMethod( LaTeXOutput,
[ IsFreydCategoryMorphism ],
function( mor )
local datum;

datum := LaTeXOutput( MorphismDatum( mor ) : OnlyDatum := true );

if ValueOption( "OnlyDatum" ) = true then

return Concatenation(
"""{\color{blue}{""",
datum,
"""}}"""
);
FunctionWithNamedArguments(
[ [ "OnlyDatum", false ] ],
function( CAP_NAMED_ARGUMENTS, mor )
local datum;

else
datum := LaTeXOutput( MorphismDatum( mor ) : OnlyDatum := true );

return Concatenation(
"{ \\tiny ", LaTeXOutput( Source( mor ) ), "}",
"""{\color{blue}{\xrightarrow{""",
datum,
"""}}}""",
"{ \\tiny ", LaTeXOutput( Range( mor ) ), "}"
);
if CAP_NAMED_ARGUMENTS.OnlyDatum = true then

return Concatenation(
LATEX_LBRACE, "\\color", LATEX_LBRACE, "blue", LATEX_RBRACE, LATEX_LBRACE,
datum,
LATEX_RBRACE, LATEX_RBRACE
);

else

return Concatenation(
LATEX_LBRACE, " \\tiny ", LaTeXOutput( Source( mor ) ), LATEX_RBRACE,
LATEX_LBRACE, "\\color", LATEX_LBRACE, "blue", LATEX_RBRACE, LATEX_LBRACE, "\\xrightarrow", LATEX_LBRACE,
datum,
LATEX_RBRACE, LATEX_RBRACE, LATEX_RBRACE,
LATEX_LBRACE, " \\tiny ", LaTeXOutput( Range( mor ) ), LATEX_RBRACE
);

fi;

fi;

end );
# =#
end
)
);

####################################################################################
##
Expand Down
Loading