Skip to content

Commit

Permalink
Merge pull request #48 from mohamed-barakat/devel
Browse files Browse the repository at this point in the history
Clean up
  • Loading branch information
mohamed-barakat authored Oct 25, 2022
2 parents f77ea4c + 4b8c17d commit 59cc9a6
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 21 deletions.
19 changes: 14 additions & 5 deletions gap/AffineClosed.gi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
# Implementations
#

##
InstallMethod( BaseOfFibration,
"for a Zariski coframe of an affine variety",
[ IsZariskiCoframeOfAnAffineVariety ],

function( ZC )

return TerminalObject( ZC );

end );

##
InstallMethod( ClosedSubsetOfSpec,
"for a homalg matrix",
Expand Down Expand Up @@ -242,14 +253,14 @@ InstallMethod( ZariskiCoframeOfAffineSpectrum,

##
AddIsHomSetInhabited( ZariskiCoframe,
{ cat, S, T } -> IsHomSetInhabitedForCoframes( S, T ) );
{ cat, S, T } -> IsHomSetInhabitedForCoframes( cat, S, T ) );

##
if IsBound( homalgTable( R )!.CoefficientsOfUnreducedNumeratorOfWeightedHilbertPoincareSeries ) then

##
AddIsEqualForObjectsIfIsHomSetInhabited( ZariskiCoframe,
{ cat, A, B } -> IsEqualForObjectsIfIsHomSetInhabitedForCoframes( A, B ) );
{ cat, A, B } -> IsEqualForObjectsIfIsHomSetInhabitedForCoframes( cat, A, B ) );

fi;

Expand All @@ -261,7 +272,7 @@ InstallMethod( ZariskiCoframeOfAffineSpectrum,
return false;
fi;

return IsHomSetInhabited( A, B ) and IsEqualForObjectsIfIsHomSetInhabited( A, B );
return IsHomSetInhabited( cat, A, B ) and IsEqualForObjectsIfIsHomSetInhabited( cat, A, B );

end );

