+
    i.U                       R t ^ RIHt R.t^ RIHt ^ RIHt ^ RIH	t	 ^ RI
HtHtHt ^ RIHtHtHt ^ RIHtHt ^ R	It^ R	It ! R
 R4      t ! R R]4      t ! R R]4      t ! R R]4      t] ! R R]4      4       t ! R R]]R7      t ! R R]]R7      t  ! R R]]R7      t! ! R R]]R7      t" ! R R]]R7      t# ! R R]]R7      t$ ! R  R!]]R7      t% ! R" R#]]R7      t& ! R$ R%]]R7      t' ! R& R']]R7      t( ! R( R)]]R7      t) ! R* R+]]R7      t* ! R, R-]]R7      t+ ! R. R/]]R7      t, ! R0 R1]]R7      t- ! R2 R3]]]R7      t. ! R4 R5]]]R7      t/ ! R6 R7]]]R7      t0 ! R8 R9]]]R7      t1 ! R: R;]]]R7      t2 ! R< R=]]]R7      t3 ! R> R?]]R7      t4 ! R@ RA]]]R7      t5 ! RB RC]]R7      t6 ! RD RE]]R7      t7RIRF lt8RG t9RH t:]Pw                  4        R	# )Jz>Options manager for :class:`~.Poly` and public API functions. )annotationsOptions)Basic)Expr)sympify)GeneratorsErrorOptionError	FlagError)numbered_symbolstopological_sortpublic)has_dupsis_sequenceNc                      ] tR t^t$ RtRtR]R&   Rt. tR]R&   . t	R]R&   . t
R]R	&   . tR]R
&   ]R 4       t]R 4       t]R 4       tRtR# )Optionz%Base class for all kinds of options. Nz
str | NoneoptionF	list[str]requiresexcludesafterbeforec                	    R # N clss   &w/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/polys/polyoptions.pydefaultOption.default           c                	    R # r   r   )r   r   s   &&r   
preprocessOption.preprocess#   r   r    c                	    R # r   r   r   optionss   &&r   postprocessOption.postprocess'   s    r    r   )__name__
__module____qualname____firstlineno____doc__r   __annotations__is_Flagr   r   r   r   classmethodr   r"   r'   __static_attributes__r   r    r   r   r      sv    /FJGHiHiE9FI     r    r   c                      ] tR t^,tRtRtRtR# )Flagz#Base class for all kinds of flags. Tr   N)r)   r*   r+   r,   r-   r/   r1   r   r    r   r3   r3   ,   s
    -Gr    r3   c                  *    ] tR t^2tRt]R 4       tRtR# )BooleanOptionzAAn option that must have a boolean value or equivalent assigned. c                	`    VR9   d   \        V4      # \        RV P                  : RV: 24      h)T'z*' must have a boolean value assigned, got )TF)boolr   r   )r   values   &&r   r"   BooleanOption.preprocess5   s,    M!;SVS]S]_deffr    r   N)r)   r*   r+   r,   r-   r0   r"   r1   r   r    r   r5   r5   2   s    Kg gr    r5   c                       ] tR t^=tRtR tRtR# )
OptionTypez7Base type for all options that does registers options. c                	   a  \         V 3R  l4       p\        \        S P                  V4       S \        P                  S P                  &   R# )c                n   <  V SP                   ,          #   \         d    SP                  4       u # i ; ir   )r   KeyErrorr   )selfr   s   &r   getter#OptionType.__init__.<locals>.getterA   s2    %CJJ'' %{{}$%s    44N)propertysetattrr   r   __options__)r   argskwargsrA   s   f*, r   __init__OptionType.__init__@   s;    		% 
	% 	V,*-CJJ'r    r   N)r)   r*   r+   r,   r-   rH   r1   r   r    r   r<   r<   =   s
    A	.r    r<   c                     a  ] tR t^Lt$ RtRt/ tR]R&   R]R&   R]R&   RR	 lt]	R
 4       t
/ 3R ltV 3R lt]R 4       t]R 4       t]R 4       tRtV ;t# )r   a  
Options manager for polynomial manipulation module.

Examples
========

>>> from sympy.polys.polyoptions import Options
>>> from sympy.polys.polyoptions import build_options

>>> from sympy.abc import x, y, z

>>> Options((x, y, z), {'domain': 'ZZ'})
{'auto': False, 'domain': ZZ, 'gens': (x, y, z)}

