Common — library smtlib-low-level-theory.theory — module DSeqArray
407
module DSeqArray
408
use map.Map
409
use int.Int
410
use DSeq
411
412
function
update_array_with_seq
(dst:map int 'a) (pos len:int) (src:seq 'a) : map int 'a =
413
(fun j -> if pos <= j < pos+len then DSeq.get src (j-pos) else dst j) No proof
414
lemma
get_update_array_with_seq
: forall dst: map int 'a. forall src pos_dst len j.
415
(update_array_with_seq dst pos_dst len src) j = if pos_dst <= j < pos_dst+len then get src (j-pos_dst) else dst j
416
417
function
update_seq_with_array
(dst:seq 'a) (pos_dst len:int) (pos_src:int) (src:map int 'a) : seq 'a
418
axiom
length_update_seq_with_array
: forall dst: seq 'a. forall src pos_dst len pos_src. length (update_seq_with_array dst pos_dst len pos_src src) = length dst
419
axiom
default_update_seq_with_array
: forall dst: seq 'a. forall src pos_dst len pos_src. default (update_seq_with_array dst pos_dst len pos_src src) = (default dst)
420
axiom
get_update_seq_with_array
: forall dst: seq 'a. forall src pos_dst len pos_src j.
421
0 <= j < length dst -> get (update_seq_with_array dst pos_dst len pos_src src) j = if pos_dst <= j < pos_dst+len then src (j-pos_dst+pos_src) else get dst j
422
423
end