Skip to content

Commit

Permalink
Merge pull request #617 from mohamed-barakat/RationalShiftAlgebra
Browse files Browse the repository at this point in the history
d&i *RationalShiftAlgebra
  • Loading branch information
mohamed-barakat authored Nov 16, 2024
2 parents 6a88f6e + 0964d54 commit 973523c
Show file tree
Hide file tree
Showing 8 changed files with 502 additions and 4 deletions.
2 changes: 1 addition & 1 deletion MatricesForHomalg/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SetPackageInfo( rec(

PackageName := "MatricesForHomalg",
Subtitle := "Matrices for the homalg project",
Version := "2024.08-05",
Version := "2024.11-02",
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
110 changes: 110 additions & 0 deletions MatricesForHomalg/gap/HomalgRing.gd
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,32 @@ DeclareProperty( "IsLocalizedWeylRing",
DeclareProperty( "IsExteriorRing",
IsHomalgRing );

## <#GAPDoc Label="IsShiftAlgebra">
## <ManSection>
## <Prop Arg="R" Name="IsShiftAlgebra"/>
## <Returns><C>true</C> or <C>false</C></Returns>
## <Description>
## <A>R</A> is a ring for &homalg;.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareProperty( "IsShiftAlgebra",
IsHomalgRing );

## <#GAPDoc Label="IsRationalShiftAlgebra">
## <ManSection>
## <Prop Arg="R" Name="IsRationalShiftAlgebra"/>
## <Returns><C>true</C> or <C>false</C></Returns>
## <Description>
## <A>R</A> is a ring for &homalg;.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareProperty( "IsRationalShiftAlgebra",
IsHomalgRing );

## <#GAPDoc Label="IsPseudoDoubleShiftAlgebra">
## <ManSection>
## <Prop Arg="R" Name="IsPseudoDoubleShiftAlgebra"/>
Expand Down Expand Up @@ -1246,6 +1272,84 @@ DeclareAttribute( "RelativeIndeterminateAntiCommutingVariablesOfExteriorRing",
DeclareAttribute( "IndeterminatesOfExteriorRing",
IsHomalgRing );

## <#GAPDoc Label="IndeterminateCoordinatesOfShiftAlgebra">
## <ManSection>
## <Attr Arg="R" Name="IndeterminateCoordinatesOfShiftAlgebra"/>
## <Returns>a list of &homalg; ring elements</Returns>
## <Description>
## The list of indeterminate coordinates of the &homalg; shift algebra <A>R</A>.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "IndeterminateCoordinatesOfShiftAlgebra",
IsHomalgRing );

## <#GAPDoc Label="ParametersOfRationalShiftAlgebra">
## <ManSection>
## <Attr Arg="R" Name="ParametersOfRationalShiftAlgebra"/>
## <Returns>a list of &homalg; ring elements</Returns>
## <Description>
## The list of indeterminate coordinates of the &homalg; shift algebra <A>R</A>.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "ParametersOfRationalShiftAlgebra",
IsHomalgRing );

## <#GAPDoc Label="RelativeIndeterminateCoordinatesOfShiftAlgebra">
## <ManSection>
## <Attr Arg="R" Name="RelativeIndeterminateCoordinatesOfShiftAlgebra"/>
## <Returns>a list of &homalg; ring elements</Returns>
## <Description>
## The list of relative indeterminate coordinates of the &homalg; shift algebra <A>R</A>.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "RelativeIndeterminateCoordinatesOfShiftAlgebra",
IsHomalgRing );

## <#GAPDoc Label="RelativeParametersOfRationalShiftAlgebra">
## <ManSection>
## <Attr Arg="R" Name="RelativeParametersOfRationalShiftAlgebra"/>
## <Returns>a list of &homalg; ring elements</Returns>
## <Description>
## The list of relative indeterminate coordinates of the &homalg; shift algebra <A>R</A>.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "RelativeParametersOfRationalShiftAlgebra",
IsHomalgRing );

## <#GAPDoc Label="IndeterminateShiftsOfShiftAlgebra">
## <ManSection>
## <Attr Arg="R" Name="IndeterminateShiftsOfShiftAlgebra"/>
## <Returns>a list of &homalg; ring elements</Returns>
## <Description>
## The list of indeterminate shifts of the &homalg; shift algebra <A>R</A>.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "IndeterminateShiftsOfShiftAlgebra",
IsHomalgRing );

