Robert Bradshaw <[EMAIL PROTECTED]> writes:

> >> Typically one uses the parent() function when one has an element
> >> (such as an integer) and wants it's Parent. This is why it's not an
> >> element of the Parent.
> >
> > Hm, I do not understand that.  Why wouldn't one want to use 5.parent (),
> > for example?  (The method notation together with tab completion is really
> > nice...)  Well, I suppose that some people prefer usual functional
> > notation.
> 
> Yes, the method notation + tab completion is very nice and usually  
> prefered. The reason one would want to use parent() however is  
> because not everything has a parent method. For example, int(1).parent 
> () would fail with an attribute error. The parent function always  
> succeeds, giving something reasonable if the object in question  
> doesn't have such a method.
> 
> Often functional notation is just handier for really common things,  
> e.g. writing sin(pi/5) rather than (pi/5).sin().

Yes, I agree here.  Personally I would have done this only for "mathematical"
functions, to reduce confusion.

> > I think it's ok to have things without parent, but I do not understand yet,
> > why x.f() and f(x) are designed differently in some cases.  One case I
> > stepped into was parent, the other was Mod.
> 
> Here it's a question of context. The method mod(a,b) is a constructor  
> for an element of Z/mZ, a.mod(b) means "divide and take the remainder  
> (as an integer)"

Oh, I saw this, but spelling it out made me understand.  Thank you!  (I'd
rather call this method "remainder", however, then.  Currently it's just very
confusing.

> >> as the set of all sets is not a category.
> >
> > Äh?  You don't mean category in the mathematical sense here, do you?
> > http://en.wikipedia.org/wiki/Category_of_sets
> 
> Yes, I meant in the sense that the class of all sets can't be an  
> object in a category. 

Hmm...

> I think the confusion here is as to what a parent actually is. A parent is an
> Object in a concrete category, i.e. it contains Elements. 

Yes, that's why I would have thought that a set should have a parent: the class
of all sets.  Oh, I see, Set([1,2,3]) is a Parent.

> This is why the notion of the "parent of a Parent" is a bit strange. 

I don't understand, I'd think that it is OK to have a Parent have elements,
that are Parents in turn.  For example, the set of combinatorial species is a
ring (in various ways), but it's very natural to think of a particular species
(eg. BinaryTree) as parent of it's structures.

> > Does Sage have it's own notion of category, just as FriCAS?

(I should have been more precise: FriCAS has it's own notion of category --
which is *different* from the usual mathematical notion of category. But now I
understand that Sage - fortunately - does *not* introduce a concept "category",
that differs from the usual one.)

Martin



--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to