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]) ⋯
Equations
- Array.instDecidableExistsAndMemOfDecidablePred = 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 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
.
Variant of any_beq
with ==
reversed.
Variant of all_bne
with !=
reversed.
Instances For
Equations
set #
Instances For
setIfInBounds #
Instances For
Instances For
BEq #
isEqv #
Content below this point has not yet been aligned with List
.
Variant of foldrM_push
with h : start = arr.size + 1
rather than (arr.push a).size
as the argument.
Variant of foldr_push
with the h : start = arr.size + 1
rather than (arr.push a).size
as the argument.
A more efficient version of arr.toList.reverse
.
Equations
- arr.toListRev = Array.foldl (fun (l : List α) (t : α) => t :: l) [] arr
Instances For
uset #
get #
Equations
Instances For
ofFn #
mem #
get lemmas #
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
take #
forIn #
foldl / foldr #
map #
modify #
filter #
filterMap #
empty #
append #
flatten #
extract #
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.
map #
map_id_fun'
differs from map_id_fun
by representing the identity function as a lambda, rather than id
.