>>> build_options((x, y, z), {'domain': 'ZZ'})
{'auto': False, 'domain': ZZ, 'gens': (x, y, z)}

**Options**

* Expand --- boolean option
* Gens --- option
* Wrt --- option
* Sort --- option
* Order --- option
* Field --- boolean option
* Greedy --- boolean option
* Domain --- option
* Split --- boolean option
* Gaussian --- boolean option
* Extension --- option
* Modulus --- option
* Symmetric --- boolean option
* Strict --- boolean option

**Flags**

* Auto --- boolean flag
* Frac --- boolean flag
* Formal --- boolean flag
* Polys --- boolean flag
* Include --- boolean flag
* All --- boolean flag
* Gen --- flag
* Series --- boolean flag

Nzdict[str, type[Option]]rE   ztuple[Expr, ...]genszsympy.polys.domains.Domaindomainc           	     	l  a aa \         P                  S 4       V'       d$   VP                  R R4      '       d   \        R4      hV'       d   \        V4      pWR &   VP	                  R/ 4      pVV V3R lpV! V4       \        V4       FM  pVS 9   d   WW K  S P                  4        F+  pS P                  V,          p	WyP                  9   g   K(  WW  KK  	  KO  	  V! V4       S P                  4        F  pS P                  V,          p	V	P                   F*  p
S P                  V
4      e   K  \        RV: RV
: R24      h	  V	P                   F*  pS P                  V4      f   K  \        RV: RV: R24      h	  K  	  S P                   F%  pS P                  V,          P                  S 4       K'  	  R# )	rK   z1both '*gens' and keyword argument 'gens' supplieddefaultsc                N  < V P                  4        Fn  w  r SP                  V,          p\	        T\
        4      '       d&   Se   TS9  d   S'       d   \        RT,          4      hTf   KZ  TP                  T4      ST&   Kp  	  R#   \         d    \        R T,          4      hi ; i)'%s' is not a valid optionN('%s' flag is not allowed in this context)itemsrE   r?   r   
issubclassr3   r"   )rF   r   r9   r   flagsr@   stricts   &   r   preprocess_options,Options.__init__.<locals>.preprocess_options   s    !%M**62C c4((}e(;!"-.X[a.a"bb$#&>>%#8DL ".   M%&BV&KLLMs   BB$Nr7   z(' option is only allowed together with 'z'' option is not allowed together with 'r   )dictrH   getr   popkeysrE   r   r   	__order__r'   )r@   rK   rF   rT   rU   rN   rV   keyr   r   require_optionexclude_options   f&&ff       r   rH   Options.__init__   se   dDHHVR((CE E:DL88J+	9 	4 >Cd{M"iikF**62Cll*$M *	 " 	8$iikF""6*C"%,,88N+3%Z`bp&qrr #/ #&,,88N+7%Y_ao&pqq #/ " nnFV$006 %r    c                  a V P                   f   . \        4       r!V P                  P                  4        Fa  w  opVP	                  S4       VP                  V3R lVP                   4       4       VP                  V3R lVP                   4       4       Kc  	   \        V\        V4      34      V n         R# R#   \         d    \        R4      hi ; i)z*Resolve the order of options' processing. Nc              3  *   <"   T F  qS3x  K
  	  R # 5ir   r   .0_namenames   & r   	<genexpr>3Options._init_dependencies_order.<locals>.<genexpr>   s     EuT]s   c              3  ,   <"   T F	  pSV3x  K  	  R # 5ir   r   rc   s   & r   rg   rh      s     FudE]s   z/cycle detected in sympy.polys options framework)r\   setrE   rR   appendupdater   r   r   list
ValueErrorRuntimeError)r   verticesedgesr   rf   s   &   @r   _init_dependencies_order Options._init_dependencies_order   s     ==  #%e # 5 5 7f%EEEFFF !8G 0(DK1H I !  G"EG GGs   B: :Cc                    \         P                  V P                  4      pV P                  4        F	  w  r4WBV&   K  	  VP                  4        F	  w  r4WBV&   K  	  V# )z-Clone ``self`` and update specified options. )rX   __new__	__class__rR   )r@   updatesobjr   r9   s   &&   r   cloneOptions.clone   sO    ll4>>*!ZZ\MFK * %]]_MFK - 
r    c                	R   < WP                   9   d   W V&   R # \        SV `	  W4       R # r   )rE   super__setattr__)r@   attrr9   rv   s   &&&r   r}   Options.__setattr__   s#    ###JG,r    c                	    / pV P                  4        FC  w  r#Vf   K  VR8w  g   K  V P                  V,          p\        V\        4      '       d   K?  W1V&   KE  	  V# )NrK   )rR   rE   rS   r3   )r@   rF   r   r9   r   s   &    r   rF   Options.args   sQ    !ZZ\MF Vv%5&&v.!#t,,#(L * r    c                	    / pV P                   P                  4        F*  w  r#\        V\        4      '       d   K  \	        W4      W&   K,  	  V# r   rE   rR   rS   r3   getattr)r@   r&   r   r   s   &   r   r&   Options.options   sB    ++113KFc4((")$"7 4 r    c                	    / pV P                   P                  4        F*  w  r#\        V\        4      '       g   K  \	        W4      W&   K,  	  V# r   r   )r@   rT   r   r   s   &   r   rT   Options.flags   sB    ++113KF#t$$ ' 5 4 r    r   )NF)r)   r*   r+   r,   r-   r\   rE   r.   rH   r0   rr   ry   r}   rC   rF   r&   rT   r1   __classcell__)rv   s   @r   r   r   L   s    -^ I+-K(-
&&67p G G$  
- 
 
    r    c                  L    ] tR tRt$ RtRt. tR]R&   . tR]R&   ]	R 4       t
