sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.37k stars 466 forks source link

enhance is_postcritically_finite, critical_point_portrait, and multiplier_spectra to work over number fields and finite fields #28170

Closed 89af23a8-fe73-43ac-b3cf-b6969ad6e40f closed 4 years ago

89af23a8-fe73-43ac-b3cf-b6969ad6e40f commented 5 years ago

The following code does not work as mentioned functions currently go to the algebraic closure:

sage: F.<a> = QuadraticField(2)
sage: P.<x,y> = ProjectiveSpace(F, 1)
sage: f = DynamicalSystem_projective([-y^3, a*x^3 - 3*x^2*y + 3*x*y^2 - y^3])
sage: f.is_postcritically_finite()
sage: F.<a> = GF(7)
sage: P.<x,y> = ProjectiveSpace(F, 1)
sage: f = DynamicalSystem_projective([x^2 + y^2, y^2])
sage: f.multiplier_spectra(1)

We call field_of_definition_critical/field_of_definition_periodic on f to change ring to a finite extension instead of QQbar, so that functionality is preserved for number fields.

Additionally, we add _is_preperiodic and is_postcritically_finite to the DynamicalSystem_projective_finite_field class: every point is preperiodic over a finite field, so both functions should return True. If return_period=True in _is_preperiodic, we call orbit_structure. In order to normalize output, we modify orbit_structure to return (m,n) as a tuple instead of a list.

In doctests for multiplier_spectra, using field of definition instead of QQbar permuted multipliers in several outputs. We corrected this and hope to prevent similar issues by sorting the output.

These changes allow is_postcritically_finite and multiplier_spectra to work over finite fields as well.

Component: dynamics

Keywords: SI2019, sd104

Author: Heidi Benham, Julia Cai, Leopold Mayer, Ben Hutz

Branch/Commit: 321adf3

Reviewer: Meghan Grip, Talia Blum, John Doyle, Alexis Suki Dasher, John Michael Clark

Issue created by migration from https://trac.sagemath.org/ticket/28170

89af23a8-fe73-43ac-b3cf-b6969ad6e40f commented 5 years ago

Description changed:

--- 
+++ 
@@ -19,4 +19,6 @@
 Additionally, we add _is_preperiodic and is_postcritically_finite to the DynamicalSystem_projective_finite_field class: every point is preperiodic over a finite field, so both functions should return True. If return_period=True in _is_preperiodic, we call orbit_structure. 
 In order to normalize output, we modify orbit_structure to return (m,n) as a tuple instead of a list. 

+In doctests for multiplier_spectra, using field of definition instead of QQbar permuted multipliers in several outputs. We corrected this and hope to prevent similar issues by sorting the output.
+
 These changes allow is_postcritically_finite and multiplier_spectra to work over finite fields as well. 
4e742295-d57b-4f9d-a633-25a3840bef4f commented 5 years ago

Branch: u/gh-leopoldmayer/enhance_is_postcritically_finitecritical_point_portraitand_multiplier_spectra_to_work_over_number_fields_and_finite_fields

89af23a8-fe73-43ac-b3cf-b6969ad6e40f commented 5 years ago

New commits:

d145dca28170 - enhance several functions using field_of_definition functions
b9f28bcMerge branch 'is_pcf' into t/28170/enhance_is_postcritically_finite__critical_point_portrait__and_multiplier_spectra_to_work_over_number_fields_and_finite_fields
89af23a8-fe73-43ac-b3cf-b6969ad6e40f commented 5 years ago

Commit: b9f28bc

3f0c92eb-0f0e-4593-a6ac-3184e0ce4380 commented 5 years ago

Reviewer: Meghan Grip, Talia Blum

vbraun commented 5 years ago
comment:5
sage -t --long --warn-long 49.7 src/sage/dynamics/arithmetic_dynamics/projective_ds.py
**********************************************************************
File "src/sage/dynamics/arithmetic_dynamics/projective_ds.py", line 264, in sage.dynamics.arithmetic_dynamics.projective_ds.?
Failed example:
    fbar.is_postcritically_finite()
Exception raised:
    Traceback (most recent call last):
      File "/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1105, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.dynamics.arithmetic_dynamics.projective_ds.?[32]>", line 1, in <module>
        fbar.is_postcritically_finite()
      File "/home/release/Sage/local/lib/python2.7/site-packages/sage/dynamics/arithmetic_dynamics/projective_ds.py", line 3105, in is_postcritically_finite
        embedding = self.field_of_definition_critical(return_embedding=True)[1]
      File "/home/release/Sage/local/lib/python2.7/site-packages/sage/dynamics/arithmetic_dynamics/generic_ds.py", line 412, in field_of_definition_critical
        K = poly.splitting_field(names, map=return_embedding, simplify_all=simplify_all)
      File "sage/rings/polynomial/polynomial_element.pyx", line 4548, in sage.rings.polynomial.polynomial_element.Polynomial.splitting_field (build/cythonized/sage/rings/polynomial/polynomial_element.c:38804)
        raise NotImplementedError("splitting_field() is only implemented over number fields and finite fields")
    NotImplementedError: splitting_field() is only implemented over number fields and finite fields
89af23a8-fe73-43ac-b3cf-b6969ad6e40f commented 5 years ago

Changed branch from u/gh-leopoldmayer/enhance_is_postcritically_finitecritical_point_portraitand_multiplier_spectra_to_work_over_number_fields_and_finite_fields to u/gh-juliacai05/enhance_is_postcritically_finitecritical_point_portraitand_multiplier_spectra_to_work_over_number_fields_and_finite_fields

