Function vstd::seq_lib::lemma_seq_take_update_commut2

source ·
pub proof fn lemma_seq_take_update_commut2<A>(s: Seq<A>, i: int, v: A, n: int)
Expand description
ensures
0 <= n <= i < s.len() ==> #[trigger] s.update(i, v).take(n) =~= s.take(n),

If i is a valid index after the first n indices of sequence s, updating sequence s at index i with value v and then taking the first n elements is equivalent to just taking the first n elements of s without the update.