using CapAndHomalg
LoadPackage( "GradedModulePresentationsForCAP" )
ℚ = HomalgFieldOfRationalsInSingular()
S = GradedRing( ℚ["x,y"] )
Sgrmod = GradedLeftPresentations( S )
InfoOfInstalledOperationsOfCategory( Sgrmod )
#ListPrimitivelyInstalledOperationsOfCategory( Sgrmod )
M = GradedFreeLeftPresentation( 2, S, @gap([ 1, 1 ]) )
N = GradedFreeLeftPresentation( 1, S, @gap([ 0 ]) )
mat = HomalgMatrix( "[x,y]", 2, 1, S )
Display( mat )
ϕ = GradedPresentationMorphism( M, mat, N )
IsWellDefined( ϕ )
IsMonomorphism( ϕ )
IsEpimorphism( ϕ )
ι = ImageEmbedding( ϕ )
IsMonomorphism( ι )
IsIsomorphism( ι )
coker_mod = CokernelObject( ϕ )
Display( coker_mod )
IsZero( coker_mod )
is_artinian = julia_to_gap( M -> AffineDimension( M ) <= 0 );
SetNameFunction( is_artinian, g"is_artinian" )
C = FullSubcategoryByMembershipFunction( Sgrmod, is_artinian )
CohP1 = Sgrmod / C
InfoOfInstalledOperationsOfCategory( CohP1 )
Sh = CanonicalProjection( CohP1 )
InstallFunctor( Sh, g"Sheafification" )
ψ = ApplyFunctor( Sh, ϕ )
IsMonomorphism( ψ )
IsEpimorphism( ψ )
coker_shv = CokernelObject( ψ )
IsZero( coker_shv )
ϵ = ApplyFunctor( Sh, ι )
IsIsomorphism( ϵ )