val pts_to_length (#opened:_) (#n:US.t) (#p:perm) (bv:bv_t n) (s:repr)
  : STGhost unit opened
      (pts_to bv p s)
      (fun _ -> pts_to bv p s)
      (requires True)
      (ensures fun _ -> Seq.length s == US.v n)
let pts_to_length bv s = A.pts_to_length bv s
val pts_to_length (#opened:_) (#n:US.t) (#p:perm) (bv:bv_t n) (s:repr)
  : STGhost unit opened
      (pts_to bv p s)
      (fun _ -> pts_to bv p s)
      (requires True)
      (ensures fun _ -> Seq.length s == US.v n)
let pts_to_length bv s =
A.pts_to_length bv s
Steel.ST.BitVector.fst.checked
Steel.ST.Util.fsti.checked Steel.ST.Effect.Ghost.fsti.checked Steel.ST.Effect.fsti.checked Steel.ST.Array.fsti.checked prims.fst.checked FStar.SizeT.fsti.checked FStar.Pervasives.fsti.checked FStar.Ghost.fsti.checked
Steel.ST.BitVector.fst
Steel.Memory.inames FStar.SizeT.t Steel.FractionalPermission.perm Steel.ST.BitVector.bv_t Steel.ST.BitVector.repr Steel.ST.Array.pts_to_length Prims.bool Prims.unit
(*
   Copyright 2021 Microsoft Research

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

   Authors: Aseem Rastogi
*)

module Steel.ST.BitVector

open Steel.ST.Effect.Ghost
open Steel.ST.Effect
open Steel.ST.Util

module US = FStar.SizeT
module G = FStar.Ghost
module A = Steel.ST.Array

/// Implementation of bv_t using an array of bool

type bv_t n = a:A.array bool{A.length a == US.v n /\ A.is_full_array a}

let pts_to bv p s = A.pts_to bv p s
val pts_to_length (#opened:_) (#n:US.t) (#p:perm) (bv:bv_t n) (s:repr)
  : STGhost unit opened
      (pts_to bv p s)
      (fun _ -> pts_to bv p s)
      (requires True)
      (ensures fun _ -> Seq.length s == US.v n)
bv: Steel.ST.BitVector.bv_t n -> s: Steel.ST.BitVector.repr
  -> Steel.ST.Effect.Ghost.STGhost Prims.unit