passagemath-gap-pkg-normalizinterface 10.6.32__cp314-cp314t-musllinux_1_2_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of passagemath-gap-pkg-normalizinterface might be problematic. Click here for more details.

Files changed (54) hide show
  1. gap/pkg/normalizinterface/CHANGES +113 -0
  2. gap/pkg/normalizinterface/LICENSE +351 -0
  3. gap/pkg/normalizinterface/PackageInfo.g +121 -0
  4. gap/pkg/normalizinterface/README.md +96 -0
  5. gap/pkg/normalizinterface/bin/aarch64-unknown-linux-musl-default64-kv10/NormalizInterface.so +0 -0
  6. gap/pkg/normalizinterface/etc/download.sh +85 -0
  7. gap/pkg/normalizinterface/etc/generate_cone_property_wrappers.g +380 -0
  8. gap/pkg/normalizinterface/examples/5x5.g +22 -0
  9. gap/pkg/normalizinterface/examples/demo.g +53 -0
  10. gap/pkg/normalizinterface/examples/docs.g +43 -0
  11. gap/pkg/normalizinterface/examples/dual_mode.g +26 -0
  12. gap/pkg/normalizinterface/examples/magic_square.g +36 -0
  13. gap/pkg/normalizinterface/init.g +7 -0
  14. gap/pkg/normalizinterface/lib/cone_property_wrappers.gd +682 -0
  15. gap/pkg/normalizinterface/lib/cone_property_wrappers.gi +132 -0
  16. gap/pkg/normalizinterface/lib/normaliz.gd +130 -0
  17. gap/pkg/normalizinterface/lib/normaliz.gi +153 -0
  18. gap/pkg/normalizinterface/makedoc.g +13 -0
  19. gap/pkg/normalizinterface/read.g +3 -0
  20. gap/pkg/normalizinterface/tst/InhomIneq.tst +20 -0
  21. gap/pkg/normalizinterface/tst/bugfix.tst +37 -0
  22. gap/pkg/normalizinterface/tst/conversion.tst +87 -0
  23. gap/pkg/normalizinterface/tst/cube-incidence.tst +62 -0
  24. gap/pkg/normalizinterface/tst/descent.tst +173 -0
  25. gap/pkg/normalizinterface/tst/dual.tst +533 -0
  26. gap/pkg/normalizinterface/tst/fractions.tst +29 -0
  27. gap/pkg/normalizinterface/tst/gorenstein.tst +22 -0
  28. gap/pkg/normalizinterface/tst/normalizinterface01.tst +46 -0
  29. gap/pkg/normalizinterface/tst/normalizinterface02.tst +107 -0
  30. gap/pkg/normalizinterface/tst/project.tst +136 -0
  31. gap/pkg/normalizinterface/tst/rational.tst +151 -0
  32. gap/pkg/normalizinterface/tst/rees.tst +544 -0
  33. gap/pkg/normalizinterface/tst/rp2poly.tst +351 -0
  34. gap/pkg/normalizinterface/tst/rproj2.tst +548 -0
  35. gap/pkg/normalizinterface/tst/testall.g +3 -0
  36. gap/pkg/normalizinterface/tst/verticesfloat.tst +11 -0
  37. passagemath_gap_pkg_normalizinterface-10.6.32.dist-info/METADATA +93 -0
  38. passagemath_gap_pkg_normalizinterface-10.6.32.dist-info/METADATA.bak +94 -0
  39. passagemath_gap_pkg_normalizinterface-10.6.32.dist-info/RECORD +54 -0
  40. passagemath_gap_pkg_normalizinterface-10.6.32.dist-info/WHEEL +5 -0
  41. passagemath_gap_pkg_normalizinterface-10.6.32.dist-info/top_level.txt +1 -0
  42. passagemath_gap_pkg_normalizinterface.libs/libeantic-da90a096.so.3.1.0 +0 -0
  43. passagemath_gap_pkg_normalizinterface.libs/libeanticxx-bd9d5c67.so.3.1.0 +0 -0
  44. passagemath_gap_pkg_normalizinterface.libs/libflint-8c82a98a.so.21.0.0 +0 -0
  45. passagemath_gap_pkg_normalizinterface.libs/libgcc_s-2d945d6c.so.1 +0 -0
  46. passagemath_gap_pkg_normalizinterface.libs/libgmp-28992bcb.so.10.5.0 +0 -0
  47. passagemath_gap_pkg_normalizinterface.libs/libgmpxx-fecb01a9.so.4.7.0 +0 -0
  48. passagemath_gap_pkg_normalizinterface.libs/libgomp-1ede7ee7.so.1.0.0 +0 -0
  49. passagemath_gap_pkg_normalizinterface.libs/libmpfr-e34bb864.so.6.2.1 +0 -0
  50. passagemath_gap_pkg_normalizinterface.libs/libnormaliz-40532fe8.so.3.11.0 +0 -0
  51. passagemath_gap_pkg_normalizinterface.libs/libstdc++-85f2cd6d.so.6.0.33 +0 -0
  52. sage/all__sagemath_gap_pkg_normalizinterface.py +1 -0
  53. sage/libs/all__sagemath_gap_pkg_normalizinterface.py +1 -0
  54. sage/libs/gap_pkg_normalizinterface.cpython-314t-aarch64-linux-musl.so +0 -0
