+
    ‹°³jp  ã                   óä   € ^ RI Ht ^ RIHt ^ RIHt ^ RIHtHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt ^ R	IHtHt ^ R
IHtHtHt ^ RIHt ^RIHt ^RIHtHtHtH t  ]! R4      t! ! R R]4      t"R# )é    )ÚS)ÚBasic)ÚTuple)ÚLambdaÚBadSignatureError)Ú
fuzzy_bool©ÚEq)ÚDummy)Ú_sympify)ÚAndÚ
as_Boolean)ÚsiftÚflattenÚhas_dups)Úsympy_deprecation_warning)ÚContains)ÚSetÚUnionÚ	FiniteSetÚSetKindÚconditionsetc                   ó²   a € ] tR t^t o Rt]P                  3R lt]! R 4      t	]! R 4      t
]! R 4      t]R 4       t]R 4       tR tR	 tR
 tR tRtV tR# )ÚConditionSeta  
Set of elements which satisfies a given condition.

.. math:: \{x \mid \textrm{condition}(x) = \texttt{True}, x \in S\}

Examples
========

>>> from sympy import Symbol, S, ConditionSet, pi, Eq, sin, Interval
>>> from sympy.abc import x, y, z

>>> sin_sols = ConditionSet(x, Eq(sin(x), 0), Interval(0, 2*pi))
>>> 2*pi in sin_sols
True
>>> pi/2 in sin_sols
False
>>> 3*pi in sin_sols
False
>>> 5 in ConditionSet(x, x**2 > 4, S.Reals)
True

If the value is not in the base set, the result is false:

>>> 5 in ConditionSet(x, x**2 > 4, Interval(2, 4))
False

Notes
=====

Symbols with assumptions should be avoided or else the
condition may evaluate without consideration of the set:

>>> n = Symbol('n', negative=True)
>>> cond = (n > 0); cond
False
>>> ConditionSet(n, cond, S.Integers)
EmptySet

Only free symbols can be changed by using `subs`:

>>> c = ConditionSet(x, x < 1, {x, z})
>>> c.subs(x, y)
ConditionSet(x, x < 1, {y, z})

To check if ``pi`` is in ``c`` use:

>>> pi in c
False

If no base set is specified, the universal set is implied:

>>> ConditionSet(x, x < 1).base_set
UniversalSet

Only symbols or symbol-like expressions can be used:

>>> ConditionSet(x + 1, x + 1 < 1, S.Integers)
Traceback (most recent call last):
...
ValueError: non-symbol dummy not recognized in condition

When the base set is a ConditionSet, the symbols will be
unified if possible with preference for the outermost symbols:

>>> ConditionSet(x, x < y, ConditionSet(z, z + y < 2, S.Integers))
ConditionSet(x, (x < y) & (x + y < 2), Integers)

c                ó¤  a aa€ \        S4      o\        S.4      p\        V4      '       d   \        R 4      h\        V4      p\	        V\
        4      '       g   \        RV,          4      h\        S4      o\	        S\        4      '       d*   SpR S 4       p\        V!  o\        RV RS R2RRR7       \        S4      oS\        P                  J d   V# S\        P                  J d   \        P                  # V\        P                  J d   \        P                  # V F(  p\        VR	R
4      '       d   K  \!        RV,          4      h	  VP#                  S4      \        P                  J d   \        RS: RV: R24      hRp\	        V\        4      '       dR   \%        VVV3R l4      p	V	R,          '       d"   \        V	R,          !  p\        V	R,          !  pM\        V	R,          !  # \	        VS 4      '       Ed-   VP&                  w  r«pV 3R lp\)        VSV
34      w  rïWï8w  d   \        R4      h\+        \-        \        S.4      \        V
.4      4      4      pV
S8X  d   \        SV4      oTpM·VP.                  SP.                  ,          '       gD   VP1                  4        UUu/ uF	  w  ppVVbK  	  ppp\        SVP3                  V4      4      oTpMQSP.                  V
P.                  ,          '       g/   SP3                  V4      o\        SP3                  V4      V4      oTp\	        S\4        4      '       db   SSP&                  ^ ,          8X  dJ   \	        SP&                  ^,          \
        4      '       d#   SP&                  ^,          P7                  V4      # \8        P:                  ! S SSV4      pVf   V# \=        VV4      # u uppi )zDuplicate symbols detectedz'base set should be a Set object, not %sc              3   ó:   "  € T F  p\        V^ 4      x € K  	  R# 5i)r   Nr	   )Ú.0Úlhss   & ÚX/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/sets/conditionset.pyÚ	<genexpr>Ú'ConditionSet.__new__.<locals>.<genexpr>e   s   é € Ð4©) 3”B�s˜A—J�J«)ùs   ‚zq
Using a set for the condition in ConditionSet is deprecated. Use a boolean
instead.

In this case, replace

    z

with

    Ú
