Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Ind

### 3 Example on additive closure

#### 3.1 Using matrix data structures

gap> QQ := HomalgFieldOfRationalsInSingular();;
gap> R := QQ * "x,y,z";;
gap> rows := CategoryOfRowsAsAdditiveClosureOfRingAsCategory( R );;
gap> M := HomalgMatrix( "[[x^2,4*y]]", 1, 2, R );;
gap> N := HomalgMatrix( "[[1,3*x], [2*y^3,5*y]]", 2, 2, R );;
gap> P := M * N;;
gap> o := CategoryOfRowsObject( rows, 1 );;
gap> A := o;;
gap> B := DirectSum( o, o );;
gap> alpha := CategoryOfRowsMorphism( rows, A, M, B );;
gap> IsWellDefined( alpha );
true
gap> beta := CategoryOfRowsMorphism( rows, B, N, B );;
gap> IsWellDefined( beta );
true
gap> gamma := PreCompose( alpha, beta );;
gap> IsWellDefined( gamma );
true
gap> UnderlyingMatrix( gamma ) = P;
true
gap> # compute Lift( gamma, beta ) via SolveLinearSystemInAbCategory for coverage of hom structure:
> delta := SolveLinearSystemInAbCategory( [ [ IdentityMorphism( A ) ] ], [ [ beta ] ], [ gamma ] )[1];;
gap> IsWellDefined( delta );
true
gap> IsCongruentForMorphisms( gamma, PreCompose( delta, beta ) );
true
gap> IsCongruentForMorphisms(
>     SumOfMorphisms( A, [ alpha, alpha, alpha ], B ),
>     AdditionForMorphisms( alpha, AdditionForMorphisms( alpha, alpha ) )
> );
true
gap> IsCongruentForMorphisms(
>     SumOfMorphisms( A, [ ], B ),
>     ZeroMorphism( A, B )
> );
true
gap> # E and EE are both occupied by GAP
> EEE := KoszulDualRing( R );;
gap> rows := CategoryOfRowsAsAdditiveClosureOfRingAsCategory( EEE );;
gap> M := HomalgMatrix( "[[e0*e1,3*e0]]", 1, 2, EEE );;
gap> N := HomalgMatrix( "[[1,e0*e2], [2*e0*e1*e2,5*e2]]", 2, 2, EEE );;
gap> P := M * N;;
gap> o := CategoryOfRowsObject( rows, 1 );;
gap> A := o;;
gap> B := DirectSum( o, o );;
gap> alpha := CategoryOfRowsMorphism( rows, A, M, B );;
gap> IsWellDefined( alpha );
true
gap> beta := CategoryOfRowsMorphism( rows, B, N, B );;
gap> IsWellDefined( beta );
true
gap> gamma := PreCompose( alpha, beta );;
gap> IsWellDefined( gamma );
true
gap> UnderlyingMatrix( gamma ) = P;
true
gap> # compute Lift( gamma, beta ) via SolveLinearSystemInAbCategory for coverage of hom structure:
> delta := SolveLinearSystemInAbCategory( [ [ IdentityMorphism( A ) ] ], [ [ beta ] ], [ gamma ] )[1];;
gap> IsWellDefined( delta );
true
gap> IsCongruentForMorphisms( gamma, PreCompose( delta, beta ) );
true
gap> IsCongruentForMorphisms(
>     SumOfMorphisms( A, [ alpha, alpha, alpha ], B ),
>     AdditionForMorphisms( alpha, AdditionForMorphisms( alpha, alpha ) )
> );
true
gap> IsCongruentForMorphisms(
>     SumOfMorphisms( A, [ ], B ),
>     ZeroMorphism( A, B )
> );
true

Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Ind

generated by GAPDoc2HTML