Documentation
Mutable
.
Mutable
Search
Google site search
return to top
source
Imports
Init
Imported by
Mutable
Mutable
.
mk
Mutable
.
get
Mutable
.
ext
Mutable
.
ext_iff
Mutable
.
mk_eq_mk
Mutable
.
getModifyUnsafe
Mutable
.
getModifyImpl
Mutable
.
getModify
Mutable
.
getModify₂Unsafe
Mutable
.
getModify₂Impl
Mutable
.
getModify₂
Mutable
#
source
structure
Mutable
(α :
Type
u)
:
Type
u
__mk__ :: (
__get__ :
α
)
Instances For
source
@[extern lean_mk_Mutable]
def
Mutable
.
mk
{α :
Type
u}
(a :
α
)
:
Mutable
α
Equations
Mutable.mk
a
=
{
__get__
:=
a
}
Instances For
source
@[extern lean_Mutable_get]
def
Mutable
.
get
{α :
Type
u}
(a :
Mutable
α
)
:
α
Equations
a
.get
=
Mutable.__get__
a
Instances For
source
theorem
Mutable
.
ext
{α :
Type
u}
{x :
Mutable
α
}
{y :
Mutable
α
}
(get :
x
.get
=
y
.get
)
:
x
=
y
source
theorem
Mutable
.
ext_iff
{α :
Type
u}
{x :
Mutable
α
}
{y :
Mutable
α
}
:
x
=
y
↔
x
.get
=
y
.get
source
@[simp]
theorem
Mutable
.
mk_eq_mk
{α :
Type
u}
{x :
α
}
{y :
α
}
:
Mutable.mk
x
=
Mutable.mk
y
↔
x
=
y
source
@[extern lean_Mutable_modify]
unsafe def
Mutable
.
getModifyUnsafe
{α :
Type
u}
(x :
Mutable
α
)
(f :
α
→
α
)
:
α
Instances For
source
@[reducible, inline]
unsafe abbrev
Mutable
.
getModifyImpl
{α :
Type
u}
(x :
Mutable
α
)
(f :
α
→
α
)
(hf :
∀ (
a
:
α
),
f
a
=
a
)
:
α
Instances For
source
@[implemented_by Mutable.getModifyImpl]
def
Mutable
.
getModify
{α :
Type
u}
(x :
Mutable
α
)
(f :
α
→
α
)
(hf :
∀ (
a
:
α
),
f
a
=
a
)
:
α
Equations
x
.getModify
f
hf
=
f
x
.get
Instances For
source
@[extern lean_Mutable_modify2]
unsafe def
Mutable
.
getModify₂Unsafe
{α :
Type
u}
{β :
Type
v}
(x :
Mutable
α
)
(f :
α
→
β
×
α
)
:
β
Instances For
source
@[reducible, inline]
unsafe abbrev
Mutable
.
getModify₂Impl
{α :
Type
u}
{β :
Type
v}
(x :
Mutable
α
)
(f :
α
→
β
×
α
)
(hgf :
∀ (
a
:
α
),
(
f
a
)
.snd
=
a
)
:
β
Instances For
source
@[implemented_by Mutable.getModify₂Impl]
def
Mutable
.
getModify₂
{α :
Type
u}
{β :
Type
v}
(x :
Mutable
α
)
(f :
α
→
β
×
α
)
(hgf :
∀ (
a
:
α
),
(
f
a
)
.snd
=
a
)
:
β
Equations
x
.getModify₂
f
hgf
=
(
f
x
.get
)
.fst
Instances For