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
1
2
3 GaussForHomalg methods and functions
3
4
5
3.1 The Tools
6
7
Please note that there are more tool functions you can define,
8
GaussForHomalg just provides homalg with a sufficient subset. This varies
9
with the type and complexity of the rings you want to define. On the other
10
hand, ImportMatrix (3.1-4) is a function specifically designed for
11
GaussForHomalg.
12
13
3.1-1 ZeroMatrix
14
15
ZeroMatrix( C )  function
16
Returns: a sparse matrix
17
18
This returns a sparse matrix with the same dimensions and base ring as the
19
homalg matrix C.
20
21
3.1-2 IdentityMatrix
22
23
IdentityMatrix( C )  function
24
Returns: a sparse matrix
25
26
This returns a sparse n × n identity matrix with the same ring as the homalg
27
matrix C, n being the number of rows of C.
28
29
3.1-3 CopyMatrix
30
31
CopyMatrix( C )  function
32
Returns: a sparse matrix
33
34
This returns a sparse matrix which is a shallow copy of the sparse matrix
35
stored in the Eval attribute of the homalg matrix C.
36
37
3.1-4 ImportMatrix
38
39
ImportMatrix( M, R )  function
40
Returns: a sparse matrix
41
42
This returns the sparse version of the GAP matrix M over the ring R. It
43
prevents homalg from calling sparse matrix algorithms on dense GAP matrices.
44
Note that this is not a "standard" tool but neccessary because of the new
45
data type.
46
47
3.1-5 Involution
48
49
Involution( M )  function
50
Returns: a sparse matrix
51
52
This returns a sparse matrix which is the transpose of the sparse matrix
53
stored in the Eval attribute of the homalg matrix M.
54
55
3.1-6 CertainRows
56
57
CertainRows( M, plist )  function
58
Returns: a sparse matrix
59
60
This returns the rows in plist of the sparse matrix stored in the Eval
61
attribute of the homalg matrix M as a new matrix.
62
63
3.1-7 CertainColumns
64
65
CertainColumns( M, plist )  function
66
Returns: a sparse matrix
67
68
This returns the columns in plist of the sparse matrix stored in the Eval
69
attribute of the homalg matrix M as a new matrix.
70
71
3.1-8 UnionOfRows
72
73
UnionOfRows( A, B )  function
74
Returns: a sparse matrix
75
76
This returns the sparse matrix created by concatenating the rows of the
77
sparse matrices stored in the Eval attributes of the homalg matrices A and
78
B.
79
80
3.1-9 UnionOfColumns
81
82
UnionOfColumns( A, B )  function
83
Returns: a sparse matrix
84
85
This returns the sparse matrix created by concatenating the columns of the
86
sparse matrices stored in the Eval attributes of the homalg matrices A and
87
B.
88
89
3.1-10 DiagMat
90
91
DiagMat( e )  function
92
Returns: a sparse matrix
93
94
This method takes a list e of homalg matrices and returns the sparse block
95
matrix of the matrices stored in the Eval attributes of the matrices in e.
96
97
3.1-11 KroneckerMat
98
99
KroneckerMat( A, B )  function
100
Returns: a sparse matrix
101
102
This returns the sparse Kronecker matrix of the matrices stored in the Eval
103
attributes of the homalg matrices A and B.
104
105
3.1-12 Compose
106
107
Compose( A, B )  function
108
Returns: a sparse matrix
109
110
This returns the matrix product of the sparse matrices stored in the Eval
111
attributes of the homalg matrices A and B.
112
113
3.1-13 NrRows
114
115
NrRows( C )  function
116
Returns: an integer
117
118
This returns the number of rows of the sparse matrix stored in the Eval
119
attribute of the homalg matrix C.
120
121
3.1-14 NrColumns
122
123
NrColumns( C )  function
124
Returns: an integer
125
126
This returns the number of columns of the sparse matrix stored in the Eval
127
attribute of the homalg matrix C.
128
129
3.1-15 IsZeroMatrix
130
131
IsZeroMatrix( C )  function
132
Returns: true or false
133
134
This returns true if the sparse matrix stored in the Eval attribute of the
135
homalg matrix C is a zero matrix, and false otherwise.
136
137
3.1-16 IsDiagonalMatrix
138
139
IsDiagonalMatrix( C )  function
140
Returns: true or false
141
142
This returns true if the sparse matrix stored in the Eval attribute of the
143
homalg matrix C is a diagonal matrix, and false otherwise.
144
145
3.1-17 ZeroRows
146
147
ZeroRows( C )  function
148
Returns: a list
149
150
This returns the list of zero rows of the sparse matrix stored in the Eval
151
attribute of the homalg matrix C.
152
153
3.1-18 ZeroColumns
154
155
ZeroColumns( C )  function
156
Returns: a list
157
158
This returns the list of zero columns of the sparse matrix stored in the
159
Eval attribute of the homalg matrix C.
160
161
162
3.2 The Basic Functions and homalg table creation
163
164
3.2-1 DecideZeroRows
165
166
DecideZeroRows( A, B )  function
167
Returns: a homalg matrix
168
169
This returns the homalg matrix you get by row reducing the homalg matrix A
170
with the homalg matrix B.
171
172
3.2-2 DecideZeroRowsEffectively
173
174
DecideZeroRowsEffectively( A, B, T )  function
175
Returns: a homalg matrix M
176
177
This returns the homalg matrix M you get by row reducing the homalg matrix A
178
with the homalg matrix B. The transformation matrix is stored in the void
179
homalg matrix T as a side effect. The matrices satisfy M = A + T * B.
180
181
3.2-3 SyzygiesGeneratorsOfRows
182
183
SyzygiesGeneratorsOfRows( M )  function
184
Returns: a homalg matrix
185
186
This returns the row syzygies of the homalg matrix M, again as a homalg
187
matrix.
188
189
3.2-4 RelativeSyzygiesGeneratorsOfRows
190
191
RelativeSyzygiesGeneratorsOfRows( M, N )  function
192
Returns: a homalg matrix
193
194
The row syzygies of M are returned, but now the computation interpretes the
195
rows of the homalg matrix N as additional zero relations.
196
197
3.2-5 RowReducedEchelonForm
198
199
RowReducedEchelonForm( M[, U] )  function
200
Returns: a homalg matrix N
201
202
If one argument is given, this returns the triangular basis (reduced row
203
echelon form) of the homalg matrix M, again as a homalg matrix. In case of
204
two arguments, still only the triangular basis of M is returned, but the
205
transformation matrix is stored in the void homalg matrix U as a side
206
effect. The matrices satisfy N = U * M.
207
208
3.2-6 CreateHomalgTable
209
210
CreateHomalgTable( R )  function
211
Returns: a homalg table
212
213
This returns the homalg table of what will become the homalg ring R (at this
214
point R is just a homalg object with some properties for the method
215
selection of CreateHomalgTable). This method includes the needed functions
216
stored in the global variables CommonHomalgTableForGaussTools and
217
CommonHomalgTableForGaussBasic, and can add some more to the record that
218
will become the homalg table.
219
220
221
3.3 Matrix entry manipulation
222
223
This is just support for the sparse matrix data type.
224
225
3.3-1 MatElm
226
227
MatElm( M, r, c, R )  method
228
Returns: M[r,c]
229
230
If the Eval attribute of the homalg matrix M over the homalg ring R is
231
sparse, this calls the corresponding Gauss command GetEntry.
232
233
3.3-2 SetMatElm
234
235
SetMatElm( M, r, c, e, R )  method
236
Returns: nothing
237
238
If the Eval attribute of the homalg matrix M over the homalg ring R is
239
sparse, this calls the corresponding Gauss command GetEntry, to achieve
240
M[r,c]:=e.
241
242
3.3-3 AddToMatElm
243
244
AddToMatElm( M, r, c, e, R )  method
245
Returns: nothing
246
247
If the Eval attribute of the homalg matrix M over the homalg ring R is
248
sparse, this calls the corresponding Gauss command AddToEntry, to achieve
249
M[r,c] := M[r,c] + e.
250
251
252