YBFj!dZddlZddlmZmZmZddlmZmZm Z m Z m Z m Z m Z mZddgZGddeZeZGddeZdS) z pygments.lexers.lean ~~~~~~~~~~~~~~~~~~~~ Lexers for the Lean theorem prover. :copyright: Copyright 2006-present by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N) RegexLexerwordsinclude)CommentOperatorKeywordNameStringNumberGeneric Whitespace Lean3Lexer Lean4LexerceZdZdZdZdZddgZdgZddgZd Z d Z e d ze zd zZ d e fde jdfdedfdejfedddefedddejfedddejfedefe efde ze jfdejfdejfdejfde jdfde jfd ejfd!ejjfged"ddej fed#ddej!fd$ej!d%fed&d'efe"d(gd)ej!d*fe"d(gd+ej#fdej#d,fd-ej#d*fd.ej#fgd+e jfd-e jd*fd.e jfgd/e jfd0e j$fde jd*fgd1Z%d2Z&d3S)4rz( For the Lean 3 theorem prover. Leanz,https://leanprover-community.github.io/lean3leanlean3*.leanz text/x-leanz text/x-lean3z2.0u(?![λΠΣ])[_a-zA-Zα-ωΑ-Ωϊ-ϻἀ-῾℀-⅏𝒜-𝖟](?:(?![λΠΣ])[_a-zA-Zα-ωΑ-Ωϊ-ϻἀ-῾℀-⅏𝒜-𝖟0-9'ⁿ-₉ₐ-ₜᵢ-ᵪ])*(\.)*\s+/-- docstring/-commentz--.*?$)forallfunPifromhaveshowassumesufficesletifelsetheninwithcalcmatchdo\bprefixsuffixsorryadmit)SortPropType)():{}[]⟨⟩u‹u›⦃⦄:=,``?z0x[A-Za-z0-9]+z0b[01]+\d+"stringz='(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4})|.)'[~?][a-z][\w\']*:\S)importrenaminghiding namespacelocalprivate protectedsectionromitrQrPexportopen attribute)(lemmatheoremdef definitionexampleaxiomaxiomsconstant constantsuniverse universes inductive coinductive structureextendsclassinstance abbreviationznoncomputable theory noncomputablemutualmetarU parameter parametersvariable variablesreserve precedencepostfixr/notationinfixinfixlinfixrbeginbyend set_optionrun_cmd@\[rU)#eval#check#reduce#exit#print#help)r0 expression\]#pop[^/-]+#push-/[/-][^\\"]+z9(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4}))rrootrUrrrGcJtjd|tjrdSdS)Nz ^import [a-z]皙?research MULTILINEtexts BC:\PYTHON\_runtimes\venv\Lib\site-packages\pygments/lexers/lean.py analyse_textzLean3Lexer.analyse_text* 9%tR\ : : 3  N)'__name__ __module__ __qualname____doc__nameurlaliases filenames mimetypes version_added _name_segment_namer r DocrSinglerrr Errorr6rr Symbolr IntegerDoubleCharVariableBuiltinPseudo Namespace Declarationr MultilineEscapetokensrrrrrs D 8CwG I/IM d F "] 2U :EZ VZ - GY '  ' U  ///18  9 U%eE B B BGM R U+E% H H H', W U DM e^V] +  /  ( V^ $ 6=( + Mv{ [ !4= 1 DL' (/ 4U E + + +-4,= ?U0E1+++0-4,?1 A2W(+ 6 U& ' GL ! !S* XG' 0 GL ! ! ) * G%w / G%v . g' (   # FJ ' fj !  ' I6= Y &- ( iYYFvrceZdZdZdZdZdgZdgZdgZdZ dZ e d ze zd zZ d Z d Z d ZdZdZdefdejdfdedfdejfeeddejfedddejfeeejjfeeefe efde zejfde fde j!fde j"fdej#dfdej$fd ejjfgee ddej%fee ddefd!ej&d"fe'd#gd$ej&d%fe'd#gd&ej(fdej(d'fd(ej(d%fd)ej(fgd&ejfd(ejd%fd)ejfgd*ej#fd+ej)fdej#d%fgd,Z*d-Z+d.S)/rz( For the Lean 4 theorem prover. Lean4z#https://github.com/leanprover/lean4lean4rz text/x-lean4z2.18u(?![λΠΣ])[_a-zA-Zα-ωΑ-Ωϊ-ϻἀ-῾℀-⅏𝒜-𝖟](?:(?![λΠΣ])[_a-zA-Zα-ωΑ-Ωϊ-ϻἀ-῾℀-⅏𝒜-𝖟0-9'ⁿ-₉ₐ-ₜᵢ-ᵪ!?])*rr)6rJ unif_hintrKinlinerLrVrmrWr[rarcr_aliasrrprqr/rsrtrurrr|r}r~rrxrOusingrMrfrQrPrSryrdrTrZropaquerXmacroelabsyntax macro_rulesr~whereabbrevrhrerUz#synthriscopedrN)rrobtainrr r!r"r$r%r&r'rwr(r)r*r+nomatchr,at)r6r5r4)8z!=#&z&&*+-/@!z-.z->.z..z...z::z:>;z;;_|z||~z=>z<=z>=z/\z\/u∀uΠuλu↔u∧u∨u≠u≤u≥¬u⁻¹u⬝u▸u→u∃u≈×u⌞u⌟u≡r>r?u↦)r7r8r9r:r;r<r=r@rArBrCz]'z]?z]!rrrrrz--.*$r-r.r1rDz (?<=\.)\d+z(\d+\.\d*)([eE][+-]?[0-9]+)?rErFrGrHrIr{rUrrrrrrrrz \\[n"\\\n]rcJtjd|tjrdSdS)Nz ^import [A-Z]rrrs rrzLean4Lexer.analyse_textrrN),rrrrrrrrrrrr keywords1 keywords2 keywords3 operators punctuationr r rrrrrr6r rr rrrrr Floatrrrrrrrrrrrrrrrs D /CiG I IM f F "] 2U :E II I I1K Z VZ - GY ' w~ & U9U5 9 9 97< H U%eE B B BGM R U9  t|2 3 U;   * D ! e^V] + F # ,fl ; V^ $ 6=( + !4= 1 DL' (! &U9U5 9 9 97;L M U9U5 9 9 97 C W(+ 6 GL ! !  G' 0 GL ! ! ) * G%w / G%v . g' (   # FJ ' fj !  ' FM * &- ( S..F`r)rrpygments.lexerrrrpygments.tokenrrrr r r r r __all__r LeanLexerrrrrrs  5555555555                      &nnnnnnnnb  jjjjjjjjjjr