o
    ‡ÎÖaœL  ã                   @   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 g d¢ZG dd„ deƒZG dd	„ d	eƒZG d
d„ deƒZdS )zØ
    pygments.lexers.theorem
    ~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for theorem-proving languages.

    :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)Ú
RegexLexerÚdefaultÚwords)	ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚGeneric)ÚCoqLexerÚIsabelleLexerÚ	LeanLexerc                   @   sÚ  e Zd ZdZdZdgZdgZdgZej	Z
dZdZdZd	Zd
ZdZdZdZdZdZdefdejjfdedfeeddd�ejfeeddd�efeeddd�ejfeeddd�efeeddd�ejfeeddd�ejfdefdd 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d(ejjfgd)efded*fd+ed,fd-efgd.e'j)fd/e'j)fd%e'j)d,fgdefd0e*fd1ejfd2ej+d,fd3ed,fe,d,ƒgd4œZ-d5d6„ Z.dS )7r   zZ
    For the `Coq <http://coq.inria.fr/>`_ theorem prover.

    .. versionadded:: 1.5
    ÚCoqÚcoqz*.vz
text/x-coq)TÚSectionÚModuleÚEndÚRequireÚImportÚExportÚVariableÚ	VariablesÚ	ParameterÚ
ParametersÚAxiomÚAxiomsÚ
HypothesisÚ
HypothesesÚNotationÚLocalÚTacticÚReservedÚScopeÚOpenÚCloseÚBindÚDelimitÚ
DefinitionÚExampleÚLetÚLtacÚFixpointÚ
CoFixpointÚMorphismÚRelationÚImplicitÚ	ArgumentsÚTypesÚSetÚUnsetÚ
ContextualÚStrictÚPrenexÚ	ImplicitsÚ	InductiveÚCoInductiveÚRecordÚ	StructureÚVariantÚ	CanonicalÚCoercionÚTheoremÚLemmaÚFactÚRemarkÚ	CorollaryÚPropositionÚPropertyÚGoalÚProofÚRestartÚSaveÚQedÚDefinedÚAbortÚAdmittedÚHintÚResolveÚRewriteÚViewÚSearchÚShowÚPrintÚPrintingÚAllÚGraphÚProjectionsÚinsideÚoutsideÚCheckÚGlobalÚInstanceÚClassÚExistingÚUniverseÚPolymorphicÚMonomorphicÚContext)ÚforallÚexistsÚexists2ÚfunÚfixÚcofixÚstructÚmatchÚendÚinÚreturnÚletÚifÚisÚthenÚelseÚforÚofÚnosimplÚwithÚas)ÚTypeÚPropÚSProp)CÚposeÚsetÚmoveÚcaseÚelimÚapplyÚclearÚhnfÚintroÚintrosÚ
generalizeÚrenameÚpatternÚafterÚdestructÚ	inductionÚusingÚrefineÚ	inversionÚ	injectionÚrewriteÚcongrÚunlockÚcomputeÚringÚfieldÚreplaceÚfoldÚunfoldÚchangeÚ
cutrewriteÚsimplÚhaveÚsuffÚwlogÚsufficesÚwithoutÚlossÚnat_normÚassertÚcutÚtrivialÚrevertÚ
bool_congrÚ	nat_congrÚsymmetryÚtransitivityÚautoÚsplitÚleftÚrightÚautorewriteÚtautoÚsetoid_rewriteÚ	intuitionÚeautoÚeapplyÚeconstructorÚetransitivityÚconstructorÚerewriteÚredÚcbvÚlazyÚ
vm_computeÚnative_computeÚsubst)ÚbyÚnowÚdoneÚexactÚreflexivityr³   ÚromegaÚomegaÚliaÚniaÚlraÚnraÚpsatzÚ
assumptionÚsolveÚcontradictionÚdiscriminateÚ
congruence)ÚdoÚlastÚfirstÚtryÚidtacÚrepeat):z!=ú#ú&z&&z\(z\)ú\*z\+ú,ú-z-\.z->ú\.z\.\.ú:ú::ú:=z:>ú;z;;ú<z<-z<->ú=ú>z>]z>\}z\?z\?\?z\[z\[<z\[>z\[\|ú]Ú_ú`z\{z\{<z\|z\|]ú\}ú~z=>z/\\z\\/z\{\|z\|\}u   Î»õ   Â¬u   âˆ§u   âˆ¨u   âˆ€u   âˆƒu   â†’u   â†”u   â‰ u   â‰¤u   â‰¥z[!$%&*+\./:<=>?@^|~-]z[!?~]z[=<>@^|&+\*/$%-]ú\s+zfalse|true|\(\)|\[\]ú\(\*Úcommentú\b©ÚprefixÚsuffixz\b([A-Z][\w\']*)z(%s)ú|Néÿÿÿÿz
(%s|%s)?%sz[^\W\d][\w']*ú\d[\d_]*ú0[xX][\da-fA-F][\da-fA-F_]*ú0[oO][0-7][0-7_]*ú0[bB][01][01_]*z(-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)z7'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'z'.'ú'ú"Ústringú[~?][a-z][\w\']*:ú\Sú[^(*)]+ú#pushú\*\)ú#popú[(*)]z[^"]+z""rÞ   z[A-Z][\w\']*(?=\s*\.)z[A-Z][\w\']*z[a-z][a-z0-9_\']*)Úrootrî   rû   Údottedc                 C   s   d| v r
d| v rdS d S d S )NrM   rJ   é   © )Útextr  r  ú9/usr/lib/python3/dist-packages/pygments/lexers/theorem.pyÚanalyse_text¡   s   ÿzCoqLexer.analyse_text)/Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesÚreÚUNICODEÚflagsÚ	keywords1Ú	keywords2Ú	keywords3Ú	keywords4Ú	keywords5Ú	keywords6ÚkeyoptsÚ	operatorsÚprefix_symsÚ
infix_symsr   r	   ÚBuiltinÚPseudor   r   r   Ú	Namespacer|   r$   Újoinr   r   ÚIntegerÚHexÚOctÚBinÚFloatr
   ÚCharÚDoubler   ra   r   Útokensr	  r  r  r  r  r      sx    	


