def _div_(left, right): """ Divide ``left`` by ``right`` TESTS:: sage: G.<a,b> = AbelianGroupWithValues([5,2], 2) sage: a._div_(b) a*b^-1 sage: a/b a*b^-1 sage: (a/b).value() 5/2 """ m = AbelianGroupElement._div_(left, right) m._value = left.value() / right.value() return m
def _div_(self, other): r""" Division of two ideal classes. EXAMPLES:: sage: G = NumberField(x^2 + 23,'a').class_group(); G Class group of order 3 with structure C3 of Number Field in a with defining polynomial x^2 + 23 sage: I = G.0; I Fractional ideal class (2, 1/2*a - 1/2) sage: I*I # indirect doctest Fractional ideal class (2, 1/2*a + 1/2) sage: I*I*I # indirect doctest Trivial principal fractional ideal class """ m = AbelianGroupElement._div_(self, other) m._value = (self.ideal() / other.ideal()).reduce_equiv() return m
def _div_(self, other): r""" Division of two ideal classes. EXAMPLE:: sage: G = NumberField(x^2 + 23,'a').class_group(); G Class group of order 3 with structure C3 of Number Field in a with defining polynomial x^2 + 23 sage: I = G.0; I Fractional ideal class (2, 1/2*a - 1/2) sage: I*I # indirect doctest Fractional ideal class (2, 1/2*a + 1/2) sage: I*I*I # indirect doctest Trivial principal fractional ideal class """ m = AbelianGroupElement._div_(self, other) m._value = (self.ideal() / other.ideal()).reduce_equiv() return m