#8682: Improve AlgebraicScheme_subscheme.__init__ and AmbientSpace._validate
----------------------------------+-----------------------------------------
Reporter: novoselt | Owner: AlexGhitza
Type: defect | Status: new
Priority: major | Milestone: sage-4.4
Component: algebraic geometry | Keywords:
Author: Andrey Novoseltsev | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
----------------------------------+-----------------------------------------
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.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8682>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.