On 06/07/16 15:49, Daniel Krenn wrote:
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))
hum. The point of my question was about ***internal*** inversion. Sage
uses `~x` as a shortcut for `1/x` which involves coercion.
{{{
sage: parent(~1)
Rational Field
sage: parent(1.inverse_of_unit())
Integer Ring
}}}
--
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.