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
7 Examples
3
4
5
7.1 Betti Diagrams
6
7
8
7.1-1 DE-2.2
9
10
 Example 
11
gap> R := HomalgFieldOfRationalsInDefaultCAS( ) * "x0,x1,x2";;
12
gap> S := GradedRing( R );;
13
gap> mat := HomalgMatrix( "[ x0^2, x1^2, x2^2 ]", 1, 3, S ); 
14
<A 1 x 3 matrix over a graded ring>
15
gap> M := RightPresentationWithDegrees( mat, S );
16
<A graded cyclic right module on a cyclic generator satisfying 3 relations>
17
gap> M := RightPresentationWithDegrees( mat );
18
<A graded cyclic right module on a cyclic generator satisfying 3 relations>
19
gap> d := Resolution( M );
20
<A right acyclic complex containing
21
3 morphisms of graded right modules at degrees [ 0 .. 3 ]>
22
gap> betti := BettiTable( d );
23
<A Betti diagram of <A right acyclic complex containing
24
3 morphisms of graded right modules at degrees [ 0 .. 3 ]>>
25
gap> Display( betti );
26
 total: 1 3 3 1
27
----------------
28
 0: 1 . . .
29
 1: . 3 . .
30
 2: . . 3 .
31
 3: . . . 1
32
----------------
33
degree: 0 1 2 3
34
gap> ## we are still below the Castelnuovo-Mumford regularity, which is 3:
35
gap> M2 := SubmoduleGeneratedByHomogeneousPart( 2, M );
36
<A graded torsion right submodule given by 3 generators>
37
gap> d2 := Resolution( M2 );
38
<A right acyclic complex containing
39
3 morphisms of graded right modules at degrees [ 0 .. 3 ]>
40
gap> betti2 := BettiTable( d2 );
41
<A Betti diagram of <A right acyclic complex containing
42
3 morphisms of graded right modules at degrees [ 0 .. 3 ]>>
43
gap> Display( betti2 );
44
 total: 3 8 6 1
45
----------------
46
 2: 3 8 6 .
47
 3: . . . 1
48
----------------
49
degree: 0 1 2 3
50

51
52
53
7.1-2 DE-Code
54
55
 Example 
56
gap> R := HomalgFieldOfRationalsInDefaultCAS( ) * "x0,x1,x2";;
57
gap> S := GradedRing( R );;
58
gap> mat := HomalgMatrix( "[ x0^2, x1^2 ]", 1, 2, S );
59
<A 1 x 2 matrix over a graded ring>
60
gap> M := RightPresentationWithDegrees( mat, S );
61
<A graded cyclic right module on a cyclic generator satisfying 2 relations>
62
gap> d := Resolution( M );
63
<A right acyclic complex containing
64
2 morphisms of graded right modules at degrees [ 0 .. 2 ]>
65
gap> betti := BettiTable( d );
66
<A Betti diagram of <A right acyclic complex containing
67
2 morphisms of graded right modules at degrees [ 0 .. 2 ]>>
68
gap> Display( betti );
69
 total: 1 2 1
70
--------------
71
 0: 1 . .
72
 1: . 2 .
73
 2: . . 1
74
--------------
75
degree: 0 1 2
76
gap> m := SubmoduleGeneratedByHomogeneousPart( 2, M );
77
<A graded torsion right submodule given by 4 generators>
78
gap> d2 := Resolution( m );
79
<A right acyclic complex containing
80
2 morphisms of graded right modules at degrees [ 0 .. 2 ]>
81
gap> betti2 := BettiTable( d2 );
82
<A Betti diagram of <A right acyclic complex containing
83
2 morphisms of graded right modules at degrees [ 0 .. 2 ]>>
84
gap> Display( betti2 );
85
 2: 4 8 4
86
--------------
87
degree: 0 1 2
88

89
90
91
7.1-3 Schenck-3.2
92
93
This is an example from Section 3.2 in [Sch03].
94
95
 Example 