RtR	# )
Expandi  z8``expand`` option to polynomial manipulation functions. expandr   r   r   c                	    R # Tr   r   s   &r   r   Expand.default
  r   r    r   N)r)   r*   r+   r,   r-   r   r   r.   r   r0   r   r1   r   r    r   r   r     s0    BFHiHi r    r   )	metaclassc                  \    ] tR tRt$ RtRt. tR]R&   . tR]R&   ]	R 4       t
]	R 4       tR	tR
# )Gensi  z6``gens`` option to polynomial manipulation functions. rK   r   r   r   c                	    R# )Nr   r   r   s   &r   r   Gens.default      	r    c                	   \        V\        4      '       d   V3pM1\        V4      ^8X  d"   \        V^ ,          4      '       d
   V^ ,          pVR8X  d   RpM\	        V4      '       d   \        R\        V4      ,          4      h\        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        R\        V4      ,          4      h\        V4      # )   zduplicated generators: %sc              3  <   "   T F  qP                   R J x  K  	  R# 5i)FN)is_commutative)rd   gens   & r   rg   "Gens.preprocess.<locals>.<genexpr>&  s     =##u,s   TFznon-commutative generators: %sr   r   )	
isinstancer   lenr   r   r   stranytuple)r   rK   s   &&r   r"   Gens.preprocess  s    dE""7DY!^DG 4 47D7?Dd^^!"=D	"IJJS==SSS====!"BSY"NOOT{r    r   Nr)   r*   r+   r,   r-   r   r   r.   r   r0   r   r"   r1   r   r    r   r   r     sD    @FHiHi   r    r   c                  p    ] tR tRt$ RtRt. tR]R&   . tR]R&   ]	P                  ! R4      t]R 4       tR	tR
# )Wrti,  z5``wrt`` option to polynomial manipulation functions. wrtr   r   r   z\s*,\s*|\s+c                	   \        V\        4      '       d   \        V4      .# \        V\        4      '       da   VP                  4       pVP	                  R 4      '       d   \        R4      hV'       g   . # \        V P                  P                  V4      4      # \        VR4      '       d   \        \        \        V4      4      # \        R4      h),zBad input: missing parameter.__getitem__z!invalid argument for 'wrt' option)r   r   r   stripendswithr   rm   	_re_splitsplithasattrmap)r   r   s   &&r   r"   Wrt.preprocess6  s    c5!!H:S!!))+C||C  !"ABB	++C011S-((C&&ABBr    r   N)r)   r*   r+   r,   r-   r   r   r.   r   recompiler   r0   r"   r1   r   r    r   r   r   ,  s@    ?FHiHi

