Non units are not interval in the same parent, but might be in a bigger one (think of the fraction field of a ring). The question is to have a method that tries to invert the object even if it has to go to a bigger parent; and a different one that tries to find the inverse in the same parent, and raises an exception if it doesn't exist.
El miércoles, 6 de julio de 2016, 21:49:24 (UTC+2), Daniel Krenn escribió: > > On 2016-07-06 16:59, Vincent Delecroix wrote: > > Do you have any suggestion for the name of a method for *internal* > > inversion in a multiplicative monoid (e.g. ring). Currently I know of > > > > sage: (-1).inverse_of_unit() > > -1 > > > > sage: m = matrix(2, [2,1,1,1]) > > sage: m._invert_unit() > > [ 1 -1] > > [-1 2] > > _invert_ ? > > This would kind of coincide with Pythons __invert__ (operator ~), which > is used for this inversion in SageMath anyways. > (I don't see any reason to have the word "unit" in the name of the > method (non-units are not invertible)) > > > -- 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.