o
    sdfz!                     @   sx   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 ddgZG dd deZeZG dd deZdS )	z
    pygments.lexers.lean
    ~~~~~~~~~~~~~~~~~~~~

    Lexers for the Lean theorem prover.

    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)
RegexLexerwordsinclude)CommentOperatorKeywordNameStringNumberGeneric
Whitespace
Lean3Lexer
Lean4Lexerc                   @   s  e Zd ZdZdZdZddgZdgZddgZd	Z	d
Z
e
d e
 d Zdefdejdfded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efeefde ej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ed"dddej fed#dddej!fd$ej!d%fed&dd'efe"d(gd)ej!d*fe"d(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d0ej$fdejd*fgd1Z%d2d3 Z&d4S )5r   z(
    For the Lean 3 theorem prover.
    Leanz,https://leanprover-community.github.io/lean3leanZlean3*.leanztext/x-leanztext/x-lean3z2.0u   (?![λΠΣ])[_a-zA-Zα-ωΑ-Ωϊ-ϻἀ-῾℀-⅏𝒜-𝖟](?:(?![λΠΣ])[_a-zA-Zα-ωΑ-Ωϊ-ϻἀ-῾℀-⅏𝒜-𝖟0-9'ⁿ-₉ₐ-ₜᵢ-ᵪ])*(\.)*\s+/--	docstring/-commentz--.*?$)forallfunPifromhaveshowassumeZsufficesletifelsetheninwithcalcmatchdo\bprefixsuffixZsorryZadmit)SortPropType)():{}[]   ⟨   ⟩u   ‹u   ›   ⦃   ⦄:=,``?z0x[A-Za-z0-9]+z0b[01]+\d+"stringz='(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4})|.)'[~?][a-z][\w\']*:\S)importrenaminghiding	namespacelocalprivate	protectedsectionr   ZomitrK   rJ   exportopen	attribute)(lemmatheoremdefZ
definitionexampleaxiomZaxiomsZconstant	constantsuniverseZ	universes	inductiveZcoinductive	structureextendsclassinstanceZabbreviationznoncomputable theorynoncomputablemutualmetarN   Z	parameter
parametersvariable	variablesZreserve
precedencepostfixr+   notationinfixinfixlinfixrbeginbyend
set_optionZrun_cmd@\[rN   )#eval#check#reduce#exit#print#help)r,   
expression\]#pop[^/-]+#push-/[/-][^\\"]+z9(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4}))rr   rootrN   r   r   rA   c                 C      t d| t jr
dS d S )Nz^import [a-z]皙?research	MULTILINEtext r   ]/var/www/html/software/conda/envs/catlas/lib/python3.10/site-packages/pygments/lexers/lean.pyanalyse_text      zLean3Lexer.analyse_textN)'__name__
__module____qualname____doc__nameurlaliases	filenames	mimetypesversion_added_name_segment_namer   r	   Docr   Singler   r   r   Errorr0   r   r   Symbolr
   IntegerDoubleCharVariableBuiltinPseudo	NamespaceDeclarationr   	MultilineEscapetokensr   r   r   r   r   r      s    


		


,



[c                   @   s  e Zd ZdZdZdZdgZdgZdgZdZ	dZ
e
d	 e
 d
 ZdZdZdZdZdZdefdejdfdedfdejfeedddejfeddddejfeeejjfeeefe
efde ejfde fde j!fde j"fdej#dfdej$fd ejjfgeedddej%feedddefd!ej&d"fe'd#gd$ej&d%fe'd#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-d. Z+d/S )0r   z(
    For the Lean 4 theorem prover.
    ZLean4z#https://github.com/leanprover/lean4Zlean4r   ztext/x-lean4z2.18u   (?![λΠΣ])[_a-zA-Zα-ωΑ-Ωϊ-ϻἀ-῾℀-⅏𝒜-𝖟](?:(?![λΠΣ])[_a-zA-Zα-ωΑ-Ωϊ-ϻἀ-῾℀-⅏𝒜-𝖟0-9'ⁿ-₉ₐ-ₜᵢ-ᵪ!?])*r   r   )6rD   Z	unif_hintrE   inlinerF   rO   r_   rP   rS   rV   rW   rU   aliasrq   ra   rb   r+   rd   re   rf   rc   rl   rm   rn   ro   ri   rI   usingrG   rZ   rK   rJ   rL   rj   rX   rM   rR   rp   opaquerQ   macroZelabsyntaxZmacro_rulesrn   whereZabbrevr[   rY   rN   z#synthr\   ZscopedrH   )r   r   obtainr   r   r   r   r    r!   r"   r#   rh   r$   r%   r&   r'   Znomatchr(   at)r0   r/   r.   )8z!=#&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   ⁻¹u   ⬝u   ▸u   →u   ∃u   ≈   ×u   ⌞u   ⌟u   ≡r8   r9   u   ↦)r1   r2   r3   r4   r5   r6   r7   r:   r;   r<   r=   r   r   r   r   r   z--.*$r)   r*   r-   r>   z
(?<=\.)\d+z(\d+\.\d*)([eE][+-]?[0-9]+)?r?   r@   rA   rB   rC   rk   rN   rr   rs   rt   ru   rv   rw   rx   ry   z
\\[n"\\\n]rz   c                 C   r|   )Nz^import [A-Z]r}   r~   r   r   r   r   r      r   zLean4Lexer.analyse_textN),r   r   r   r   r   r   r   r   r   r   r   r   Z	keywords1Z	keywords2Z	keywords3	operatorspunctuationr   r	   r   r   r   r   r   r0   r   r   r   r   r   r   r   r
   Floatr   r   r   r   r   r   r   r   r   r   r   r   r   r   r      sp    	









0)r   r   Zpygments.lexerr   r   r   Zpygments.tokenr   r   r   r   r	   r
   r   r   __all__r   	LeanLexerr   r   r   r   r   <module>   s    
(q