On 18 August 2017 at 14:48, Johan S. H. Rosenkilde <maill...@atuin.dk> wrote: > Compared to Sage 8.0, matrices in Sage 8.1.beta1 now have a host of new > methods: > > - leading_coefficient > - leading_item > - leading_monomial > - leading_support > - leading_term > > These are inherited from the category of finite dimensional modules with > basis of which matrix spaces are now members. > > The semantics is that an e.g. 3x3 matrix over R is an R-module over the > basis > > [1 0 0] [0 1 0] [0 0 1] > [0 0 0], [0 0 0], [0 0 0], ... > [0 0 0] [0 0 0] [0 0 0] > > and hence, M.leading_coefficient() on such a matrix returns M[2,2] if > this is non-zero, otherwise M[2,1] if this is non-zero, etc. > > While it is arguably too rigid to say that this is "senseless" (as I > wrote in the subject), I believe that the use of these functions for > matrices is very narrow. And since matrices are an extremely central > object that beginners immediately start playing around with, it is > unfortunate that they will pollute the tab-completion to such a degree, > and with doc strings which are not very helpful to the algebraically > uninitiated.
I entirely agree. If you had asked me what these methods ('leading_term') etc meant for matrices I would have had absolutely no idea. But then the same would be true if you had asked me what the "leading term" was of an element of the free module R^n (for any ring R). So my recommendation would be to get rid of these at that level. They may have meaning for some modules which happen to be free R-modules of finite rank (such as polynomials over R of fixed degree, where they do of course make sense) but not on __all__ R-modules! They have been put in the wrong place. [In my opinion!] > > My question here is whether it is really intended that all matrices get > stuck with these (almost) senseless methods? > > (this came up during #23619 where we are introducing "leading_matrix" > and "leading_position" for matrices over a univariate polynomial ring.) > > Best, > Johan > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.