
%^Tc           @   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-2014 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        E   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 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 j d f d e j f d d j e d d d   e f d e e e f e f d d j e  e j  f d d j e  e j 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 j* 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   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   byt   donet   exactt   reflexivityt   romegat   omegat
   assumptiont   solvet   contradictiont   discriminatet   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   \\/u   Πu   λs   [!$%&*+\./:<=>?@^|~-]t   andt   asrt   landt   lort   lslt   lxort   modt   ors   [!?~]s   [=<>@^|&+\*/$%-]t   unitt   intt   floatt   boolt   stringt   chart   listt   arrays   \s+s   false|true|\(\)|\[\]s   \(\*t   commentt   prefixs   \bt   suffixs   \b([A-Z][\w\']*)(?=\s*\.)t   dotteds   \b([A-Z][\w\']*)s   (%s)t   |Nis
   (%s|%s)?%ss   \b(%s)\bs   [^\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   "s   [~?][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_\']*c         C   s   |  j  d  r t Sd  S(   Ns   (*(   t
   startswitht   True(   t   text(    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/theorem.pyt   analyse_text   s    (E   R   R   R   R   R   R   s   Variables	   VariablesR   R   R   R   R   R   R   R    s   ReservedR"   R#   R$   R%   R&   R'   R(   R)   R*   R+   R,   R-   R.   R/   s   SetR1   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   s   existsRX   RY   RZ   R[   R\   s   matchs   ends   inR`   Ra   Rb   Rc   Rd   s   elseRf   Rg   Rh   Ri   Rj   (   s   TypeRl   (5   Rm   s   setRo   Rp   Rq   s   applys   clearRt   Ru   Rv   Rw   s   renames   patterns   afterR{   R|   R}   R~   R   R   R   R   R   R   R   R   s   replaceR   R   R   R   R   R   R   R   R   R   R   R   s   assertR   R   R   R   R   R   R   R   s   splitR   R   R   R   (   R   s   doneR   R   R   R   R   R   R   R   R   (   R   R   R   R   R   s   repeat(/   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   \\/u   Πu   λ(   R   R   R   R   R   R   s   mods   or(   R   s   ints   floats   bools   strings   chars   lists   array(/   t   __name__t
   __module__t   __doc__t   namet   aliasest	   filenamest	   mimetypest	   keywords1t	   keywords2t	   keywords3t	   keywords4t	   keywords5t	   keywords6t   keyoptst	   operatorst   word_operatorst   prefix_symst
   infix_symst
   primitivesR   R   t   Builtint   PseudoR   R   R   t	   NamespaceRk   R!   t   Classt   joinR   t   WordR	   t   Integert   Hext   Octt   Bint   FloatR   t   Chart   DoubleR   R
   R   t   tokensR   (    (    (    s;   /usr/lib/python2.7/dist-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-isabelleR   t   assumest   attacht   avoidst   bindert   checkingt   class_instancet   class_relationt   code_modulet   congst   constantt
   constrainst	   datatypest   definest   filet   fixesRf   t	   functionst   hintst
   identifierRb   t   importsR_   t   includest   infixt   infixlt   infixrRc   t   keywordst   lazyt   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   beginR^   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   fixrecRY   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   fromRd   t
   ultimatelyRi   t   ML_prft   alsot   includet	   includingRa   t   moreovert   notet   txtt   txt_rawt	   unfoldingR}   t   writet   assumeRp   t   defRZ   t   presumet   guesst   obtaint   showt   thusRr   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   s   andR   R   R   R  R  R  R  R  R  R  R  R	  R
  s   files   fixess   forR  R  R  s   ifR  s   inR  R  R  R  s   isR  R  R  R  R  R  R  R  s   opens   outputR  R   R!  R"  R#  R$  R%  R&  R'  R(  R)  R*  (L   R+  R,  R-  R.  R/  R0  R1  R2  R3  R4  s   helpR6  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  s   pwdRc  Rd  Re  Rf  Rg  Rh  Ri  Rj  Rk  Rl  s   tryRm  s   typRo  s   values   valuesRr  Rs  Rt  Ru  (   Rv  Rw  s   end(   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  s   funR  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  s   localeR  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  s   recordR  R  R  R  R  R  R  R  R  R  R  R  R  R  R  s   textR  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  s   instanceR  R  R  R  R  R  R  R  R   R!  R"  R#  R$  R%  R&  R'  R(  s   subclassR*  R+  R,  R-  R.  (   s   bys   doneR/  (   R0  R1  (   s   haveR2  R3  (   s   nextR5  (   R6  R7  s   thenR8  s   with(   R9  R:  s   includeR<  s   letR=  R>  R?  R@  RA  s   usings   write(   RC  s   caseRD  s   fixRE  (   RF  RG  RH  RI  (   s   applyRJ  RK  RL  RM  RN  (   s   ::R   RO  RP  RQ  R   R   R   R   R   RR  R   RS  RT  (   RU  RV  RW  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   R   R   R   Rk   R   t   Headingt
   SubheadingR   t   Errort   SymbolR   R	   R   R   R   R   t   OtherR   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/theorem.pyR      s$  			                                                                       										c        6   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 d Z d Z d Z i d e f d e j j 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 d! d d d e f e e  e j j f e e d! d d d e j j f e e  e f e e d! d d d e j 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	   variablest   printR,  t   axiomR  R%  t   universet   aliasR5  t   optionst
   precedencet   postfixR   t
   calc_transt
   calc_substt	   calc_reflR  R  R  R  t   evalt   checkt   exitt   coercionR^   t   privateR}   t	   namespaceR<  R  Rz  R  t	   protectedt   exposet   exportt
   set_optiont   add_rewritet   extendsRV   RW   RY   t   PiRG  R7  R   RH  RC  t   takeRa   Rb   Re   Rd   R   R_   Ri   Rw  R5  R/  t   calcRk   Rl   Rr   t   and_thent   or_elset   appendt
   interleavet   part   fixpointR   t   at_mostt   discardt   focus_att   rotatet   try_fort   nowR   t   eassumptiont   stateRu   Rw   R   R   t   betat   tracet   focust   repeat1t   determR{   R   R   Rv   s   !=R   R   s   &&t   *RR  R   t   /t   @s   -.s   ->RW  s   ..s   ...s   ::s   :>R   s   ;;R   s   <-R   s   ==R   R   R   R   s   ||R   s   =>s   <=s   >=s   /\s   \/u   ∀u   Πu   λu   ↔u   ∧u   ∨u   ≠u   ≤u   ≥u   ¬u   ⁻¹u   ⬝u   ▸u   →u   ∃u   ℕu   ℤu   ≈R   R   t   nott   ifft   eqRO  RP  R   RU  RV  RQ  R   u   ⦃u   ⦄s   :=R   R   R   R   R   R   R   R   t   prodt   sumt   pairt   realt   natt   numt   paths   \s+s   \b(false|true)\b|\(\)|\[\]s   /-R   s   --.*?$s   \bR   uY   [A-Za-z_α-κμ-ϻἀ-῾℀-⅏][A-Za-z_'α-κμ-ϻἀ-῾⁰-⁹ⁿ-₉ₐ-ₜ℀-⅏]*s   \d+R   s   [~?][a-z][\w\']*:R   s   [^/-]s   #pushs   -/s   #pops   [/-]s   [^\\"]+s   \\[n"\\](6   Rr  s   abbreviationRs  Rt  s
   definitionRu  Rv  Rw  Rx  Ry  Rz  R{  R|  s   lemmas	   corollaryR}  s	   variabless   prints   theoremR  s	   inductives	   structureR  s   aliass   helpR  R  R  s   prefixR  R  R  s   infixs   infixls   infixrs   notations   evalR  s   exitR  s   endR  s   usings	   namespaces	   includings   instances   sections   contextR  R  R  R  R  R  (   s   foralls   existss   funR  s   obtains   froms   haves   shows   assumeR  s   lets   ifs   elses   thens   bys   ins   withs   begins   proofs   qedR  (   s   Types   Prop(   s   applyR  R  s   appendR  R  R  s   repeatR  s   discardR  R  R  R  s
   assumptionR  s   states   intros
   generalizes   exacts   unfoldR  R  R  R  R  s   destructs   trys   autos   intros(3   s   !=R   R   s   &&R  RR  R   R  R  s   -.s   ->RW  s   ..s   ...s   ::s   :>R   s   ;;R   s   <-R   s   ==R   R   R   R   s   ||R   s   =>s   <=s   >=s   /\s   \/u   ∀u   Πu   λu   ↔u   ∧u   ∨u   ≠u   ≤u   ≥u   ¬u   ⁻¹u   ⬝u   ▸u   →u   ∃u   ℕu   ℤu   ≈(   s   ands   orR  R  R  (   RO  RP  R   RU  RV  RQ  R   u   ⦃u   ⦄s   :=R   (   s   units   ints   bools   strings   chars   lists   arrayR  s   sumR  s   realR  R  s   path(&   R   R   R   R   R   R   R   t   ret	   MULTILINEt   UNICODEt   flagsR   R   R   R   R   R   t   punctuationR   R   R   R   R   R   t   SingleR   R   R   Rk   R   R	   R   R   R   R   t	   Multilinet   EscapeR   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/theorem.pyR   y  sn   			                	!(   R   R  t   pygments.lexerR    R   R   t   pygments.tokenR   R   R   R   R   R   R	   R
   R   t   __all__R   R   R   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/theorem.pyt   <module>
   s   @