val rel_map3G : ('a -> 'b -> 'c -> GTot 'd) -> (double 'a) -> (double 'b) -> (double 'c) -> GTot (double 'd)
let rel_map3G f (R x1 x2) (R y1 y2) (R z1 z2) = R (f x1 y1 z1) (f x2 y2 z2)
val rel_map3G : ('a -> 'b -> 'c -> GTot 'd) -> (double 'a) -> (double 'b) -> (double 'c) -> GTot (double 'd)
let rel_map3G f (R x1 x2) (R y1 y2) (R z1 z2) =
R (f x1 y1 z1) (f x2 y2 z2)
FStar.Relational.Relational.fst.checked
prims.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.Heap.fst.checked
FStar.Relational.Relational.fst
FStar.Relational.Relational.double FStar.Pervasives.Native.Mktuple3 FStar.Relational.Relational.rel FStar.Relational.Relational.R
(*
   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.Relational.Relational
open FStar.Heap

(* Relational Type constructor (Equivalent to pairs) *)
type rel (a:Type) (b:Type) : Type =
  | R : l:a -> r:b -> rel a b

(* Some frequently used abbreviations *)
type double (t:Type) = rel t t
type eq (t:Type) = p:(double t){R?.l p == R?.r p}

let twice x = R x x
let tu = twice ()

(* functions to lift normal functions to Relational functions *)
val rel_map1T : ('a -> Tot 'b) -> (double 'a) -> Tot (double 'b)
let rel_map1T f (R x1 x2)  = R (f x1) (f x2)

val rel_map2Teq : #a:eqtype -> #b:eqtype -> #c:Type -> (a -> b -> Tot c) -> (double a) -> (double b) -> Tot (double c)
let rel_map2Teq #a #b #c f (R x1 x2) (R y1 y2) = R (f x1 y1) (f x2 y2)

val rel_map2T : ('a -> 'b -> Tot 'c) -> (double 'a) -> (double 'b) -> Tot (double 'c)
let rel_map2T f (R x1 x2) (R y1 y2) = R (f x1 y1) (f x2 y2)

val rel_map2G : ('a -> 'b -> GTot 'c) -> (double 'a) -> (double 'b) -> GTot (double 'c)
let rel_map2G f (R x1 x2) (R y1 y2) = R (f x1 y1) (f x2 y2)

val rel_map3T : ('a -> 'b -> 'c -> Tot 'd) -> (double 'a) -> (double 'b) -> (double 'c) -> Tot (double 'd)
let rel_map3T f (R x1 x2) (R y1 y2) (R z1 z2) = R (f x1 y1 z1) (f x2 y2 z2)
val rel_map3G : ('a -> 'b -> 'c -> GTot 'd) -> (double 'a) -> (double 'b) -> (double 'c) -> GTot (double 'd)

    f: (_: 'a -> _: 'b -> _: 'c -> Prims.GTot 'd) ->
    _: FStar.Relational.Relational.double 'a ->
    _: FStar.Relational.Relational.double 'b ->
    _: FStar.Relational.Relational.double 'c
  -> Prims.GTot (FStar.Relational.Relational.double 'd)