á"ü
ý
úÓ7r   c                   @   sÜ  e Zd 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g 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�e j!f‘ee	ddd�e j"f‘ee
ddd�e f‘eeddd�e f‘eeddd�e#j$f‘eeddd�e#j%f‘eeddd�e j&f‘eeddd�e j&f‘eeddd�e#j'f‘eeddd�e f‘eeddd�e f‘eeddd�e f‘eeddd�e f‘eeddd�e f‘eeddd�e f‘eeddd�e f‘ee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‘d,efded-fd.ed/fd0efgd1efd2ed/fd3efd4efgd5e.fd e.j(fd6e.fd7e.fd(e.d/fgd8e.j/fd e.j(fd9e.j/fd7e.j/fd*e.j/d/fgd:œZ0d;S )<r   zf
    For the `Isabelle <http://isabelle.in.tum.de/>`_ proof assistant.

    .. versionadded:: 2.0
    ÚIsabelleÚisabellez*.thyztext/x-isabelle)2ÚandÚassumesÚattachÚavoidsÚbinderÚcheckingÚclass_instanceÚclass_relationÚcode_moduleÚcongsÚconstantÚ
constrainsÚ	datatypesÚdefinesÚfileÚfixesrw   Ú	functionsÚhintsÚ
identifierrs   Úimportsrp   ÚincludesÚinfixÚinfixlÚinfixrrt   Úkeywordsr¾   Úmodule_nameÚmonosÚ	morphismsÚno_discs_selsÚnotesÚobtainsÚopenÚoutputÚ
overloadedÚ
parametricÚ
permissiveÚ	pervasiveÚ
rep_compatÚshowsÚ	structureÚ
type_classÚtype_constructorÚ	uncheckedÚunsafeÚwhere)LÚ
ML_commandÚML_valÚ
class_depsÚ	code_depsÚ	code_thmsÚdisplay_draftsÚfind_constsÚfind_theoremsÚfind_unused_assmsÚfull_prfÚhelpÚlocale_depsÚnitpickÚprÚprfÚprint_abbrevsÚprint_antiquotationsÚprint_attributesÚprint_bindsÚ
print_bnfsÚprint_bundlesÚprint_case_translationsÚprint_casesÚprint_clasetÚprint_classesÚprint_codeprocÚprint_codesetupÚprint_coercionsÚprint_commandsÚprint_contextÚprint_defn_rulesÚprint_dependenciesÚprint_factsÚprint_induct_rulesÚprint_inductivesÚprint_interpsÚprint_localeÚprint_localesÚprint_methodsÚprint_optionsÚprint_ordersÚprint_quot_mapsÚprint_quotconstsÚprint_quotientsÚprint_quotientsQ3Úprint_quotmapsQ3Úprint_rulesÚprint_simpsetÚprint_stateÚprint_statementÚprint_syntaxÚprint_theoremsÚprint_theoryÚprint_trans_rulesÚpropÚpwdÚ
quickcheckÚrefuteÚsledgehammerÚ
smt_statusÚsolve_directÚspark_statusÚtermÚthmÚthm_depsÚthy_depsrÖ   Útry0ÚtypÚunused_thmsÚvalueÚvaluesÚwelcomeÚprint_ML_antiquotationsÚprint_term_bindingsÚvalues_prolog)ÚtheoryÚbeginro   )ÚheaderÚchapter)ÚsectionÚ
subsectionÚsubsubsectionÚsectÚsubsectÚ
subsubsect)ŽÚMLÚML_fileÚabbreviationÚadhoc_overloadingÚaritiesÚ	atom_declÚattribute_setupÚaxiomatizationÚbundleÚcase_of_simpsÚclassÚclassesÚclassrelÚ
codatatypeÚ
code_abortÚ
code_classÚ
code_constÚcode_datatypeÚcode_identifierÚcode_includeÚcode_instanceÚcode_modulenameÚ
code_monadÚcode_printingÚcode_reflectÚcode_reservedÚ	code_typeÚcoinductiveÚcoinductive_setÚconstsÚcontextÚdatatypeÚdatatype_newÚdatatype_new_compatÚdeclarationÚdeclareÚdefault_sortÚdefer_recdefÚ
definitionÚdefsÚdomainÚdomain_isomorphismÚ	domaindefÚequivarianceÚexport_codeÚextractÚextract_typeÚfixrecrj   Ú	fun_casesÚ
hide_classÚ
hide_constÚ	hide_factÚ	hide_typeÚimport_const_mapÚimport_fileÚimport_tptpÚimport_type_mapÚ	inductiveÚinductive_setÚinstantiationÚjudgmentÚlemmasÚlifting_forgetÚlifting_updateÚlocal_setupÚlocaleÚmethod_setupÚnitpick_paramsÚno_adhoc_overloadingÚno_notationÚ	no_syntaxÚno_translationsÚno_type_notationÚnominal_datatypeÚnonterminalÚnotationÚnotepadÚoracleÚoverloadingÚparse_ast_translationÚparse_translationÚpartial_functionÚ	primcorecÚprimrecÚprimrec_newÚprint_ast_translationÚprint_translationÚquickcheck_generatorÚquickcheck_paramsÚrealizabilityÚ	realizersÚrecdefÚrecordÚrefute_paramsÚsetupÚsetup_liftingÚsimproc_setupÚsimps_of_caseÚsledgehammer_paramsÚ	spark_endÚ
spark_openÚspark_open_sivÚspark_open_vcgÚspark_proof_functionsÚspark_typesÚ
statespaceÚsyntaxÚsyntax_declarationr  Útext_rawÚtheoremsÚtranslationsÚtype_notationÚtype_synonymÚtyped_print_translationÚtypedeclÚ
hoarestateÚinstall_C_fileÚinstall_C_typesÚ	wpc_setupÚc_defsÚc_typesÚmemsafeÚ
SML_exportÚSML_fileÚ
SML_importÚapproximateÚbnf_axiomatizationÚ	cartoucheÚdatatype_compatÚfree_constructorsÚfunctorÚnominal_functionÚnominal_terminationÚpermanent_interpretationÚbindsÚdefiningÚsmt2_statusÚterm_cartoucheÚboogie_fileÚtext_cartouche)Úinductive_casesÚinductive_simps)!Úax_specificationÚbnfÚ	code_predÚ	corollaryÚcpodefÚcrunchÚcrunch_ignoreÚenriched_typeÚfunctionÚinstanceÚinterpretationÚlemmaÚlift_definitionÚnominal_inductiveÚnominal_inductive2Únominal_primrecÚpcpodefÚprimcorecursiveÚquotient_definitionÚquotient_typeÚ	recdef_tcÚrep_datatypeÚschematic_corollaryÚschematic_lemmaÚschematic_theoremÚspark_vcÚspecificationÚsubclassÚ	sublocaleÚterminationÚtheoremÚtypedefÚwrap_free_constructors)rÂ   rÄ   Úqed)ÚsorryÚoops)rŸ   ÚhenceÚ	interpret)ÚnextÚproof)ÚfinallyÚfromru   Ú
ultimatelyrz   )ÚML_prfÚalsoÚincludeÚ	includingrr   ÚmoreoverÚnoteÚtxtÚtxt_rawÚ	unfoldingr�   Úwrite)Úassumer‚   Údefrk   Úpresume)ÚguessÚobtainÚshowÚthus)r„   Ú	apply_endÚapply_traceÚbackÚdeferÚprefer)rà   rß   ú(ú)ú[ræ   rç   rä   rÜ   ró   ú+rÝ   ú!ú?)ú{ú}Ú.z..rì   rí   rî   z\{\*r  rï   rð   z\\<\w*>z[^\W\d][.\w']*z\?[^\W\d][.\w']*z'[^\W\d][.\w']*rõ   rö   r÷   rø   rú   rû   rè   Úfactrþ   rÿ   r   r  r  z[^*}]+z\*\}rÛ   ré   z[^"\\]+z\\"z\\z[^`\\]+z\\`)r  rî   r  rû   r‡  N)1r
  r  r  r  r  r  r  r  Úkeyword_minorÚkeyword_diagÚkeyword_thyÚkeyword_sectionÚkeyword_subsectionÚkeyword_theory_declÚkeyword_theory_scriptÚkeyword_theory_goalÚkeyword_qedÚkeyword_abandon_proofÚkeyword_proof_goalÚkeyword_proof_blockÚkeyword_proof_chainÚkeyword_proof_declÚkeyword_proof_asmÚkeyword_proof_asm_goalÚkeyword_proof_scriptr  Úproof_operatorsr   r   r   r   ÚWordr   r   r|   r   ÚHeadingÚ