>*IC Cr    r   c                  \    ] tR tRt$ RtRt. tR]R&   . tR]R&   ]	R 4       t
]	R 4       tR	tR
# )SortiG  z6``sort`` option to polynomial manipulation functions. sortr   r   r   c                	    . # r   r   r   s   &r   r   Sort.defaultO  r   r    c                	    \        V\        4      '       d/   VP                  R 4       Uu. uF  q"P                  4       NK  	  up# \	        VR4      '       d   \        \        \        V4      4      # \        R4      hu upi )>r   z"invalid argument for 'sort' option)r   r   r   r   r   rm   r   r   )r   r   r   s   && r   r"   Sort.preprocessS  s_    dC  ,0JJsO=OSYY[O==T=))C''BCC	 >s   A;r   Nr   r   r    r   r   r   G  sF    @FHiHi  D Dr    r   c                  \    ] tR tRt$ RtRt. tR]R&   . tR]R&   ]	R 4       t
]	R 4       tR	tR
# )Orderi]  z7``order`` option to polynomial manipulation functions. orderr   r   r   c                	J    \         P                  P                  P                  # r   )sympypolys	orderingslexr   s   &r   r   Order.defaulte  s    {{$$(((r    c                	T    \         P                  P                  P                  V4      # r   )r   r   r   monomial_key)r   r   s   &&r   r"   Order.preprocessi  s    {{$$11%88r    r   Nr   r   r    r   r   r   ]  sD    AFHiHi) ) 9 9r    r   c                  6    ] tR tRt$ RtRt. tR]R&   . ROtRt	R# )	Fieldin  z7``field`` option to polynomial manipulation functions. fieldr   r   r   N)rL   r   gaussian
r)   r*   r+   r,   r-   r   r   r.   r   r1   r   r    r   r   r   n  s    AFHi.Hr    r   c                  6    ] tR tRt$ RtRt. tR]R&   . ROtRt	R# )	Greedyiw  z8``greedy`` option to polynomial manipulation functions. greedyr   r   r   NrL   r   r   	extensionmodulus	symmetricr   r   r    r   r   r   w  s    BFHiSHr    r   c                  F    ] tR tRt$ RtRt]R 4       t. tR]	R&   . R	Ot
RtR# )
	Compositei  z;``composite`` option to polynomial manipulation functions. 	compositec                	    R # r   r   r   s   &r   r   Composite.default  r   r    r   r   r   Nr   )r)   r*   r+   r,   r-   r   r0   r   r   r.   r   r1   r   r    r   r   r     s-    EF  HiSHr    r   c                  4   ] tR tRt$ RtRt. tR]R&   . ROtR.t	]
