On Jun 24, 12:23 am, "Nicolas M. Thiery" <nicolas.thi...@u-psud.fr>
wrote:
> On Wed, Jun 23, 2010 at 11:06:40PM -0700, John H Palmieri wrote:
> > > If the grading is over NN/ZZ, or some naturally ordered monoid, I
> > > would definitely argue for keeping degree for all elements.
>
> > That's not how I think of elements of a Z-graded algebra: in my
> > experience, if they're not homogeneous, then they don't have a
> > degree.  It should probably be left as a case-by-case situation.
>
> Well, certainly not case by case, since for most of our graded
> algebras (and we will have lots of them) we definitely want to have a
> degree function for all elements. But maybe that should be just in a
> subcategory (most of our algebras are actually graded connected over
> NN).
>
> What makes you dislike having degree implemented for all elements?
>
>  - That it could be accidently used on non homogeneous elements by the
>    caller, when not meant to, without an error raised?

Yes, or that mathematically, at least some people would view "degree"
as being undefined except on homogeneous elements, and I would want
Sage to reflect that.  If someone tells me that an element of a graded
algebra has degree d, then I expect it to be homogeneous: I expect it
to give a well-defined action, raising degree by d, on any graded
module over that graded algebra. If someone says that they have a
"degree d polynomial", then I understand that this just means that the
leading term is homogeneous of degree d, but if they say they have a
"degree d element in the polynomial ring k[x,y,z] graded by ...", then
I interpret this to be a homogeneous element.

(By "if they say", I really mean, "if I read this in a paper dealing
with graded algebras".  For example, if X is a topological space and
H^*(X) is its cohomology, then if someone talks about a "degree d
element of H^*(X)", they are almost guaranteed, in my experience, to
mean "a *homogeneous* element of degree d of H^*(X)".)

I'm leaving my example as is: non-homogeneous elements don't have a
well-defined degree.  But I'm also including a comment about this
choice in the docstring.

>  - That the specs might be ill-defined for non homogeneous elements
>    (e.g. if the order is not total)?
>
>  - That there is a faster way to do it for homogeneous elements
>    (assuming we don't check for homogeneity)?
>
> > Because without forcing the list, the TestSuite fails.

> Ah ok. Then that's just a bug that should be investigated and
> fixed. Let me know when you have an updated patch on trac, and I'll
> have a look.

It's posted now:

<http://trac.sagemath.org/sage_trac/ticket/9280>

> It's great that we are having all those discussions. Once the example
> will be finalized, we will have a sound basis to build upon.

That's what I'm hoping.

Thanks to everyone for all of your comments and suggestions.

--
John

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-de...@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to