hilbert
6
Search
☰
About
Tutorial
Roadmap
Get involved
Reference manual
Blueprint
API docs
Papers
About
Tutorial
Roadmap
Get involved
Reference manual
Blueprint
API docs
Papers
GitHub
return to top
source
Imports
Lean.Expr
Imported by
Lean
.
Level
.
replace
Lean
.
Expr
.
ReplaceLevelImpl
.
cacheSize
Lean
.
Expr
.
ReplaceLevelImpl
.
State
Lean
.
Expr
.
ReplaceLevelImpl
.
ReplaceM
Lean
.
Expr
.
ReplaceLevelImpl
.
cache
Lean
.
Expr
.
ReplaceLevelImpl
.
replaceUnsafeM
Lean
.
Expr
.
ReplaceLevelImpl
.
initCache
Lean
.
Expr
.
ReplaceLevelImpl
.
replaceUnsafe
Lean
.
Expr
.
replaceLevel
Lean
.
Util
.
ReplaceLevel
source
partial def
Lean
.
Level
.
replace
(
f?
:
Level
→
Option
Level
)
(
u
:
Level
)
:
Level
source
@[reducible, inline]
abbrev
Lean
.
Expr
.
ReplaceLevelImpl
.
cacheSize
:
USize
Equations
Lean.Expr.ReplaceLevelImpl.cacheSize
=
8192
-
1
Instances For
source
structure
Lean
.
Expr
.
ReplaceLevelImpl
.
State
:
Type
keys :
Array
Expr
results :
Array
Expr
Instances For
source
@[reducible, inline]
abbrev
Lean
.
Expr
.
ReplaceLevelImpl
.
ReplaceM
(
α
:
Type
)
:
Type
Equations
Lean.Expr.ReplaceLevelImpl.ReplaceM
=
StateM
Lean.Expr.ReplaceLevelImpl.State
Instances For
source
unsafe def
Lean
.
Expr
.
ReplaceLevelImpl
.
cache
(
i
:
USize
)
(
key
result
:
Expr
)
:
ReplaceM
Expr
Equations
Lean.Expr.ReplaceLevelImpl.cache
i
key
result
=
do
modify
fun (
s
:
Lean.Expr.ReplaceLevelImpl.State
) =>
{
keys
:=
s
.
keys
.
uset
i
key
⋯
,
results
:=
s
.
results
.
uset
i
result
⋯
}
pure
result
Instances For
source
unsafe def
Lean
.
Expr
.
ReplaceLevelImpl
.
replaceUnsafeM
(
f?
:
Level
→
Option
Level
)
(
size
:
USize
)
(
e
:
Expr
)
:
ReplaceM
Expr
Equations
Lean.Expr.ReplaceLevelImpl.replaceUnsafeM
f?
size
e
=
Lean.Expr.ReplaceLevelImpl.replaceUnsafeM.visit✝
f?
size
e
Instances For
source
unsafe def
Lean
.
Expr
.
ReplaceLevelImpl
.
initCache
:
State
Equations
One or more equations did not get rendered due to their size.
Instances For
source
unsafe def
Lean
.
Expr
.
ReplaceLevelImpl
.
replaceUnsafe
(
f?
:
Level
→
Option
Level
)
(
e
:
Expr
)
:
Expr
Equations
Lean.Expr.ReplaceLevelImpl.replaceUnsafe
f?
e
=
StateT.run'
(
Lean.Expr.ReplaceLevelImpl.replaceUnsafeM
f?
Lean.Expr.ReplaceLevelImpl.cacheSize
e
)
Lean.Expr.ReplaceLevelImpl.initCache
Instances For
source
@[implemented_by Lean.Expr.ReplaceLevelImpl.replaceUnsafe]
partial def
Lean
.
Expr
.
replaceLevel
(
f?
:
Level
→
Option
Level
)
:
Expr
→
Expr