P                  ! R4      t]
P                  ! R4      t]
P                  ! R	4      t]
P                  ! R
4      t]
P                  ! R4      t]
P                  ! R4      t]R 4       t]R 4       tRtR# )Domaini  z8``domain`` option to polynomial manipulation functions. rL   r   r   rK   z^(R|RR)(_(\d+))?$z^(C|CC)(_(\d+))?$z^(FF|GF)\((\d+)\)$z)^(Z|ZZ|Q|QQ|ZZ_I|QQ_I|R|RR|C|CC)\[(.+)\]$z^(Z|ZZ|Q|QQ)\((.+)\)$z^(Q|QQ)\<(.+)\>$c                	   \        V\        P                  P                  P                  4      '       d   V# \        VR 4      '       d   VP                  4       # \        V\        4      '       EdQ   VR9   d%   \        P                  P                  P                  # VR9   d%   \        P                  P                  P                  # VR8X  d%   \        P                  P                  P                  # VR8X  d%   \        P                  P                  P                  # VR8X  d%   \        P                  P                  P                  # V P                  P                  V4      pVen   VP                  4       w   r4Vf%   \        P                  P                  P                   # \        P                  P                  P#                  \%        V4      4      # V P&                  P                  V4      pVen   VP                  4       w   r4Vf%   \        P                  P                  P(                  # \        P                  P                  P+                  \%        V4      4      # V P,                  P                  V4      pVeH   \        P                  P                  P/                  \%        VP                  4       ^,          4      4      # V P0                  P                  V4      pVEe   VP                  4       w  rV\3        \5        \6        VP9                  R4      4      4      pVR9   d3   \        P                  P                  P                  P:                  ! V!  # VR9   d3   \        P                  P                  P                  P:                  ! V!  # VR9   d3   \        P                  P                  P                   P:                  ! V!  # VR8X  d3   \        P                  P                  P                  P:                  ! V!  # VR8X  d3   \        P                  P                  P                  P:                  ! V!  # \        P                  P                  P(                  P:                  ! V!  # V P<                  P                  V4      pVe   VP                  4       w  rV\3        \5        \6        VP9                  R4      4      4      pVR9   d3   \        P                  P                  P                  P>                  ! V!  # \        P                  P                  P                  P>                  ! V!  # V P@                  P                  V4      pVep   \3        \5        \6        VP                  4       ^,          P9                  R4      4      4      p\        P                  P                  P                  PB                  ! V!  # \E        RV,          4      h)		to_domainZZ_IQQ_IEXr   z-expected a valid domain specification, got %s)ZZZ)QQQ)RRR)#r   r   r   domainsr   r   r   r   r   r   r   r   r   _re_realfieldmatchgroupsr   	RealFieldint_re_complexfieldCCComplexField_re_finitefieldFF_re_polynomialrm   r   r   r   	poly_ring_re_fraction
frac_field_re_algebraicalgebraic_fieldr   )r   rL   r_precgroundrK   s   &&     r   r"   Domain.preprocess  s   fekk118899MV[))##%%$$${{**---${{**---{{**///{{**///~{{**---!!''/A}XXZ
1< ;;..111 ;;..88TCC$$**62A}XXZ
1< ;;..111 ;;..;;CIFF##))&1A}{{**--c!((*Q-.@AA""((0A} xxzCC9:[( ;;..11;;TBB{* ;;..11;;TBB{* ;;..11;;TBBv% ;;..33==tDDv% ;;..33==tDD ;;..11;;TBB  &&v.A} xxzCC9:[( ;;..11<<dCC ;;..11<<dCC!!''/A}CA)<)<S)ABC{{**--==tDDIFRSSr    c                	   R V9   de   RV9   d^   VR,          P                   '       dE   \        VR,          P                  4      \        VR ,          4      ,          '       d   \        R4      hR V9  g   VR ,          '       gG   RV9   d>   VR,          \        P
                  P                  P                  8X  d   \        R4      hR# R# R# )rK   rL   z/ground domain and generators interfere togetherz>you have to provide generators because EX domain was requestedN)is_Compositerj   symbolsr   r   r   r   r   r%   s   &&r   r'   Domain.postprocess  s    WW!49J9W9W9WWX&../#gfo2FFF!AC CG#76??G#(9U[[=P=P=S=S(S!"bcc )T# ,;r    r   N)r   r   r   r   r   )r)   r*   r+   r,   r-   r   r   r.   r   r   r   r   r   r   r   r   r   r   r0   r"   r'   r1   r   r    r   r   r     s    BFHiDHHEJJ34Mzz"67jj!67OZZ LMN::67LJJ23MTT TTl d dr    r   c                  F    ] tR tRt$ RtRt. tR]R&   . R	Ot]	R 4       t
