Preliminaries #
toList #
empty #
size #
push #
mkArray #
L[i] and L[i]? #
mem #
isEmpty #
Decidability of bounded quantifiers #
Equations
- Array.instDecidableForallForallMemOfDecidablePred = decidable_of_iff (∀ (i : Nat) (h : i < xs.size), p xs[i]) ⋯
any / all #
Variant of anyM_toArray
with a side condition on stop
.
Variant of allM_toArray
with a side condition on stop
.
Instances For
Equations
set #
setIfInBounds #
Instances For
Instances For
Instances For
BEq #
isEqv #
map #
map_id_fun'
differs from map_id_fun
by representing the identity function as a lambda, rather than id
.
Use this as induction ass using array₂_induction
on a hypothesis of the form ass : Array (Array α)
.
The hypothesis ass
will be replaced with a hypothesis ass : List (List α)
,
and former appearances of ass
in the goal will be replaced with (ass.map List.toArray).toArray
.
Use this as induction ass using array₃_induction
on a hypothesis of the form ass : Array (Array (Array α))
.
The hypothesis ass
will be replaced with a hypothesis ass : List (List (List α))
,
and former appearances of ass
in the goal will be replaced with
((ass.map (fun xs => xs.map List.toArray)).map List.toArray).toArray
.
filter #
filterMap #
singleton #
append #
flatten #
flatMap #
mkArray #
Preliminaries about swap
needed for reverse
. #
reverse #
extract #
Equations
Instances For
foldlM and foldrM #
Variant of foldlM_append
with a side condition for the stop
argument.
Variant of foldlM_push
with a side condition for the stop
argument.
foldl / foldr #
Variant of foldr_push
with the h : start = arr.size + 1
rather than (arr.push a).size
as the argument.
Variant of foldrM_append
with a side condition for the start
argument.
We can prove that two folds over the same array are related (by some arbitrary relation) if we know that the initial elements are related and the folding function, for each element of the array, preserves the relation.
We can prove that two folds over the same array are related (by some arbitrary relation) if we know that the initial elements are related and the folding function, for each element of the array, preserves the relation.
Content below this point has not yet been aligned with List
.
sum #
uset #
get #
ofFn #
mem #
get lemmas #
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
shrink #
forIn #
map #
modify #
contains #
Equations
- Array.instDecidableMemOfDecidableEq a as = decidable_of_iff (as.contains a = true) ⋯
swap #
eraseIdx #
isPrefixOf #
zipWith #
findSomeM?, findM?, findSome?, find? #
More theorems about List.toArray
, followed by an Array
operation. #
Our goal is to have simp
"pull List.toArray
outwards" as much as possible.