89af23a8-fe73-43ac-b3cf-b6969ad6e40f commented 5 years ago
comment:7

Modified is_postcritically_finite to check if base ring of f is algebraically closed before attempting to change ring.

89af23a8-fe73-43ac-b3cf-b6969ad6e40f commented 5 years ago

Changed branch from u/gh-juliacai05/enhance_is_postcritically_finitecritical_point_portraitand_multiplier_spectra_to_work_over_number_fields_and_finite_fields to u/gh-leopoldmayer/enhance_is_postcritically_finitecritical_point_portraitand_multiplier_spectra_to_work_over_number_fields_and_finite_fields

89af23a8-fe73-43ac-b3cf-b6969ad6e40f commented 5 years ago

Changed commit from b9f28bc to 0b6ead0

89af23a8-fe73-43ac-b3cf-b6969ad6e40f commented 5 years ago

Changed branch from u/gh-leopoldmayer/enhance_is_postcritically_finitecritical_point_portraitand_multiplier_spectra_to_work_over_number_fields_and_finite_fields to u/gh-juliacai05/enhance_is_postcritically_finitecritical_point_portraitand_multiplier_spectra_to_work_over_number_fields_and_finite_fields

89af23a8-fe73-43ac-b3cf-b6969ad6e40f commented 5 years ago

New commits:

b9b49b2Merge branch 'u/gh-leopoldmayer/enhance_is_postcritically_finite__critical_point_portrait__and_multiplier_spectra_to_work_over_number_fields_and_finite_fields' of git://trac.sagemath.org/sage into edit_28170
0b6ead0Edit 28170 to address doctest failure
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

Changed commit from 0b6ead0 to 5c8e1f0

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

e649e4e28263 : Added a degree function for dynamical systems and affine morphisms.
b504232Merge branch 8.9.beta4 of git://trac.sagemath.org/sage into 28263
5be01a9Merge branch 'u/gh-juliacai05/enhance_is_postcritically_finite__critical_point_portrait__and_multiplier_spectra_to_work_over_number_fields_and_finite_fields' of git://trac.sagemath.org/sage into change_28170
5c8e1f028170 - added embedding parameter to is_pcf over finite fields so that critical_point_portrait works over finite fields
bhutz commented 5 years ago
comment:10

err...looks like you got the affine degree function mixed in with your code for this ticket. That needs to be removed.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

Changed commit from 5c8e1f0 to b684a71

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

6878a9028170 - remove affine degree function from code for ticket
d1ff92aMerge branch 'u/gh-juliacai05/enhance_is_postcritically_finite__critical_point_portrait__and_multiplier_spectra_to_work_over_number_fields_and_finite_fields' of git://trac.sagemath.org/sage into fix_28170
b684a7128170: removed affine degree function code
89af23a8-fe73-43ac-b3cf-b6969ad6e40f commented 5 years ago
comment:12

affine degree function code from 28163 removed

0befb2c9-79c8-4449-86c2-a598706f893f commented 5 years ago

Changed reviewer from Meghan Grip, Talia Blum to Meghan Grip, Talia Blum, John Doyle

vbraun commented 5 years ago
comment:14

Merge conflict, please merge in the next beta...

bhutz commented 4 years ago

Changed branch from u/gh-juliacai05/enhance_is_postcritically_finitecritical_point_portraitand_multiplier_spectra_to_work_over_number_fields_and_finite_fields to u/bhutz/enhance_is_postcritically_finitecritical_point_portraitand_multiplier_spectra_to_work_over_number_fields_and_finite_fields

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Changed commit from b684a71 to c877e68

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

c877e6828170: added option to use closure or splitting fields
bhutz commented 4 years ago

Changed author from Heidi Benham, Julia Cai, Leopold Mayer to Heidi Benham, Julia Cai, Leopold Mayer, Ben Hutz

bhutz commented 4 years ago
comment:17

Since it was often very slow over the splitting fielded made the default to be the algebraic closure with the option of using the splitting field. Added a number of examples.

Adjusted the field_of_definition functions to return the base if it is already the algebraic closure.

This is ready for another set of eyes.

bhutz commented 4 years ago

Changed branch from u/bhutz/enhance_is_postcritically_finitecritical_point_portraitand_multiplier_spectra_to_work_over_number_fields_and_finite_fields to u/bhutz/28170

bhutz commented 4 years ago

Changed keywords from SI2019 to SI2019, sd104

6008011b-a057-4e72-86c4-319449947e58 commented 4 years ago

Changed reviewer from Meghan Grip, Talia Blum, John Doyle to Meghan Grip, Talia Blum, John Doyle, Alexis Suki Dasher, John Michael Clark

6008011b-a057-4e72-86c4-319449947e58 commented 4 years ago
comment:19

The following code gives an error:

sage: P.<x,y> = ProjectiveSpace(GF(13),1)
sage: f = DynamicalSystem_projective([x^4 - x^2*y^2 + y^4, y^4])
sage: f.is_postcritically_finite(use_algebraic_closure=False)
TypeError: is_postcritically_finite() got an unexpected keyword argument 'use_algebraic_closure'

This should not give an error when giving the keyword 'use_algebraic_closure', and should instead return True regardless. Every point is postcritically finite in a finite field.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Changed commit from c877e68 to 321adf3

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

321adf328170: fix from review comments
6008011b-a057-4e72-86c4-319449947e58 commented 4 years ago
comment:22

All tests pass.

vbraun commented 4 years ago

Changed branch from u/bhutz/28170 to 321adf3