96
gap> Qxyz := HomalgFieldOfRationalsInDefaultCAS( ) * "x,y,z";;
97
gap> mmat := HomalgMatrix( "[ x, x^3 + y^3 + z^3 ]", 1, 2, Qxyz );
98
<A 1 x 2 matrix over an external ring>
99
gap> S := GradedRing( Qxyz );;
100
gap> M := RightPresentationWithDegrees( mmat, S );
101
<A graded cyclic right module on a cyclic generator satisfying 2 relations>
102
gap> Mr := Resolution( M );
103
<A right acyclic complex containing
104
2 morphisms of graded right modules at degrees [ 0 .. 2 ]>
105
gap> bettiM := BettiTable( Mr );
106
<A Betti diagram of <A right acyclic complex containing
107
2 morphisms of graded right modules at degrees [ 0 .. 2 ]>>
108
gap> Display( bettiM );
109
 total: 1 2 1
110
--------------
111
 0: 1 1 .
112
 1: . . .
113
 2: . 1 1
114
--------------
115
degree: 0 1 2
116
gap> R := GradedRing( CoefficientsRing( S ) * "x,y,z,w" );;
117
gap> nmat := HomalgMatrix( "[ z^2 - y*w, y*z - x*w, y^2 - x*z ]", 1, 3, R );
118
<A 1 x 3 matrix over a graded ring>
119
gap> N := RightPresentationWithDegrees( nmat );
120
<A graded cyclic right module on a cyclic generator satisfying 3 relations>
121
gap> Nr := Resolution( N );
122
<A right acyclic complex containing
123
2 morphisms of graded right modules at degrees [ 0 .. 2 ]>
124
gap> bettiN := BettiTable( Nr );
125
<A Betti diagram of <A right acyclic complex containing
126
2 morphisms of graded right modules at degrees [ 0 .. 2 ]>>
127
gap> Display( bettiN );
128
 total: 1 3 2
129
--------------
130
 0: 1 . .
131
 1: . 3 2
132
--------------
133
degree: 0 1 2
134

135
136
137
7.1-4 Schenck-8.3
138
139
This is an example from Section 8.3 in [Sch03].
140
141
 Example 
142
gap> R := HomalgFieldOfRationalsInDefaultCAS( ) * "x,y,z,w";;
143
gap> S := GradedRing( R );;
144
gap> jmat := HomalgMatrix( "[ z*w, x*w, y*z, x*y, x^3*z - x*z^3 ]", 1, 5, S );
145
<A 1 x 5 matrix over a graded ring>
146
gap> J := RightPresentationWithDegrees( jmat );
147
<A graded cyclic right module on a cyclic generator satisfying 5 relations>
148
gap> Jr := Resolution( J );
149
<A right acyclic complex containing
150
3 morphisms of graded right modules at degrees [ 0 .. 3 ]>
151
gap> betti := BettiTable( Jr );
152
<A Betti diagram of <A right acyclic complex containing
153
3 morphisms of graded right modules at degrees [ 0 .. 3 ]>>
154
gap> Display( betti );
155
 total: 1 5 6 2
156
----------------
157
 0: 1 . . .
158
 1: . 4 4 1
159
 2: . . . .
160
 3: . 1 2 1
161
----------------
162
degree: 0 1 2 3
163

164
165
166
7.1-5 Schenck-8.3.3
167
168
This is Exercise 8.3.3 in [Sch03].
169
170
 Example 
171
gap> Qxyz := HomalgFieldOfRationalsInDefaultCAS( ) * "x,y,z";;
172
gap> S := GradedRing( Qxyz );;
173
gap> mat := HomalgMatrix( "[ x*y*z, x*y^2, x^2*z, x^2*y, x^3 ]", 1, 5, S );
174
<A 1 x 5 matrix over a graded ring>
175
gap> M := RightPresentationWithDegrees( mat, S );
176
<A graded cyclic right module on a cyclic generator satisfying 5 relations>
177
gap> Mr := Resolution( M );
178
<A right acyclic complex containing
179
3 morphisms of graded right modules at degrees [ 0 .. 3 ]>
180
gap> betti := BettiTable( Mr );
181
<A Betti diagram of <A right acyclic complex containing
182
3 morphisms of graded right modules at degrees [ 0 .. 3 ]>>
183
gap> Display( betti );
184
 total: 1 5 6 2
