Ë
    çÍ:jmA  ã                   óP  — d dl mZ d dlmZmZ  e«       Z G d„ d«      Z G d„ de«      Z G d„ d«      Z G d	„ d
e«      Z	 G d„ de	«      Z
 G d„ de	«      Z G d„ de«      Z G d„ de«      Z G d„ d«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Zd„ Zedk(  r e«        yy)é    )ÚCounter)ÚAPPÚLogicParserc                   ó,   — e Zd ZdZdZdZeegZeegz   Zy)ÚTokensú(ú)z-oN)Ú__name__Ú
__module__Ú__qualname__ÚOPENÚCLOSEÚIMPÚPUNCTÚTOKENS© ó    úi/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/nltk/sem/linearlogic.pyr   r      s'   „ à€DØ€Eð €Cà�5ˆM€EØ�c�U‰]�Fr   r   c                   ó:   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
y	)
ÚLinearLogicParserz!A linear logic expression parser.c                 ó´   — t        j                  | «       t        dt        j                  dd di| _        | xj                  t        j                  gz  c_        y )Né   é   é   )r   Ú__init__r   r   r   Úoperator_precedenceÚright_associated_operations©Úselfs    r   r   zLinearLogicParser.__init__   s@   € Ü×Ñ˜TÔ"ä$'¨¬F¯J©J¸¸4ÀÐ#CˆÔ Ø×(Ò(¬V¯Z©Z¨LÑ8Ö(r   c                 ó"   — t         j                  S ©N)r   r   r   s    r   Úget_all_symbolsz!LinearLogicParser.get_all_symbols$   s   € Ü�}‰}Ðr   c                 ó–   — |t         j                  vr| j                  ||«      S |t         j                  k(  r| j	                  ||«      S y r!   )r   r   Úhandle_variabler   Úhandle_open)r   ÚtokÚcontexts      r   ÚhandlezLinearLogicParser.handle'   sE   € Ø”f—m‘mÑ#Ø×'Ñ'¨¨WÓ5Ð5Ø”F—K‘KÒØ×#Ñ# C¨Ó1Ð1ð  r   c                 ó6   — |t         j                  k(  rt        S y r!   )r   r   ÚImpExpression)r   r&   s     r   Úget_BooleanExpression_factoryz/LinearLogicParser.get_BooleanExpression_factory-   s   € Ø”&—*‘*ÒÜ Ð àr   c                 ó   —  |||«      S r!   r   )r   ÚfactoryÚfirstÚseconds       r   Úmake_BooleanExpressionz(LinearLogicParser.make_BooleanExpression3   s   € Ù�u˜fÓ%Ð%r   c                 ó:  — | j                  t        |«      r„| j                  d«      rs| j                  d«      t        j
                  k(  rQ| j                  «        | j                  t        «      }| j                  t        j                  «       t        ||d«      }|S )zèAttempt to make an application expression.  If the next tokens
        are an argument in parens, then the argument expression is a
        function being applied to the arguments.  Otherwise, return the
        argument expression.r   N)
Úhas_priorityr   ÚinRangeÚtokenr   r   Úprocess_next_expressionÚassertNextTokenr   ÚApplicationExpression)r   Ú
expressionr'   Úarguments       r   Úattempt_ApplicationExpressionz/LinearLogicParser.attempt_ApplicationExpression6   sq   € ð
 ×ÑœS 'Ô*Ø�|‰|˜AŒ 4§:¡:¨a£=´F·K±KÒ#?Ø—
‘
”Ø×7Ñ7¼Ó<�Ø×$Ñ$¤V§\¡\Ô2Ü2°:¸xÈÓN�
ØÐr   c                 óT   — |d   j                  «       rt        |«      S t        |«      S )Nr   )ÚisupperÚVariableExpressionÚConstantExpression)r   Únames     r   Úmake_VariableExpressionz)LinearLogicParser.make_VariableExpressionC   s&   € Ø�‰7�?‰?ÔÜ% dÓ+Ð+ä% dÓ+Ð+r   N)r
   r   r   Ú__doc__r   r"   r(   r+   r0   r:   r@   r   r   r   r   r      s(   „ Ù+ò9òò2òò&òó,r   r   c                   ó>   — e Zd Z e«       Zed„ «       Zdd„Zd„ Zd„ Z	y)Ú
