mk lemmas #
toArray lemmas #
Equations
toList #
Equations
empty #
size #
push #
cast #
replicate #
Equations
Equations
Equations
Equations
L[i] and L[i]? #
mem #
Decidability of bounded quantifiers #
Equations
- Vector.instDecidableForallForallMemOfDecidablePred = decidable_of_iff (∀ (i : Nat) (h : i < n), p xs[i]) ⋯
any / all #
set #
setIfInBounds #
BEq #
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 vector₂_induction
on a hypothesis of the form ass : Vector (Vector α n) m
.
The hypothesis ass
will be replaced with a hypothesis ass : Array (Array α)
along with additional hypotheses h₁ : ass.size = m
and h₂ : ∀ xs ∈ ass, xs.size = n
.
Appearances of the original ass
in the goal will be replaced with
Vector.mk (xss.attach.map (fun ⟨xs, m⟩ => Vector.mk xs ⋯)) ⋯
.
Use this as induction ass using vector₃_induction
on a hypothesis of the form ass : Vector (Vector (Vector α n) m) k
.
The hypothesis ass
will be replaced with a hypothesis ass : Array (Array (Array α))
along with additional hypotheses h₁ : ass.size = k
, h₂ : ∀ xs ∈ ass, xs.size = m
,
and h₃ : ∀ xs ∈ ass, ∀ x ∈ xs, x.size = n
.
Appearances of the original ass
in the goal will be replaced with
Vector.mk (xss.attach.map (fun ⟨xs, m⟩ => Vector.mk (xs.attach.map (fun ⟨x, m'⟩ => Vector.mk x ⋯)) ⋯)) ⋯
.
singleton #
append #
See also eq_push_append_of_mem
, which proves a stronger version
in which the initial array must not contain the element.
flatten #
flatMap #
replicate #
Equations
Variant of replicate_succ
that prepends a
at the beginning of the vector.
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
reverse #
Equations
extract #
foldlM and foldrM #
foldl / foldr #
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
leftpad and rightpad #
contains #
more lemmas about pop
#
Equations
replace #
Logic #
any / all #
findRev? and findSomeRev? #
zipWith #
take #
swap #
take #
drop #
Decidable quantifiers. #
Equations
- Vector.instDecidableForallVectorSucc P = decidable_of_iff' (∀ (x : α) (xs : Vector α n), P (xs.push x)) ⋯