
xi\c           @   s   d  Z  d d l Z d d l m Z m Z m Z d d l m Z m Z m	 Z	 m
 Z
 m Z m Z m Z m Z m Z d d d g Z d e f d     YZ d e f d	     YZ d e f d
     YZ d S(   s   
    pygments.lexers.theorem
    ~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for theorem-proving languages.

    :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
iN(   t
   RegexLexert   defaultt   words(	   t   Textt   Commentt   Operatort   Keywordt   Namet   Stringt   Numbert   Punctuationt   Generict   CoqLexert   IsabelleLexert	   LeanLexerc        M   B   s  e  Z d  Z d Z d g Z d g Z d g Z dZ dZ dZ	 dZ
 dZ dZ dZ d Z d Z d Z i d e f d e j j f d e d f e e d d d d e j f e e d d d d e f e e	 d d d d e j f e e
 d d d d e f e e d d d d e j f e e d d d d e j f d e f d d j e d d d   e f d e e e f e f d e f d e j f d e j f de j  f de j! f de j" f de# j$ f de# j$ f de f de# j% df d	e f g d
6de f d e df de df de f g d 6de# j% f de# j% f de# j% df g d6d e f d e& f de j f de j' df de df e( d g d6Z) d  Z* RS(  sZ   
    For the `Coq <http://coq.inria.fr/>`_ theorem prover.

    .. versionadded:: 1.5
    t   Coqt   coqs   *.vs
   text/x-coqt   Sectiont   Modulet   Endt   Requiret   Importt   Exportt   Variablet	   Variablest	   Parametert
   Parameterst   Axiomt
   Hypothesist
   Hypothesest   Notationt   Localt   Tactict   Reservedt   Scopet   Opent   Closet   Bindt   Delimitt
   Definitiont   Lett   Ltact   Fixpointt
   CoFixpointt   Morphismt   Relationt   Implicitt	   Argumentst   Sett   Unsett
   Contextualt   Strictt   Prenext	   Implicitst	   Inductivet   CoInductivet   Recordt	   Structuret	   Canonicalt   Coerciont   Theoremt   Lemmat	   Corollaryt   Propositiont   Factt   Remarkt   Examplet   Prooft   Goalt   Savet   Qedt   Definedt   Hintt   Resolvet   Rewritet   Viewt   Searcht   Showt   Printt   Printingt   Allt   Grapht   Projectionst   insidet   outsidet   Checkt   Globalt   Instancet   Classt   Existingt   Universet   Polymorphict   Monomorphict   Contextt   forallt   existst   exists2t   funt   fixt   cofixt   structt   matcht   endt   int   returnt   lett   ift   ist   thent   elset   fort   oft   nosimplt   witht   ast   Typet   Propt   poset   sett   movet   caset   elimt   applyt   cleart   hnft   introt   introst
   generalizet   renamet   patternt   aftert   destructt	   inductiont   usingt   refinet	   inversiont	   injectiont   rewritet   congrt   unlockt   computet   ringt   fieldt   replacet   foldt   unfoldt   changet
   cutrewritet   simplt   havet   sufft   wlogt   sufficest   withoutt   losst   nat_normt   assertt   cutt   trivialt   revertt
   bool_congrt	   nat_congrt   symmetryt   transitivityt   autot   splitt   leftt   rightt   autorewritet   tautot   setoid_rewritet	   intuitiont   eautot   eapplyt   econstructort   etransitivityt   constructort   erewritet   redt   cbvt   lazyt
   vm_computet   native_computet   substt   byt   donet   exactt   reflexivityt   romegat   omegat
   assumptiont   solvet   contradictiont   discriminatet
   congruencet   dot   lastt   firstt   tryt   idtact   repeats   !=t   #t   &s   &&s   \(s   \)s   \*s   \+t   ,t   -s   -\.s   ->s   \.s   \.\.t   :s   ::s   :=s   :>t   ;s   ;;t   <s   <-s   <->t   =t   >s   >]s   >\}s   \?s   \?\?s   \[s   \[<s   \[>s   \[\|t   ]t   _t   `s   \{s   \{<s   \|s   \|]s   \}t   ~s   =>s   /\\s   \\/s   \{\|s   \|\}u   Πu   λs   [!$%&*+\./:<=>?@^|~-]s   [!?~]s   [=<>@^|&+\*/$%-]s   \s+s   false|true|\(\)|\[\]s   \(\*t   commentt   prefixs   \bt   suffixs   \b([A-Z][\w\']*)s   (%s)t   |Nis
   (%s|%s)?%ss   [^\W\d][\w']*s   \d[\d_]*s   0[xX][\da-fA-F][\da-fA-F_]*s   0[oO][0-7][0-7_]*s   0[bB][01][01_]*s(   -?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)s7   '(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'s   '.'t   't   "t   strings   [~?][a-z][\w\']*:t   roots   [^(*)]+s   #pushs   \*\)s   #pops   [(*)]s   [^"]+s   ""s   [A-Z][\w\']*(?=\s*\.)s   [A-Z][\w\']*s   [a-z][a-z0-9_\']*t   dottedc         C   s   |  j  d  r t Sd  S(   Ns   (*(   t
   startswitht   True(   t   text(    (    s6   lib/python2.7/site-packages/pygments/lexers/theorem.pyt   analyse_text   s    (M   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R    R!   R"   R#   R$   R%   R&   R'   R(   R)   R*   R+   R,   R-   R.   R/   R0   R1   R2   R3   R4   R5   R6   R7   R8   R9   R:   R;   R<   R=   R>   R?   R@   RA   RB   RC   RD   RE   RF   RG   RH   RI   RJ   RK   RL   RM   RN   RO   RP   RQ   RR   RS   RT   RU   RV   RW   RX   RY   RZ   R[   R\   R]   (   R^   R_   R`   Ra   Rb   Rc   Rd   Re   Rf   Rg   Rh   Ri   Rj   Rk   Rl   Rm   Rn   Ro   Rp   Rq   Rr   (   Rs   Rt   (C   Ru   Rv   Rw   Rx   Ry   Rz   R{   R|   R}   R~   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   (   R   R   R   R   R   R   R   R   R   R   R   R   (   R   R   R   R   R   R   (1   s   !=R   R   s   &&s   \(s   \)s   \*s   \+R   R   s   -\.s   ->s   \.s   \.\.R   s   ::s   :=s   :>R   s   ;;R   s   <-s   <->R   R   s   >]s   >\}s   \?s   \?\?s   \[s   \[<s   \[>s   \[\|R   R   R   s   \{s   \{<s   \|s   \|]s   \}R   s   =>s   /\\s   \\/s   \{\|s   \|\}u   Πu   λ(+   t   __name__t
   __module__t   __doc__t   namet   aliasest	   filenamest	   mimetypest	   keywords1t	   keywords2t	   keywords3t	   keywords4t	   keywords5t	   keywords6t   keyoptst	   operatorst   prefix_symst
   infix_symsR   R   t   Builtint   PseudoR   R   R   t	   NamespaceRs   R!   t   joinR   R	   t   Integert   Hext   Octt   Bint   FloatR   t   Chart   DoubleR
   RX   R   t   tokensR   (    (    (    s6   lib/python2.7/site-packages/pygments/lexers/theorem.pyR      s   			                          
     		#						c           B   s$  e  Z d  Z d Z d g Z d g Z d g Z dZ dZ dZ	 dZ
 dZ dZ dZ dZ dZ dZ dZ dZ dZ dZ dZ dZ dZ dZ dZ i d{e f d|e d}f d~e d f e e  e f e e  e j f e e dddde j  f e e dddde j! f e e	 dddde f e e dddde f e e
 dddde" j# f e e dddde" j$ f e e dddde j% f e e dddde j% f e e dddde" j& f e e dddde f e e dddde f e e dddde f e e dddde f e e dddde f e e dddde f e e dddde f e e dddde j  f de j' f de( f de( f de( j! f de( f de) j* f de) j+ f de) j, f de- df de- j. df g  d6de f d|e df de df de f g d}6de f de df de f de f g d 6de- f de- j' f de- f de- f de- df g d6de- j. f de- j' f de- j. f de- j. f de- j. df g d6Z/ RS(  sf   
    For the `Isabelle <http://isabelle.in.tum.de/>`_ proof assistant.

    .. versionadded:: 2.0
    t   Isabellet   isabelles   *.thys   text/x-isabellet   andt   assumest   attacht   avoidst   bindert   checkingt   class_instancet   class_relationt   code_modulet   congst   constantt
   constrainst	   datatypest   definest   filet   fixesRn   t	   functionst   hintst
   identifierRj   t   importsRg   t   includest   infixt   infixlt   infixrRk   t   keywordsR   t   module_namet   monost	   morphismst   no_discs_selst   notest   obtainst   opent   outputt
   overloadedt
   parametrict
   permissivet	   pervasivet
   rep_compatt   showst	   structuret
   type_classt   type_constructort	   uncheckedt   unsafet   wheret
   ML_commandt   ML_valt
   class_depst	   code_depst	   code_thmst   display_draftst   find_constst   find_theoremst   find_unused_assmst   full_prft   helpt   locale_depst   nitpickt   prt   prft   print_abbrevst   print_antiquotationst   print_attributest   print_bindst
   print_bnfst   print_bundlest   print_case_translationst   print_casest   print_clasett   print_classest   print_codeproct   print_codesetupt   print_coercionst   print_commandst   print_contextt   print_defn_rulest   print_dependenciest   print_factst   print_induct_rulest   print_inductivest   print_interpst   print_localet   print_localest   print_methodst   print_optionst   print_orderst   print_quot_mapst   print_quotconstst   print_quotientst   print_quotientsQ3t   print_quotmapsQ3t   print_rulest   print_simpsett   print_statet   print_statementt   print_syntaxt   print_theoremst   print_theoryt   print_trans_rulest   propt   pwdt
   quickcheckt   refutet   sledgehammert
   smt_statust   solve_directt   spark_statust   termt   thmt   thm_depst   thy_depsR   t   try0t   typt   unused_thmst   valuet   valuest   welcomet   print_ML_antiquotationst   print_term_bindingst   values_prologt   theoryt   beginRf   t   headert   chaptert   sectiont
   subsectiont   subsubsectiont   sectt   subsectt
   subsubsectt   MLt   ML_filet   abbreviationt   adhoc_overloadingt   aritiest	   atom_declt   attribute_setupt   axiomatizationt   bundlet   case_of_simpst   classt   classest   classrelt
   codatatypet
   code_abortt
   code_classt
   code_constt   code_datatypet   code_identifiert   code_includet   code_instancet   code_modulenamet
   code_monadt   code_printingt   code_reflectt   code_reservedt	   code_typet   coinductivet   coinductive_sett   constst   contextt   datatypet   datatype_newt   datatype_new_compatt   declarationt   declaret   default_sortt   defer_recdeft
   definitiont   defst   domaint   domain_isomorphismt	   domaindeft   equivariancet   export_codet   extractt   extract_typet   fixrecRa   t	   fun_casest
   hide_classt
   hide_constt	   hide_factt	   hide_typet   import_const_mapt   import_filet   import_tptpt   import_type_mapt	   inductivet   inductive_sett   instantiationt   judgmentt   lemmast   lifting_forgett   lifting_updatet   local_setupt   localet   method_setupt   nitpick_paramst   no_adhoc_overloadingt   no_notationt	   no_syntaxt   no_translationst   no_type_notationt   nominal_datatypet   nonterminalt   notationt   notepadt   oraclet   overloadingt   parse_ast_translationt   parse_translationt   partial_functiont	   primcorect   primrect   primrec_newt   print_ast_translationt   print_translationt   quickcheck_generatort   quickcheck_paramst   realizabilityt	   realizerst   recdeft   recordt   refute_paramst   setupt   setup_liftingt   simproc_setupt   simps_of_caset   sledgehammer_paramst	   spark_endt
   spark_opent   spark_open_sivt   spark_open_vcgt   spark_proof_functionst   spark_typest
   statespacet   syntaxt   syntax_declarationR   t   text_rawt   theoremst   translationst   type_notationt   type_synonymt   typed_print_translationt   typedeclt
   hoarestatet   install_C_filet   install_C_typest	   wpc_setupt   c_defst   c_typest   memsafet
   SML_exportt   SML_filet
   SML_importt   approximatet   bnf_axiomatizationt	   cartouchet   datatype_compatt   free_constructorst   functort   nominal_functiont   nominal_terminationt   permanent_interpretationt   bindst   definingt   smt2_statust   term_cartouchet   boogie_filet   text_cartouchet   inductive_casest   inductive_simpst   ax_specificationt   bnft	   code_predt	   corollaryt   cpodeft   cruncht   crunch_ignoret   enriched_typet   functiont   instancet   interpretationt   lemmat   lift_definitiont   nominal_inductivet   nominal_inductive2t   nominal_primrect   pcpodeft   primcorecursivet   quotient_definitiont   quotient_typet	   recdef_tct   rep_datatypet   schematic_corollaryt   schematic_lemmat   schematic_theoremt   spark_vct   specificationt   subclasst	   sublocalet   terminationt   theoremt   typedeft   wrap_free_constructorsR   R   t   qedt   sorryt   oopsR   t   hencet	   interprett   nextt   prooft   finallyt   fromRl   t
   ultimatelyRq   t   ML_prft   alsot   includet	   includingRi   t   moreovert   notet   txtt   txt_rawt	   unfoldingR   t   writet   assumeRx   t   defRb   t   presumet   guesst   obtaint   showt   thusRz   t	   apply_endt   apply_tracet   backt   defert   prefers   ::R   t   (t   )t   [R   R   R   R   R   t   +R   t   !t   ?t   {t   }t   .s   ..s   \s+s   \(\*R   s   \{\*R   s   \bR   s   \\<\w*>s   [^\W\d][.\w']*s   \?[^\W\d][.\w']*s   '[^\W\d][.\w']*s   \d[\d_]*s   0[xX][\da-fA-F][\da-fA-F_]*s   0[oO][0-7][0-7_]*s   0[bB][01][01_]*R   R   R   t   factR   s   [^(*)]+s   #pushs   \*\)s   #pops   [(*)]s   [^*}]+s   \*\}s   \*s   \}s   [^"\\]+s   \\"s   \\s   [^`\\]+s   \\`(2   R  R  R  R  R  R  R  R	  R
  R  R  R  R  R  R  R  Rn   R  R  R  Rj   R  Rg   R  R  R  R  Rk   R  R   R  R  R  R  R  R   R!  R"  R#  R$  R%  R&  R'  R(  R)  R*  R+  R,  R-  R.  (L   R/  R0  R1  R2  R3  R4  R5  R6  R7  R8  R9  R:  R;  R<  R=  R>  R?  R@  RA  RB  RC  RD  RE  RF  RG  RH  RI  RJ  RK  RL  RM  RN  RO  RP  RQ  RR  RS  RT  RU  RV  RW  RX  RY  RZ  R[  R\  R]  R^  R_  R`  Ra  Rb  Rc  Rd  Re  Rf  Rg  Rh  Ri  Rj  Rk  Rl  Rm  Rn  Ro  Rp  R   Rq  Rr  Rs  Rt  Ru  Rv  Rw  Rx  Ry  (   Rz  R{  Rf   (   R|  R}  (   R~  R  R  R  R  R  (   R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  Ra   R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R   R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R   R  R  R  R  R  R  R  R  R	  R
  R  R  R  R  R  (   R  R  (!   R  R  R  R  R  R  R  R  R  R  R  R  R  R  R   R!  R"  R#  R$  R%  R&  R'  R(  R)  R*  R+  R,  R-  R.  R/  R0  R1  R2  (   R   R   R3  (   R4  R5  (   R   R6  R7  (   R8  R9  (   R:  R;  Rl   R<  Rq   (   R=  R>  R?  R@  Ri   RA  RB  RC  RD  RE  R   RF  (   RG  Rx   RH  Rb   RI  (   RJ  RK  RL  RM  (   Rz   RN  RO  RP  RQ  RR  (   s   ::R   RS  RT  RU  R   R   R   R   R   RV  R   RW  RX  (   RY  RZ  R[  s   ..(0   R   R   R   R   R   R   R   t   keyword_minort   keyword_diagt   keyword_thyt   keyword_sectiont   keyword_subsectiont   keyword_theory_declt   keyword_theory_scriptt   keyword_theory_goalt   keyword_qedt   keyword_abandon_prooft   keyword_proof_goalt   keyword_proof_blockt   keyword_proof_chaint   keyword_proof_declt   keyword_proof_asmt   keyword_proof_asm_goalt   keyword_proof_scriptR   t   proof_operatorsR   R   R   R   t   WordR   R   Rs   R   t   Headingt
   SubheadingR   t   Errort   SymbolR   R	   R   R   R   R   t   OtherR   (    (    (    s6   lib/python2.7/site-packages/pygments/lexers/theorem.pyR      s$  			                                                                       										c        =   B   s  e  Z d  Z d Z d g Z d g Z d g Z e j e j	 BZ
 d Z d Z d Z d Z d Z i d e f d e d f d e j f e e d  d d d e j f e e d  d d d e f e e d  d d d e j f e e  e j j f e e  e f d e f d e j f d e j d f d e j f g d 6d e j  f d e j  d f d e j  d f d e j  f g d 6d e j f d e j! f d e j d f g d 6Z" RS(   sm   
    For the `Lean <https://github.com/leanprover/lean>`_
    theorem prover.

    .. versionadded:: 2.0
    t   Leant   leans   *.leans   text/x-leant   importR  t   opaque_hintt   tactic_hintR  t   renamingt   inlinet   hidingt   exposingt	   parametert
   parameterst
   conjecturet
   hypothesisR  R  t   variablet	   variablesR0  t   axiomR  R)  t   universet   aliasR9  t   optionst
   precedencet   postfixR   t
   calc_transt
   calc_substt	   calc_reflR  R  R  R  t   evalt   checkt   exitt   coercionRf   t   privateR   t	   namespaceR@  R  R~  R  t	   protectedt   exposet   exportt
   set_optiont   add_rewritet   extendsR!  t   exampleR  t	   constantst   printt   opaquet	   reduciblet   irreducibleR^   Ra   t   PiRK  R;  R   RL  RG  t   takeRi   Rj   Rm   Rl   R   Rg   Rq   R{  R9  R3  t   calcRe   Rs   Rt   u   !=u   #u   &u   &&u   *u   +u   -u   /u   @u   !u   `u   -.u   ->u   .u   ..u   ...u   ::u   :>u   ;u   ;;u   <u   <-u   =u   ==u   >u   _u   |u   ||u   ~u   =>u   <=u   >=u   /\u   \/u   ∀u   Πu   λu   ↔u   ∧u   ∨u   ≠u   ≤u   ≥u   ¬u   ⁻¹u   ⬝u   ▸u   →u   ∃u   ℕu   ℤu   ≈u   ×u   ⌞u   ⌟u   ≡u   ⟨u   ⟩u   (u   )u   :u   {u   }u   [u   ]u   ⦃u   ⦄u   :=u   ,s   \s+s   /-R   s   --.*?$s   \bR   u\   [A-Za-z_α-κμ-ϻἀ-῾℀-⅏][A-Za-z_'α-κμ-ϻἀ-῾⁰-⁹ⁿ-₉ₐ-ₜ℀-⅏0-9]*s   \d+R   R   s   [~?][a-z][\w\']*:R   s   [^/-]s   #pushs   -/s   #pops   [/-]s   [^\\"]+s   \\[n"\\](=   Rw  R  Rx  Ry  R  Rz  R{  R|  R}  R~  R  R  R  R  R  R  R  R0  R  R  R)  R  R  R9  R  R  R  R   R  R  R  R  R  R  R  R  R  R  R  Rf   R  R   R  R@  R  R~  R  R  R  R  R  R  R  R!  R  R  R  R  R  R  R  (   R^   Ra   R  RK  R;  R   RL  RG  R  Ri   Rj   Rm   Rl   R   Rg   Rq   R{  R9  R3  R  Re   (   Rs   Rt   (:   u   !=u   #u   &u   &&u   *u   +u   -u   /u   @u   !u   `u   -.u   ->u   .u   ..u   ...u   ::u   :>u   ;u   ;;u   <u   <-u   =u   ==u   >u   _u   |u   ||u   ~u   =>u   <=u   >=u   /\u   \/u   ∀u   Πu   λu   ↔u   ∧u   ∨u   ≠u   ≤u   ≥u   ¬u   ⁻¹u   ⬝u   ▸u   →u   ∃u   ℕu   ℤu   ≈u   ×u   ⌞u   ⌟u   ≡u   ⟨u   ⟩(   u   (u   )u   :u   {u   }u   [u   ]u   ⦃u   ⦄u   :=u   ,(#   R   R   R   R   R   R   R   t   ret	   MULTILINEt   UNICODEt   flagsR   R   R   R   t   punctuationR   R   t   SingleR   R   R   Rs   R   R   R   R   R	   R   R   R   R   t	   Multilinet   EscapeR   (    (    (    s6   lib/python2.7/site-packages/pygments/lexers/theorem.pyR   y  sb   			                 	(   R   R  t   pygments.lexerR    R   R   t   pygments.tokenR   R   R   R   R   R   R	   R
   R   t   __all__R   R   R   (    (    (    s6   lib/python2.7/site-packages/pygments/lexers/theorem.pyt   <module>
   s   @