Opened 16 months ago
Closed 16 months ago
#20650 closed enhancement (fixed)
Add is_polynomial and normal_form to projective morphism
Reported by:  rlmiller  Owned by:  rlmiller 

Priority:  minor  Milestone:  sage7.3 
Component:  algebraic geometry  Keywords:  
Cc:  bhutz  Merged in:  
Authors:  Rebecca Lauren Miller, Ben Hutz  Reviewers:  Ben Hutz, Rebecca Lauren Miller 
Report Upstream:  N/A  Work issues:  
Branch:  2da7679 (Commits)  Commit:  2da7679deb429928be086719fa144a44c86d62a9 
Dependencies:  Stopgaps: 
Description
Added function to determine whether an equation is a polynomial or not by checking if it has a totally ramified fixed point. (is_polynomial)
Then used this function to create make_look_poly, which puts polynomials in the form "xn + a*x(n2) +...+c", where a and c are constants.
Needs more examples, specifically for errors.
Change History (16)
comment:1 Changed 16 months ago by
 Branch set to u/rlmiller/polynomials
comment:2 Changed 16 months ago by
 Commit set to 753f9ad95995d52a368f40acc0d639e7cf922e55
 Owner changed from Rebecca Lauren Miller to rlmiller
 Priority changed from major to minor
comment:3 Changed 16 months ago by
 Status changed from new to needs_review
comment:4 Changed 16 months ago by
 Cc bhutz added; Ben Hutz removed
comment:5 Changed 16 months ago by
 Status changed from needs_review to needs_work
 The documentation does not build
[schemes ] /home/ben/sage/sagetest/local/lib/python2.7/sitepackages/sage/schemes/projective/projective_morphism.py:docstring of sage.schemes.projective.projective_morphism.SchemeMorphism_polynomial_projective_space_finite_field.make_look_poly:13: ERROR: Unexpected indentation. Error building the documentation.
 Totally Rmified Fixed Point does not need initial caps.
 "xn + a*x(n2) +...+c" should not be "
 the examples sage:: should only have one :.
 the doc tests pass, but only because the examples with :: are not being run.
 formatting of the code needs some attention, such as spaces around =
 these two functions were added to the finite field section of polynomial morphism. Should they work over other rings/fields as well?
 make_look_poly could use a better name. How about 'normal_form'? Since it has only one keyword, you should use the keyword instead of the dict kwds
comment:6 Changed 16 months ago by
 Commit changed from 753f9ad95995d52a368f40acc0d639e7cf922e55 to c19032f06179fcb8daae8dda215ce7a639047085
Branch pushed to git repo; I updated commit sha1. New commits:
c19032f  20650 fixed documentaion

comment:7 Changed 16 months ago by
 Status changed from needs_work to needs_review
comment:8 Changed 16 months ago by
 Branch changed from u/rlmiller/polynomials to u/bhutz/polynomials
comment:9 Changed 16 months ago by
 Commit changed from c19032f06179fcb8daae8dda215ce7a639047085 to 530a5858742e5075485487213645d537a7a865f8
 Reviewers set to Ben Hutz
 Status changed from needs_review to needs_work
I did some code cleanup. No functionality was changed except that instead of having to compute the inverses of the conjugation it now just computes the right one to start with.
There are still a few functionality issues: Other base rings that should work do not such as QQ
P.<x,y>=ProjectiveSpace(QQ,1) H=End(P) f=H([x^2+y^2,y^2]) f.is_polynomial()
I think it likely these will work for finite fields as well
P.<x,y>=ProjectiveSpace(GF(13),1) H=End(P) f=H([x^2+y^2,y^2]) f.is_polynomial()
Function field base rings are not going to work, but this error isn't very informative
R.<c>=PolynomialRing(QQ) P.<x,y>=ProjectiveSpace(FractionField(R),1) H=End(P) f=H([x^2+c*y^2,y^2]) f.is_polynomial()
R.<c>=FunctionField(QQ) P.<x,y>=ProjectiveSpace(R,1) H=End(P) f=H([x^2+c*y^2,y^2]) f.is_polynomial()
The single rational preimage check is not sufficient
K.<w>=QuadraticField(4/27) P.<x,y>=ProjectiveSpace(K,1) H=End(P) S=P.coordinate_ring() f=H([x^3+w*y^3,x*y^2]) f.is_polynomial()
New commits:
530a585  20650: code clean up

comment:10 Changed 16 months ago by
One more thing: in dimension > 1 it should return a NotImplmentedError?
comment:11 Changed 16 months ago by
 Branch changed from u/bhutz/polynomials to u/rlmiller/polynomials
comment:12 Changed 16 months ago by
 Commit changed from 530a5858742e5075485487213645d537a7a865f8 to f913bde4a701f68348f18adb23730ea84a5b9b85
 Status changed from needs_work to needs_review
New commits:
f913bde  20650 Fixed errors with finite field and QQ

comment:13 Changed 16 months ago by
 Branch changed from u/rlmiller/polynomials to u/bhutz/polynomials
comment:14 Changed 16 months ago by
 Commit changed from f913bde4a701f68348f18adb23730ea84a5b9b85 to 2da7679deb429928be086719fa144a44c86d62a9
 Component changed from algebra to algebraic geometry
 Summary changed from Add is_polynomial and make_look_poly to projective morphism to Add is_polynomial and normal_form to projective morphism
Going all the way to the splitting field was causing some slow performance, so I've reworked it to manage the fields directly. This includes special casing finite fields and managing the embeddings as well.
it should be noted that a simple error in projective_morphism.conjugation() was corrected in this ticket as well as a simple error in affine_morphism.homogenize()
The new version is ready for review now.
New commits:
2da7679  20650: rework functions for speed, finite fields

comment:15 Changed 16 months ago by
 Reviewers changed from Ben Hutz to Ben Hutz, Rebecca Lauren Miller
 Status changed from needs_review to positive_review
comment:16 Changed 16 months ago by
 Branch changed from u/bhutz/polynomials to 2da7679deb429928be086719fa144a44c86d62a9
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
20650 Created is_polynomial and make_look_poly functionc