RtR# )
Spliti   z7``split`` option to polynomial manipulation functions. r   r   r   c                	*    R V9   d   \        R4      hR# )r   z%'split' option is not implemented yetN)NotImplementedErrorr%   s   &&r   r'   Split.postprocess	  s    g%&MNN r    r   N)r   r   rL   r   r   r   r   r)   r*   r+   r,   r-   r   r   r.   r   r0   r'   r1   r   r    r   r   r      s1    AFHi H O Or    r   c                  F    ] tR tRt$ RtRt. tR]R&   . R	Ot]	R 4       t
RtR# )
Gaussiani  z:``gaussian`` option to polynomial manipulation functions. r   r   r   c                	    R V9   dN   VR ,          RJ d?   \         P                  P                  P                  VR&   \        P                  V4       R# R# R# )r   TrL   N)r   r   r   r   	Extensionr'   r%   s   &&r   r'   Gaussian.postprocess  sG     WZ%8D%@ % 3 3 8 8GH!!'* &A r    r   N)r   r   rL   r   r   r   r   r  r   r    r   r  r    s/    DFHi H + +r    r  c                  V    ] tR tRt$ RtRt. tR]R&   . R
Ot]	R 4       t
]	R 4       tRtR	# )r  i  z;``extension`` option to polynomial manipulation functions. r   r   r   c                	    V^8X  d   \        V4      # V^ 8X  d   \        R4      h\        VR4      '       g   V0pV# V'       g   RpV# \        V4      pV# )r   z.'False' is an invalid argument for 'extension'__iter__N)r8   r   r   rj   )r   r   s   &&r   r"   Extension.preprocess(  se    >	?"!^NOO9j11&K	  ! $I  !$IIr    c                	    R V9   dN   VR ,          RJd?   \         P                  P                  P                  P                  ! VR ,          !  VR&   R# R# R# )r   TrL   N)r   r   r   r   r   r%   s   &&r   r'   Extension.postprocess9  sL    '!gk&:$&F % 3 3 6 6 F F%!'GH 'G!r    r   N)r   rL   r   r   r   r   r)   r*   r+   r,   r-   r   r   r.   r   r0   r"   r'   r1   r   r    r   r  r    sC    EFHiH    ' 'r    r  c                  V    ] tR tRt$ RtRt. tR]R&   . R
Ot]	R 4       t
]	R 4       tRtR	# )Modulusi@  z9``modulus`` option to polynomial manipulation functions. r   r   r   c                	    \        V4      pVP                  '       d   V^ 8  d   \        V4      # \        RV,          4      h)    z)'modulus' must a positive integer, got %s)r   
is_Integerr   r   )r   r   s   &&r   r"   Modulus.preprocessH  s?    '"'A+w<;gEG Gr    c                	    R V9   dJ   VR ,          pVP                  RR4      p\        P                  P                  P	                  W#4      VR&   R# R# )r   r   TrL   N)rY   r   r   r   r   )r   r&   r   r   s   &&  r   r'   Modulus.postprocessR  sH    i(GK6I % 3 3 6 6w JGH  r    r   N)r   r   rL   r   r   r  r   r    r   r  r  @  sC    CFHiEHG G K Kr    r  c                  ,    ] tR tRtRtRtR.t. ROtRtR# )	SymmetriciZ  z;``symmetric`` option to polynomial manipulation functions. r   r   r   N)r   rL   r   r   r   )	r)   r*   r+   r,   r-   r   r   r   r1   r   r    r   r  r  Z  s    EF{HEHr    r  c                  .    ] tR tRtRtRt]R 4       tRtR# )Strictic  z8``strict`` option to polynomial manipulation functions. rU   c                	    R # r   r   r   s   &r   r   Strict.defaulth  r   r    r   N	r)   r*   r+   r,   r-   r   r0   r   r1   r   r    r   r  r  c  s    BF r    r  c                  F    ] tR tRtRtRt. ROt]R 4       t]R 4       t	Rt
R# )	Autoim  z4``auto`` flag to polynomial manipulation functions. autoc                	    R # r   r   r   s   &r   r   Auto.defaultt  r   r    c                	B    R V9   g   RV9   d   RV9  d   RVR&   R# R# R# )rL   r   r   FNr   r%   s   &&r   r'   Auto.postprocessx  s*    7g#56;P#GFO <Q#5r    r   N)r   rL   r   r   )r)   r*   r+   r,   r-   r   r   r0   r   r'   r1   r   r    r   r  r  m  s5    >F8E  $ $r    r  c                  .    ] tR tRtRtRt]R 4       tRtR# )Fraci~  z6``auto`` option to polynomial manipulation functions. fracc                	    R # Fr   r   s   &r   r   Frac.default      r    r   Nr  r   r    r   r&  r&  ~  s    @F r    r&  c                  .    ] tR tRtRtRt]R 4       tRtR# )Formali  z6``formal`` flag to polynomial manipulation functions. formalc                	    R # r)  r   r   s   &r   r   Formal.default  r+  r    r   Nr  r   r    r   r-  r-        @F r    r-  c                      ] tR tRtRtRtRtR# )Polysi  z5``polys`` flag to polynomial manipulation functions. r   r   N)r)   r*   r+   r,   r-   r   r1   r   r    r   r3  r3    s
    ?Fr    r3  c                  .    ] tR tRtRtRt]R 4       tRtR# )Includei  z7``include`` flag to polynomial manipulation functions. includec                	    R # r)  r   r   s   &r   r   Include.default  r+  r    r   Nr  r   r    r   r5  r5    s    AF r    r5  c                  .    ] tR tRtRtRt]R 4       tRtR# )Alli  z3``all`` flag to polynomial manipulation functions. allc                	    R # r)  r   r   s   &r   r   All.default  r+  r    r   Nr  r   r    r   r:  r:    s    =F r    r:  c                  >    ] tR tRtRtRt]R 4       t]R 4       tRt	R# )Geni  z3``gen`` flag to polynomial manipulation functions. r   c                	    ^ # )r  r   r   s   &r   r   Gen.default  s    r    c                	T    \        V\        \        34      '       d   V# \        R 4      h)z!invalid argument for 'gen' option)r   r   r   r   )r   r   s   &&r   r"   Gen.preprocess  s$    cE3<((JABBr    r   N
