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: 418384
## Create the category of rational vector spaces

if not IsBound( VectorSpacesConstructorsLoaded ) then

  ReadPackage( "CAP", "examples/testfiles/VectorSpacesConstructors.gi" );;

fi;

vecspaces := CreateCapCategory( "vecspaces" );
ReadPackage( "CAP", "examples/testfiles/VectorSpacesAllMethods.gi" );

## create example input

A := QVectorSpace( 2 );
B := QVectorSpace( 2 );
alpha := VectorSpaceMorphism( A, [ [ 1, 1 ], [ 1, -1 ] ], A );
A := InDeductiveSystem( A );
B := InDeductiveSystem( B );
alpha := InDeductiveSystem( alpha );

## operations

# k := KernelEmbedding( alpha );

k := alpha;

P := DirectProduct( A, A );

pi := ProjectionInFactorOfDirectProduct( [ A, A ], 1 );

F := FiberProduct( k, pi );

pr := ProjectionInFactor( F, 2 );

k2 := KernelObject( pr );

P2 := DirectProduct( k2, k2, k2 );

HasIsZero( P2 );