> Thanks for your feedback. Here is the rationale we had in
> MuPAD-Combinat for *not* using the notation S[n]:

> Say you want to denote the set of generators of a free module. When
> writing mathematics, one very often uses a family (b_i)_{i in I}.  For
> for the free module F=Q.a \oplus Q.b \oplus Q.c over the rational, one
> would use: (b_i)_{i in {a,b,c}} . When programming, it is very handy
> to have a straightforward translation of this notation, and this is
> the purpose of Family in Sage:
> 
>       sage: F = CombinatorialFreeModule(QQ, ["a", "b", "c"])
>       sage: b = A.basis(); b
>       Finite family {'a': B['a'], 'c': B['c'], 'b': B['b']}

Interesting! You probably meant F.basis(). But anyway, how can you be 
sure that b['a'] is the "same" as the 'a' in the free module? (OK, I 
don't know your specification of the basis() function, but I would 
suppose that it is just giving a basis. Since F is basically the vector 
space QQ^3, you could have a basis. {(0,0,1), (0,1,1), (1,1,1)} and I 
don't see an obvious reason (when I call these vectors by B['a'], 
B['b'], B['c']) why they should have anything to do with a,b,c. In fact,
b['a'] might give any non-zero element from the free module. Why do you 
index it by 'a'? It might be a naming convention that you call the first 
vector B['a'] but that should not have any relation to the "a" in

F = CombinatorialFreeModule(QQ, ["a", "b", "c"])

Or do I just not understand you basis() function?

Oh... the docstring is very precise ;-) :

             Returns the basis of self.
                     ^^^

If there is only one basis that would surprise me. Otherwise the 
documentation is very vague. I have deliberately not cited the example, 
because I wanted the definition (i.e. the specification) of the function.

Ralf

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

Reply via email to