#10529: dimension() and is_smooth() for algebraic subschemes of toric varieties
----------------------------------+-----------------------------------------
   Reporter:  vbraun              |       Owner:  AlexGhitza
       Type:  enhancement         |      Status:  needs_work
   Priority:  major               |   Milestone:  sage-4.6.2
  Component:  algebraic geometry  |    Keywords:            
     Author:  Volker Braun        |    Upstream:  N/A       
   Reviewer:  Andrey Novoseltsev  |      Merged:            
Work_issues:                      |  
----------------------------------+-----------------------------------------

Comment(by novoselt):

 Comments on the second patch (trac_10529_MPolynomialIdeal_subs.patch)

  1. The "two-line description" is a little hard to understand, I would
 remove "while not touching other variables" part and instead demonstrate
 it on examples. (But I don't insist on this point.)

  2. The second example in the doctest works with a polynomial, not an
 ideal, so it should be fixed.

  3. The following fails for no reason:
  {{{
 sage: R.<a,b> = PolynomialRing(QQ,2)
 sage: S = PolynomialRing(QQ,"x")
 sage: S.inject_variables()
 Defining x
 sage: p = a^2+b^2+a-b+2
 sage: p.subs(a=x, b=x)
 2*x^2 + 2
 sage: _.parent()
 Univariate Polynomial Ring in x over Rational Field
 sage: I = R.ideal(p)
 sage: I
 Ideal (a^2 + b^2 + a - b + 2) of Multivariate Polynomial Ring in a, b over
 Rational Field
 sage: I.subs(a=x, b=x)
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 ...
 TypeError: Could not find a common ring for the substituted generators.
 }}}
  One solution is to add a check for univariate polynomial rings, but what
 about fraction fields and symbolic rings
  {{{
 sage: var("x")
 x
 sage: x.parent()
 Symbolic Ring
 sage: I.subs(a=x, b=x)
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 ...
 TypeError: Could not find a common ring for the substituted generators.
 }}}
  Maybe it is OK to try to construct an ideal using the sequence universe
 if it has ideal method? So that the code looks like
  {{{
 ring = self.ring()
 generators = [f.subs(in_dict, **kwds) for f in self.gens()]
 if not all(gen in ring for gen in generators):
     ring = Sequence(generators).universe()
 try:
     return ring.ideal(generators)
 except AttributeError:
     raise TypeError("cannot form an ideal from the substituted
 generators!")
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10529#comment:7>
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.

Reply via email to