(expr, assumptions)
return expr
>>> from sympy import MatrixSymbol, Q, assuming, refine, det
    >>> X = MatrixSymbol('X', 2, 2)
    >>> det(X)
    Determinant(X)
    >>> with assuming(Q.orthogonal(X)):
    ...     print(refine(det(X)))
    1
>>> from sympy import MatrixSymbol, Q, assuming, refine, det
    >>> X = MatrixSymbol('X', 2, 2)
    >>> det(X)
    Determinant(X)
    >>> with assuming(Q.orthogonal(X)):
    ...     print(refine(det(X)))
    1
>>> from sympy import MatrixSymbol Q assuming refine det >>> X = MatrixSymbol ( X 2 2 ) >>> det ( X ) Determinant ( X ) >>> with assuming ( Q . orthogonal ( X )) : ... print ( refine ( det ( X ))) 1
def refine_Determinant(expr, assumptions):
    """
    >>> from sympy import MatrixSymbol, Q, assuming, refine, det
    >>> X = MatrixSymbol('X', 2, 2)
    >>> det(X)
    Determinant(X)
    >>> with assuming(Q.orthogonal(X)):
    ...     print(refine(det(X)))
    1
    """
    if ask(Q.orthogonal(expr.arg), assumptions):
        return S.One
    elif ask(Q.singular(expr.arg), assumptions):
        return S.Zero
    elif ask(Q.unit_triangular(expr.arg), assumptions):
        return S.One

    return expr
def refine_Determinant ( expr , assumptions ) : if ask ( Q . orthogonal ( expr . arg ) , assumptions ) : return S . One elif ask ( Q . singular ( expr . arg ) , assumptions ) : return S . Zero elif ask ( Q . unit_triangular ( expr . arg ) , assumptions ) : return S . One return expr