Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

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

563574 views
1
2
A The Matrix Tool Operations
3
4
The functions listed below are components of the homalgTable object stored
5
in the ring. They are only indirectly accessible through standard methods
6
that invoke them.
7
8
9
A.1 The Tool Operations without a Fallback Method
10
11
There are matrix methods for which homalg needs a homalgTable entry for
12
non-internal rings, as it cannot provide a suitable fallback. Below is the
13
list of these homalgTable entries.
14
15
16
A.2 The Tool Operations with a Fallback Method
17
18
These are the methods for which it is recommended for performance reasons to
19
have a homalgTable entry for non-internal rings. homalg only provides a
20
generic fallback method.
21
22
A.2-1 MonomialMatrix
23
24
MonomialMatrix( d, R )  operation
25
Returns: a homalg matrix
26
27
The column matrix of d-th monomials of the homalg graded ring R.
28
29
 Example 
30
gap> R := HomalgFieldOfRationalsInDefaultCAS( ) * "x,y,z";;
31
gap> S := GradedRing( R );;
32
gap> m := MonomialMatrix( 2, S );
33
<A ? x 1 matrix over a graded ring>
34
gap> NrRows( m );
35
6
36
gap> m;
37
<A 6 x 1 matrix over a graded ring>
38
gap> Display( m );
39
x^2,
40
x*y,
41
x*z,
42
y^2,
43
y*z,
44
z^2
45
(over a graded ring) 
46

47
48
A.2-2 RandomMatrixBetweenGradedFreeLeftModules
49
50
RandomMatrixBetweenGradedFreeLeftModules( degreesS, degreesT, R )  operation
51
Returns: a homalg matrix
52
53
A random r × c-matrix between the graded free left modules R^(-degreesS) ->
54
R^(-degreesT), where r =Length(degreesS) and c =Length(degreesT).
55
56
 Example 
57
gap> R := HomalgFieldOfRationalsInDefaultCAS( ) * "a,b,c";;
58
gap> S := GradedRing( R );;
59
gap> rand := RandomMatrixBetweenGradedFreeLeftModules( [ 2, 3, 4 ], [ 1, 2 ], S );
60
<A 3 x 2 matrix over a graded ring>
61
gap> #Display( rand );
62
gap> #a-2*b+2*c, 2, 
63
gap> #a^2-a*b+b^2-2*b*c+5*c^2, 3*c, 
64
gap> #2*a^3-3*a^2*b+2*a*b^2+3*a^2*c+a*b*c-2*b^2*c-3*b*c^2-2*c^3,a^2-4*a*b-3*a*c-c^2
65

66
67
A.2-3 RandomMatrixBetweenGradedFreeRightModules
68
69
RandomMatrixBetweenGradedFreeRightModules( degreesT, degreesS, R )  operation
70
Returns: a homalg matrix
71
72
A random r × c-matrix between the graded free right modules R^(-degreesS) ->
73
R^(-degreesT), where r =Length(degreesT) and c =Length(degreesS).
74
75
 Example 
76
gap> R := HomalgFieldOfRationalsInDefaultCAS( ) * "a,b,c";;
77
gap> S := GradedRing( R );;
78
gap> rand := RandomMatrixBetweenGradedFreeRightModules( [ 1, 2 ], [ 2, 3, 4 ], S );
79
<A 2 x 3 matrix over a graded ring>
80
gap> #Display( rand );
81
gap> #a-2*b-c,a*b+b^2-b*c,2*a^3-a*b^2-4*b^3+4*a^2*c-3*a*b*c-b^2*c+a*c^2+5*b*c^2-2*c^3,
82
gap> #-5, -2*a+c, -2*a^2-a*b-2*b^2-3*a*c 
83

84
85
A.2-4 Diff
86
87
Diff( D, N )  operation
88
Returns: a homalg matrix
89
90
If D is a f × p-matrix and N is a g × q-matrix then H=Diff(D,N) is an fg ×
91
pq-matrix whose entry H[g*(i-1)+j,q*(k-1)+l] is the result of
92
differentiating N[j,l] by the differential operator corresponding to D[i,k].
93
(Here we follow the Macaulay2 convention.)
94
95
 Example 
96
gap> S := HomalgFieldOfRationalsInDefaultCAS( ) * "a,b,c" * "x,y,z";;
97
gap> D := HomalgMatrix( "[ \
98
> x,2*y, \
99
> y,a-b^2, \
100
> z,y-b \
101
> ]", 3, 2, S );
102
<A 3 x 2 matrix over an external ring>
103
gap> N := HomalgMatrix( "[ \
104
> x^2-a*y^3,x^3-z^2*y,x*y-b,x*z-c, \
105
> x, x*y, a-b, x*a*b \
106
> ]", 2, 4, S );
107
<A 2 x 4 matrix over an external ring>
108
gap> H := Diff( D, N );
109
<A 6 x 8 matrix over an external ring>
110
gap> Display( H );
111
2*x, 3*x^2, y,z, -6*a*y^2,-2*z^2,2*x,0, 
112
1, y, 0,a*b,0, 2*x, 0, 0, 
113
-3*a*y^2,-z^2, x,0, -y^3, 0, 0, 0, 
114
0, x, 0,0, 0, 0, 1, b*x,
115
0, -2*y*z,0,x, -3*a*y^2,-z^2, x+1,0, 
116
0, 0, 0,0, 0, x, 1, -a*x
117

118
119
120