Beispiel #1
0
 def inverse(self):
     r"""
     Return the multiplicative inverse of this ideal class.
     
     EXAMPLE::
     
         sage: K.<a> = NumberField(x^3 - 3*x + 8); G = K.class_group()
         sage: G(2, a).inverse()
         Fractional ideal class (2, a^2 + 2*a - 1)
     """
     m = AbelianGroupElement.inverse(self)
     return FractionalIdealClass(self.parent(), (~self.__ideal).reduce_equiv(), m.list())
Beispiel #2
0
 def inverse(self):
     r"""
     Return the multiplicative inverse of this ideal class.
     
     EXAMPLE::
     
         sage: K.<a> = NumberField(x^3 - 3*x + 8); G = K.class_group()
         sage: G(2, a).inverse()
         Fractional ideal class (2, a^2 + 2*a - 1)
     """
     m = AbelianGroupElement.inverse(self)
     return FractionalIdealClass(self.parent(),
                                 (~self.__ideal).reduce_equiv(), m.list())
    def inverse(self):
        r"""
        Return the multiplicative inverse of this ideal class.

        EXAMPLES::

            sage: K.<a> = NumberField(x^3 - 3*x + 8); G = K.class_group()
            sage: G(2, a).inverse()
            Fractional ideal class (2, a^2 + 2*a - 1)
            sage: ~G(2, a)
            Fractional ideal class (2, a^2 + 2*a - 1)
        """
        m = AbelianGroupElement.inverse(self)
        m._value = (~self.ideal()).reduce_equiv()
        return m
Beispiel #4
0
    def inverse(self):
        r"""
        Return the multiplicative inverse of this ideal class.

        EXAMPLE::

            sage: K.<a> = NumberField(x^3 - 3*x + 8); G = K.class_group()
            sage: G(2, a).inverse()
            Fractional ideal class (2, a^2 + 2*a - 1)
            sage: ~G(2, a)
            Fractional ideal class (2, a^2 + 2*a - 1)
        """
        m = AbelianGroupElement.inverse(self)
        m._value = (~self.ideal()).reduce_equiv()
        return m
Beispiel #5
0
 def inverse(self):
     r"""
     Finds the inverse of the given S-ideal class.
     
     EXAMPLES::
     
         sage: K.<a> = QuadraticField(-14)
         sage: I = K.ideal(2,a)                  
         sage: S = (I,)
         sage: CS = K.S_class_group(S)
         sage: G = K.ideal(3,a+1)
         sage: CS(G).inverse()
         Fractional S-ideal class (3, a + 2)
     """
     m = AbelianGroupElement.inverse(self)
     inv_ideal = self.parent().number_field().class_group()(self.ideal()).inverse().ideal()
     return SFractionalIdealClass(self.parent(), inv_ideal , m.list())
Beispiel #6
0
 def inverse(self):
     r"""
     Finds the inverse of the given S-ideal class.
     
     EXAMPLES::
     
         sage: K.<a> = QuadraticField(-14)
         sage: I = K.ideal(2,a)                  
         sage: S = (I,)
         sage: CS = K.S_class_group(S)
         sage: G = K.ideal(3,a+1)
         sage: CS(G).inverse()
         Fractional S-ideal class (3, a + 2)
     """
     m = AbelianGroupElement.inverse(self)
     inv_ideal = self.parent().number_field().class_group()(
         self.ideal()).inverse().ideal()
     return SFractionalIdealClass(self.parent(), inv_ideal, m.list())
Beispiel #7
0
    def inverse(self):
        """
        Return the inverse element.

        EXAMPLE::

            sage: G.<a,b> = AbelianGroupWithValues([2,-1], [0,4])
            sage: a.inverse()
            a^-1
            sage: a.inverse().value()
            1/2
            sage: a.__invert__().value()
            1/2
            sage: (~a).value()
            1/2
            sage: (a*b).value()
            -2
            sage: (a*b).inverse().value()
            -1/2
        """
        m = AbelianGroupElement.inverse(self)
        m._value = ~self.value()
        return m
Beispiel #8
0
    def inverse(self):
        """
        Return the inverse element.

        EXAMPLE::

            sage: G.<a,b> = AbelianGroupWithValues([2,-1], [0,4])
            sage: a.inverse()
            a^-1
            sage: a.inverse().value()
            1/2
            sage: a.__invert__().value()
            1/2
            sage: (~a).value()
            1/2
            sage: (a*b).value()
            -2
            sage: (a*b).inverse().value()
            -1/2
        """
        m = AbelianGroupElement.inverse(self)
        m._value = ~self.value()
        return m