Documentation
Mathlib
.
Lean
.
Thunk
Search
Google site search
return to top
source
Imports
Init
Mathlib.Init
Imported by
Thunk
.
get_pure
Thunk
.
get_mk
Thunk
.
instDecidableEq_mathlib
Thunk
.
prod
Thunk
.
prod_get_fst
Thunk
.
prod_get_snd
Thunk
.
add
Thunk
.
instAdd_mathlib
Thunk
.
add_get
Basic facts about
Thunk
.
#
source
@[simp]
theorem
Thunk
.
get_pure
{α :
Type
u_1}
(x :
α
)
:
(
Thunk.pure
x
)
.get
=
x
source
@[simp]
theorem
Thunk
.
get_mk
{α :
Type
u_1}
(f :
Unit
→
α
)
:
{
fn
:=
f
}
.get
=
f
()
source
instance
Thunk
.
instDecidableEq_mathlib
{α :
Type
u}
[
DecidableEq
α
]
:
DecidableEq
(
Thunk
α
)
Equations
a
.instDecidableEq_mathlib
b
=
⋯
.mpr
inferInstance
source
def
Thunk
.
prod
{α :
Type
u}
{β :
Type
v}
(a :
Thunk
α
)
(b :
Thunk
β
)
:
Thunk
(
α
×
β
)
The cartesian product of two thunks.
Equations
a
.prod
b
=
{
fn
:=
fun (
x
:
Unit
) =>
(
a
.get
,
b
.get
)
}
Instances For
source
@[simp]
theorem
Thunk
.
prod_get_fst
{α :
Type
u}
{β :
Type
v}
{a :
Thunk
α
}
{b :
Thunk
β
}
:
(
a
.prod
b
)
.get
.fst
=
a
.get
source
@[simp]
theorem
Thunk
.
prod_get_snd
{α :
Type
u}
{β :
Type
v}
{a :
Thunk
α
}
{b :
Thunk
β
}
:
(
a
.prod
b
)
.get
.snd
=
b
.get
source
def
Thunk
.
add
{α :
Type
u}
[
Add
α
]
(a b :
Thunk
α
)
:
Thunk
α
The sum of two thunks.
Equations
a
.add
b
=
{
fn
:=
fun (
x
:
Unit
) =>
a
.get
+
b
.get
}
Instances For
source
instance
Thunk
.
instAdd_mathlib
{α :
Type
u}
[
Add
α
]
:
Add
(
Thunk
α
)
Equations
Thunk.instAdd_mathlib
=
{
add
:=
Thunk.add
}
source
@[simp]
theorem
Thunk
.
add_get
{α :
Type
u}
[
Add
α
]
{a b :
Thunk
α
}
:
(
a
+
b
)
.get
=
a
.get
+
b
.get