Expressionc                 ó8   — | j                   j                  |«      S r!   )Ú_linear_logic_parserÚparse)ÚclsÚss     r   Ú
fromstringzExpression.fromstringM   s   € à×'Ñ'×-Ñ-¨aÓ0Ð0r   Nc                 ó   — t        | ||«      S r!   )r7   )r   ÚotherÚother_indicess      r   ÚapplytozExpression.applytoQ   s   € Ü$ T¨5°-Ó@Ð@r   c                 ó$   — | j                  |«      S r!   )rM   ©r   rK   s     r   Ú__call__zExpression.__call__T   s   € Ø�|‰|˜EÓ"Ð"r   c                 ó<   — d| j                   j                  › d| › d�S )Nú<ú ú>)Ú	__class__r
   r   s    r   Ú__repr__zExpression.__repr__W   s"   € Ø�4—>‘>×*Ñ*Ð+¨1¨T¨F°!Ð4Ð4r   r!   )
r
   r   r   r   rE   ÚclassmethodrI   rM   rP   rV   r   r   r   rC   rC   J   s-   „ Ù,Ó.Ðàñ1ó ð1óAò#ó5r   rC   c                   óF   — e Zd Zdd„Zdd„Zd„ Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zy)ÚAtomicExpressionNc                 óL   — t        |t        «      sJ ‚|| _        |sg }|| _        y)z‘
        :param name: str for the constant name
        :param dependencies: list of int for the indices on which this atom is dependent
        N)Ú
