diff --git a/PackageInfo.g b/PackageInfo.g index 2f8037a..299ba0d 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -10,7 +10,7 @@ SetPackageInfo( rec( PackageName := "GradientBasedLearningForCAP", Subtitle := "Gradient Based Learning via Category Theory", -Version := "2026.02-01", +Version := "2026.04-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", @@ -70,13 +70,13 @@ Dependencies := rec( GAP := ">= 4.13.0", NeededOtherPackages := [ [ "GAPDoc", ">= 1.5" ], - [ "CAP", ">= 2026.02-01" ], - [ "MonoidalCategories", ">= 2024.04-01" ], - [ "CartesianCategories", ">= 2024.04-01" ], - [ "ToolsForCategoricalTowers", ">= 2024.06-02" ], + [ "CAP", ">= 2026.04-02" ], + [ "MonoidalCategories", ">= 2025.12-01" ], + [ "CartesianCategories", ">= 2025.12-01" ], + [ "ToolsForCategoricalTowers", ">= 2026.04-01" ], ], SuggestedOtherPackages := [ - [ "ToolsForHigherHomologicalAlgebra", ">= 2023.01-01" ], # for 'Show'ing latex-strings + [ "ToolsForHigherHomologicalAlgebra", ">= 2026.04-01" ], # for 'Show'ing latex-strings ], ExternalConditions := [ ], ), diff --git a/examples/CategoryOfSkeletalSmoothMaps.g b/examples/CategoryOfSkeletalSmoothMaps.g index 1ff19bb..9731c04 100644 --- a/examples/CategoryOfSkeletalSmoothMaps.g +++ b/examples/CategoryOfSkeletalSmoothMaps.g @@ -14,10 +14,10 @@ Smooth := SkeletalCategoryOfSmoothMaps( ); Display( Smooth ); #! A CAP category with name SkeletalSmoothMaps: #! -#! 49 primitive operations were used to derive 93 operations for this category wh\ +#! 49 primitive operations were used to derive 92 operations for this category wh\ #! ich algorithmically +#! * IsLinearCategoryOverCommutativeSemiring #! * IsCartesianCategory -#! * IsLinearCategoryOverCommutativeRing #! * IsSymmetricMonoidalCategory #! and furthermore mathematically #! * IsStrictMonoidalCategory diff --git a/gap/CategoryOfLenses.gi b/gap/CategoryOfLenses.gi index c78b8f5..5372177 100644 --- a/gap/CategoryOfLenses.gi +++ b/gap/CategoryOfLenses.gi @@ -520,8 +520,8 @@ InstallOtherMethod( \., p3 := ProjectionInFactorOfDirectProductWithGivenDirectProduct( Smooth, [ P, P, P ], 3, P3 ); s := AdditionForMorphisms( Smooth, - MultiplyWithElementOfCommutativeRingForMorphisms( Smooth, learning_rate, p3 ), - MultiplyWithElementOfCommutativeRingForMorphisms( Smooth, momentum, p1 ) ); + MultiplyWithElementOfCommutativeSemiringForMorphisms( Smooth, learning_rate, p3 ), + MultiplyWithElementOfCommutativeSemiringForMorphisms( Smooth, momentum, p1 ) ); put := UniversalMorphismIntoDirectProductWithGivenDirectProduct( Smooth, [ P, P ], P3, [ s, AdditionForMorphisms( Smooth, p2, s ) ], P2 ); @@ -742,7 +742,7 @@ InstallOtherMethod( \., p2 := ProjectionInFactorOfDirectProductWithGivenDirectProduct( Smooth, [ P, P ], 2, P2 ); put := AdditionForMorphisms( Smooth, - p1, MultiplyWithElementOfCommutativeRingForMorphisms( Smooth, learning_rate, p2 ) ); + p1, MultiplyWithElementOfCommutativeSemiringForMorphisms( Smooth, learning_rate, p2 ) ); S := ObjectConstructor( Lenses, Pair( P, P ) ); @@ -838,8 +838,8 @@ InstallOtherMethod( \., put_1 := AdditionForMorphisms( Smooth, p1, SmoothMap( Smooth, TxP4, [ 1 ], Smooth.( 1 ) ) ); m := AdditionForMorphisms( Smooth, - MultiplyWithElementOfCommutativeRingForMorphisms( Smooth, beta_1, p2 ), - MultiplyWithElementOfCommutativeRingForMorphisms( Smooth, 1 - beta_1, p5 ) ); + MultiplyWithElementOfCommutativeSemiringForMorphisms( Smooth, beta_1, p2 ), + MultiplyWithElementOfCommutativeSemiringForMorphisms( Smooth, 1 - beta_1, p5 ) ); put_2 := m; @@ -856,9 +856,9 @@ InstallOtherMethod( \., m_hat := MultiplicationForMorphisms( Smooth, m, b ); v := AdditionForMorphisms( Smooth, - MultiplyWithElementOfCommutativeRingForMorphisms( Smooth, + MultiplyWithElementOfCommutativeSemiringForMorphisms( Smooth, beta_2, p3 ), - MultiplyWithElementOfCommutativeRingForMorphisms( Smooth, + MultiplyWithElementOfCommutativeSemiringForMorphisms( Smooth, 1 - beta_2, MultiplicationForMorphisms( Smooth, p5, p5 ) ) ); put_3 := v; @@ -888,7 +888,7 @@ InstallOtherMethod( \., DirectProductFunctorial( Smooth, ListWithIdenticalEntries( n, Smooth.Sqrt ) ) ) ), DirectProductFunctorial( Smooth, ListWithIdenticalEntries( n, Smooth.Power( -1 ) ) ) ); - s := MultiplyWithElementOfCommutativeRingForMorphisms( Smooth, learning_rate, MultiplicationForMorphisms( Smooth, s, m_hat ) ); + s := MultiplyWithElementOfCommutativeSemiringForMorphisms( Smooth, learning_rate, MultiplicationForMorphisms( Smooth, s, m_hat ) ); put_4 := AdditionForMorphisms( Smooth, p4, s ); diff --git a/gap/SkeletalCategoryOfSmoothMaps.autogen.gd b/gap/SkeletalCategoryOfSmoothMaps.autogen.gd index b862be0..49d046b 100644 --- a/gap/SkeletalCategoryOfSmoothMaps.autogen.gd +++ b/gap/SkeletalCategoryOfSmoothMaps.autogen.gd @@ -68,13 +68,12 @@ #! * #! * #! * -#! * #! * #! * #! * #! * #! * -#! * +#! * #! * #! * #! * diff --git a/gap/SkeletalCategoryOfSmoothMaps.gi b/gap/SkeletalCategoryOfSmoothMaps.gi index d95dd6d..e1ecde5 100644 --- a/gap/SkeletalCategoryOfSmoothMaps.gi +++ b/gap/SkeletalCategoryOfSmoothMaps.gi @@ -29,7 +29,7 @@ InstallGlobalFunction( SkeletalCategoryOfSmoothMaps, SetIsCartesianCategory( Smooth, true ); SetIsStrictMonoidalCategory( Smooth, true ); SetIsSymmetricMonoidalCategory( Smooth, true ); - SetIsLinearCategoryOverCommutativeRing( Smooth, true ); + SetIsLinearCategoryOverCommutativeSemiring( Smooth, true ); ## @@ -38,12 +38,12 @@ InstallGlobalFunction( SkeletalCategoryOfSmoothMaps, reals!.Name := "Reals"; # or IsFloat - reals!.RingElementFilter := IsRingElement; + reals!.SemiringElementFilter := IsRingElement; # or Float reals!.interpret_rationals_func := IdFunc; - SetCommutativeRingOfLinearCategory( Smooth, reals ); + SetCommutativeSemiringOfLinearCategory( Smooth, reals ); ## AddObjectConstructor( Smooth, @@ -311,7 +311,7 @@ InstallGlobalFunction( SkeletalCategoryOfSmoothMaps, end ); - AddMultiplyWithElementOfCommutativeRingForMorphisms( Smooth, + AddMultiplyWithElementOfCommutativeSemiringForMorphisms( Smooth, function ( Smooth, a, f ) local map, jacobian_matrix; @@ -1092,7 +1092,7 @@ InstallOtherMethod( \., s := PreComposeList( Smooth, [ SubtractionForMorphisms( Smooth, f, m ), squares, Smooth.Sum( n ) ] ); - return MultiplyWithElementOfCommutativeRingForMorphisms( Smooth, 1 / n, s ); + return MultiplyWithElementOfCommutativeSemiringForMorphisms( Smooth, 1 / n, s ); end; @@ -1365,7 +1365,7 @@ InstallOtherMethod( \., total_sum := PreComposeList( Smooth, [ diff, square, sum ] ); # return the average - return MultiplyWithElementOfCommutativeRingForMorphisms( Smooth, 1 / n, total_sum ); + return MultiplyWithElementOfCommutativeSemiringForMorphisms( Smooth, 1 / n, total_sum ); end; @@ -1486,7 +1486,7 @@ InstallOtherMethod( \., total_sum := PreCompose( Smooth, mul, Smooth.Sum( n ) ); # return the average - return MultiplyWithElementOfCommutativeRingForMorphisms( Smooth, -1 / n, total_sum ); + return MultiplyWithElementOfCommutativeSemiringForMorphisms( Smooth, -1 / n, total_sum ); end;