Dear Florent, I hope you don't feel offended by my questions. I knew the mathematics you were writing about. I was just saying that either the function basis() should be renamed to canonical_basis() or all what you wrote in your mail should better go into the specification of basis().
I just love to see extensive documentation. The current documentation is not as precise as a mathematician wants. If I try to understand a function, I don't want to be forced to look at the code. Translating programs into mathematics, I would say, the specification is what goes int \begin{theorem} ... \end{theorem}, the code however, lives in \begin{proof} ... \end{proof}. Hmm.. I don't know whether this is the best comparison. But it is completely fine to use theorem without knowing its proof. Ralf On 03/03/2009 01:56 PM, Florent Hivert wrote: > Dear Ralf, > >> 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? > > As usual in mathematics, we identify two different things, whereas when > writing code we have to be very precise. The universal property in the > category of R-module state that: > > For any ring R and set E, there exist an unique (upto isomorphism) R-module > R(E), and a mapping i: E -> R(E) such that if f is an arbitrary mapping > from E to some R-module M, then there exists a unique module homomorphism > g: R(E) -> M such that f = g o i. The mapping i is called the canonical > injection from E to R(E). > > Usually when speaking about R(E), we don't make any difference between any e > in E, and the corresponding element i(e) in R(E). The same abuse of language > is usually done in free group. For many reason, we don't want (cannot ?) do > this abuse anymore in Sage. This being clear, in R(E) there is a canonical > basis (i(e))_{e in E}. The basis Nicolas is speaking about is this basis. so > that "b['a'] is the "same" as the 'a'" is "true" by construction. The rigorous > statement is that b['a'] is the image of 'a' by the canonical injection i. > Now the printing b['a'] is not very clear, and the user is supposed to provide > it's own printing, usually by giving a name to the basis b. > > Note that the mathematical notation (i(e))_{e in E} is exactly an instance of > the notion of family, as stated by Nicolas. This is a very simple and very > natural notion in mathematics... It should be as natural in Sage... As an > example: for any species F, we have a family (F_n)_{n in N} where F_n is > defined as F[{1 ... n}]. And there is a canonical EnumerableSet associated to > F that is Union((F_n)_{n in N}). > > This discussion should clearly end is the doc... Any help welcome. > > Cheers, > > Florent --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---