@@ -0,0 +1,85 @@
1
+ #!/bin/sh
2
+ #
3
+ # Download a file and verify its checksum; repeat until
4
+ # the checksum matches or the user told us to give up.
5
+
6
+ set -e
7
+
8
+ usage() {
9
+ cat <<EOF
10
+ Usage: $0 URL [SHA256 [FILENAME]]
11
+ EOF
12
+
13
+ exit $1
14
+ }
15
+
16
+ if [ $# -lt 1 ]; then
17
+ usage 1
18
+ fi
19
+ if [ $# -gt 3 ]; then
20
+ usage 1
21
+ fi
22
+
23
+ FileURL="$1"
24
+ ExpectedChecksum="$2"
25
+ if [ $# = 3 ]; then
26
+ Filename="$3"
27
+ else
28
+ Filename=$(basename ${FileURL})
29
+ fi
30
+
31
+ while : ; do
32
+
33
+ #
34
+ # Download
35
+ #
36
+ if [ -e ${Filename} ] ; then
37
+ echo "Checking for ${Filename}... found existing file, using that"
38
+ # TODO: add a checksum check?
39
+ elif command -v wget >/dev/null 2>&1 ; then
40
+ echo "Checking for ${Filename}... downloading with wget"
41
+ wget ${FileURL}
42
+ elif command -v curl >/dev/null 2>&1 ; then
43
+ echo "Checking for ${Filename}... downloading with curl"
44
+ curl -L -O ${FileURL}
45
+ else
46
+ echo "Checking for ${Filename}... not found and unable to download"
47
+ echo
48
+ echo "Please manually download the following file:"
49
+ echo " ${FileURL}"
50
+ echo "Put it into the current directory and re-run this script."
51
+ exit 1
52
+ fi
53
+
54
+ #
55
+ # Compute checksum
56
+ #
57
+ echo "Verifying SHA256 checksum of ${Filename}..."
58
+ if command -v sha256sum >/dev/null 2>&1 ; then
59
+ ActualChecksum=$(sha256sum ${Filename})
60
+ elif command -v shasum >/dev/null 2>&1 ; then
61
+ ActualChecksum=$(shasum -a 256 ${Filename})
62
+ elif command -v openssl >/dev/null 2>&1 ; then
63
+ ActualChecksum=$(openssl sha256 ${Filename})
64
+ else
65
+ ActualChecksum=skip
66
+ fi
67
+
68
+ #
69
+ # Compare checksum
70
+ #
71
+ case ${ActualChecksum} in
72
+ *${ExpectedChecksum}* )
73
+ echo " valid SHA256 checksum"
74
+ break
75
+ ;;
76
+ *) echo " invalid SHA256 checksum, expected ${ExpectedChecksum} but got ${ActualChecksum}"
77
+ echo " retrying in 30 seconds..."
78
+ sleep 30
79
+ rm -f ${Filename}
80
+ ;;
81
+ esac
82
+
83
+ done;
84
+
85
+ exit 0
@@ -0,0 +1,380 @@
1
+ LoadPackage("NormalizInterface");
2
+
3
+ docstrings := rec(
4
+
5
+ AffineDim := rec(
6
+ returns := "the affine dimension",
7
+ description := """
8
+ The affine dimension of the polyhedron in inhomogeneous computations. Its computation is triggered if necessary.
9
+ """,
10
+ ),
11
+
12
+ ClassGroup := rec(
13
+ returns := "the class group in a special format",
14
+ description := """
15
+ A normal affine monoid $M$ has a well-defined divisor class group.
16
+ It is naturally isomorphic to the divisor class group of $K[M]$ where $K$
17
+ is a field (or any unique factorization domain).
18
+ We represent it as a vector where the first entry is the rank. It is
19
+ followed by sequence of pairs of entries <M>n,m</M>. Such two entries
20
+ represent a free cyclic summand <M>(\mathbb{Z}/n\mathbb{Z})^m</M>.
21
+ Not allowed in inhomogeneous computations.
22
+ """,
23
+ ),
24
+
25
+ Congruences := rec(
26
+ returns := "a matrix whose rows represent the congruences",
27
+ description := """
28
+ The equations, congruences and support hyperplanes together
29
+ describe the lattice points of the cone.
30
+ """,
31
+ ),
32
+
33
+ Deg1Elements := rec(
34
+ returns := "a matrix whose rows are the degree 1 elements",
35
+ description := """
36
+ Requires the presence of a grading. Not allowed in inhomogeneous computations.
37
+ """,
38
+ ),
39
+
40
+ Dehomogenization := rec(
41
+ returns := "the dehomgenization vector",
42
+ description := """
43
+ Only for inhomogeneous computations.
44
+ """,
45
+ ),
46
+
47
+ EmbeddingDim := rec(
48
+ rename := "EmbeddingDimension",
49
+ returns := "the embedding dimension of the cone",
50
+ description := """
51
+ The embedding dimension is the dimension of the space in which the
52
+ computation is done. It is the number of components of the output vectors.
53
+ This value is always known directly after the creation of the cone.
54
+ """,
55
+ ),
56
+
57
+ Equations := rec(
58
+ returns := "a matrix whose rows represent the equations",
59
+ description := """
60
+ The equations cut out the linear space generated by the cone.
61
+ The equations, congruences and support hyperplanes together
62
+ describe the lattice points of the cone.
63
+ """,
64
+ ),
65
+
66
+ ExcludedFaces := rec(
67
+ returns := "a matrix whose rows represent the excluded faces",
68
+ description := "",
69
+ ),
70
+
71
+ ExtremeRays := rec(
72
+ returns := "a matrix whose rows are the extreme rays",
73
+ description := "",
74
+ ),
75
+
76
+ Generators := rec(
77
+ returns := "a matrix whose rows are the generators of <A>cone</A>",
78
+ description := "",
79
+ ),
80
+
81
+ GeneratorOfInterior := rec(
82
+ returns := "a vector representing the generator of the interior of <A>cone</A>",
83
+ description := """
84
+ If <A>cone</A> is Gorenstein, this function returns the generator of the interior of <A>cone</A>.
85
+ If <A>cone</A> is not Gorenstein, an error is raised.
86
+ """,
87
+ ),
88
+
89
+ Grading := rec(
90
+ returns := "the grading vector",
91
+ description := "",
92
+ ),
93
+
94
+ HilbertBasis := rec(
95
+ returns := "a matrix whose rows are the Hilbert basis elements",
96
+ description := "",
97
+ ),
98
+
99
+ HilbertQuasiPolynomial := rec(
100
+ returns := "the Hilbert function as a quasipolynomial",
101
+ description := """
102
+ The Hilbert function counts the lattice points degreewise. The result is a
103
+ quasipolynomial <M>Q</M>, that is, a polynomial with periodic coefficients. It is
104
+ given as list of polynomials <M>P_0, \ldots, P_{(p-1)}</M> such that <M>Q(i) = P_{(i \bmod p)} (i)</M>.
105
+ """,
106
+ ),
107
+
108
+ HilbertSeries := rec(
109
+ returns := "the Hilbert series as rational function",
110
+ description := """
111
+ The result consists of a list with two entries. The first is the numerator
112
+ polynomial. In inhomogeneous computations this can also be a Laurent
113
+ polynomial. The second list entry represents the denominator. It is a list
114
+ of pairs <M>[k_i, l_i]</M>. Such a pair represents the factor <M>(1-t^{k_i})^{l_i}</M>.
115
+ """,
116
+ ),
117
+
118
+ InclusionExclusionData := rec(
119
+ returns := "inclusion-exclusion data",
120
+ description := """
121
+ List of faces which are internally have been used in the inclusion-exclusion
122
+ scheme. Given as a list pairs. The first pair entry is a key of generators
123
+ contained in the face (compare also <Ref Func="NmzTriangulation"/>) and the
124
+ multiplicity with which it was considered.
125
+ Only available with excluded faces or strict constraints as input.
126
+ """,
127
+ ),
128
+
129
+ IsDeg1ExtremeRays := rec(
130
+ returns := "<K>true</K> if all extreme rays have degree 1; <K>false</K> otherwise",
131
+ description := "",
132
+ ),
133
+
134
+ IsDeg1HilbertBasis := rec(
135
+ returns := "<K>true</K> if all Hilbert basis elements have degree 1; <K>false</K> otherwise",
136
+ description := "",
137
+ ),
138
+
139
+ IsGorenstein := rec(
140
+ returns := "whether the cone is Gorenstein",
141
+ description := """
142
+ Returns true if <A>cone</A> is Gorenstein, false otherwise.
143
+ """,
144
+ ),
145
+
146
+ IsInhomogeneous := rec(
147
+ returns := "whether the cone is inhomogeneous",
148
+ description := """
149
+ This value is always known directly after the creation of the cone.
150
+ """,
151
+ ),
152
+
153
+ IsIntegrallyClosed := rec(
154
+ returns := "<K>true</K> if the cone is integrally closed; <K>false</K> otherwise",
155
+ description := """
156
+ It is integrally closed when the Hilbert basis is a subset of the original monoid generators. So it is only computable if we have original monoid generators.
157
+ """,
158
+ ),
159
+
160
+ IsPointed := rec(
161
+ returns := "<K>true</K> if the cone is pointed; <K>false</K> otherwise",
162
+ description := "",
163
+ ),
164
+
165
+ IsReesPrimary := rec(
166
+ returns := "<K>true</K> if is the monomial ideal is primary to the irrelevant maximal ideal, <K>false</K> otherwise",
167
+ description := """
168
+ Only used with the input type <C>rees_algebra</C>.
169
+ """,
170
+ ),
171
+
172
+ MaximalSubspace := rec(
173
+ returns := "a matrix whose rows generate the maximale linear subspace",
174
+ description := "",
175
+ ),
176
+
177
+ ModuleGenerators := rec(
178
+ returns := "a matrix whose rows are the module generators",
179
+ description := "",
180
+ ),
181
+
182
+ ModuleGeneratorsOverOriginalMonoid := rec(
183
+ returns := "a matrix whose rows are the module generators over the original monoid",
184
+ description := """
185
+ A minimal system of generators of the integral closure over the original monoid.
186
+ Requires the existence of original monoid generators. Not allowed in inhomogeneous computations.
187
+ """,
188
+ ),
189
+
190
+ ModuleRank := rec(
191
+ returns := "the rank of the module of lattice points in the polyhedron as a module over the recession monoid",
192
+ description := """
193
+ Only for inhomogeneous computations.
194
+ """,
195
+ ),
196
+
197
+ OriginalMonoidGenerators := rec(
198
+ returns := "a matrix whose rows are the original monoid generators",
199
+ description := "",
200
+ ),
201
+
202
+ Rank := rec(
203
+ returns := "the rank of the cone",
204
+ description := """
205
+ This value is the rank of the lattice generated by the lattice points of the cone.
206
+ """,
207
+ ),
208
+
209
+ RecessionRank := rec(
210
+ returns := "the rank of the recession cone",
211
+ description := """
212
+ Only for inhomogeneous computations.
213
+ """,
214
+ ),
215
+
216
+ ReesPrimaryMultiplicity := rec(
217
+ description := """
218
+ the multiplicity of a monomial ideal, provided it is primary to the maximal
219
+ ideal generated by the indeterminates. Used only with the input type
220
+ <C>rees_algebra</C>.
221
+ """,
222
+ ),
223
+
224
+ SupportHyperplanes := rec(
225
+ returns := "a matrix whose rows represent the support hyperplanes",
226
+ description := """
227
+ The equations cut out the linear space generated by the cone.
228
+ The equations, congruences and support hyperplanes together
229
+ describe the lattice points of the cone.
230
+ """,
231
+ ),
232
+
233
+ Triangulation := rec(
234
+ returns := "the triangulation",
235
+ description := """
236
+ This returns a list of the maximal simplicial cones in a triangulation, i.e., a list of cones dividing the
237
+ cone into simplicial cones. Each cone in the list is represented by a pair.
238
+ The first entry of such a pair is the key of the simplex, i.e., a list of integers $a_1,\dots,a_n$
239
+ referring to the <Ref Func="NmzGenerators"/> (counting from 0) which are used in this simplicial cone.
240
+ The second entry of each pair in the list is the absolute value of the determinant of the generator matrix of the simplicial cone.
241
+ """,
242
+ ),
243
+
244
+ TriangulationDetSum := rec(
245
+ returns := "sum of the absolute values of the determinants of the simplicial cones in the used triangulation",
246
+ description := "",
247
+ ),
248
+
249
+ TriangulationSize := rec(
250
+ returns := "the number of simplicial cones in the used triangulation",
251
+ description := "",
252
+ ),
253
+
254
+ VerticesFloat := rec(
255
+ returns := "a matrix whose rows are the vertices of the polyhedron <A>cone</A> with float coordinates",
256
+ description := """
257
+ The rows of this matrix represent the vertices of <A>cone</A>, printed as floats for better readability.
258
+ The result might be inexact, and should therefore not be used for computations.
259
+ """,
260
+ ),
261
+
262
+ VerticesOfPolyhedron := rec(
263
+ returns := "a matrix whose rows are the vertices of the polyhedron",
264
+ description := "",
265
+ ),
266
+
267
+
268
+ EhrhartSeries := rec(
269
+ description := """
270
+ Supported in Normaliz >= 3.5.0.
271
+ """,
272
+ ),
273
+
274
+ EuclideanVolume := rec(
275
+ description := """
276
+ Supported in Normaliz >= 3.5.0.
277
+ """,
278
+ ),
279
+
280
+ ProjectCone := rec(
281
+ description := """
282
+ Supported in Normaliz >= 3.5.0.
283
+ """,
284
+ ),
285
+
286
+ SuppHypsFloat := rec(
287
+ description := """
288
+ Supported in Normaliz >= 3.5.2.
289
+ """,
290
+ ),
291
+
292
+ Volume := rec(
293
+ description := """
294
+ Supported in Normaliz >= 3.5.0.
295
+ """,
296
+ ),
297
+
298
+ FVector := rec(
299
+ description := """
300
+ Supported in Normaliz >= 3.7.0.
301
+ """,
302
+ ),
303
+
304
+ FaceLattice := rec(
305
+ description := """
306
+ Supported in Normaliz >= 3.7.0.
307
+ """,
308
+ ),
309
+
310
+ Incidence := rec(
311
+ description := """
312
+ Supported in Normaliz >= 3.8.0.
313
+ """,
314
+ ),
315
+
316
+ );
317
+
318
+ all_props := Set(RecNames(_NmzRecordOfConeProperties));
319
+ documented_props := RecNames(docstrings);
320
+
321
+ for x in Difference(documented_props, all_props) do
322
+ Print("Property ", x, " is documented but not actually available\n");
323
+ od;
324
+
325
+ for x in Difference(all_props, documented_props) do
326
+ Print("Property ", x, " is undocumented\n");
327
+ od;
328
+
329
+ stream := OutputTextFile("lib/cone_property_wrappers.gd", false);
330
+ SetPrintFormattingStatus(stream, false);
331
+
332
+ PrintTo(stream,"""# WARNING: This file was generated by etc/generate_cone_property_wrappers.g,
333
+ # DO NOT EDIT IT BY HAND!
334
+
335
+ #! @Chapter Functions
336
+ #! @Section Cone properties
337
+
338
+ """);
339
+ for x in all_props do
340
+ if IsBound(docstrings.(x)) then
341
+ r := docstrings.(x);
342
+ else
343
+ r := rec(description:="");
344
+ fi;
345
+ if IsBound(r.rename) then y := r.rename; else y := x; fi;
346
+ PrintTo(stream, "#! @Arguments cone\n");
347
+ if IsBound(r.returns) then
348
+ PrintTo(stream, "#! @Returns ", r.returns, "\n");
349
+ fi;
350
+ PrintTo(stream, "#! @Description\n");
351
+ lines := SplitString(r.description, "\n");
352
+ for l in lines do
353
+ PrintTo(stream, "#! ", l ,"\n");
354
+ od;
355
+ if Length(lines) > 0 then
356
+ PrintTo(stream, "#! <P/>\n");
357
+ fi;
358
+ PrintTo(stream, "#! This is an alias for <C>NmzConeProperty( cone, \"", x, "\" );</C> see <Ref Func=\"NmzConeProperty\"/>.\n");
359
+ PrintTo(stream, "DeclareGlobalFunction( \"Nmz", y, "\" );\n");
360
+ od;
361
+
362
+ CloseStream(stream);
363
+
364
+
365
+ stream := OutputTextFile("lib/cone_property_wrappers.gi", false);
366
+ SetPrintFormattingStatus(stream, false);
367
+ PrintTo(stream,"""# WARNING: This file was generated by etc/generate_cone_property_wrappers.g,
368
+ # DO NOT EDIT IT BY HAND!
369
+
370
+ """);for x in all_props do
371
+ y := x;
372
+ if IsBound(docstrings.(x)) then
373
+ r := docstrings.(x);
374
+ if IsBound(r.rename) then
375
+ y := r.rename;
376
+ fi;
377
+ fi;
378
+ PrintTo(stream, "InstallGlobalFunction( Nmz", y, ", cone -> NmzConeProperty( cone, \"", x,"\" ) );\n");
379
+ od;
380
+ CloseStream(stream);
@@ -0,0 +1,22 @@
1
+ ## 5x5 magic square
2
+ LoadPackage("NormalizInterface");
3
+
4
+
5
+ 5x5eq := [
6
+ [1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
7
+ [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
8
+ [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0],
9
+ [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1],
10
+ [0, 1, 1, 1, 1, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0],
11
+ [1, 0, 1, 1, 1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0],
12
+ [1, 1, 0, 1, 1, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0],
13
+ [1, 1, 1, 0, 1, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0],
14
+ [1, 1, 1, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1],
15
+ [0, 1, 1, 1, 1, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1],
16
+ [1, 1, 1, 1, 0, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0]
17
+ ];
18
+ 5x5grading := [[1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
19
+
20
+ NmzSetVerboseDefault(true);
21
+ 5x5cone := NmzCone(["equations", 5x5eq,"grading",5x5grading]);
22
+ NmzHilbertSeries(5x5cone); time;
@@ -0,0 +1,53 @@
1
+ #! @BeginChunk Demo_example
2
+ #! @BeginExample
3
+ C := NmzCone(["integral_closure",[[2,1],[1,3]]]);
4
+ #! <a Normaliz cone>
5
+ NmzHasConeProperty(C,"HilbertBasis");
6
+ #! false
7
+ NmzHasConeProperty(C,"SupportHyperplanes");
8
+ #! false
9
+ NmzConeProperty(C,"HilbertBasis");
10
+ #! [ [ 1, 1 ], [ 1, 2 ], [ 1, 3 ], [ 2, 1 ] ]
11
+ NmzHasConeProperty(C,"SupportHyperplanes");
12
+ #! true
13
+ NmzConeProperty(C,"SupportHyperplanes");
14
+ #! [ [ -1, 2 ], [ 3, -1 ] ]
15
+ #! @EndExample
16
+ #! @EndChunk
17
+
18
+
19
+ #! @BeginChunk Demo_example_equation
20
+ #! @BeginExample
21
+ D := NmzCone(["equations",[[1,2,-3]], "grading",[[0,-1,3]]]);
22
+ #! <a Normaliz cone>
23
+ NmzCompute(D,["DualMode","HilbertSeries"]);
24
+ #! true
25
+ NmzHilbertBasis(D);
26
+ #! [ [ 1, 1, 1 ], [ 0, 3, 2 ], [ 3, 0, 1 ] ]
27
+ NmzHilbertSeries(D);
28
+ #! [ t^2-t+1, [ [ 1, 1 ], [ 3, 1 ] ] ]
29
+ NmzHasConeProperty(D,"SupportHyperplanes");
30
+ #! true
31
+ NmzSupportHyperplanes(D);
32
+ #! [ [ 0, 1, 0 ], [ 1, 0, 0 ] ]
33
+ NmzEquations(D);
34
+ #! [ [ 1, 2, -3 ] ]
35
+ #! @EndExample
36
+ #! @EndChunk
37
+
38
+
39
+ #! @BeginChunk Demo_example_inhom_equation
40
+ #! @BeginExample
41
+ P := NmzCone(["inhom_equations",[[1,2,-3,1]], "grading", [[1,1,1]]]);
42
+ #! <a Normaliz cone>
43
+ NmzIsInhomogeneous(C);
44
+ #! false
45
+ NmzIsInhomogeneous(P);
46
+ #! true
47
+ NmzHilbertBasis(P);
48
+ #! [ [ 1, 1, 1, 0 ], [ 3, 0, 1, 0 ], [ 0, 3, 2, 0 ] ]
49
+ NmzModuleGenerators(P);
50
+ #! [ [ 0, 1, 1, 1 ], [ 2, 0, 1, 1 ] ]
51
+ #! @EndExample
52
+ #! @EndChunk
53
+
@@ -0,0 +1,43 @@
1
+ #! @BeginChunk NmzCone_example
2
+ #! @BeginExample
3
+ cone := NmzCone(["integral_closure",[[2,1],[1,3]]]);
4
+ #! <a Normaliz cone>
5
+ #! @EndExample
6
+ #! @EndChunk
7
+
8
+ #! @BeginChunk NmzHasConeProperty_example
9
+ #! @BeginExample
10
+ NmzHasConeProperty(cone, "ExtremeRays");
11
+ #! false
12
+ #! @EndExample
13
+ #! @EndChunk
14
+
15
+ #! @BeginChunk NmzKnownConeProperties_example
16
+ #! @BeginExample
17
+ NmzKnownConeProperties(cone);
18
+ #! [ "EmbeddingDim", "Generators", "InternalIndex", "IsInhomogeneous",
19
+ #! "OriginalMonoidGenerators", "Sublattice" ]
20
+ #! @EndExample
21
+ #! @EndChunk
22
+
23
+ #! @BeginChunk NmzCompute_example
24
+ #! @BeginExample
25
+ NmzKnownConeProperties(cone);
26
+ #! [ "EmbeddingDim", "Generators", "InternalIndex", "IsInhomogeneous",
27
+ #! "OriginalMonoidGenerators", "Sublattice" ]
28
+ NmzCompute(cone, ["SupportHyperplanes", "IsPointed"]);
29
+ #! true
30
+ NmzKnownConeProperties(cone);
31
+ #! [ "EmbeddingDim", "ExtremeRays", "Generators", "InternalIndex",
32
+ #! "IsDeg1ExtremeRays", "IsInhomogeneous", "IsPointed", "MaximalSubspace",
33
+ #! "OriginalMonoidGenerators", "Rank", "Sublattice", "SupportHyperplanes" ]
34
+ NmzCompute(cone);;
35
+ NmzKnownConeProperties(cone);
36
+ #! [ "ClassGroup", "EmbeddingDim", "ExtremeRays", "Generators", "HilbertBasis",
37
+ #! "InternalIndex", "IsDeg1ExtremeRays", "IsInhomogeneous",
38
+ #! "IsIntegrallyClosed", "IsPointed", "IsTriangulationNested",
39
+ #! "IsTriangulationPartial", "MaximalSubspace", "OriginalMonoidGenerators",
40
+ #! "Rank", "Sublattice", "SupportHyperplanes", "TriangulationDetSum",
41
+ #! "TriangulationSize", "UnitGroupIndex" ]
42
+ #! @EndExample
43
+ #! @EndChunk
@@ -0,0 +1,26 @@
1
+ #! @BeginChunk example_dual
2
+ #! @BeginExample
3
+ M := [
4
+ [ 8, 8, 8, 7 ],
5
+ [ 0, 4, 0, 1 ],
6
+ [ 0, 1, 0, 7 ],
7
+ [ 0, -2, 0, 7 ],
8
+ [ 0, -2, 0, 1 ],
9
+ [ 8, 48, 8, 17 ],
10
+ [ 1, 6, 1, 34 ],
11
+ [ 2,-12, -2, 37 ],
12
+ [ 4,-24, -4, 14 ]
13
+ ];;
14
+ D := NmzCone(["inhom_inequalities", M,
15
+ "signs", [[1,1,1]],
16
+ "grading", [[1,1,1]]]);
17
+ #! <a Normaliz cone>
18
+ NmzCompute(D,["DualMode","HilbertBasis","ModuleGenerators"]);
19
+ #! true
20
+ NmzHilbertBasis(D);
21
+ #! [ [ 1, 0, 0, 0 ], [ 1, 0, 1, 0 ] ]
22
+ NmzModuleGenerators(D);
23
+ #! [ [ 0, 0, 0, 1 ], [ 0, 0, 1, 1 ], [ 0, 0, 2, 1 ], [ 0, 0, 3, 1 ] ]
24
+ #! @EndExample
25
+ #! @EndChunk
26
+
@@ -0,0 +1,36 @@
1
+ #! @BeginChunk Demo_example_3x3magiceven
2
+ #! @BeginExample
3
+ Magic3x3even := NmzCone(["equations",
4
+ [ [1, 1, 1, -1, -1, -1, 0, 0, 0],
5
+ [1, 1, 1, 0, 0, 0, -1, -1, -1],
6
+ [0, 1, 1, -1, 0, 0, -1, 0, 0],
7
+ [1, 0, 1, 0, -1, 0, 0, -1, 0],
8
+ [1, 1, 0, 0, 0, -1, 0, 0, -1],
9
+ [0, 1, 1, 0, -1, 0, 0, 0, -1],
10
+ [1, 1, 0, 0, -1, 0, -1, 0, 0] ],
11
+ "congruences",
12
+ [ [1, 0, 0, 0, 0, 0, 0, 0, 0, 2],
13
+ [0, 0, 1, 0, 0, 0, 0, 0, 0, 2],
14
+ [0, 0, 0, 0, 0, 0, 1, 0, 0, 2],
15
+ [0, 0, 0, 0, 0, 0, 0, 0, 1, 2] ],
16
+ "grading",
17
+ [ [1, 1, 1, 0, 0, 0, 0, 0, 0] ] ] );
18
+ #! <a Normaliz cone>
19
+
20
+ NmzHilbertBasis(Magic3x3even);
21
+ #! [ [ 0, 4, 2, 4, 2, 0, 2, 0, 4 ], [ 2, 0, 4, 4, 2, 0, 0, 4, 2 ],
22
+ #! [ 2, 2, 2, 2, 2, 2, 2, 2, 2 ], [ 2, 4, 0, 0, 2, 4, 4, 0, 2 ],
23
+ #! [ 4, 0, 2, 0, 2, 4, 2, 4, 0 ], [ 2, 3, 4, 5, 3, 1, 2, 3, 4 ],
24
+ #! [ 2, 5, 2, 3, 3, 3, 4, 1, 4 ], [ 4, 1, 4, 3, 3, 3, 2, 5, 2 ],
25
+ #! [ 4, 3, 2, 1, 3, 5, 4, 3, 2 ] ]
26
+
27
+
28
+ NmzHilbertSeries(Magic3x3even);
29
+ #! [ t^3+3*t^2-t+1, [ [ 1, 1 ], [ 2, 2 ] ] ]
30
+
31
+ NmzHilbertQuasiPolynomial(Magic3x3even);
32
+ #! [ 1/2*t^2+t+1, 1/2*t^2-1/2 ]
33
+
34
+ #! @EndExample
35
+ #! @EndChunk
36
+
@@ -0,0 +1,7 @@
1
+ if LoadKernelExtension("NormalizInterface") = false then
2
+ Error("failed to load NormalizInterface kernel extension");
3
+ fi;
4
+
5
+ ReadPackage("NormalizInterface", "lib/normaliz.gd");
6
+
7
+ ReadPackage("NormalizInterface", "lib/cone_property_wrappers.gd" );