
    \h                        S SK JrJrJr  S SKJrJrJrJrJ	r	J
r
  S SKJr   " S S\5      r\\R                  \\R                  \\R                   \\R"                  \	\R$                  \
\R&                  0r " S S\5      rg)	    )	PredicateAppliedPredicateQ)EqNeGtLtGeLe)
Dispatcherc                   *    \ rS rSrSrSr\" SSS9rSrg)	CommutativePredicate   z
Commutative predicate.

Explanation
===========

``ask(Q.commutative(x))`` is true iff ``x`` commutes with any other
object with respect to multiplication operation.

commutativeCommutativeHandlerzHandler for key 'commutative'.doc N)	__name__
__module____qualname____firstlineno____doc__namer   handler__static_attributes__r       [/var/www/auris/envauris/lib/python3.13/site-packages/sympy/assumptions/predicates/common.pyr   r      s    	 D-3STGr   r   c                   >   ^  \ rS rSrSrSr\" SSS9rU 4S jrSr	U =r
$ )	IsTruePredicate   a  
Generic predicate.

Explanation
===========

``ask(Q.is_true(x))`` is true iff ``x`` is true. This only makes
sense if ``x`` is a boolean object.

Examples
========

>>> from sympy import ask, Q
>>> from sympy.abc import x, y
>>> ask(Q.is_true(True))
True

Wrapping another applied predicate just returns the applied predicate.

>>> Q.is_true(Q.even(x))
Q.even(x)

Wrapping binary relation classes in SymPy core returns applied binary
relational predicates.

>>> from sympy import Eq, Gt
>>> Q.is_true(Eq(x, y))
Q.eq(x, y)
>>> Q.is_true(Gt(x, y))
Q.gt(x, y)

Notes
=====

This class is designed to wrap the boolean objects so that they can
behave as if they are applied predicates. Consequently, wrapping another
applied predicate is unnecessary and thus it just returns the argument.
Also, binary relation classes in SymPy core have binary predicates to
represent themselves and thus wrapping them with ``Q.is_true`` converts them
to these applied predicates.

is_trueIsTrueHandlerzBWrapper allowing to query the truth value of a boolean expression.r   c                    > [        U[        5      (       a  U$ [        USS5      (       a!  [        [	        U5         nU" UR
                  6 $ [        TU ]  U5      $ )Nis_RelationalF)
isinstancer   getattrbinrelpredstypeargssuper__call__)selfargpred	__class__s      r   r,   IsTruePredicate.__call__I   sQ    c+,,J3//tCy)D?"w$$r   r   )r   r   r   r   r   r   r   r   r,   r   __classcell__)r0   s   @r   r    r       s*    )T DPG
% %r   r    N)sympy.assumptionsr   r   r   sympy.core.relationalr   r   r   r	   r
   r   sympy.multipledispatchr   r   eqnegtltgeler(   r    r   r   r   <module>r<      sf    < < 8 8 -U9 U  144QTT2qttRr144QTTJ9%i 9%r   