+
    TBiz!                         R t ^ RIt^ RIHtHtHt ^ RIHtHtH	t	H
t
HtHtHtHt RR.t ! R R]4      t]t ! R R]4      tR# )z
pygments.lexers.lean
~~~~~~~~~~~~~~~~~~~~

Lexers for the Lean theorem prover.

:copyright: Copyright 2006-2025 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                   (  a  ] tR t^t o RtRtRtRR.tR.tRR.t	R	t
R
t]R,           ],           R,           tRR]3R]P                  R3R]R3R]P"                  3]! R.RRR7      ]3]! R/RRR7      ]P*                  3]! R0RRR7      ]P,                  3]! R14      ]3]]3R],           ]P2                  3R]P6                  3R]P6                  3R]P6                  3R]P8                  R3R]P:                  3R]P<                  3R]P>                  P@                  3.R]! R2RRR7      ]PB                  3]! R3RRR7      ]PD                  3R!]PD                  R 3]! R4RR"7      ]3]#! R4      .R R#]PD                  R$3]#! R4      .RR%]PH                  3R]PH                  R&3R']PH                  R$3R(]PH                  3.RR%]P                  3R']P                  R$3R(]P                  3.RR)]P8                  3R*]PJ                  3R]P8                  R$3./t&R+ t'R,t(V t)R-# )5r   z 
For the Lean 3 theorem prover.
Leanz,https://leanprover-community.github.io/lean3leanlean3*.leanztext/x-leanztext/x-lean3z2.0u   (?![λΠΣ])[_a-zA-Zα-ωΑ-Ωϊ-ϻἀ-῾℀-⅏𝒜-𝖟](?:(?![λΠΣ])[_a-zA-Zα-ωΑ-Ωϊ-ϻἀ-῾℀-⅏𝒜-𝖟0-9'ⁿ-₉ₐ-ₜᵢ-ᵪ])*(\.)*
expression\s+/--	docstring/-commentz--.*?$\bprefixsuffix``?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root	attribute@\[)r   \]#pop[^/-]+#push-/[/-][^\\"]+z9(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4}))c                b    \         P                  ! R V \         P                  4      '       d   R# R# )z^import [a-z]皙?Nresearch	MULTILINEtexts   &9/usr/lib/python3.14/site-packages/pygments/lexers/lean.pyanalyse_textLean3Lexer.analyse_text   "    99%tR\\:: ;     N)forallfunPifromhaveshowassumesufficesletifelsetheninwithcalcmatchdosorryadmit)SortPropType)():{}[]   ⟨   ⟩u   ‹u   ›   ⦃   ⦄:=,)importrenaminghiding	namespacelocalprivate	protectedsectionr   omitri   rh   exportopenr'   )(lemmatheoremdef
definitionexampleaxiomaxiomsconstant	constantsuniverse	universes	inductivecoinductive	structureextendsclassinstanceabbreviationznoncomputable theorynoncomputablemutualmetar'   	parameter
parametersvariable	variablesreserve
precedencepostfixr   notationinfixinfixlinfixrbeginbyend
set_optionrun_cmd)#eval#check#reduce#exit#print#help)*__name__
__module____qualname____firstlineno____doc__nameurlaliases	filenames	mimetypesversion_added_name_segment_namer   r	   Docr   Singler   r   r   ErrorrT   r   r   Symbolr
   IntegerDoubleCharVariableBuiltinPseudo	NamespaceDeclarationr   	MultilineEscapetokensr9   __static_attributes____classdictcell____classdict__s   @r8   r   r      s     D
8CwG
I/IM	d  F"]2U:E 	Z VZZ-GY''   	/ 18	9
 %eEBGMMR+E%H',,W   DMe^V]]+/(V^^$6==(+Mv{{[!4==1DLL''(/
2 	 	 E	+ -4,=,=	?  0 E1+0 -4,?,?1A2 W((+6   &' L!S*
V 	G''0L!
 	))*G%%w/G%%v.g''(	
 	

#FJJ'fjj!

 	'I6==Y&--(
iYFv r<   c                     a  ] tR t^t o RtRtRtR.tR.tR.t	Rt
Rt]R	,           ],           R
,           tR*tR+tR,tR-tR.tRR]3R]P(                  R3R]R3R]P,                  3]! ]RRR7      ]P2                  3]! R/RRR7      ]P6                  3]! ]4      ]P:                  P<                  3]! ]4      ]3]]3R],           ]P@                  3R]!3R]!PD                  3R]!PF                  3R]PH                  R3R]PJ                  3R]P:                  P<                  3.R]! ]RRR7      ]PL                  3]! ]RRR7      ]3R]PN                  R3](! R4      .RR]PN                  R 3](! R4      .RR!]PR                  3R]PR                  R"3R#]PR                  R 3R$]PR                  3.RR!]P(                  3R#]P(                  R 3R$]P(                  3.RR%]PH                  3R&]PT                  3R]PH                  R 3./t+R' t,R(t-V t.R)# )0r   z 
For the Lean 4 theorem prover.
Lean4z#https://github.com/leanprover/lean4lean4r   ztext/x-lean4z2.18u   (?![λΠΣ])[_a-zA-Zα-ωΑ-Ωϊ-ϻἀ-῾℀-⅏𝒜-𝖟](?:(?![λΠΣ])[_a-zA-Zα-ωΑ-Ωϊ-ϻἀ-῾℀-⅏𝒜-𝖟0-9'ⁿ-₉ₐ-ₜᵢ-ᵪ!?])*r   r   r'   r   r   r   r   r   r   z--.*$r   r   r    z
(?<=\.)\d+z(\d+\.\d*)([eE][+-]?[0-9]+)?r!   r"   r#   r$   r%   r&   r(   r)   r*   r+   r,   r-   r.   r/   z
\\[n"\\\n]c                b    \         P                  ! R V \         P                  4      '       d   R# R# )z^import [A-Z]r1   Nr2   r6   s   &r8   r9   Lean4Lexer.analyse_text   r;   r<   r=   N)6rb   	unif_hintrc   inlinerd   rm   r   rn   rr   rx   rz   rv   aliasr   r   r   r   r   r   r   r   r   r   r   r   r   rg   usingre   r}   ri   rh   rk   r   r{   rl   rq   r   opaquero   macroelabsyntaxmacro_rulesr   whereabbrevr   r|   r'   z#synthr   scopedrf   )r>   r?   obtainrA   rB   rC   rD   rF   rG   rH   rI   r   rJ   rK   rL   rM   nomatchrN   at)rT   rS   rR   )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   ≡r\   r]   u   ↦)rU   rV   rW   rX   rY   rZ   r[   r^   r_   r`   ra   rO   )/r   r   r   r   r   r   r   r   r   r   r   r   r   	keywords1	keywords2	keywords3	operatorspunctuationr   r	   r   r   r   r   r   rT   r   r   r   r   r   r   r   r
   Floatr   r   r   r   r   r   r   r   r   r9   r   r   r   s   @r8   r   r      s     D
/CiG
I IM	f  F"]2U:EIII
IK 	Z VZZ-GY'w~~&9U597<<H%eEBGMMR9t||223;*D!e^V]]+F#,fll;V^^$6==(+!4==1DLL''(!
$ 	9U597;L;LM9U597CW((+6L!	
 	G''0L!
 	))*G%%w/G%%v.g''(
 	

#FJJ'fjj!

 	'FMM*&--(
S.F` r<   )r   r3   pygments.lexerr   r   r   pygments.tokenr   r   r   r   r	   r
   r   r   __all__r   	LeanLexerr   r=   r<   r8   <module>r      sT    
 5 5      
&n nb 	j jr<   