val bind_wp (#a #b: Type) (wp1: pure_wp a) (wp2: (a -> pure_wp b)) : pure_wp b
val bind_wp (#a #b: Type) (wp1: pure_wp a) (wp2: (a -> pure_wp b)) : pure_wp b
let bind_wp (#a #b:Type) (wp1:pure_wp a) (wp2:a -> pure_wp b) : pure_wp b =
  elim_pure_wp_monotonicity_forall ();
  as_pure_wp (fun p -> wp1 (fun x -> wp2 x p))
(*
   Copyright 2008-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.
*)

module IteSoundness

(*
 * This module intentionally admits goals etc., so silence warnings
 *)
#set-options "--warn_error -274 --warn_error -296 --warn_error -242"

(*
 * This module provides unit tests for checking the soundness of the layered
 *   effects if-then-else combinator using a tactic
 *)

open FStar.Tactics.V2

let unit : Type0 = unit
irreducible let an_attr : unit = ()

(*
 * First a layer over PURE
 * This works without the tactic too, but just to illustrate
 *)

type repr (a:Type) (wp:pure_wp a) = unit -> PURE a wp

open FStar.Monotonic.Pure

unfold
let return_wp (#a:Type) (x:a) : pure_wp a = as_pure_wp (fun p -> p x)
let return (a:Type) (x:a) : repr a (return_wp x) = fun () -> x
/
prims.fst.checked FStar.Tactics.V2.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.Monotonic.Pure.fst.checked
IteSoundness.fst
wp1: Prims.pure_wp a -> wp2: (_: a -> Prims.pure_wp b) -> Prims.pure_wp b
Prims.pure_wp FStar.Monotonic.Pure.as_pure_wp Prims.pure_post Prims.l_True Prims.pure_pre Prims.unit FStar.Monotonic.Pure.elim_pure_wp_monotonicity_forall
let bind_wp (#a #b: Type) (wp1: pure_wp a) (wp2: (a -> pure_wp b)) : pure_wp b =
  
elim_pure_wp_monotonicity_forall ();
as_pure_wp (fun p -> wp1 (fun x -> wp2 x p))