On Wed, Feb 10, 2010 at 11:10:46AM -0500, Jason Bandlow wrote:
> I am indifferent to the choice of convention.  I agree that the conflict
> you point out is disturbing.  My choice for using the smallest support
> was based on the current behavior of printing in sage (for most
> combinatorics).
> 
> sage: X = CombinatorialFreeModule(QQ, [1,2,3]);   B = X.basis()
> sage: B[3] + B[1]
> B[1] + B[3]
> 
> sage: SF = SymmetricFunctions(QQ); SF.inject_shorthands()
> sage: s(e[1]^3)
> s[1, 1, 1] + 2*s[2, 1] + s[3]
> 
> I vote -1 on leading_term always giving the last term printed and
> trailing_term always giving the first term printed.  I have no problem
> with changing the order of printing, though.

Ah, interesting. As Simon, I really have a Gröbner point of view here
(leading = large). I had actually never associated the leading term of
something with how it reads on screen. Probably because the printing
convention varies from system to system, and even within a system.

For polynomials, the terms are sorted decreasingly, so it would be
consistent to do the same for symmetric functions and the like
(although series are probably printed the other way around). I am just
a bit reluctant to fix all the doctests accordingly, but sage
-fixdoctest can probably relieve us from most of the trouble.

Preference anyone? In particular, who thinks consistency between
leading / trailing and the way elements are printed is important?

> > A related call for votes: what do we want to mean by upper/lower
> > triangular morphisms? Let X be a module with basis, and b its basis.
> > 
> > Then, a morphism f: X->X is upper triangular if, for all i,
> > 
> >  - Option 1:   f( b[i] ) = c * b[i] + smaller terms
> >  - Option 2:   f( b[i] ) = c * b[i] + larger terms
> > 
> > Intuitively, I vote for Option 1. An argument is that this matches
> > with upper triangularity of the matrix A of f when writing the images
> > f(b[i]) as column vectors, which is the usual convention when f(x) is
> > calculated by A * X.
> 
> Well, maybe it isn't too unusual to think of x as a row-vector and
> compute f(x) = x * A.

I know ... I am fairly agnostic as well, and probably are mostly
influenced by the fact that we always teach A*X in class, or at least
here in France.

Hmm, one point though: morphisms in Sage compose from right to left
(as the usual \circ). So it would be consistent to think left action /
multiplication by their matrix on the left.

> After all, a list of coefficients looks like a row vector and not a
> column vector.  As an example, currently in sage we have
>
> sage: SF = SymmetricFunctions(QQ); SF.inject_shorthands()
> sage: s.transition_matrix(m,3)
> [1 1 1]
> [0 1 2]
> [0 0 1]
> 
> Do you agree that, in principle, this command should return the matrix
> representing the morphism from the Schur basis to the monomial basis?

Definitely.

> If so, this is currently in agreement with option 2, and should be
> changed if we adopt option 1.  Again, I am basically agnostic as to the
> convention we choose, as long as we document it and use it consistently.

Ok. Transition matrix will have to be rewritten in a generic way at
some point anyway, though we will have to be careful with backward
compatibility.

> I'll note that we seem to be in agreement that the upper-left corner of
> the matrix should be indexed by the (smallest-smallest) pair of indices.

Yes.

>   I think this is useful, as it naturally generalizes to the commonly
> occurring case of a semi-infinite set with a smallest, but not largest,
> element (eg, NonNegativeIntegers). But I will point out that if we use
> leading_term=largest, then the rows and columns of this matrix will
> begin with the trailing term and end with the leading term, which again
> seems unfortunate to me.

Yup.

Cheers,
                                Nicolas
--
Nicolas M. Thiéry "Isil" <[email protected]>
http://Nicolas.Thiery.name/

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

Reply via email to