Expand Down Expand Up @@ -418,8 +429,6 @@ InstallMethod( ZariskiCoframeOfAffineSpectrum,

if not IsIdenticalObj( R, B ) then
SetBaseOfFibration( ZariskiCoframe, TerminalObject( ZariskiCoframeOfAffineSpectrum( B ) ) );
else
SetBaseOfFibration( ZariskiCoframe, TerminalObject( ZariskiCoframe ) );
fi;

return ZariskiCoframe;
Expand Down
19 changes: 14 additions & 5 deletions gap/AffineOpen.gi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
# Implementations
#

##
InstallMethod( BaseOfFibration,
"for a Zariski frame of an affine variety",
[ IsZariskiFrameOfAnAffineVariety ],

function( ZF )

return TerminalObject( ZF );

end );

##
InstallMethod( OpenSubsetOfSpec,
"for a homalg matrix",
Expand Down Expand Up @@ -242,14 +253,14 @@ InstallMethod( ZariskiFrameOfAffineSpectrum,

##
AddIsHomSetInhabited( ZariskiFrame,
{ cat, S, T } -> IsHomSetInhabitedForFrames( S, T ) );
{ cat, S, T } -> IsHomSetInhabitedForFrames( cat, S, T ) );

##
if IsBound( homalgTable( R )!.CoefficientsOfUnreducedNumeratorOfWeightedHilbertPoincareSeries ) then

##
AddIsEqualForObjectsIfIsHomSetInhabited( ZariskiFrame,
{ cat, A, B } -> IsEqualForObjectsIfIsHomSetInhabitedForFrames( A, B ) );
{ cat, A, B } -> IsEqualForObjectsIfIsHomSetInhabitedForFrames( cat, A, B ) );

fi;

Expand All @@ -261,7 +272,7 @@ InstallMethod( ZariskiFrameOfAffineSpectrum,
return false;
fi;

return IsHomSetInhabited( A, B ) and IsEqualForObjectsIfIsHomSetInhabited( A, B );
return IsHomSetInhabited( cat, A, B ) and IsEqualForObjectsIfIsHomSetInhabited( cat, A, B );

end );

Expand Down Expand Up @@ -418,8 +429,6 @@ InstallMethod( ZariskiFrameOfAffineSpectrum,

if not IsIdenticalObj( R, B ) then
SetBaseOfFibration( ZariskiFrame, TerminalObject( ZariskiFrameOfAffineSpectrum( B ) ) );
else
SetBaseOfFibration( ZariskiFrame, TerminalObject( ZariskiFrame ) );
fi;

ZariskiFrame!.ZariskiCoframe := ZariskiCoframeOfAffineSpectrum( R );
Expand Down
9 changes: 5 additions & 4 deletions gap/ZariskiCoframe.gi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

##
InstallGlobalFunction( IsHomSetInhabitedForCoframes,
function( S, T )
function( cat, S, T )
local irrS, irrT;

if Dimension( S ) > Dimension( T ) then
Expand All @@ -16,15 +16,15 @@ InstallGlobalFunction( IsHomSetInhabitedForCoframes,
if HasIrreducibleComponents( S ) then
irrS := IrreducibleComponents( S );
if Length( irrS ) > 1 then
return ForAll( irrS, C -> IsHomSetInhabited( C, T ) );
return ForAll( irrS, C -> IsHomSetInhabited( cat, C, T ) );
fi;
fi;

if HasIrreducibleComponents( T ) and
HasIsIrreducibleObjectInZariskiCoframe( S ) and IsIrreducibleObjectInZariskiCoframe( S ) then
irrT := IrreducibleComponents( T );
if Length( irrT ) > 1 then
return ForAny( irrT, C -> IsHomSetInhabited( S, C ) );
return ForAny( irrT, C -> IsHomSetInhabited( cat, S, C ) );
fi;
fi;

Expand All @@ -38,7 +38,7 @@ end );

##
InstallGlobalFunction( IsEqualForObjectsIfIsHomSetInhabitedForCoframes,
function( S, T )
function( cat, S, T )

if Dimension( S ) < Dimension( T ) then
return false;
Expand All @@ -47,6 +47,7 @@ InstallGlobalFunction( IsEqualForObjectsIfIsHomSetInhabitedForCoframes,
S := BestUnderlyingColumn( S );
T := BestUnderlyingColumn( T );

## needs S, T to be radical
return HilbertPoincareSeries( S ) = HilbertPoincareSeries( T );

end );
Expand Down
5 changes: 3 additions & 2 deletions gap/ZariskiFrame.gi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

##
InstallGlobalFunction( IsHomSetInhabitedForFrames,
function( S, T )
function( cat, S, T )

if HasDimensionOfComplement( S ) and HasDimensionOfComplement( T ) and
DimensionOfComplement( S ) < DimensionOfComplement( T ) then
Expand All @@ -23,11 +23,12 @@ end );

##
InstallGlobalFunction( IsEqualForObjectsIfIsHomSetInhabitedForFrames,
function( S, T )
function( cat, S, T )

S := BestUnderlyingColumn( S );
T := BestUnderlyingColumn( T );

## needs S, T to be radical
return HilbertPoincareSeries( S ) = HilbertPoincareSeries( T );

end );
Expand Down
4 changes: 4 additions & 0 deletions gap/ZariskiFrameOrCoframe.gd
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ DeclareOperation( "IsClosed",
DeclareAttribute( "UnderlyingRing",
IsObjectInZariskiFrameOrCoframe );

#!
DeclareAttribute( "BaseOfFibration",
IsZariskiFrameOrCoframe );

#!
DeclareAttribute( "BaseOfFibration",
IsObjectInZariskiFrameOrCoframe );
Expand Down
10 changes: 5 additions & 5 deletions gap/ZariskiFrameOrCoframe.gi
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ InstallMethodForCompilerForCAP( ObjectInZariskiFrameOrCoframe,

function( Z, I )

return ObjectifyObjectForCAPWithAttributes( rec( ), Z,
return CreateCapCategoryObjectWithAttributes( Z,
PreUnderlyingMatrix, I );

end );
Expand All @@ -46,7 +46,7 @@ InstallMethodForCompilerForCAP( ObjectInZariskiFrameOrCoframeByRadicalColumn,

function( Z, I )

return ObjectifyObjectForCAPWithAttributes( rec( ), Z,
return CreateCapCategoryObjectWithAttributes( Z,
UnderlyingRadicalColumn, I );

end );
Expand All @@ -58,7 +58,7 @@ InstallMethodForCompilerForCAP( ObjectInZariskiFrameOrCoframeByStandardColumn,

function( Z, I )

return ObjectifyObjectForCAPWithAttributes( rec( ), Z,
return CreateCapCategoryObjectWithAttributes( Z,
UnderlyingStandardColumn, I );

end );
Expand All @@ -83,7 +83,7 @@ InstallMethodForCompilerForCAP( ObjectInZariskiFrameOrCoframeByListOfColumns,

L := DuplicateFreeList( L );

return ObjectifyObjectForCAPWithAttributes( rec( ), Z,
return CreateCapCategoryObjectWithAttributes( Z,
UnderlyingListOfColumns, L );

end );
Expand All @@ -108,7 +108,7 @@ InstallMethodForCompilerForCAP( ObjectInZariskiFrameOrCoframeByListOfRadicalColu

L := DuplicateFreeList( L );

return ObjectifyObjectForCAPWithAttributes( rec( ), Z,
return CreateCapCategoryObjectWithAttributes( Z,
UnderlyingListOfRadicalColumns, L );

end );
Expand Down

0 comments on commit 59cc9a6

Please sign in to comment.