Dear all,

I am starting to work to implement Witt vectors in Sage.  I think I
have most of the needed functions in a ".sage" file, but I now need to
create a "RingOfWittVectors" class and feel a little lost.

I've been looking over the developer's guide and some Python
references, but haven't been able to find the answers.  But I'd gladly
just read any reference you might give me.

Please let me know if this is not the proper place to ask these sorts
of questions, as they might be quite basic.



If I understand the process correctly, I must create a ".py" file and
put it (I assume) in "$SAGEROOT/devel/sage/sage/rings" and add it to
"all.py"

I assume that the "RingOfWittVectors" would be implemented as a Python
class, correct?  Something like:

--------------------------
class RingOfWittVectors():
r"""
Documentation...
"""    
    def __init__(self, R, n):
        self.base_ring=R
        self.length=n

    def __call__(self, v):
        # test if length and entries are correct
        self.data=v
    

(...)
--------------------------

I assume that there should be a containing class to use in 

class RingOfWittVectors(<some sage defined class>):
(...)

correct?  How can I find which classes are predefined?


Also, should __call__ have all the possible coercions?


What other special methods __<something>__ should be added...  I am
lost trying to find this.


I'd appreciate any input or reference.  In particular, a simple example of a
similar class would be greatly helpful.


Thanks,

Luis

-- 
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

Reply via email to