val bool_of_or : #p:Type -> #q:Type -> Prims.sum p q ->
  Tot (b:bool{(b ==> p) /\ (not(b) ==> q)})
let bool_of_or #p #q t =
  match t with
  | Prims.Left  _ -> true
  | Prims.Right _ -> false
val bool_of_or : #p:Type -> #q:Type -> Prims.sum p q ->
  Tot (b:bool{(b ==> p) /\ (not(b) ==> q)})
let bool_of_or #p #q t =
match t with
| Prims.Left _ -> true
| Prims.Right _ -> false
FStar.SquashProperties.fst.checked
prims.fst.checked FStar.Squash.fsti.checked FStar.Pervasives.fsti.checked FStar.Constructive.fst.checked
FStar.SquashProperties.fst
Prims.sum Prims.bool Prims.l_and Prims.l_imp Prims.b2t Prims.op_Negation
(*
   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.SquashProperties

open FStar.Constructive

open FStar.Squash

val join_squash : #a:Type -> squash (squash a) -> GTot (squash a)
let join_squash #a s = bind_squash #(squash a) #a s (fun x -> x)

val squash_arrow : #a:Type -> #p:(a -> Type) ->
  $f:(x:a -> GTot (squash (p x))) -> GTot (squash (x:a -> GTot (p x)))
let squash_arrow #a #p f = squash_double_arrow (return_squash f)

val forall_intro : #a:Type -> #p:(a -> Type) ->
  $f:(x:a -> Lemma (p x)) -> Lemma (x:a -> GTot (p x))(* (forall (x:a). p x) *)
let forall_intro #a #p f =
  let ff : (x:a -> GTot (squash (p x))) = (fun x -> f x; get_proof (p x)) in
  give_proof #(x:a -> GTot (p x)) (squash_arrow #a #p ff)


// currently unused
// val squash_elim : a:Type -> #b:Type -> t1:b -> t2:b ->
//       (       a -> Tot (ceq t1 t2)) ->
//   Tot (squash a -> Tot (ceq t1 t2))

(* assume val tt (t:Type) : squash t *)

(* assume val squash_mem_elim : a:Type -> #b:Type -> t1:b -> t2:b -> *)
(*       (x:squash a -> t:(squash a -> Type) -> Tot (t ())) -> *)
(*   Tot (x:squash a -> t:(squash a -> Type) -> Tot (t x)) *)

(* get_proof and give_proof are phrased in terms of squash *)

(* The whole point of defining squash is to soundly allow define excluded_middle;
   here this follows from get_proof and give_proof *)

val bool_of_or : #p:Type -> #q:Type -> Prims.sum p q ->
  Tot (b:bool{(b ==> p) /\ (not(b) ==> q)})
val bool_of_or : #p:Type -> #q:Type -> Prims.sum p q ->
  Tot (b:bool{(b ==> p) /\ (not(b) ==> q)})
t: Prims.sum p q -> b: Prims.bool{(b ==> p) /\ (Prims.op_Negation b ==> q)}