185
----------------
186
 0: 1 . . .
187
 1: . . . .
188
 2: . 5 6 2
189
----------------
190
degree: 0 1 2 3
191

192
193
194
7.2 Commutative Algebra
195
196
197
7.2-1 Saturate
198
199
 Example 
200
gap> R := HomalgFieldOfRationalsInDefaultCAS( ) * "x,y,z";;
201
gap> S := GradedRing( R );;
202
gap> m := GradedLeftSubmodule( "x,y,z", S );
203
<A graded torsion-free (left) ideal given by 3 generators>
204
gap> I := Intersect( m^3, GradedLeftSubmodule( "x", S ) );
205
<A graded torsion-free (left) ideal given by 6 generators>
206
gap> NrRelations( I );
207
8
208
gap> Im := SubobjectQuotient( I, m );
209
<A graded torsion-free rank 1 (left) ideal given by 3 generators>
210
gap> I_m := Saturate( I, m );
211
<A graded principal (left) ideal of rank 1 on a free generator>
212
gap> Is := Saturate( I );
213
<A graded principal (left) ideal of rank 1 on a free generator>
214
gap> Assert( 0, Is = I_m );
215

216
217
218
7.3 Global Section Modules of the Induced Sheaves
219
220
221
7.3-1 Examples of the ModuleOfGlobalSections Functor and Purity Filtrations
222
223
 Example 
224
gap> LoadPackage( "GradedRingForHomalg" );;
225
gap> Qxyzt := HomalgFieldOfRationalsInDefaultCAS( ) * "x,y,z,t";;
226
gap> S := GradedRing( Qxyzt );;
227
gap> 
228
gap> wmat := HomalgMatrix( "[ \
229
> x*y, y*z, z*t, 0, 0, 0,\
230
> x^3*z,x^2*z^2,0, x*z^2*t, -z^2*t^2, 0,\
231
> x^4, x^3*z, 0, x^2*z*t, -x*z*t^2, 0,\
232
> 0, 0, x*y, -y^2, x^2-t^2, 0,\
233
> 0, 0, x^2*z, -x*y*z, y*z*t, 0,\
234
> 0, 0, x^2*y-x^2*t,-x*y^2+x*y*t,y^2*t-y*t^2,0,\
235
> 0, 0, 0, 0, -1, 1 \
236
> ]", 7, 6, Qxyzt );;
237
gap> 
238
gap> LoadPackage( "GradedModules" );;
239
gap> wmor := GradedMap( wmat, "free", "free", "left", S );;
240
gap> IsMorphism( wmor );;
241
gap> W := LeftPresentationWithDegrees( wmat, S );;
242
gap> HW := ModuleOfGlobalSections( W );
243
<A graded left module presented by yet unknown relations for 6 generators>
244
gap> LinearStrandOfTateResolution( W, 0,4 );
245
<A cocomplex containing 4 morphisms of graded left modules at degrees
246
[ 0 .. 4 ]>
247
gap> purity_iso := IsomorphismOfFiltration( PurityFiltration( W ) );
248
<A non-zero isomorphism of graded left modules>
249
gap> Hpurity_iso := ModuleOfGlobalSections( purity_iso );
250
<An isomorphism of graded left modules>
251
gap> ModuleOfGlobalSections( wmor );
252
<A homomorphism of graded left modules>
253
gap> NaturalMapToModuleOfGlobalSections( W );
254
<A homomorphism of graded left modules>
255

256
257
258
7.3-2 Horrocks Mumford bundle
259
260
This example computes the global sections module of the Horrocks-Mumford
261
bundle.
262
263
 Example 
