Preliminaries #
toList #
empty #
size #
Equations
Instances For
Equations
Instances For
L[i] and L[i]? #
pop #
push #
replicate #
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
mem #
isEmpty #
Equations
Instances For
Equations
Instances For
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.
Equations
set #
setIfInBounds #
BEq #
Equations
Instances For
Equations
Instances For
Instances For
isEqv #
back #
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 #
Instances For
singleton #
append #
flatten #
flatMap #
replicate #
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Instances For
Instances For
Equations
Instances For
Equations
Instances For
Instances For
Instances For
Instances For
Instances For
Equations
Instances For
Equations
Instances For
Instances For
Instances For
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Preliminaries about swap needed for reverse. #
reverse #
Equations
Instances For
extract #
shrink #
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.
Further results about back and back? #
Equations
Instances For
Additional operations #
leftpad #
contains #
Equations
Instances For
more lemmas about pop #
Equations
Instances For
Logic #
any / all #
modify #
swap #
swapAt #
replace #
toListRev #
Converts an array to a list that contains the same elements in the opposite order.
This is equivalent to, but more efficient than, Array.toList ∘ List.reverse.
Examples:
Instances For
appendList #
Preliminaries about ofFn #
Preliminaries about range and range' #
Content below this point has not yet been aligned with List.
sum #
uset #
get #
mem #
get lemmas #
forIn #
contains #
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.