let spred (#a:Type) (rel:preorder a) = p:(a -> Type){Preorder.stable p rel}
let spred (#a: Type) (rel: preorder a) =
p: (a -> Type){Preorder.stable p rel}
FStar.MRef.fsti.checked
prims.fst.checked FStar.ST.fst.checked FStar.Preorder.fst.checked FStar.Pervasives.fsti.checked FStar.Heap.fst.checked
FStar.MRef.fsti
FStar.Preorder.preorder FStar.Preorder.stable
(*
   Copyright 2008-2018 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.
*)
module FStar.MRef
open FStar.Heap
open FStar.ST

open FStar.Preorder

let stable = FStar.Preorder.stable

val token (#a:Type) (#b:preorder a) (r:mref a b) (p:(a -> Type){stable p b}) : Type0

val witness_token: #a:Type -> #b:preorder a -> m:mref a b -> p:(a -> Type){stable p b}
  -> ST unit (requires (fun h0 -> p (sel h0 m)))
            (ensures (fun h0 _ h1 -> h0==h1 /\ token m p))

val recall_token: #a:Type -> #b:preorder a -> m:mref a b -> p:(a -> Type){stable p b}
  -> ST unit (requires (fun _ ->  token m p))
            (ensures (fun h0 _ h1 -> h0==h1 /\ p (sel h1 m)))
val spred : rel: FStar.Preorder.preorder a -> Type
rel: FStar.Preorder.preorder a -> Type