CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418346
#! @Chapter Examples and Tests

#! @Section Intersection of Submodules

LoadPackage( "ModulePresentationsForCAP" );

LoadPackage( "RingsForHomalg" );

#! @Example
Q := HomalgFieldOfRationalsInSingular();;
R := Q * "x,y";
#! Q[x,y]
F := AsLeftPresentation( HomalgMatrix( [ [ 0 ] ], R ) );
#! <An object in Category of left presentations of Q[x,y]>
I1 := AsLeftPresentation( HomalgMatrix( [ [ "x" ] ], R ) );;
I2 := AsLeftPresentation( HomalgMatrix( [ [ "y" ] ], R ) );;
Display( I1 );
#! x
#! 
#! An object in Category of left presentations of Q[x,y]
Display( I2 );
#! y
#! 
#! An object in Category of left presentations of Q[x,y]
eps1 := PresentationMorphism( F, HomalgMatrix( [ [ 1 ] ], R ), I1 );
#! <A morphism in Category of left presentations of Q[x,y]>
eps2 := PresentationMorphism( F, HomalgMatrix( [ [ 1 ] ], R ), I2 );
#! <A morphism in Category of left presentations of Q[x,y]>
kernelemb1 := KernelEmbedding( eps1 );
#! <A monomorphism in Category of left presentations of Q[x,y]>
kernelemb2 := KernelEmbedding( eps2 );
#! <A monomorphism in Category of left presentations of Q[x,y]>
P := FiberProduct( kernelemb1, kernelemb2 );;
Display( P );
#! (an empty 0 x 1 matrix)
#! 
#! An object in Category of left presentations of Q[x,y]
pi1 := ProjectionInFactorOfFiberProduct( [ kernelemb1, kernelemb2 ], 1 );
#! <A monomorphism in Category of left presentations of Q[x,y]>
composite := PreCompose( pi1, kernelemb1 );
#! <A monomorphism in Category of left presentations of Q[x,y]>
Display( composite );
#! x*y
#! 
#! A monomorphism in Category of left presentations of Q[x,y]
#! @EndExample