z1.5zdeprecated-conditionset-set)Údeprecated_since_versionÚactive_deprecations_targetÚ	_diff_wrtFz`%s` is not symbol-likezsym `z` is not in base_set `Ú`Nc                 ó:   <€ \        SP                  SV 4      4      # ©N)r   Úsubs)Ú_Ú	conditionÚsyms   &€€r   Ú<lambda>Ú&ConditionSet.__new__.<locals>.<lambda>Ž   s   ø€ ¤J¨y¯~©~¸cÀ1Ó/EÔ$Fó    Tc                 ób   <€ S! V \        \        ^ 4      4      P                  4       P                  # ©r   )r
   ÚadummyÚas_dummyr,   )ÚsÚclss   &€r   ÚsigÚ!ConditionSet.__new__.<locals>.sig—   s%   ø€ Ù˜1œb¤¨›mÓ,×5Ñ5Ó7×;Ñ;Ð;r/   z"sym does not match sym of base set)r   r   r   r   Ú
isinstancer   Ú	TypeErrorr   r   r   r   r   ÚtrueÚfalseÚEmptySetÚgetattrÚ
ValueErrorÚcontainsr   ÚargsÚmapÚdictÚzipÚfree_symbolsÚitemsÚxreplacer   Ú	intersectr   Ú__new__r   )r5   r,   r+   Úbase_setÚflatÚcondition_origÚtempÚiÚknowÚsiftedr4   ÚcÚbr6   ÚsaÚsbÚrepsÚkÚvÚrvs   fff&                r   rH   ÚConditionSet.__new__X   s5  ú€ Ü�s‹mˆÜ˜�u‹~ˆÜ�D�>Š>Ü#Ð$@ÓAÐAÜ˜HÓ%ˆÜ˜(¤C×(Ò(ÜØ9¸HÕDóFð Fä˜YÓ'ˆ	ä�i¤×+Ò+Ø&ˆNÙ4©)Ó4ˆDÜ˜T™
ˆIÜ%ðð Ðð ð €Kð ðð */Ø+Hõô" ˜yÓ)ˆ	àœŸ™ÓØˆOàœŸ™ÓÜ—:‘:Ðà”q—z‘zÓ!Ü—:‘:Ðó ˆAÜ˜1˜k¨5×1Ô1Ü Ð!:¸QÕ!>Ó?Ð?ñ ð ×Ñ˜SÓ!¤Q§W¡WÓ,ÝÃ#ÃxÐPÓQÐQàˆÜ�h¤	×*Ò*ÜØÕFóHˆFà�d�|Œ|Ü  &¨¥,Ñ/�Ü$ f¨T¥lÑ3‘ä  &¨¥,Ñ/Ð/ä�h ×$Ó$Ø—m‘m‰GˆA�!õ<ä˜˜s A˜hÓ'‰FˆBØŒxÜ'Ð(LÓMÐMÜœœG S E›N¬G°Q°C«LÓ9Ó:ˆDØ�CŒxÜ 	¨1Ó-�	Ø‘Ø—^‘^ c×&6Ñ&6×6Ô6Ø)-¯©¬Ô6©¡  A˜˜1š©�Ñ6Ü 	¨1¯:©:°dÓ+;Ó<�	Ø‘Ø×+Ñ+¨a¯n©n×<Ô<Ø—l‘l 4Ó(�Ü 	× 2Ñ 2°4Ó 8¸!Ó<�	Ø�ô �i¤×*Ò*°°y·~±~ÀaÕ7HÔ0HÜ˜)Ÿ.™.¨Õ+¬S×1Ò1Ø —~‘~ aÕ(×2Ñ2°8Ó<Ð<ä�]Š]˜3  Y°Ó9ˆØ’\ˆrÐ6¤u¨T°2£Ð6ùó 7s   Ê)Oc                ó(   € V P                   ^ ,          # r1   ©r@   ©Úselfs   &r   r-   ÚConditionSet.<lambda>±   s   €  §	¡	¨!¦r/   c                ó(   € V P                   ^,          # )é   rZ   r[   s   &r   r-   r]   ²   s   €  d§i¡i°¦lr/   c                ó(   € V P                   ^,          # )é   rZ   r[   s   &r   r-   r]   ³   s   €  T§Y¡Y¨q¦\r/   c                óœ   € V P                   P                  V P                  P                  ,
          pWP                  P                  ,          # r(   )r+   rD   r,   rI   )r\   Ú	cond_symss   & r   rD   ÚConditionSet.free_symbolsµ   s3   € à—N‘N×/Ñ/°$·(±(×2GÑ2GÕGˆ	ØŸ=™=×5Ñ5Õ5Ð5r/   c                ó.   € \        V P                  .4      # r(   )r   r,   r[   s   &r   Úbound_symbolsÚConditionSet.bound_symbolsº   s   € ä˜Ÿ™�zÓ"Ð"r/   c                ób  a€ V3R  loS! V P                   V4      '       g   \        P                  # \        WP                  4      pV\        P                  J d   \        P                  # \        V P                   3V P                  4      p V! V4      p\        W$4      #   \         d     R# i ; i)c                 ój  <€ W3 Uu. uF  p\        V\        4      NK  	  ppVP                  R 4      pV^8X  d   R# V^ 8X  d   R # \        V 4      \        V4      8H  ;'       dM    \        ;QJ d(    V3R l\        W4       4       F  '       d   K   R# 	  R # ! V3R l\        W4       4       4      # u upi )TFc              3   ó8   <"  € T F  w  rS! W4      x € K  	  R # 5ir(   © )r   rM   ÚjÚok_sigs   &  €r   r    Ú9ConditionSet._contains.<locals>.ok_sig.<locals>.<genexpr>Æ   s   øé € ð ,4Ù)2¡ ‘�q—�«ùs   ƒ)r8   r   ÚcountÚlenÚallrC   )ÚarQ   rM   ÚtuplesrP   rm   s   &&   €r   rm   Ú&ConditionSet._contains.<locals>.ok_sig¿   s£   ø€ Ø56±FÓ;±F¨q”j ¤EÖ*±FˆFÐ;Ø—‘˜TÓ"ˆAØ�AŒvÙØ�AŒvÙÜ�q“6œS ›VÑ#÷ 4ð 4¯«ô ,4Ü),¨Q¬ó,4¯¬ð 4ªð 4¨ô ,4Ü),¨Q¬ó,4ó )4ð 4ùò <s   ‡B0N)	r,   r   r;   r   rI   r   r+   r   r9   )r\   ÚotherÚ	base_condÚlamdaÚlambda_condrm   s   &&   @r   Ú	_containsÚConditionSet._contains¾   s�   ø€ õ	4ñ �d—h‘h ×&Ò&Ü—7‘7ˆNô ˜U§M¡MÓ2ˆ	ØœŸ™ÓÜ—7‘7ˆNô ˜Ÿ™�{ D§N¡NÓ3ˆð	/Ù ›,ˆKô �yÓ.Ð.øô ô 	Úð	ús   ÂB ÂB.Â-B.c                óè   € \        V P                  V P                  4      p\        V P                  \        4      '       d   V! V!  pMV! V4      p\        W P                  P                  V4      4      # r(   )r   r,   r+   r8   r   r   rI   r?   )r\   ru   Úfs   && r   Úas_relationalÚConditionSet.as_relationalÛ   sS   € Ü�4—8‘8˜TŸ^™^Ó,ˆÜ�d—h‘h¤×&Ò&Ù�5‘	‰Aá�%“ˆAÜ�1—m‘m×,Ñ,¨UÓ3Ó4Ð4r/   c                ó|  € V P                   w  r4pVP                  V\        4      pVP                  \        4      pVP                  W4      pW…8w  d,   V'       g   VP                  W4      pV P	                  W4V4      # V'       d   M&\        VR R4      '       d   VP                  W4      pM V P	                  W4V4      # )r%   F)r@   r)   r2   ÚhasÚfuncr=   )	r\   ÚoldÚnewr,   ÚcondÚbaseÚdsymÚinsymÚnewbases	   &&&      r   Ú
