Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/sage/dynamics/arithmetic_dynamics/projective_ds.py
Original file line number Diff line number Diff line change
Expand Up @@ -8437,6 +8437,14 @@ def normal_form(self, return_conjugation=False):
To: Finite Field in z2 of size 3^2
Defn: 1 |--> 1

Fixes :issue:`38012` by not forcing univariate polynomial to be univariate::

sage: R.<z> = PolynomialRing(QQ)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says an implementation detail that is not understandable by a user. The usual way to introduce a test (example) for a fix is

TEST:

Check that :issue:`38012` is fixed::

    sage: R.<z> = PolynomialRing(QQ)

sage: f = DynamicalSystem_affine(z^2 + z + 1).homogenize(1)
sage: f.normal_form()
Dynamical System of Projective Space of dimension 1 over Rational Field
Defn: Defined on coordinates by sending (x0 : x1) to
(x0^2 + 5/4*x1^2 : x1^2)
"""
# defines the field of fixed points
if self.codomain().dimension_relative() != 1:
Expand Down Expand Up @@ -8465,7 +8473,8 @@ def normal_form(self, return_conjugation=False):
#we find one and not go all the way to the splitting field
i = 0
if G.degree() != 0:
G = G.polynomial(G.variable(0))
if is_MPolynomialRing(G.parent()):
G = G.polynomial(G.variable(0))
else:
#no other fixed points
raise NotImplementedError("map is not a polynomial")
Expand Down