Ask Your Question

Cody's profile - activity

2023-12-16 21:00:04 +0100 received badge  Notable Question (source)
2019-11-08 18:55:56 +0100 received badge  Popular Question (source)
2017-03-22 22:12:37 +0100 received badge  Popular Question (source)
2011-07-10 16:53:50 +0100 commented question Modifying PALP settings

Edited to include the code.

2011-07-10 07:11:24 +0100 asked a question Modifying PALP settings

I encounter an error from PALP when I try to create a dual cone. I create a cone Cstar as an intersection of several other cones, then try to create its dual:

Cstar.dual();

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_25.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("Q3N0YXIuZHVhbCgp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/tmp/tmpFOwj4h/___code___.py", line 2, in <module>
    exec compile(u'Cstar.dual()
  File "", line 1, in <module>

  File "/opt/sage47/local/lib/python2.6/site-packages/sage/geometry/cone.py", line 1608, in dual
    rays = list(self.facet_normals())
  File "/opt/sage47/local/lib/python2.6/site-packages/sage/geometry/cone.py", line 2123, in facet_normals
    for i in range(P.nfacets()):
  File "/opt/sage47/local/lib/python2.6/site-packages/sage/geometry/lattice_polytope.py", line 2196, in nfacets
    if self.is_reflexive():
  File "/opt/sage47/local/lib/python2.6/site-packages/sage/geometry/lattice_polytope.py", line 1930, in is_reflexive
    self._read_equations(self.poly_x("e"))
  File "/opt/sage47/local/lib/python2.6/site-packages/sage/geometry/lattice_polytope.py", line 2712, in poly_x
    return self._palp("poly.x -f" + keys, reduce_dimension)
  File "/opt/sage47/local/lib/python2.6/site-packages/sage/geometry/lattice_polytope.py", line 1026, in _palp
    self, self.vertices(), result)
ValueError: Error executing "poly.x -fe" for the given polytope!
Polytope: A lattice polytope: 10-dimensional, 47 vertices.
Vertices:
...[a large matrix]
Output:
increase POLY_Dmax!

How do I increase POLY_Dmax?

2011-06-23 21:29:07 +0100 marked best answer Magma object from magma.eval()?

Suppose you created a polynomial in Magma with the following command:

 sage: magma.eval('R<x> := PolynomialRing(RationalField()); f := (x-17/2)^3;')

Then, you can get a Sage version of that object like this:

 sage: magma('f').sage()

The magma('f') part creates an object (MagmaElement) in Sage which is basically a pointer to the variable f in the Magma session. (You can actually use this perform calls on this objects which will translate to Magma commands. For example, magma('f').Factorization() is basically same as doing magma.eval('result := Factorization(f);') and returning magma('result').) The sage() method will convert a MagmaElement to the corresponding Sage object if possible.

2011-06-23 15:30:36 +0100 received badge  Student (source)
2011-06-23 15:13:33 +0100 asked a question Magma object from magma.eval()?

How can I get a Magma object to use inside of Sage from something created in Magma through magma.eval()? Is this possible?

2011-06-23 12:47:46 +0100 received badge  Scholar (source)
2011-06-23 12:47:46 +0100 marked best answer Specifying cardinality for action of permutation group

In ticket 10335, there is a patch which will allow one to specify the domain of the permutation group (and hence its cardinality). For example, you'll be able to do something like

sage: P = PermutationGroup([[(1,2)], [(1,3),(2,4)]], domain=[1,2,3,4,5])
sage: P.degree()
5

where as now in Sage you would get 4 for the degree. This will also be passed on to Magma. I'm hoping that this will be in the next release of Sage.

2011-06-22 16:06:48 +0100 commented answer Specifying cardinality for action of permutation group

Thanks! Can you point me a reference on how to apply the patches?

2011-06-22 15:29:54 +0100 received badge  Editor (source)
2011-06-22 15:26:18 +0100 received badge  Supporter (source)
2011-06-22 02:09:49 +0100 asked a question Specifying cardinality for action of permutation group

In Magma, it is possible to create a permutation group with something like G := PermutationGroup<n|relations>, where $n$ is to be the cardinality of the set the group acts on. One needs this cardinality to use a GModule method. I would like to create such a group in Sage and then port it to Magma to create a GModule, but I always end up with a Magma element having too small a cardinality. Is it possible to specify such a cardinality in Sage? Can it be created as a subgroup of $S_n$? I did not have luck with that.