Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve AlgebraicScheme_subscheme.__init__ and AmbientSpace._validate #8682

Closed
novoselt opened this issue Apr 13, 2010 · 4 comments
Closed

Comments

@novoselt
Copy link
Member

Creation of a subscheme given by polynomial equations in some ambient space involves converting the input to polynomials in the correct ring and checking that these polynomials are "OK", e.g. that they are homogeneous for the projective space. There are the following (little) problems with the current realization:

  • converting to the coordinate ring is done in _validate method of ambient spaces, but it is the same for all of them and in general I would expect that a method with such a name just checks something without modifying the input
  • if a subscheme is constructed using an ideal of a wrong ring, but polynomials can be converted into the coordinate ring of the ambient space, then wrong ideal will be saved for later use
  • _validate is not listed as a mandatory method for overriding by subclasses of AmbientSpace

The attached patch makes the following:

  • all conversions are done in !init! of the subscheme
  • _validate of AmbientSpace's must check that the polynomials are OK, but they are already guaranteed to lie in the correct ring
  • _validate is listed as a method which must be overridden
  • error messages in exceptions include only the polynomial that lead to the error, not the whole input

Apply on top of #8675.

Component: algebraic geometry

Author: Andrey Novoseltsev

Reviewer: Alex Ghitza

Merged: sage-4.4.4.alpha0

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

@novoselt
Copy link
Member Author

comment:1

Attachment: trac_8682_improve_algebraic_subscheme_init.patch.gz

@aghitza
Copy link
Contributor

aghitza commented May 18, 2010

Reviewer: Alex Ghitza

@aghitza
Copy link
Contributor

aghitza commented May 18, 2010

comment:2

Looks good to me.

@mwhansen
Copy link
Contributor

mwhansen commented Jun 6, 2010

Merged: sage-4.4.4.alpha0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants