From a2047973a959ce4818ec050aabed7152fb717c78 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 24 Aug 2018 11:24:10 +0200 Subject: [PATCH] Turn IsDirectSumOfModules into a pure filter IsDirectSumOfModules is not a property or attribute that can be set to true or false due to a later computation; rather, it can only be set when creating an object via a special constructor. That suggests it should simply be a filter, not an attribute. This makes qpa compatible with this upcoming GAP change: --- doc/chapter_right_modules.xml | 4 ++-- lib/module.gd | 2 +- lib/module.gi | 21 +-------------------- 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/doc/chapter_right_modules.xml b/doc/chapter_right_modules.xml index 5ce03ee..e933a54 100755 --- a/doc/chapter_right_modules.xml +++ b/doc/chapter_right_modules.xml @@ -472,7 +472,7 @@ gap> N := RightModuleOverPathAlgebra(A,mat); the direct sum of the representations contained in the list L. In addition three attributes are attached to the - result, , , . @@ -540,7 +540,7 @@ gap> N := RightModuleOverPathAlgebra(A,mat); - + Arguments: M -- a path algebra module (PathAlgebraMatModule).
diff --git a/lib/module.gd b/lib/module.gd index 6aab501..b658b31 100644 --- a/lib/module.gd +++ b/lib/module.gd @@ -32,7 +32,7 @@ InstallTrueMethod( IsIndecomposableModule, IsSimpleQPAModule ); DeclareProperty( "IsSemisimpleModule", IsPathAlgebraMatModule ); InstallTrueMethod( IsSemisimpleModule, IsSimpleQPAModule ); DeclareOperation( "DirectSumOfQPAModules", [ IsList] ); -DeclareAttribute( "IsDirectSumOfModules", IsPathAlgebraMatModule ); +DeclareFilter( "IsDirectSumOfModules", IsPathAlgebraMatModule ); DeclareAttribute( "DirectSumProjections", IsPathAlgebraMatModule ); DeclareAttribute( "DirectSumInclusions", IsPathAlgebraMatModule ); DeclareOperation( "SupportModuleElement", [ IsRightAlgebraModuleElement ] ); diff --git a/lib/module.gi b/lib/module.gi index b4eb70f..0d82eaf 100644 --- a/lib/module.gi +++ b/lib/module.gi @@ -1907,7 +1907,7 @@ InstallMethod( DirectSumOfQPAModules, Add( list_of_incls, RightModuleHomOverAlgebra( L[ i ], direct_sum, maps ) ); od; - SetIsDirectSumOfModules( direct_sum, true ); + SetFilterObj( direct_sum, IsDirectSumOfModules ); SetDirectSumProjections( direct_sum, list_of_projs ); SetDirectSumInclusions( direct_sum, list_of_incls ); @@ -1919,25 +1919,6 @@ end ); -####################################################################### -## -#P IsDirectSumOfModules( ) -## -## is a module over a path algebra. The function checks if the -## property "IsDirectSumOfModules" is set to true for M, and returns -## true if it is, and false if it is not. (Note that this is NOT a -## check for indecomposability.) -## -InstallMethod( IsDirectSumOfModules, - "for a module over a path algebra", - [ IsPathAlgebraMatModule ], 0, - function( M ) - - return "IsDirectSumOfModules" in KnownTruePropertiesOfObject(M); - -end -); - ####################################################################### ## #O SupportModuleElement()