[sage-devel] Re: Scheme extends Parent

2010-07-12 Thread Andrey Novoseltsev
On Jul 12, 10:20 am, Marco Streng marco.str...@gmail.com wrote:
 Hi all,

 I'm getting a bit confused about Parent objects and why
 sage.schemes.generic.scheme.Scheme extends Parent.

 Schemes are not really containers of anything, right? Calling
 S.an_element() currently gives a NotImplementedError for most schemes,
 and TestSuite(S).run() will give lots of failures for almost every
 kind of scheme.

 ProjectiveSpace does implement an_element, but that gives elements of
 the coordinate ring instead of elements of the projective space
 itself.

 To make things even more confusing, the documentation for
 sage.structure.parent.Parent.an_element() says Parent structures that
 are should override _an_element_() instead. What does Parent
 structures that are mean? When is a parent structure?

 Thanks,
 Marco

 {{{
 sage: Q.X,Y,Z = QQ[]
 sage: P = ProjectiveSpace(Q)
 sage: e = P.an_element(); e
 X
 sage: e.parent()
 Multivariate Polynomial Ring in X, Y, Z over Rational Field
 sage: S = Curve(X^2-Y^2+Z^2)
 sage: S.an_element()
 NotImplementedError: please implement _an_element_ for Projective
 Curve over Rational Field defined by X^2 - Y^2 + Z^2

 }}}

I was the one who switched schemes to Parent instead of Parent_old and
I definitely did notice that TestSuite does not run on them and in
general there are some confusing points. However I was not able to
completely fix everything and in particular not even all components
of the schemes framework are derived from new style classes. I would
argue that schemes are containers of their points, so there is nothing
wrong in deriving them from Parent, but the way how it is done may
require fixing and modification. If someone wants to do it, I beg
doing it after inclusion of all tickets upto #9245 because: 1) it may
be a bit difficult to rebase all patches in that sequence; 2) these
tickets add more complicated and more documented and doctested
ambient spaces and schemes, so it would be nice to have them in to
test the changes.

Thank you,
Andrey

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Scheme extends Parent

2010-07-12 Thread Marco Streng


On 12 jul, 18:54, William Stein wst...@gmail.com wrote:
 On Monday, July 12, 2010, Marco Streng marco.str...@gmail.com wrote:
  Hi all,

  I'm getting a bit confused about Parent objects and why
  sage.schemes.generic.scheme.Scheme extends Parent.

  Schemes are not really containers of anything, right?

 A scheme is by definition a locally ring topological space.   Thus a scheme 
 is:

    - a set of points (prime ideals in case of an affine scheme)

    -  a topology (locally the zariski topology)

   - a sheaf if rings

  Calling
  S.an_element() currently gives a NotImplementedError for most schemes,
  and TestSuite(S).run() will give lots of failures for almost every
  kind of scheme.

  ProjectiveSpace does implement an_element, but that gives elements of
  the coordinate ring instead of elements of the projective space
  itself.

 Why elements in quotes?  Coordinate ring elements is a bug.

In quotes because I don't call them elements but points (or
elements) of the underlying topological space. Variety extends
Scheme, but for me an element of a variety sound like a rational
point or a geometric point, but not a scheme-theoretic point.

Anyway, I'm fine with elements of a Sage Scheme meaning points of
the topological space.

I'm still confused about the following though:

  To make things even more confusing, the documentation for
  sage.structure.parent.Parent.an_element() says Parent structures that
  are should override _an_element_() instead. What does Parent
  structures that are mean? When is a parent structure?

Thanks,
Marco

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org