r)   r*   r+   r,   r-   r   r0   r   r"   r1   r   r    r   r?  r?    s2    =F  C Cr    r?  c                  .    ] tR tRtRtRt]R 4       tRtR# )Seriesi  z6``series`` flag to polynomial manipulation functions. seriesc                	    R # r)  r   r   s   &r   r   Series.default  r+  r    r   Nr  r   r    r   rF  rF    r1  r    rF  c                  >    ] tR tRtRtRt]R 4       t]R 4       tRt	R# )Symbolsi  z7``symbols`` flag to polynomial manipulation functions. r   c                	    \        R ^R7      # )s)start)r
   r   s   &r   r   Symbols.default  s    1--r    c                	`    \        VR 4      '       d   \        V4      # \        RV,          4      h)r
  z2expected an iterator or iterable container, got %s)r   iterr   )r   r   s   &&r   r"   Symbols.preprocess  s+    7J''= RU\\]]r    r   NrD  r   r    r   rK  rK    s2    AF. . ^ ^r    rK  c                  .    ] tR tRtRtRt]R 4       tRtR# )Methodi  z6``method`` flag to polynomial manipulation functions. methodc                	r    \        V\        4      '       d   VP                  4       # \        R V,          4      h)zexpected a string, got %s)r   r   lowerr   )r   rU  s   &&r   r"   Method.preprocess  s,    fc""<<>!9FBCCr    r   N)	r)   r*   r+   r,   r-   r   r0   r"   r1   r   r    r   rT  rT    s    @FD Dr    rT  c                v    Vf   RT r\        V4      ^8w  g   RV9  g	   V '       d   \        W4      # VR,          # )z9Construct options from keyword arguments or ... options. optr   )r   r   )rK   rF   s   &&r   build_optionsr[    s7    |d
4yA~d*dt""E{r    c                   \        V4      pV P                  4        FE  p \        P                  V,          P                  '       d   W!9  d   \        RV,          4      hKE  KG  	  R#   \         d    \        RT,          4      hi ; i)a  
Allow specified flags to be used in the given context.

Examples
========

>>> from sympy.polys.polyoptions import allowed_flags
>>> from sympy.polys.domains import ZZ

>>> allowed_flags({'domain': ZZ}, [])

>>> allowed_flags({'domain': ZZ, 'frac': True}, [])
Traceback (most recent call last):
...
FlagError: 'frac' flag is not allowed in this context

>>> allowed_flags({'domain': ZZ, 'frac': True}, ['frac'])

rQ   rP   N)rj   r[   r   rE   r/   r	   r?   r   )rF   rT   args   && r   allowed_flagsr^    s    ( JEyy{	B""3'///C4D>DF F 5E/ 
  	B:S@AA	Bs   ?A''Bc                2    RV 9  d   \        V 4      p WR&   V # )z$Update options with default values. rN   )rX   )r&   rN   s   &,r   set_defaultsr`    s      w-&
Nr    r   )<r-   
__future__r   __all__sympy.core.basicr   sympy.core.exprr   sympy.core.sympifyr   sympy.polys.polyerrorsr   r   r	   sympy.utilitiesr
   r   r   sympy.utilities.iterablesr   r   sympy.polysr   r   r   r3   r5   typer<   rX   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r&  r-  r3  r5  r:  r?  rF  rK  rT  r[  r^  r`  rr   r   r    r   <module>rk     s#   D "+ "   & J J F F ;  	 46 gF g. . rd r rj
]j 
6Z :C&J C6D6Z D,9Fj 9"/MZ /T]j T
T 
TpdVz pdfOMZ O+}
 + '* 'BKf
 K4F F]j $=$* $"=$* ]DJ M4: mTZ - C$* C"]DJ ^dj ^"
DTZ 
DB>      "r    