Subheadingr!  ÚErrorÚSymbolr	   r   r$  r%  r&  r
   ÚOtherr*  r  r  r  r  r   ¦   sâ    &ÿþý
ûúø
öôóñðîíëéèçæäãâ à"Þ$Ü%Û&Ú(Ø)×*Ö+Õ-Ó
.Ò1üüû
û
¼r   c                   @   sr  e Zd ZdZdZdgZdgZdgZej	ej
B Zdefdejdfd	ed
fdejfedddd�ejfedddd�ejfdejfedddd�efedddd�ejfedddd�ejfeddd�efedƒefdefdejfdejfdejfdejdfdejfdejfdejj fgd ej!fd	ej!d!fd"ej!d#fd$ej!fgd ejfd"ejd#fd$ejfgd%ejfd&ej"fdejd#fgd'œZ#d(S ))r   zm
    For the `Lean <https://github.com/leanprover/lean>`_
    theorem prover.

    .. versionadded:: 2.0
    ÚLeanÚleanz*.leanztext/x-leanrì   z/--Ú	docstringz/-rî   z--.*?$)ÚimportÚrenamingÚhidingÚ	namespaceÚlocalÚprivateÚ	protectedr©  rj  Úomitr©  r©  ÚexportrL  Ú	attributerï   rð   )(rH  r[  rs  rÕ  ÚexampleÚaxiomÚaxiomsr7  Ú	constantsÚuniverseÚ	universesrè  rÊ  rT  Úextendsr¹  rF  r±  znoncomputable theoryÚnoncomputableÚmutualÚmetar¬  Ú	parameterÚ
parametersÚvariableÚ	variablesÚreserveÚ
precedenceÚpostfixrñ   rú  rB  rC  rD  r¦  rÂ   ro   Ú
set_optionÚrun_cmdz@\[[^\]]*\])rg   rj   ÚPirf  rŸ   rw  rr  r¢   rr   rs   rv   ru   rp   rz   Úcalcrn   rÓ   )r_  Úadmit)ÚSortr}   r|   )z#evalz#checkz#reducez#exitz#printz#help)rò   )r~  r  rß   r„  r…  r€  ræ   u   âŸ¨u   âŸ©u   â€¹u   â€ºu   â¦ƒu   â¦„rá   rÜ   z¨[A-Za-z_\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2100-\u214f][.A-Za-z_\'\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2070-\u2079\u207f-\u2089\u2090-\u209c\u2100-\u214f0-9]*z0x[A-Za-z0-9]+z0b[01]+z\d+rú   rû   z='(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4})|.)'rü   rý   z[^/-]rÿ   z-/r  z[/-]z[^\\"]+z9(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4})))r  rî   r¢  rû   N)$r
  r  r  r  r  r  r  r  r  Ú	MULTILINEr  r  r   r
   ÚDocr   ÚSingler   r   r!  ÚDeclarationr   r�  r|   r   r	   r   r#  r)  r(  r   r  r   Ú	MultilineÚEscaper*  r  r  r  r  r   ~  s|    
	÷	÷
èèüüýýþþ

ÀC

ü
ý
ý
²r   )r  r  Úpygments.lexerr   r   r   Úpygments.tokenr   r   r   r   r	   r
   r   r   r   Ú__all__r   r   r   r  r  r  r  Ú<module>   s    
,  Y