Bootstrapping theorems about arrays #
This file contains some theorems about Array
and List
needed for Init.Data.List.Impl
.
Lemmas about List.toArray
. #
Equations
Instances For
Unapplied variant of push_toArray
, useful for monadic reasoning.
Variant of foldrM_toArray
with a side condition for the start
argument.
Variant of foldlM_toArray
with a side condition for the stop
argument.
Variant of foldr_toArray
with a side condition for the start
argument.
Variant of foldl_toArray
with a side condition for the stop
argument.
Equations
Instances For
Equations
Instances For
Variant of foldrM_push
with the start := arr.size + 1
rather than (arr.push a).size
.
Variant of foldr_push
with the start := arr.size + 1
rather than (arr.push a).size
.
A more efficient version of arr.toList.reverse
.
Equations
- arr.toListRev = Array.foldl (fun (l : List α) (t : α) => t :: l) [] arr
Instances For
Equations
Instances For
Instances For
Instances For
get #
set #
setD #
ofFn #
Equations
Instances For
Equations
Instances For
Instances For
Instances For
Instances For
Equations
Instances For
Equations
Instances For
Instances For
Equations
Instances For
Equations
Instances For
foldl / foldr #
map #
Instances For
mapIdx #
modify #
filter #
Equations
Instances For
filterMap #
Instances For
empty #
Equations
Instances For
append #
flatten #
extract #
any #
Equations
Instances For
all #
Equations
Instances For
contains #
Equations
- Array.instDecidableMemOfDecidableEq a as = decidable_of_iff (as.contains a = true) ⋯
swap #
Instances For
Instances For
Instances For
Instances For
More theorems about List.toArray
, followed by an Array
operation. #
Our goal is to have simp
"pull List.toArray
outwards" as much as possible.
Variant of anyM_toArray
with a side condition on stop
.
Variant of any_toArray
with a side condition on stop
.
Variant of allM_toArray
with a side condition on stop
.
Variant of all_toArray
with a side condition on stop
.