Skip to content

Commit

Permalink
Merge pull request #1708 from mohamed-barakat/AdditiveClosure
Browse files Browse the repository at this point in the history
fixed FreydCategoriesForCAP tests for Julia
  • Loading branch information
zickgraf authored Nov 2, 2024
2 parents 5156f9d + eb9aab2 commit e6b89d6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion 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 := "2024.10-03",
Version := "2024.10-04",
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
11 changes: 5 additions & 6 deletions FreydCategoriesForCAP/examples/AdditiveClosureKronecker.g
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,22 @@
#! @Example
LoadPackage( "FreydCategoriesForCAP", false );
#! true
Q := HomalgFieldOfRationals();
#! Q
Q := HomalgFieldOfRationals();;
R := RingAsCategory( Q );
#! RingAsCategory( Q )
A := AdditiveClosure( R );
#! AdditiveClosure( RingAsCategory( Q ) )
u := TensorUnit( A );
#! <An object in AdditiveClosure( RingAsCategory( Q ) )
#! <An object in AdditiveClosure( RingAsCategory( Q ) )\
#! defined by 1 underlying objects>
mor1 := [ [ 1 / R, 2 / R ] ] / A;
#! <A morphism in AdditiveClosure( RingAsCategory( Q ) )
#! <A morphism in AdditiveClosure( RingAsCategory( Q ) )\
#! defined by a 1 x 2 matrix of underlying morphisms>
mor2 := [ [ 3 / R, 4 / R ] ] / A;
#! <A morphism in AdditiveClosure( RingAsCategory( Q ) )
#! <A morphism in AdditiveClosure( RingAsCategory( Q ) )\
#! defined by a 1 x 2 matrix of underlying morphisms>
T := TensorProduct( mor1, mor2 );
#! <A morphism in AdditiveClosure( RingAsCategory( Q ) )
#! <A morphism in AdditiveClosure( RingAsCategory( Q ) )\
#! defined by a 1 x 4 matrix of underlying morphisms>
Display( T );
#! A 1 x 4 matrix with entries in RingAsCategory( Q )
Expand Down
35 changes: 18 additions & 17 deletions FreydCategoriesForCAP/examples/AdditiveClosureMonoidal.g
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ B := "B" / T;
AT := AdditiveClosure( T );
#! AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )
ABAA := [ A, B, A, A ] / AT;
#! <An object in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )
#! <An object in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )\
#! defined by 4 underlying objects>
BAB := [ B, A, B ] / AT;
#! <An object in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )
#! <An object in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )\
#! defined by 3 underlying objects>
AB := [ A, B ] / AT;
#! <An object in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )
#! <An object in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )\
#! defined by 2 underlying objects>
mor_AB := MorphismConstructor( A, "A -> B", B );
#! <A zero, isomorphism in TerminalCategoryWithMultipleObjects( )>
Expand All @@ -36,51 +36,52 @@ alpha := MorphismConstructor( ABAA,
[ mor_AB, id_A, mor_AB ],
[ mor_AB, id_A, mor_AB ] ],
BAB );
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )\
#! defined by a 4 x 3 matrix of underlying morphisms>
IsWellDefined( alpha );
#! true
alpha2 := TensorProduct( alpha, alpha );
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )\
#! defined by a 16 x 9 matrix of underlying morphisms>
IsWellDefined( alpha2 );
#! true
IsIsomorphism( alpha2 );
#! true
left := LeftUnitor( ABAA );
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )\
#! defined by a 4 x 4 matrix of underlying morphisms>
IsWellDefined( left );
#! true
left_inv := LeftUnitorInverse( ABAA );
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )\
#! defined by a 4 x 4 matrix of underlying morphisms>
IsOne( PreCompose( left, left_inv ) );
PreCompose( left, left_inv ) = IdentityMorphism( Source( left ) );
#! true
IsOne( PreCompose( left_inv, left ) );
PreCompose( left_inv, left ) = IdentityMorphism( Range( left ) );
#! true
right := RightUnitor( BAB );
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )\
#! defined by a 3 x 3 matrix of underlying morphisms>
IsWellDefined( right );
#! true
right_inv := RightUnitorInverse( BAB );
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )\
#! defined by a 3 x 3 matrix of underlying morphisms>
IsOne( PreCompose( right, right_inv ) );
PreCompose( right, right_inv ) = IdentityMorphism( Source( right ) );
#! true
IsOne( PreCompose( right_inv, right ) );
PreCompose( right_inv, right ) = IdentityMorphism( Range( right ) );
#! true
aslr := AssociatorLeftToRight( AB, BAB, AB );
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )\
#! defined by a 12 x 12 matrix of underlying morphisms>
IsWellDefined( aslr );
#! true
asrl := AssociatorRightToLeft( AB, BAB, AB );
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )
#! <A morphism in AdditiveClosure( TerminalCategoryWithMultipleObjects( ) )\
#! defined by a 12 x 12 matrix of underlying morphisms>
IsOne( PreCompose( aslr, asrl ) );
PreCompose( aslr, asrl ) = IdentityMorphism( Source( aslr ) );
#! true
IsOne( PreCompose( asrl, aslr ) );
PreCompose( asrl, aslr ) = IdentityMorphism( Range( aslr ) );
#! true
#! @EndExample

0 comments on commit e6b89d6

Please sign in to comment.