_eval_subsÚConditionSet._eval_subsã   s™   € ØŸ)™)‰ˆ�4Ø�x‰x˜œVÓ$ˆØ—‘œÓ ˆà—)‘)˜CÓ%ˆØŒ?ßØ—y‘y Ó*�Ø—9‘9˜S¨Ó0Ð0ßØÜ�S˜+ u×-Ò-Ø—9‘9˜SÓ&‰DàØ�y‰y˜ DÓ)Ð)r/   c                ó@   € \        V P                  P                  4      # r(   )r   r,   Úkindr[   s   &r   Ú_kindÚConditionSet._kindõ   s   € Ü�t—x‘x—}‘}Ó%Ð%r/   rk   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   ÚUniversalSetrH   Úpropertyr,   r+   rI   rD   rf   ry   r}   r‰   r�   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      s~   ø‡ € ñCðH /0¯n©nô W7ñr Ñ,Ó
-€CÙÑ2Ó3€IÙÑ1Ó2€Hàñ6ó ð6ð ñ#ó ð#ò/ò:5ò*÷$&ð &r/   r   N)#Úsympy.core.singletonr   Úsympy.core.basicr   Úsympy.core.containersr   Úsympy.core.functionr   r   Úsympy.core.logicr   Úsympy.core.relationalr
   Úsympy.core.symbolr   Úsympy.core.sympifyr   Úsympy.logic.boolalgr   r   Úsympy.utilities.iterablesr   r   r   Úsympy.utilities.exceptionsr   r?   r   Úsetsr   r   r   r   r2   r   rk   r/   r   Ú<module>r¥      sL   ðÝ "Ý "Ý 'ß 9Ý 'Ý $Ý #Ý 'ß /ß =Ñ =Ý @Ý ß 0Ó 0ñ 
ˆ~Ó	€ôc&�3ö c&r/   