o aL@sdZddlZddlmZmZmZddlmZmZm Z m Z m Z m Z m Z mZmZgdZGdddeZGdd d eZGd d d eZdS) 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) RegexLexerdefaultwords) TextCommentOperatorKeywordNameStringNumber PunctuationGeneric)CoqLexer IsabelleLexer LeanLexerc@seZdZdZdZdgZdgZdgZej Z dZ dZ dZ d Zd Zd Zd Zd ZdZdZdefdejjfdedfee dddejfee dddefee dddejfeedddefeedddejfeedddejfdefddeddde fdeeefe fdefde!j"fde!j#fde!j$fd e!j%fd!e!j&fd"e'j(fd#e'j(fd$efd%e'j)d&fd'efd(ejjfgd)efded*fd+ed,fd-efgd.e'j)fd/e'j)fd%e'j)d,fgdefd0e*fd1ejfd2ej+d,fd3ed,fe,d,gd4Z-d5d6Z.dS)7rzZ For the `Coq `_ theorem prover. .. versionadded:: 1.5 Coqcoqz*.vz text/x-coq)TSectionModuleEndRequireImportExportVariable Variables Parameter ParametersAxiomAxioms Hypothesis HypothesesNotationLocalTacticReservedScopeOpenCloseBindDelimit DefinitionExampleLetLtacFixpoint CoFixpointMorphismRelationImplicit ArgumentsTypesSetUnset ContextualStrictPrenex Implicits Inductive CoInductiveRecord StructureVariant CanonicalCoercionTheoremLemmaFactRemark Corollary PropositionPropertyGoalProofRestartSaveQedDefinedAbortAdmittedHintResolveRewriteViewSearchShowPrintPrintingAllGraph ProjectionsinsideoutsideCheckGlobalInstanceClassExistingUniverse Polymorphic MonomorphicContext)forallexistsexists2funfixcofixstructmatchendinreturnletifisthenelseforofnosimplwithas)TypePropSProp)Cposesetmovecaseelimapplyclearhnfintrointros generalizerenamepatternafterdestruct inductionusingrefine inversion injectionrewritecongrunlockcomputeringfieldreplacefoldunfoldchange cutrewritesimplhavesuffwlogsufficeswithoutlossnat_normassertcuttrivialrevert bool_congr nat_congrsymmetry transitivityautosplitleftright autorewritetautosetoid_rewrite intuitioneautoeapply econstructor etransitivity constructorerewriteredcbvlazy vm_computenative_computesubst)bynowdoneexact reflexivityrromegaomegalianialranrapsatz assumptionsolve contradiction discriminate congruence)dolastfirsttryidtacrepeat):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+zfalse|true|\(\)|\[\]\(\*comment\bprefixsuffixz\b([A-Z][\w\']*)z(%s)|Nz (%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""rz[A-Z][\w\']*(?=\s*\.)z [A-Z][\w\']*z[a-z][a-z0-9_\']*)rootrrdottedcCsd|vr d|vr dSdSdS)NrMrJ)textrr9/usr/lib/python3/dist-packages/pygments/lexers/theorem.py analyse_textszCoqLexer.analyse_text)/__name__ __module__ __qualname____doc__namealiases filenames mimetypesreUNICODEflags keywords1 keywords2 keywords3 keywords4 keywords5 keywords6keyopts operators prefix_syms infix_symsrr BuiltinPseudorrr Namespacer|r$joinrr IntegerHexOctBinFloatr CharDoubler rartokensr rrrrrsx     "   7rc @seZdZdZdZdgZdgZdgZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZgdefdedfdedfeeefeeejfeeddde j!fee ddde j"fee ddde fee ddde fee ddde#j$fee ddde#j%feeddde j&feeddde j&feeddde#j'feeddde feeddde feeddde feeddde feeddde feeddde feeddde feeddde j!fd ej(fd!e)fd"e)fd#e)j"fd$e)fd%e*j+fd&e*j,fd'e*j-fd(e.d)fd*e.j/d+fd,efded-fd.ed/fd0efgd1efd2ed/fd3efd4efgd5e.fd e.j(fd6e.fd7e.fd(e.d/fgd8e.j/fd e.j(fd9e.j/fd7e.j/fd*e.j/d/fgd:Z0d;S)`_ proof assistant. .. versionadded:: 2.0 Isabelleisabellez*.thyztext/x-isabelle)2andassumesattachavoidsbindercheckingclass_instanceclass_relation code_modulecongsconstant constrains datatypesdefinesfilefixesrw functionshints identifierrsimportsrpincludesinfixinfixlinfixrrtkeywordsr module_namemonos morphisms no_discs_selsnotesobtainsopenoutput overloaded parametric permissive pervasive rep_compatshows structure type_classtype_constructor uncheckedunsafewhere)L ML_commandML_val class_deps code_deps code_thmsdisplay_drafts find_consts find_theoremsfind_unused_assmsfull_prfhelp locale_depsnitpickprprf print_abbrevsprint_antiquotationsprint_attributes print_binds print_bnfs print_bundlesprint_case_translations print_cases print_claset print_classesprint_codeprocprint_codesetupprint_coercionsprint_commands print_contextprint_defn_rulesprint_dependencies print_factsprint_induct_rulesprint_inductives print_interps print_locale print_locales print_methods print_options print_ordersprint_quot_mapsprint_quotconstsprint_quotientsprint_quotientsQ3print_quotmapsQ3 print_rules print_simpset print_stateprint_statement print_syntaxprint_theorems print_theoryprint_trans_rulesproppwd quickcheckrefute sledgehammer smt_status solve_direct spark_statustermthmthm_depsthy_depsrtry0typ unused_thmsvaluevalueswelcomeprint_ML_antiquotationsprint_term_bindings values_prolog)theorybeginro)headerchapter)section subsection subsubsectionsectsubsect subsubsect)MLML_file abbreviationadhoc_overloadingarities atom_declattribute_setupaxiomatizationbundle case_of_simpsclassclassesclassrel codatatype code_abort code_class code_const code_datatypecode_identifier code_include code_instancecode_modulename code_monad code_printing code_reflect code_reserved code_type coinductivecoinductive_setconstscontextdatatype datatype_newdatatype_new_compat declarationdeclare default_sort defer_recdef definitiondefsdomaindomain_isomorphism domaindef equivariance export_codeextract extract_typefixrecrj fun_cases hide_class hide_const hide_fact hide_typeimport_const_map import_file import_tptpimport_type_map inductive inductive_set instantiationjudgmentlemmaslifting_forgetlifting_update local_setuplocale method_setupnitpick_paramsno_adhoc_overloading no_notation no_syntaxno_translationsno_type_notationnominal_datatype nonterminalnotationnotepadoracle overloadingparse_ast_translationparse_translationpartial_function primcorecprimrec primrec_newprint_ast_translationprint_translationquickcheck_generatorquickcheck_params realizability realizersrecdefrecord refute_paramssetup setup_lifting simproc_setup simps_of_casesledgehammer_params spark_end spark_openspark_open_sivspark_open_vcgspark_proof_functions spark_types statespacesyntaxsyntax_declarationrtext_rawtheorems translations type_notation type_synonymtyped_print_translationtypedecl hoarestateinstall_C_fileinstall_C_types wpc_setupc_defsc_typesmemsafe SML_exportSML_file SML_import approximatebnf_axiomatization cartouchedatatype_compatfree_constructorsfunctornominal_functionnominal_terminationpermanent_interpretationbindsdefining smt2_statusterm_cartouche boogie_filetext_cartouche)inductive_casesinductive_simps)!ax_specificationbnf code_pred corollarycpodefcrunch crunch_ignore enriched_typefunctioninstanceinterpretationlemmalift_definitionnominal_inductivenominal_inductive2nominal_primrecpcpodefprimcorecursivequotient_definition quotient_type recdef_tc rep_datatypeschematic_corollaryschematic_lemmaschematic_theoremspark_vc specificationsubclass sublocale terminationtheoremtypedefwrap_free_constructors)rrqed)sorryoops)rhence interpret)nextproof)finallyfromru ultimatelyrz) ML_prfalsoinclude includingrrmoreovernotetxttxt_raw unfoldingrwrite)assumerdefrkpresume)guessobtainshowthus)r apply_end apply_tracebackdeferprefer)rr()[rrrrr+r!?){}.z..rrrz\{\*rrrz\\<\w*>z[^\W\d][.\w']*z\?[^\W\d][.\w']*z'[^\W\d][.\w']*rrrrrrrfactrrrrrz[^*}]+z\*\}rrz[^"\\]+z\\"z\\z[^`\\]+z\\`)rrrrrN)1r r r r rrrr keyword_minor keyword_diag keyword_thykeyword_sectionkeyword_subsectionkeyword_theory_declkeyword_theory_scriptkeyword_theory_goal keyword_qedkeyword_abandon_proofkeyword_proof_goalkeyword_proof_blockkeyword_proof_chainkeyword_proof_declkeyword_proof_asmkeyword_proof_asm_goalkeyword_proof_scriptrproof_operatorsrrrrWordrr r|r Heading Subheadingr!ErrorSymbolr r r$r%r&r Otherr*rrrrrs &       "$%&()*+- .1  rc@sreZdZdZdZdgZdgZdgZej ej BZ de fde jdfd ed fd ejfed d d dejfedd d dejfdejfedd d defedd d dejfedd d dejfedd defedefdefdejfdejfdejfde jdfde jfdejfdejj fgd ej!fd ej!d!fd"ej!d#fd$ej!fgd e jfd"e jd#fd$e jfgd%e jfd&e j"fde jd#fgd'Z#d(S))rzm For the `Lean `_ theorem prover. .. versionadded:: 2.0 Leanleanz*.leanz text/x-leanrz/-- docstringz/-rz--.*?$)importrenaminghiding namespacelocalprivate protectedrrjomitrrexportrL attributerr)(rHr[rsrexampleaxiomaxiomsr7 constantsuniverse universesrrrTextendsrrFrznoncomputable theory noncomputablemutualmetar parameter parametersvariable variablesreserve precedencepostfixrrrBrCrDrrro set_optionrun_cmdz @\[[^\]]*\])rgrjPirfrrwrrrrrrsrvrurprzcalcrnr)r_admit)Sortr}r|)z#evalz#checkz#reducez#exitz#printz#help)r)r~rrrrrru⟨u⟩u‹u›u⦃u⦄rrz[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]*z0x[A-Za-z0-9]+z0b[01]+z\d+rrz='(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4})|.)'rrz[^/-]rz-/rz[/-]z[^\\"]+z9(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4})))rrrrN)$r r r r rrrrr MULTILINErrrr DocrSinglerrr! Declarationr rr|rr r r#r)r(rrr  MultilineEscaper*rrrrr~s|       C     r)r rpygments.lexerrrrpygments.tokenrrrrr r r r r __all__rrrrrrrs ,Y