

def refine_Determinant(expr, assumptions):
    "\n    >>> from sympy import MatrixSymbol, Q, assuming, refine, det\n    >>> X = MatrixSymbol('X', 2, 2)\n    >>> det(X)\n    Determinant(X)\n    >>> with assuming(Q.orthogonal(X)):\n    ...     print(refine(det(X)))\n    1\n    "
    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 assumptions

dataset/ETHPy150Open sympy/sympy/sympy/matrices/expressions/determinant.py refine_Determinant/VarMisuse@84/199 `expr`->`assumptions`