Skip to content

Commit

Permalink
simplify array_of_list
Browse files Browse the repository at this point in the history
  • Loading branch information
W95Psp committed Aug 30, 2024
1 parent 4ebf066 commit a366ce9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions proof-libs/fstar/rust_primitives/Rust_primitives.Hax.fst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ instance update_at_tc_array t l n: update_at_tc (t_Array t l) (int_t n) = {
let (.[]<-) #self #idx {| update_at_tc self idx |} (s: self) (i: idx {f_index_pre s i})
= update_at s i

let array_of_list (#t:Type)
unfold let array_of_list (#t:Type)
(n: nat {n < maxint Lib.IntTypes.U16})
(l: list t {FStar.List.Tot.length l == n})
: t_Array t (sz n) = Rust_primitives.Arrays.of_list #t l
: t_Array t (sz n)
= Seq.seq_of_list l

0 comments on commit a366ce9

Please sign in to comment.