let bind_ens (a:Type) (b:Type)
             (ens_f: pure_post a)
             (ens_g: a -> pure_post b)
  = fun (y:b) -> exists (x:a). ens_f x /\ ens_g x y
let bind_ens (a b: Type) (ens_f: pure_post a) (ens_g: (a -> pure_post b)) =
fun (y: b) -> exists (x: a). ens_f x /\ ens_g x y
Steel.ST.Effect.fsti.checked
Steel.Memory.fsti.checked Steel.Effect.Common.fsti.checked prims.fst.checked FStar.Tactics.fst.checked FStar.Pervasives.fsti.checked FStar.Ghost.fsti.checked
Steel.ST.Effect.fsti
Prims.pure_post Prims.l_Exists Prims.l_and Prims.logical
(*
   Copyright 2020 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 Steel.ST.Effect

(** This module provides an effect ST, a specialization of
    Steel.Effect.Steel removing selectors from the requires and
    ensures indexes *)

open Steel.Memory
open FStar.Ghost
module Mem = Steel.Memory
module T = FStar.Tactics
include Steel.Effect.Common
#set-options "--warn_error -330"  //turn off the experimental feature warning
#set-options "--ide_id_info_off"

val repr (a:Type)
         (framed:bool)
         (pre:pre_t)
         (post:post_t a)
         (req:pure_pre)
         (ens:pure_post a)
  : Type u#2

val return_ (a:Type)
            (x:a)
            (#[@@@ framing_implicit] p:a -> vprop)
  : repr a true (return_pre (p x)) p True (fun v -> v == x)

unfold
let bind_req (a:Type)
             (req_f: pure_pre)
             (ens_f: pure_post a)
             (pr:a -> prop)
             (req_g: a -> pure_pre)
  = req_f /\ (forall (x:a). ens_f x ==> pr x /\ req_g x)


unfold
let bind_ens (a:Type) (b:Type)
             (ens_f: pure_post a)
val bind_ens : a: Type -> b: Type -> ens_f: Prims.pure_post a -> ens_g: (_: a -> Prims.pure_post b) -> y: b
  -> Prims.logical
a: Type -> b: Type -> ens_f: Prims.pure_post a -> ens_g: (_: a -> Prims.pure_post b) -> y: b
  -> Prims.logical