예제 #1
0
    def isometry_in_model(self, A):
        r"""
        Check if the given matrix ``A`` is in the group `U(1,1)`.

        EXAMPLES::

            sage: z = [CC.random_element() for k in range(2)]; z.sort(key=abs)
            sage: A = matrix(2,[z[1], z[0],z[0].conjugate(),z[1].conjugate()])
            sage: HyperbolicPlane().PD().isometry_in_model(A)
            True
        """
        if isinstance(A, HyperbolicIsometry):
            return True
        # alpha = A[0][0]
        # beta = A[0][1]
        # Orientation preserving and reversing
        return (HyperbolicIsometryPD._orientation_preserving(A)
                or HyperbolicIsometryPD._orientation_preserving(I * A))
예제 #2
0
    def isometry_in_model(self, A):
        r"""
        Check if the given matrix ``A`` is in the group `U(1,1)`.

        EXAMPLES::

            sage: z = [CC.random_element() for k in range(2)]; z.sort(key=abs)
            sage: A = matrix(2,[z[1], z[0],z[0].conjugate(),z[1].conjugate()])
            sage: HyperbolicPlane().PD().isometry_in_model(A)
            True
        """
        if isinstance(A, HyperbolicIsometry):
            return True
        # alpha = A[0][0]
        # beta = A[0][1]
        # Orientation preserving and reversing
        return (HyperbolicIsometryPD._orientation_preserving(A) or
                HyperbolicIsometryPD._orientation_preserving(I * A))
예제 #3
0
    def image_isometry_matrix(self, x):
        """
        Return the image of the matrix of the hyperbolic isometry ``x``
        under ``self``.

        EXAMPLES:

        We check that orientation-reversing isometries behave as they
        should::

            sage: PD = HyperbolicPlane().PD()
            sage: UHP = HyperbolicPlane().UHP()
            sage: phi = UHP.coerce_map_from(PD)
            sage: phi.image_isometry_matrix(matrix([[0,I],[I,0]]))
            [-1  0]
            [ 0 -1]
        """
        from sage.geometry.hyperbolic_space.hyperbolic_isometry import HyperbolicIsometryPD
        if not HyperbolicIsometryPD._orientation_preserving(x):
            return matrix([[1,I],[I,1]]) * x * matrix([[1,-I],[-I,1]]).conjugate() / Integer(2)
        return matrix([[1,I],[I,1]]) * x * matrix([[1,-I],[-I,1]]) / Integer(2)
예제 #4
0
    def image_isometry_matrix(self, x):
        """
        Return the image of the matrix of the hyperbolic isometry ``x``
        under ``self``.

        EXAMPLES:

        We check that orientation-reversing isometries behave as they
        should::

            sage: PD = HyperbolicPlane().PD()
            sage: UHP = HyperbolicPlane().UHP()
            sage: phi = UHP.coerce_map_from(PD)
            sage: phi.image_isometry_matrix(matrix([[0,I],[I,0]]))
            [-1  0]
            [ 0 -1]
        """
        from sage.geometry.hyperbolic_space.hyperbolic_isometry import HyperbolicIsometryPD
        if not HyperbolicIsometryPD._orientation_preserving(x):
            return matrix([[1,I],[I,1]]) * x * matrix([[1,-I],[-I,1]]).conjugate() / Integer(2)
        return matrix([[1,I],[I,1]]) * x * matrix([[1,-I],[-I,1]]) / Integer(2)