Lemmas about Int64Array #
Lemmas about arrays and slices, stated in terms of the model Array Int64 and
List Int64.
Arrays #
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem ScalarArray.Int64Array.foldl_eq_foldl_toArray {β : Type v} (f : β → Int64 → β) (init : β) (a : Int64Array) :
theorem ScalarArray.Int64Array.foldr_eq_foldr_toArray {β : Type v} (f : Int64 → β → β) (init : β) (a : Int64Array) :
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem ScalarArray.Int64Array.toArray_copySlice (src : Int64Array) (srcOff : Nat) (dest : Int64Array) (destOff len : Nat) (exact : Bool) :
theorem ScalarArray.Int64Array.copySlice_eq_append (src : Int64Array) (srcOff : Nat) (dest : Int64Array) (destOff len : Nat) (exact : Bool) :
Lists #
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem ScalarArray.Int64Array.toList_copySlice (src : Int64Array) (srcOff : Nat) (dest : Int64Array) (destOff len : Nat) (exact : Bool) :
Accessors #
@[simp]
@[simp]
@[simp]
Last element #
@[simp]
@[simp]
@[simp]
@[simp]
Writes #
theorem ScalarArray.Int64Array.getElem_copySlice (src : Int64Array) (srcOff : Nat) (dest : Int64Array) (destOff len : Nat) (exact : Bool) (i : Nat) (h : i < (src.copySlice srcOff dest destOff len exact).size) :
Machine-word indices #
usize is the size when the size fits in a USize, which holds for every array in memory. Loops
over USize indices take this as a hypothesis, since the model Array has no bound on its size.
theorem ScalarArray.Int64Array.lt_usize_iff (a : Int64Array) (h : a.size < USize.size) {i : USize} :
The guard i < a.usize of a loop over USize indices bounds the index.
Folds and queries #
@[simp]
@[simp]
@[simp]
@[simp]
theorem ScalarArray.Int64Array.foldl_toList {β : Type v} (f : β → Int64 → β) (init : β) (a : Int64Array) :
@[simp]
theorem ScalarArray.Int64Array.foldr_toList {β : Type v} (f : Int64 → β → β) (init : β) (a : Int64Array) :
@[simp]
theorem ScalarArray.Int64Array.forIn_toList {β : Type v} {m : Type v → Type w} [Monad m] [LawfulMonad m] (a : Int64Array) (init : β) (f : Int64 → β → m (ForInStep β)) :
theorem ScalarArray.Int64Array.findIdx?_eq (a : Int64Array) (p : Int64 → Bool) (start : Nat) :
a.findIdx? p start = Option.map (fun (x : Nat) => x + start) (List.findIdx? p (List.drop start a.toList))
@[simp]
@[simp]
theorem ScalarArray.Int64Array.map_val_findFinIdx? (a : Int64Array) (p : Int64 → Bool) (start : Nat) :
@[simp]
theorem ScalarArray.Int64Array.foldlM_toList {β : Type v} {m : Type v → Type w} [Monad m] (f : β → Int64 → m β) (init : β) (a : Int64Array) :
@[simp]
theorem ScalarArray.Int64Array.foldrM_toList {β : Type v} {m : Type v → Type w} [Monad m] (f : Int64 → β → m β) (init : β) (a : Int64Array) :
Membership #
@[simp]
@[simp]
@[simp]
@[simp]
Collecting iterators #
@[simp]
theorem Std.Iter.toList_toInt64Array {α : Type} [Iterator α Id Int64] [Iterators.Finite α Id] [IteratorLoop α Id Id] [LawfulIteratorLoop α Id Id] (it : Iter Int64) :
Slices #
@[simp]
@[simp]
Copying the slice from start to stop is the same as extracting those elements.
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem ScalarArray.Int64Array.getElem_toSlice (a : Int64Array) (start stop i : Nat) (h : i < Std.Slice.size (a.toSlice start stop)) :
@[simp]
@[simp]
theorem ScalarArray.Int64Array.Slice.getElem_slice (s : Int64Array.Slice) (start stop i : Nat) (h : i < Std.Slice.size (s.slice start stop)) :
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem ScalarArray.Int64Array.Slice.getElem_popFront (s : Int64Array.Slice) (i : Nat) (h : i < Std.Slice.size s.popFront) :
theorem ScalarArray.Int64Array.Slice.foldr_eq_foldr_toList_copy {β : Type v} (f : Int64 → β → β) (init : β) (s : Int64Array.Slice) :
Folding over a slice is folding over the list of its elements.
Slices as copies #
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem ScalarArray.Int64Array.Slice.foldl_eq_foldl_copy {β : Type v} (f : β → Int64 → β) (init : β) (s : Int64Array.Slice) :
@[simp]
theorem ScalarArray.Int64Array.Slice.foldlM_eq_foldlM_copy {β : Type v} {m : Type v → Type w} [Monad m] [LawfulMonad m] (f : β → Int64 → m β) (init : β) (s : Int64Array.Slice) :
@[simp]
theorem ScalarArray.Int64Array.Slice.forIn_eq_forIn_copy {β : Type v} {m : Type v → Type w} [Monad m] [LawfulMonad m] (s : Int64Array.Slice) (init : β) (f : Int64 → β → m (ForInStep β)) :
@[simp]
theorem ScalarArray.Int64Array.Slice.forM_eq_forM_copy {m : Type v → Type w} [Monad m] [LawfulMonad m] (s : Int64Array.Slice) (f : Int64 → m PUnit) :
@[simp]
theorem ScalarArray.Int64Array.Slice.foldr_eq_foldr_copy {β : Type v} (f : Int64 → β → β) (init : β) (s : Int64Array.Slice) :
@[simp]
theorem ScalarArray.Int64Array.Slice.foldrM_eq_foldrM_copy {β : Type v} {m : Type v → Type w} [Monad m] [LawfulMonad m] (f : Int64 → β → m β) (init : β) (s : Int64Array.Slice) :
@[simp]
@[simp]
@[simp]
@[simp]
theorem ScalarArray.Int64Array.Slice.find?_eq_find?_toList_copy (s : Int64Array.Slice) (p : Int64 → Bool) :
@[simp]
theorem ScalarArray.Int64Array.Slice.count_eq_countP_toList_copy (s : Int64Array.Slice) (p : Int64 → Bool) :
@[simp]
theorem ScalarArray.Int64Array.Slice.findRev?_eq_find?_reverse_toList_copy (s : Int64Array.Slice) (p : Int64 → Bool) :
Membership in slices #
@[simp]
theorem ScalarArray.Int64Array.Slice.getElem_mem {s : Int64Array.Slice} {i : Nat} (h : i < Std.Slice.size s) :
Slice equality #
@[simp]