264
gap> LoadPackage( "GradedRingForHomalg" );;
265
gap> R := HomalgFieldOfRationalsInDefaultCAS( ) * "x0..x4";;
266
gap> S := GradedRing( R );;
267
gap> A := KoszulDualRing( S, "e0..e4" );;
268
gap> LoadPackage( "GradedModules" );;
269
gap> mat := HomalgMatrix( "[ \
270
> e1*e4, e2*e0, e3*e1, e4*e2, e0*e3, \
271
> e2*e3, e3*e4, e4*e0, e0*e1, e1*e2 \
272
> ]",
273
> 2, 5, A );
274
<A 2 x 5 matrix over a graded ring>
275
gap> phi := GradedMap( mat, "free", "free", "left", A );;
276
gap> IsMorphism( phi );
277
true
278
gap> M := GuessModuleOfGlobalSectionsFromATateMap( 2, phi );
279
#I GuessModuleOfGlobalSectionsFromATateMap uses a heuristic for efficiency;
280
please check the correctness of the following result
281

282
<A graded left module presented by yet unknown relations for 19 generators>
283
gap> IsPure( M );
284
true
285
gap> Rank( M );
286
2 
287
gap> Display( BettiTable( Resolution( M ) ) );
288
 total: 19 35 20 2
289
--------------------
290
 3: 4 . . .
291
 4: 15 35 20 .
292
 5: . . . 2
293
--------------------
294
degree: 0 1 2 3
295
gap> Display( BettiTable( TateResolution( M, -5, 5 ) ) );
296
total: 100 37 14 10 5 2 5 10 14 37 100 ? ? ? ?
297
----------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
298
 4: 100 35 4 . . . . . . . . 0 0 0 0
299
 3: * . 2 10 10 5 . . . . . . 0 0 0
300
 2: * * . . . . . 2 . . . . . 0 0
301
 1: * * * . . . . . . 5 10 10 2 . 0
302
 0: * * * * . . . . . . . . 4 35 100
303
----------|---|---|---|---|---|---|---|---|---|---|---|---|---|---S
304
twist: -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5
305
-------------------------------------------------------------------
306
Euler: 100 35 2 -10 -10 -5 0 2 0 -5 -10 -10 2 35 100
307
gap> M;
308
<A graded reflexive non-projective rank 2 left module presented by 94 \
309
relations for 19 generators>
310
gap> P := ElementOfGrothendieckGroup( M );
311
( 2*O_{P^4} - 1*O_{P^3} - 4*O_{P^2} - 2*O_{P^1} ) -> P^4
312
gap> P!.DisplayTwistedCoefficients := true;
313
true
314
gap> P;
315
( 2*O(-3) - 10*O(-2) + 15*O(-1) - 5*O(0) ) -> P^4
316
gap> chi := HilbertPolynomial( M );
317
1/12*t^4+2/3*t^3-1/12*t^2-17/3*t-5
318
gap> c := ChernPolynomial( M );
319
( 2 | 1-h+4*h^2 ) -> P^4
320
gap> ChernPolynomial( M * S^3 );
321
( 2 | 1+5*h+10*h^2 ) -> P^4
322
gap> ch := ChernCharacter( M );
323
[ 2-u-7*u^2/2!+11*u^3/3!+17*u^4/4! ] -> P^4
324
gap> HilbertPolynomial( ch );
325
1/12*t^4+2/3*t^3-1/12*t^2-17/3*t-5
326
gap> List( [ -8 .. 7 ], i -> Value( chi, i ) );
327
[ 35, 2, -10, -10, -5, 0, 2, 0, -5, -10, -10, 2, 35, 100, 210, 380 ]
328
gap> HF := HilbertFunction( M );
329
function( t ) ... end
330
gap> List( [ 0 .. 7 ], HF );
331
[ 0, 0, 0, 4, 35, 100, 210, 380 ]
332
gap> IndexOfRegularity( M );
333
4
334
gap> DataOfHilbertFunction( M );
335
[ [ [ 4 ], [ 3 ] ], 1/12*t^4+2/3*t^3-1/12*t^2-17/3*t-5 ]
336

337
338
339