isinstanceÚstrr?   Údependencies)r   r?   r]   s      r   r   zAtomicExpression.__init__\   s+   € ô
 ˜$¤Ô$Ð$Ð$ØˆŒ	áØˆLØ(ˆÕr   c                 ó   — |r	| |v r||    S | S )zõ
        If 'self' is bound by 'bindings', return the atomic to which it is bound.
        Otherwise, return self.

        :param bindings: ``BindingDict`` A dictionary of bindings used to simplify
        :return: ``AtomicExpression``
        r   ©r   Úbindingss     r   ÚsimplifyzAtomicExpression.simplifyh   s   € ñ ˜ Ñ(Ø˜D‘>Ð!àˆKr   c                 ó   — g | _         | g fS ©a3  
        From Iddo Lev's PhD Dissertation p108-109

        :param index_counter: ``Counter`` for unique indices
        :param glueFormulaFactory: ``GlueFormula`` for creating new glue formulas
        :return: (``Expression``,set) for the compiled linear logic and any newly created glue formulas
        ©r]   ©r   Úindex_counterÚglueFormulaFactorys      r   Úcompile_poszAtomicExpression.compile_posu   ó   € ð ˆÔØ�bˆzÐr   c                 ó   — g | _         | g fS rc   rd   re   s      r   Úcompile_negzAtomicExpression.compile_neg€   ri   r   c                 ó`   — |j                  | j                  j                  «       «      | _        y r!   )Úinitialize_labelr?   Úlower©r   Úfstructs     r   Úinitialize_labelsz"AtomicExpression.initialize_labels‹   s   € Ø×,Ñ,¨T¯Y©Y¯_©_Ó->Ó?ˆ�	r   c                 ój   — | j                   |j                   k(  xr | j                  |j                  k(  S r!   )rU   r?   rO   s     r   Ú__eq__zAtomicExpression.__eq__Ž   s'   € Ø�~‰~ §¡Ñ0ÒL°T·Y±YÀ%Ç*Á*Ñ5LÐLr   c                 ó   — | |k(   S r!   r   rO   s     r   Ú__ne__zAtomicExpression.__ne__‘   ó   € Ø˜5‘=Ð Ð r   c                 óZ   — | j                   }| j                  r|d| j                  z  z  }|S ©Nz%s)r?   r]   )r   Úaccums     r   Ú__str__zAtomicExpression.__str__”   s.   € Ø—	‘	ˆØ×ÒØ�T˜D×-Ñ-Ñ-Ñ-ˆEØˆr   c                 ó,   — t        | j                  «      S r!   )Úhashr?   r   s    r   Ú__hash__zAtomicExpression.__hash__š   s   € Ü�D—I‘I‹Ðr   r!   )r
   r   r   r   ra   rh   rk   rq   rs   ru   rz   r}   r   r   r   rY   rY   [   s1   „ ó
)óò	ò	ò@òMò!òór   rY   c                   ó   — e Zd Zd„ Zy)r>   c                 ó°   — t        |t        «      sJ ‚t        |t        «      r	 |t        || fg«      z   S | |k(  r|S t        | ||«      ‚# t        $ r Y Œw xY w)aæ  
        If 'other' is a constant, then it must be equal to 'self'.  If 'other' is a variable,
        then it must not be bound to anything other than 'self'.

        :param other: ``Expression``
        :param bindings: ``BindingDict`` A dictionary of all current bindings
        :return: ``BindingDict`` A new combined dictionary of of 'bindings' and any new binding
        :raise UnificationException: If 'self' and 'other' cannot be unified in the context of 'bindings'
        )r[   rC   r=   ÚBindingDictÚVariableBindingExceptionÚUnificationException)r   rK   r`   s      r   ÚunifyzConstantExpression.unifyŸ   sk   € ô ˜%¤Ô,Ð,Ð,Ü�eÔ/Ô0ðØ¤+°°t¨}¨oÓ">Ñ>Ð>ð �UŠ]ØˆOÜ" 4¨°Ó9Ð9øô	 ,ò Ùðús   ¤A	 Á		AÁAN©r
   r   r   rƒ   r   r   r   r>   r>   ž   s   „ ó:r   r>   c                   ó   — e Zd Zd„ Zy)r=   c                 ó–   — t        |t        «      sJ ‚	 | |k(  r|S |t        | |fg«      z   S # t        $ r}t	        | ||«      |‚d}~ww xY w)aˆ  
        'self' must not be bound to anything other than 'other'.

        :param other: ``Expression``
        :param bindings: ``BindingDict`` A dictionary of all current bindings
        :return: ``BindingDict`` A new combined dictionary of of 'bindings' and the new binding
        :raise UnificationException: If 'self' and 'other' cannot be unified in the context of 'bindings'
        N)r[   rC   r€   r�   r‚   ©r   rK   r`   Úes       r   rƒ   zVariableExpression.unifyµ   s_   € ô ˜%¤Ô,Ð,Ð,ð	EØ�uŠ}Ø�à¤+°°e¨}¨oÓ">Ñ>Ð>øÜ'ò 	EÜ& t¨U°HÓ=À1ÐDûð	Eús   ”, ›, ¬	AµAÁANr„   r   r   r   r=   r=   ´   s   „ óEr   r=   c                   óJ   — e Zd Zd„ Zdd„Zd„ Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zy)r*   c                 óh   — t        |t        «      sJ ‚t        |t        «      sJ ‚|| _        || _        y)zƒ
        :param antecedent: ``Expression`` for the antecedent
        :param consequent: ``Expression`` for the consequent
        N)r[   rC   Ú
antecedentÚ
consequent)r   r‹   rŒ   s      r   r   zImpExpression.__init__É   s2   € ô
 ˜*¤jÔ1Ð1Ð1Ü˜*¤jÔ1Ð1Ð1Ø$ˆŒØ$ˆ�r   Nc                 óŠ   — | j                  | j                  j                  |«      | j                  j                  |«      «      S r!   )rU   r‹   ra   rŒ   r_   s     r   ra   zImpExpression.simplifyÓ   s6   € Ø�~‰~Ø�O‰O×$Ñ$ XÓ.°·±×0HÑ0HÈÓ0Ró
ð 	
r   c                 ó  — t        |t        «      sJ ‚	 || j                  j                  |j                  |«      z   | j                  j                  |j                  |«      z   S # t
        $ r}t        | ||«      |‚d}~ww xY w)a˜  
        Both the antecedent and consequent of 'self' and 'other' must unify.

        :param other: ``ImpExpression``
        :param bindings: ``BindingDict`` A dictionary of all current bindings
        :return: ``BindingDict`` A new combined dictionary of of 'bindings' and any new bindings
        :raise UnificationException: If 'self' and 'other' cannot be unified in the context of 'bindings'
        N)r[   r*   r‹   rƒ   rŒ   r�   r‚   r‡   s       r   rƒ   zImpExpression.unifyØ   s‡   € ô ˜%¤Ô/Ð/Ð/ð	EàØ—/‘/×'Ñ'¨×(8Ñ(8¸(ÓCñDà—/‘/×'Ñ'¨×(8Ñ(8¸(ÓCñDðøô
 (ò 	EÜ& t¨U°HÓ=À1ÐDûð	Eús   ”AA$ Á$	B Á-A;Á;B c                 ó    — | j                   j                  ||«      \  }}| j                  j                  ||«      \  }}t	        ||«      ||z   fS rc   )r‹   rk   rŒ   rh   r*   )r   rf   rg   ÚaÚa_newÚcÚc_news          r   rh   zImpExpression.compile_posë   sP   € ð —_‘_×0Ñ0°Ð@RÓS‰
ˆˆEØ—_‘_×0Ñ0°Ð@RÓS‰
ˆˆEÜ˜a Ó# U¨U¡]Ð3Ð3r   c                 ó  — | j                   j                  ||«      \  }}| j                  j                  ||«      \  }}|j	                  «       }|j
                  j                  |«        |d|z  ||h«      }|||z   |gz   fS )aG  
        From Iddo Lev's PhD Dissertation p108-109

        :param index_counter: ``Counter`` for unique indices
        :param glueFormulaFactory: ``GlueFormula`` for creating new glue formulas
        :return: (``Expression``,list of ``GlueFormula``) for the compiled linear logic and any newly created glue formulas
        zv%s)r‹   rh   rŒ   rk   Úgetr]   Úappend)	r   rf   rg   r�   r‘   r’   r“   Úfresh_indexÚnew_vs	            r   rk   zImpExpression.compile_neg÷   s…   € ð —_‘_×0Ñ0°Ð@RÓS‰
ˆˆEØ—_‘_×0Ñ0°Ð@RÓS‰
ˆˆEØ#×'Ñ'Ó)ˆØ	�‰×Ñ˜kÔ*Ù" 5¨;Ñ#6¸¸K¸=ÓIˆØ�5˜5‘= E 7Ñ*Ð+Ð+r   c                 óp   — | j                   j                  |«       | j                  j                  |«       y r!   )r‹   rq   rŒ   ro   s     r   rq   zImpExpression.initialize_labels  s&   € Ø�‰×)Ñ)¨'Ô2Ø�‰×)Ñ)¨'Õ2r   c                 ó    — | j                   |j                   k(  xr4 | j                  |j                  k(  xr | j                  |j                  k(  S r!   )rU   r‹   rŒ   rO   s     r   rs   zImpExpression.__eq__
  sE   € à�N‰N˜eŸo™oÑ-ò 4Ø—‘ 5×#3Ñ#3Ñ3ò4à—‘ 5×#3Ñ#3Ñ3ð	
r   c                 ó   — | |k(   S r!   r   rO   s     r   ru   zImpExpression.__ne__  rv   r   c                 ó¨   — dj                  t        j                  | j                  t        j                  | j
                  t        j                  «      S )Nz{}{} {} {}{})Úformatr   r   r‹   r   rŒ   r   r   s    r   rz   zImpExpression.__str__  s8   € Ø×$Ñ$Ü�K‰KØ�O‰OÜ�J‰JØ�O‰OÜ�L‰Ló
ð 	
r   c                 óŒ   — t        t        | j                  «      › t        j                  › t        | j                  «      › �«      S r!   )r|   r‹   r   r   rŒ   r   s    r   r}   zImpExpression.__hash__  s2   € Ü”t˜DŸO™OÓ,Ð-¬f¯j©j¨\¼$¸t¿¹Ó:OÐ9PÐQÓRÐRr   r!   )r
   r   r   r   ra   rƒ   rh   rk   rq   rs   ru   rz   r}   r   r   r   r*   r*   È   s6   „ ò%ó
ò
Eò&
4ò,ò3ò
ò!ò
óSr   r*   c                   ó4   — e Zd Zdd„Zdd„Zd„ Zd„ Zd„ Zd„ Zy)	r7   Nc           	      ó¢  — |j                  «       }|j                  «       }t        |t        «      sJ ‚t        |t        «      sJ ‚t	        «       }	 t        |t
        «      r||j                  z  }t        |t
        «      r||j                  z  }||j                  j                  ||«      z  }|rft        |j                  j                  «      |k  st        d|›d|›�«      ‚t        |j                  j                  «      |k(  rt        d|›d|›�«      ‚|| _        || _        || _        y# t        $ r}t        d|› d|› d|› �«      |‚d}~ww xY w)aY  
        :param function: ``Expression`` for the function
        :param argument: ``Expression`` for the argument
        :param argument_indices: set for the indices of the glue formula from which the argument came
        :raise LinearLogicApplicationException: If 'function' cannot be applied to 'argument' given 'argument_indices'.
        zCannot apply z to z. NzGDependencies unfulfilled when attempting to apply Linear Logic formula zZDependencies not a proper subset of indices when attempting to apply Linear Logic formula )ra   r[   r*   rC   r€   r7   r`   r‹   rƒ   r‚   ÚLinearLogicApplicationExceptionÚsetr]   Úfunctionr9   )r   r£   r9   Úargument_indicesÚfunction_simpÚargument_simpr`   rˆ   s           r   r   zApplicationExpression.__init__"  sW  € ð !×)Ñ)Ó+ˆØ ×)Ñ)Ó+ˆä˜-¬Ô7Ð7Ð7Ü˜-¬Ô4Ð4Ð4ä“=ˆð		Ü˜(Ô$9Ô:Ø˜H×-Ñ-Ñ-�Ü˜(Ô$9Ô:Ø˜H×-Ñ-Ñ-�Ø˜×0Ñ0×6Ñ6°}ÀhÓOÑOˆHñ ä�}×/Ñ/×<Ñ<Ó=Ð@PÒPÝ5â$¡mð5óð ô �=×+Ñ+×8Ñ8Ó9Ð=MÒMÝ5â$¡mð5óð ð
 !ˆŒØ ˆŒØ ˆ�øô+ $ò 	Ü1Ø ˜¨d°=°/ÀÀAÀ3ÐGóàðûð	ús   ÁAD+ Ä+	EÄ4E	Å	Ec                 óh   — |s| j                   }| j                  j                  |«      j                  S )a=  
        Since function is an implication, return its consequent.  There should be
        no need to check that the application is valid since the checking is done
        by the constructor.

        :param bindings: ``BindingDict`` A dictionary of bindings used to simplify
        :return: ``Expression``
        )r`   r£   ra   rŒ   r_   s     r   ra   zApplicationExpression.simplifyN  s+   € ñ Ø—}‘}ˆHà�}‰}×%Ñ% hÓ/×:Ñ:Ð:r   c                 ó    — | j                   |j                   k(  xr4 | j                  |j                  k(  xr | j                  |j                  k(  S r!   )rU   r£   r9   rO   s     r   rs   zApplicationExpression.__eq__\  sA   € à�N‰N˜eŸo™oÑ-ò 0Ø—‘ §¡Ñ/ò0à—‘ §¡Ñ/ð	
r   c                 ó   — | |k(   S r!   r   rO   s     r   ru   zApplicationExpression.__ne__c  rv   r   c                 ó„   — d| j                   z  t        j                  z   d| j                  z  z   t        j                  z   S rx   )r£   r   r   r9   r   r   s    r   rz   zApplicationExpression.__str__f  s1   € Ø�d—m‘mÑ#¤f§k¡kÑ1°D¸4¿=¹=Ñ4HÑHÌ6Ï<É<ÑWÐWr   c                 óŒ   — t        t        | j                  «      › t        j                  › t        | j                  «      › �«      S r!   )r|   r‹   r   r   rŒ   r   s    r   r}   zApplicationExpression.__hash__i  s2   € Ü”t˜DŸO™OÓ,Ð-¬f¯k©k¨]¼4ÀÇÁÓ;PÐ:QÐRÓSÐSr   r!   )	r
   r   r   r   ra   rs   ru   rz   r}   r   r   r   r7   r7   !  s#   „ ó*!óX;ò
ò!òXóTr   r7   c                   óD   — e Zd Zdd„Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zy)r€   Nc                 óv   — i | _         t        |t        «      r|j                  «       }|r|D ]
  \  }}|| |<   Œ yy)zÞ
        :param bindings:
            list [(``VariableExpression``, ``AtomicExpression``)] to initialize the dictionary
            dict {``VariableExpression``: ``AtomicExpression``} to initialize the dictionary
        N)Údr[   ÚdictÚitems)r   r`   ÚvÚbs       r   r   zBindingDict.__init__n  sE   € ð ˆŒä�h¤Ô%Ø—~‘~Ó'ˆHáØ ò ‘��1Ø��Q’ñð r   c                 óÚ   — t        |t        «      sJ ‚t        |t        «      sJ ‚||k7  sJ ‚| j                  j	                  |d«      }|r||k(  r|| j                  |<   yt        d|z  «      ‚)a“  
        A binding is consistent with the dict if its variable is not already bound, OR if its
        variable is already bound to its argument.

        :param variable: ``VariableExpression`` The variable bind
        :param binding: ``Expression`` The expression to which 'variable' should be bound
        :raise VariableBindingException: If the variable cannot be bound in this dictionary
        Nz*Variable %s already bound to another value)r[   r=   rC   r®   r•   r�   )r   ÚvariableÚbindingÚexistings       r   Ú__setitem__zBindingDict.__setitem__}  st   € ô ˜(Ô$6Ô7Ð7Ð7Ü˜'¤:Ô.Ð.Ð.à˜7Ò"Ð"Ð"à—6‘6—:‘:˜h¨Ó-ˆá˜7 hÒ.Ø&ˆD�F‰F�8Òä*Ø<ÀÑIóð r   c                 ó”   — t        |t        «      sJ ‚| j                  |   }|r	 | j                  |   }|rŒyy# t        $ r |cY S w xY w)zD
        Return the expression to which 'variable' is bound
        N)r[   r=   r®   ÚKeyError)r   r´   Úintermediates      r   Ú__getitem__zBindingDict.__getitem__”  sU   € ô ˜(Ô$6Ô7Ð7Ð7à—v‘v˜hÑ'ˆÙð$Ø#Ÿv™v lÑ3�ô øô ò $Ø#Ò#ð$ús   ¥9 ¹AÁAc                 ó   — || j                   v S r!   ©r®   )r   Úitems     r   Ú__contains__zBindingDict.__contains__¡  s   € Ø�t—v‘vˆ~Ðr   c                 óî   — 	 t        «       }| j                  D ]  }| j                  |   ||<   Œ |j                  D ]  }|j                  |   ||<   Œ |S # t        $ r}t        d| ›d|›�«      |‚d}~ww xY w)a  
        :param other: ``BindingDict`` The dict with which to combine self
        :return: ``BindingDict`` A new dict containing all the elements of both parameters
        :raise VariableBindingException: If the parameter dictionaries are not consistent with each other
        z;Attempting to add two contradicting VariableBindingsLists: ú, N)r€   r®   r�   )r   rK   Úcombinedr±   rˆ   s        r   Ú__add__zBindingDict.__add__¤  sˆ   € ð	Ü"“}ˆHØ—V‘Vò (�Ø"Ÿf™f Q™i�˜’ð(à—W‘Wò )�Ø#Ÿg™g a™j�˜’ð)àˆOøÜ'ò 	Ý*â48¹%ðAóð ðûð	ús   ‚AA Á	A4ÁA/Á/A4c                 ó   — | |k(   S r!   r   rO   s     r   ru   zBindingDict.__ne__·  rv   r   c                 ó`   — t        |t        «      st        ‚| j                  |j                  k(  S r!   )r[   r€   Ú	TypeErrorr®   rO   s     r   rs   zBindingDict.__eq__º  s$   € Ü˜%¤Ô-ÜˆOØ�v‰v˜Ÿ™Ñ Ð r   c                 ó†   ‡ — ddj                  ˆ fd„t        ‰ j                  j                  «       «      D «       «      z   dz   S )Nú{rÁ   c              3   óF   •K  — | ]  }|› d ‰j                   |   › �–— Œ y­w)z: Nr½   )Ú.0r±   r   s     €r   ú	<genexpr>z&BindingDict.__str__.<locals>.<genexpr>À  s$   øè ø€ ÒR°q !  B t§v¡v¨a¡y kÔ2ÑRùs   ƒ!ú})ÚjoinÚsortedr®   Úkeysr   s   `r   rz   zBindingDict.__str__¿  s2   ø€ Ø�T—Y‘YÓR¼FÀ4Ç6Á6Ç;Á;Ã=Ó<QÔRÓRÑRÐUXÑXÐXr   c                 ó   — d| z  S )NzBindingDict: %sr   r   s    r   rV   zBindingDict.__repr__Â  s   € Ø  4Ñ'Ð'r   r!   )r
   r   r   r   r·   r»   r¿   rÃ   ru   rs   rz   rV   r   r   r   r€   r€   m  s0   „ óòò.$òòò&!ò!ò
Yó(r   r€   c                   ó   — e Zd Zy)r�   N©r
   r   r   r   r   r   r�   r�   Æ  ó   „ Ør   r�   c                   ó   — e Zd Zd„ Zy)r‚   c           	      óB   — t         j                  | d|› d|› d|› �«       y )NzCannot unify z with z given )Ú	Exceptionr   )r   r�   r²   r`   s       r   r   zUnificationException.__init__Ë  s%   € Ü×Ñ˜4 =°°°6¸!¸¸GÀHÀ:Ð!NÕOr   N)r
   r   r   r   r   r   r   r‚   r‚   Ê  s   „ óPr   r‚   c                   ó   — e Zd Zy)r¡   NrÒ   r   r   r   r¡   r¡   Ï  rÓ   r   r¡   c                  ó¤  — t         j                  } t         | d«      «       t         | d«      «       t         | d«      «       t         | d«      «       t         | d«      j                  «       «       t         | d«      j                  «       «       t         | d«      j                  «       «       t         | d«      j                  «       «       y )	NÚfz(g -o f)z((g -o G) -o G)zg -o h -o fz(g -o f)(g)z(H -o f)(g)z((g -o G) -o G)((g -o f))z(H -o H)((g -o f)))rC   rI   Úprintra   )Úlexprs    r   ÚdemorÜ   Ó  s›   € Ü×!Ñ!€Eä	‰%�‹+ÔÜ	‰%�Ó
ÔÜ	‰%Ð"Ó
#Ô$Ü	‰%�Ó
Ô Ü	‰%�Ó
×
(Ñ
(Ó
*Ô+Ü	‰%�Ó
×
(Ñ
(Ó
*Ô+Ü	‰%Ð,Ó
-×
6Ñ
6Ó
8Ô9Ü	‰%Ð%Ó
&×
/Ñ
/Ó
1Õ2r   Ú__main__N)Únltk.internalsr   Únltk.sem.logicr   r   Ú_counterr   r   rC   rY   r>   r=   r*   r7   r€   rÖ   r�   r‚   r¡   rÜ   r
   r   r   r   ú<module>rá      sÎ   ðõ #ß +á‹9€÷	ñ 	ô,,˜ô ,,÷^5ñ 5ô"@�zô @ôF:Ð)ô :ô,EÐ)ô Eô(VS�Jô VSôrIT˜Jô IT÷XV(ñ V(ôr	˜yô 	ôP˜9ô Pô
	 iô 	ò
3ð ˆzÒÙ…Fð r   