From eb9aab2d6baa9e34ff965b971a57f7d9ce28981d Mon Sep 17 00:00:00 2001 From: Mohamed Barakat Date: Tue, 29 Oct 2024 15:17:47 +0100 Subject: [PATCH] fixed FreydCategoriesForCAP tests for Julia --- FreydCategoriesForCAP/PackageInfo.g | 2 +- .../examples/AdditiveClosureKronecker.g | 11 +++--- .../examples/AdditiveClosureMonoidal.g | 35 ++++++++++--------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/FreydCategoriesForCAP/PackageInfo.g b/FreydCategoriesForCAP/PackageInfo.g index e5affdc477..383d355901 100644 --- a/FreydCategoriesForCAP/PackageInfo.g +++ b/FreydCategoriesForCAP/PackageInfo.g @@ -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", diff --git a/FreydCategoriesForCAP/examples/AdditiveClosureKronecker.g b/FreydCategoriesForCAP/examples/AdditiveClosureKronecker.g index 0d2449c138..200d9ae10a 100644 --- a/FreydCategoriesForCAP/examples/AdditiveClosureKronecker.g +++ b/FreydCategoriesForCAP/examples/AdditiveClosureKronecker.g @@ -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 ); -#! mor1 := [ [ 1 / R, 2 / R ] ] / A; -#! mor2 := [ [ 3 / R, 4 / R ] ] / A; -#! T := TensorProduct( mor1, mor2 ); -#! Display( T ); #! A 1 x 4 matrix with entries in RingAsCategory( Q ) diff --git a/FreydCategoriesForCAP/examples/AdditiveClosureMonoidal.g b/FreydCategoriesForCAP/examples/AdditiveClosureMonoidal.g index 040fa840c1..89210dc299 100644 --- a/FreydCategoriesForCAP/examples/AdditiveClosureMonoidal.g +++ b/FreydCategoriesForCAP/examples/AdditiveClosureMonoidal.g @@ -14,13 +14,13 @@ B := "B" / T; AT := AdditiveClosure( T ); #! AdditiveClosure( TerminalCategoryWithMultipleObjects( ) ) ABAA := [ A, B, A, A ] / AT; -#! BAB := [ B, A, B ] / AT; -#! AB := [ A, B ] / AT; -#! mor_AB := MorphismConstructor( A, "A -> B", B ); #! @@ -36,51 +36,52 @@ alpha := MorphismConstructor( ABAA, [ mor_AB, id_A, mor_AB ], [ mor_AB, id_A, mor_AB ] ], BAB ); -#! IsWellDefined( alpha ); #! true alpha2 := TensorProduct( alpha, alpha ); -#! IsWellDefined( alpha2 ); #! true IsIsomorphism( alpha2 ); #! true left := LeftUnitor( ABAA ); -#! IsWellDefined( left ); #! true left_inv := LeftUnitorInverse( ABAA ); -#! -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 ); -#! IsWellDefined( right ); #! true right_inv := RightUnitorInverse( BAB ); -#! -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 ); -#! IsWellDefined( aslr ); #! true asrl := AssociatorRightToLeft( AB, BAB, AB ); -#! -IsOne( PreCompose( aslr, asrl ) ); +PreCompose( aslr, asrl ) = IdentityMorphism( Source( aslr ) ); #! true -IsOne( PreCompose( asrl, aslr ) ); +PreCompose( asrl, aslr ) = IdentityMorphism( Range( aslr ) ); #! true #! @EndExample +