Skip to content

Commit

Permalink
Trac #18399: projective automorphism group fails for homogenized maps
Browse files Browse the repository at this point in the history
When the numerator is a constant, the .polynomial() conversion returns a
different variable than the denominator. This is the expected behavior
from the documentation of those functions. So this ticket will change
how the conversion is done.

Example that fails

{{{
A.<z>=AffineSpace(QQ,1)
HA=End(A)
f=HA([1/z^7])
F=f.homogenize(1)
F.automorphism_group()

}}}

URL: http://trac.sagemath.org/18399
Reported by: bhutz
Ticket author(s): Ben Hutz
Reviewer(s): Grayson Jorgenson
  • Loading branch information
Release Manager authored and vbraun committed May 18, 2015
2 parents 444b65c + 62ce7b2 commit 635a18e
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/sage/schemes/projective/projective_morphism.py
Expand Up @@ -2425,6 +2425,18 @@ def automorphism_group(self, **kwds):
sage: f = H([3*x^2*y - y^3,x^3 - 3*x*y^2])
sage: f.automorphism_group(algorithm='CRT',return_functions=True,iso_type=True)
([x, (x + 1)/(x - 1), (-x + 1)/(x + 1), -x, 1/x, -1/x, (x - 1)/(x + 1), (-x - 1)/(x - 1)], 'Dihedral of order 8')
::
sage: A.<z> = AffineSpace(QQ,1)
sage: H = End(A)
sage: f = H([1/z^3])
sage: F = f.homogenize(1)
sage: F.automorphism_group()
[
[1 0] [0 2] [-1 0] [ 0 -2]
[0 1], [2 0], [ 0 1], [ 2 0]
]
"""

alg = kwds.get('algorithm',None)
Expand All @@ -2434,13 +2446,12 @@ def automorphism_group(self, **kwds):

if self.domain().dimension_relative() != 1:
raise NotImplementedError("Must be dimension 1")
else:
f = self.dehomogenize(1)
z = f[0].parent().gen()
f = self.dehomogenize(1)
R = PolynomialRing(f.base_ring(),'x')
if is_FractionFieldElement(f[0]):
F = (f[0].numerator().polynomial(z))/f[0].denominator().polynomial(z)
F = (f[0].numerator().univariate_polynomial(R))/f[0].denominator().univariate_polynomial(R)
else:
F = f[0].polynomial(z)
F = f[0].univariate_polynomial(R)
from endPN_automorphism_group import automorphism_group_QQ_CRT, automorphism_group_QQ_fixedpoints
if alg is None:
if self.degree() <= 12:
Expand Down

0 comments on commit 635a18e

Please sign in to comment.