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
Init.BinderPredicates
Init.NotationExtra
Init.Omega
Init.Data.Prod
Init.Data.List.Find
Init.Data.List.TakeDrop
Init.Data.Option.Lemmas
Init.Data.List.Nat.Range
Init.Data.List.Nat.TakeDrop
Imported by
List
.
find?_eq_some_iff_getElem
List
.
findIdx?_eq_some_le_of_findIdx?_eq_some
Init
.
Data
.
List
.
Nat
.
Find
Results about
List.sum
specialized to
Nat
#
source
theorem
List
.
find?_eq_some_iff_getElem
{
α
:
Type
u_1}
{
xs
:
List
α
}
{
p
:
α
→
Bool
}
{
b
:
α
}
:
find?
p
xs
=
some
b
↔
p
b
=
true
∧
∃
(
i
:
Nat
)
,
∃
(
h
:
i
<
xs
.
length
)
,
xs
[
i
]
=
b
∧
∀ (
j
:
Nat
) (
hj
:
j
<
i
), (
!
p
xs
[
j
]
)
=
true
source
theorem
List
.
findIdx?_eq_some_le_of_findIdx?_eq_some
{
α
:
Type
u_1}
{
xs
:
List
α
}
{
p
q
:
α
→
Bool
}
(
w
:
∀ (
x
:
α
),
x
∈
xs
→
p
x
=
true
→
q
x
=
true
)
{
i
:
Nat
}
(
h
:
findIdx?
p
xs
=
some
i
)
:
∃
(
j
:
Nat
)
,
j
≤
i
∧
findIdx?
q
xs
=
some
j