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
#! @BeginChunk example dual
#! @BeginExample
M := [
 [ 8,  8,  8,  7 ],
 [ 0,  4,  0,  1 ],
 [ 0,  1,  0,  7 ],
 [ 0, -2,  0,  7 ],
 [ 0, -2,  0,  1 ],
 [ 8, 48,  8, 17 ],
 [ 1,  6,  1, 34 ],
 [ 2,-12, -2, 37 ],
 [ 4,-24, -4, 14 ]
];
#! [ [ 8, 8, 8, 7 ], [ 0, 4, 0, 1 ], [ 0, 1, 0, 7 ], [ 0, -2, 0, 7 ],
#!   [ 0, -2, 0, 1 ], [ 8, 48, 8, 17 ], [ 1, 6, 1, 34 ],
#!   [ 2, -12, -2, 37 ], [ 4, -24, -4, 14 ] ]
D := NmzCone(["inhom_inequalities", M,
              "signs", [[1,1,1]],
              "grading", [[1,1,1]]]);
#! <a Normaliz cone>
NmzCompute(D,["DualMode","HilbertBasis","ModuleGenerators"]);
#! true
NmzHilbertBasis(D);
#! [ [ 1, 0, 0, 0 ], [ 1, 0, 1, 0 ] ]
NmzModuleGenerators(D);
#! [ [ 0, 0, 0, 1 ], [ 0, 0, 1, 1 ], [ 0, 0, 2, 1 ], [ 0, 0, 3, 1 ] ]
#! @EndExample
#! @EndChunk