Skip to content

Commit

Permalink
Merge pull request #68 from cdwensley/my-dev
Browse files Browse the repository at this point in the history
modified AlgebraHomomorphismByFunction
  • Loading branch information
cdwensley authored Dec 3, 2022
2 parents ece127b + 816d20a commit ab957b5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 25 deletions.
5 changes: 3 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# CHANGES to the 'XModAlg' package

## 1.22 -> 1.22dev (06/07/22)

## 1.22 -> 1.23 (03/12/22)
* (03/12/22) changed AlgebraHomomorphismByFunction to agree with FR version
and prior to the function being moved to the main GAP library

## 1.18 -> 1.22 (29/04/22)
* (27/04/22) required version 2.87 of XMod which uses Size2d in place of Size,
Expand Down
6 changes: 3 additions & 3 deletions PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ SetPackageInfo( rec(

PackageName := "XModAlg",
Subtitle := "Crossed Modules and Cat1-Algebras",
Version := "1.22dev",
Date := "06/07/2022", # dd/mm/yyyy format
Version := "1.23",
Date := "03/12/2022", # dd/mm/yyyy format
License := "GPL-2.0-or-later",

Persons := [
Expand Down Expand Up @@ -84,7 +84,7 @@ Dependencies := rec(
GAP := ">=4.11.0",
NeededOtherPackages := [ ["XMod", ">=2.87"],
["LAGUNA", ">=3.9.3"] ],
SuggestedOtherPackages := [ ], ## ["GAPDoc", ">= 1.6.1" ] ],
SuggestedOtherPackages := [ ],
ExternalConditions := [ ]
),

Expand Down
10 changes: 7 additions & 3 deletions lib/algebra.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##
#W algebra.gd The XMODALG package Zekeriya Arvasi
#W & Alper Odabas
#Y Copyright (C) 2014-2021, Zekeriya Arvasi & Alper Odabas,
#Y Copyright (C) 2014-2022, Zekeriya Arvasi & Alper Odabas,
##

DeclareInfoClass( "InfoXModAlg" );
Expand All @@ -28,8 +28,12 @@ DeclareOperation( "InclusionMappingAlgebra", [ IsAlgebra, IsAlgebra ] );
DeclareOperation( "RestrictionMappingAlgebra",
[ IsAlgebraHomomorphism, IsAlgebra, IsAlgebra ] );

DeclareOperation( "AlgebraHomomorphismByFunction",
[ IsAlgebra, IsAlgebra, IsFunction ] );
## remove this "not IsBound(...)" hack as soon as the declarations
## have been moved to the main GAP library
if not IsBound( AlgebraHomomorphismByFunction ) then
DeclareOperation( "AlgebraHomomorphismByFunction",
[ IsAlgebra, IsAlgebra, IsFunction ] );
fi;

DeclareOperation( "ModuleHomomorphism",
[ IsAlgebra, IsRing ] );
Expand Down
27 changes: 10 additions & 17 deletions lib/algebra.gi
Original file line number Diff line number Diff line change
Expand Up @@ -471,23 +471,16 @@ end);

#############################################################################
##
#F AlgebraHomomorphismByFunction( <D>, <E>, <fun> )
##
InstallMethod( AlgebraHomomorphismByFunction, "for 2 algebras and a function",
true, [ IsAlgebra, IsAlgebra, IsFunction ], 0,
function ( A,B,C )
local act,arg,narg,usage,error,fun; # mapping <map>, result
act := rec( fun := C );
ObjectifyWithAttributes( act,
NewType(GeneralMappingsFamily( ElementsFamily(FamilyObj(A)),
ElementsFamily(FamilyObj(B)) ),
IsSPMappingByFunctionRep and IsSingleValued
and IsTotal and IsAlgebraHomomorphism ),
Source, A,
Range, B );
# return the mapping
return act;
end );
#O AlgebraHomomorphismByFunction( <D>, <E>, <fun> )
##
InstallMethod( AlgebraHomomorphismByFunction,
"(XModAlg) for two algebras and a function",
[ IsAlgebra, IsAlgebra, IsFunction ],
function( S, R, f )
return Objectify( TypeOfDefaultGeneralMapping( S, R,
IsSPMappingByFunctionRep and IsAlgebraHomomorphism),
rec( fun := f ) );
end);

#############################################################################
##
Expand Down

0 comments on commit ab957b5

Please sign in to comment.