Documentation
Concurrency
.
MVar
.
State
Search
return to top
source
Imports
Init
Imported by
Concurrency
.
MVar
.
State
Concurrency
.
MVar
.
instReprState
Concurrency
.
MVar
.
instDecidableEqState
Concurrency
.
MVar
.
instBEqState
Concurrency
.
MVar
.
State
.
isEmpty
Concurrency
.
MVar
.
State
.
isEmpty_empty
Concurrency
.
MVar
.
State
.
isEmpty_full
Concurrency
.
MVar
.
State
.
isFull
Concurrency
.
MVar
.
State
.
isFull_empty
Concurrency
.
MVar
.
State
.
isFull_full
Concurrency
.
MVar
.
State
.
get?
Concurrency
.
MVar
.
State
.
get
source
inductive
Concurrency
.
MVar
.
State
(
a
:
Type
)
:
Type
empty
{
a
:
Type
}
:
State
a
full
{
a
:
Type
}
:
a
→
State
a
Instances For
source
instance
Concurrency
.
MVar
.
instReprState
{
a✝
:
Type
}
[
Repr
a✝
]
:
Repr
(
State
a✝
)
Equations
Concurrency.MVar.instReprState
=
{
reprPrec
:=
Concurrency.MVar.reprState✝
}
source
instance
Concurrency
.
MVar
.
instDecidableEqState
{
a✝
:
Type
}
[
DecidableEq
a✝
]
:
DecidableEq
(
State
a✝
)
Equations
Concurrency.MVar.instDecidableEqState
=
Concurrency.MVar.decEqState✝
source
instance
Concurrency
.
MVar
.
instBEqState
{
a✝
:
Type
}
[
BEq
a✝
]
:
BEq
(
State
a✝
)
Equations
Concurrency.MVar.instBEqState
=
{
beq
:=
Concurrency.MVar.beqState✝
}
source
def
Concurrency
.
MVar
.
State
.
isEmpty
{
a
:
Type
}
:
State
a
→
Bool
Equations
Concurrency.MVar.State.empty
.
isEmpty
=
true
(
Concurrency.MVar.State.full
a_1
)
.
isEmpty
=
false
Instances For
source
@[simp]
theorem
Concurrency
.
MVar
.
State
.
isEmpty_empty
{
a
:
Type
}
:
empty
.
isEmpty
=
true
source
@[simp]
theorem
Concurrency
.
MVar
.
State
.
isEmpty_full
{
a✝
:
Type
}
{
a
:
a✝
}
:
(
full
a
)
.
isEmpty
=
false
source
def
Concurrency
.
MVar
.
State
.
isFull
{
a
:
Type
}
:
State
a
→
Bool
Equations
Concurrency.MVar.State.empty
.
isFull
=
false
(
Concurrency.MVar.State.full
a_1
)
.
isFull
=
true
Instances For
source
@[simp]
theorem
Concurrency
.
MVar
.
State
.
isFull_empty
{
a
:
Type
}
:
empty
.
isFull
=
false
source
@[simp]
theorem
Concurrency
.
MVar
.
State
.
isFull_full
{
a✝
:
Type
}
{
a
:
a✝
}
:
(
full
a
)
.
isFull
=
true
source
def
Concurrency
.
MVar
.
State
.
get?
{
a
:
Type
}
(
self
:
State
a
)
:
Option
a
Equations
Concurrency.MVar.State.empty
.
get?
=
none
(
Concurrency.MVar.State.full
a_1
)
.
get?
=
some
a_1
Instances For
source
def
Concurrency
.
MVar
.
State
.
get
{
a
:
Type
}
(
self
:
State
a
)
:
self
.
isFull
=
true
→
a
Equations
(
Concurrency.MVar.State.full
x_2
)
.
get
x_3
=
x_2
Instances For