## <#GAPDoc Label="IndeterminateShiftsOfRationalShiftAlgebra">
## <ManSection>
## <Attr Arg="R" Name="IndeterminateShiftsOfRationalShiftAlgebra"/>
## <Returns>a list of &homalg; ring elements</Returns>
## <Description>
## The list of indeterminate shifts of the &homalg; shift algebra <A>R</A>.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "IndeterminateShiftsOfRationalShiftAlgebra",
IsHomalgRing );

## <#GAPDoc Label="IndeterminateCoordinatesOfPseudoDoubleShiftAlgebra">
## <ManSection>
## <Attr Arg="R" Name="IndeterminateCoordinatesOfPseudoDoubleShiftAlgebra"/>
Expand Down Expand Up @@ -1706,6 +1810,12 @@ DeclareOperation( "KoszulDualRing",
DeclareOperation( "KoszulDualRing",
[ IsHomalgRing ] );

DeclareOperation( "ShiftAlgebra",
[ IsHomalgRing, IsList ] );

DeclareOperation( "RationalShiftAlgebra",
[ IsHomalgRing, IsList ] );

DeclareOperation( "PseudoDoubleShiftAlgebra",
[ IsHomalgRing, IsList ] );

Expand Down
167 changes: 167 additions & 0 deletions MatricesForHomalg/gap/HomalgRing.gi
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,20 @@ InstallValue( CommonHomalgTableForRings,

brackets := [ "{", "}" ];

## the pseudo shift algebra:
elif HasIndeterminateShiftsOfShiftAlgebra( R ) then

var := IndeterminateShiftsOfShiftAlgebra( R );

brackets := [ "<", ">" ];

## the pseudo shift algebra:
elif HasIndeterminateShiftsOfRationalShiftAlgebra( R ) then

var := IndeterminateShiftsOfRationalShiftAlgebra( R );

brackets := [ "<", ">" ];

## the pseudo double-shift algebra:
elif HasIndeterminateShiftsOfPseudoDoubleShiftAlgebra( R ) then

Expand Down Expand Up @@ -574,6 +588,21 @@ InstallMethod( Indeterminates,

end );

##
InstallMethod( Indeterminates,
"for homalg rings",
[ IsHomalgRing and HasIndeterminateCoordinatesOfShiftAlgebra ],

function( R )

return
Concatenation(
IndeterminateCoordinatesOfShiftAlgebra( R ),
IndeterminateShiftsOfShiftAlgebra( R )
);

end );

##
InstallMethod( Indeterminates,
"for homalg rings",
Expand Down Expand Up @@ -1364,6 +1393,144 @@ InstallMethod( SetRingProperties,

end );

##
InstallMethod( SetRingProperties,
"for homalg rings",
[ IsHomalgRing and IsShiftAlgebra, IsHomalgRing and IsFreePolynomialRing, IsList ],

function( S, R, shift )
local r, b, param, paramS, var, d;

r := CoefficientsRing( R );

if HasBaseRing( R ) then
b := BaseRing( R );
else
b := r;
fi;

var := IndeterminatesOfPolynomialRing( R );
var := List( var, a -> a / S );

d := Length( var );

if d > 0 then
SetIsFinite( S, false );
fi;

SetCoefficientsRing( S, r );

if HasRationalParameters( r ) then
param := RationalParameters( r );
paramS := List( param, a -> a / S );
Perform( [ 1 .. Length( param ) ], function( i ) SetName( paramS[i], Name( param[i] ) ); end );
SetRationalParameters( S, paramS );
fi;

SetCharacteristic( S, Characteristic( R ) );

SetIsCommutative( S, shift = [ ] );

SetIndeterminateCoordinatesOfShiftAlgebra( S, var );

if HasRelativeIndeterminatesOfPolynomialRing( R ) then
SetRelativeIndeterminateCoordinatesOfShiftAlgebra(
S, RelativeIndeterminatesOfPolynomialRing( R ) );
fi;

SetIndeterminateShiftsOfShiftAlgebra( S, shift );

if d > 0 then
SetIsLeftArtinian( S, false );
SetIsRightArtinian( S, false );
fi;

SetIsLeftNoetherian( S, true );
SetIsRightNoetherian( S, true );

if HasIsIntegralDomain( r ) and IsIntegralDomain( r ) then
SetIsIntegralDomain( S, true );
fi;

if d > 0 then
SetIsLeftPrincipalIdealRing( S, false );
SetIsRightPrincipalIdealRing( S, false );
SetIsPrincipalIdealRing( S, false );
fi;

SetBasisAlgorithmRespectsPrincipalIdeals( S, true );

end );

##
InstallMethod( SetRingProperties,
"for homalg rings",
[ IsHomalgRing and IsRationalShiftAlgebra, IsHomalgRing and IsFreePolynomialRing, IsList ],

function( S, R, shift )
local r, b, param, paramS, var, d;

r := CoefficientsRing( R );

if HasBaseRing( R ) then
b := BaseRing( R );
else
b := r;
fi;

var := IndeterminatesOfPolynomialRing( R );
var := List( var, a -> a / S );

d := Length( var );

if d > 0 then
SetIsFinite( S, false );
fi;

SetCoefficientsRing( S, r );

if HasRationalParameters( r ) then
param := RationalParameters( r );
paramS := List( param, a -> a / S );
Perform( [ 1 .. Length( param ) ], function( i ) SetName( paramS[i], Name( param[i] ) ); end );
SetRationalParameters( S, paramS );
fi;

SetCharacteristic( S, Characteristic( R ) );

SetIsCommutative( S, shift = [ ] );

SetParametersOfRationalShiftAlgebra( S, var );

if HasRelativeIndeterminatesOfPolynomialRing( R ) then
SetRelativeParametersOfRationalShiftAlgebra(
S, RelativeIndeterminatesOfPolynomialRing( R ) );
fi;

SetIndeterminateShiftsOfRationalShiftAlgebra( S, shift );

if d > 0 then
SetIsLeftArtinian( S, false );
SetIsRightArtinian( S, false );
fi;

SetIsLeftNoetherian( S, true );
SetIsRightNoetherian( S, true );

if HasIsIntegralDomain( r ) and IsIntegralDomain( r ) then
SetIsIntegralDomain( S, true );
fi;

if d > 0 then
SetIsLeftPrincipalIdealRing( S, false );
SetIsRightPrincipalIdealRing( S, false );
SetIsPrincipalIdealRing( S, false );
fi;

SetBasisAlgorithmRespectsPrincipalIdeals( S, true );

end );

##
InstallMethod( SetRingProperties,
"for homalg rings",
Expand Down
4 changes: 4 additions & 0 deletions MatricesForHomalg/gap/Tools.gi
Original file line number Diff line number Diff line change
Expand Up @@ -3726,6 +3726,8 @@ InstallMethod( Coefficients,
indets := RelativeIndeterminateAntiCommutingVariablesOfExteriorRing( R );
elif HasIndeterminateAntiCommutingVariablesOfExteriorRing( R ) then
indets := IndeterminateAntiCommutingVariablesOfExteriorRing( R );
elif HasIndeterminateShiftsOfShiftAlgebra( R ) then
indets := IndeterminateShiftsOfShiftAlgebra( R );
elif HasIndeterminateShiftsOfPseudoDoubleShiftAlgebra( R ) then
indets := IndeterminateShiftsOfPseudoDoubleShiftAlgebra( R );
elif HasIndeterminateShiftsOfDoubleShiftAlgebra( R ) then
Expand Down Expand Up @@ -3804,6 +3806,8 @@ InstallMethod( Coefficients,
indets := RelativeIndeterminateAntiCommutingVariablesOfExteriorRing( R );
elif HasIndeterminateAntiCommutingVariablesOfExteriorRing( R ) then
indets := IndeterminateAntiCommutingVariablesOfExteriorRing( R );
elif HasIndeterminateShiftsOfShiftAlgebra( R ) then
indets := IndeterminateShiftsOfShiftAlgebra( R );
elif HasIndeterminateShiftsOfPseudoDoubleShiftAlgebra( R ) then
indets := IndeterminateShiftsOfPseudoDoubleShiftAlgebra( R );
elif HasIndeterminateShiftsOfDoubleShiftAlgebra( R ) then
Expand Down
4 changes: 2 additions & 2 deletions RingsForHomalg/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SetPackageInfo( rec(

PackageName := "RingsForHomalg",
Subtitle := "Dictionaries of external rings",
Version := "2024.06-01",
Version := "2024.11-02",
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 Expand Up @@ -207,7 +207,7 @@ PackageDoc := rec(
Dependencies := rec(
GAP := ">= 4.12.1",
NeededOtherPackages := [
[ "MatricesForHomalg", ">= 2023.08-01" ],
[ "MatricesForHomalg", ">= 2024.11-02" ],
[ "HomalgToCAS", ">= 2023.08-01" ],
[ "GaussForHomalg", ">= 2023.08-01" ],
[ "GAPDoc", ">= 1.0" ]
Expand Down
Loading

0 comments on commit 973523c

Please sign in to comment.