aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/bij.mli
blob: e67db5364cffc70209148ae2aa62ec98b41914ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(***********************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team    *)
(* <O___,, *        INRIA-Rocquencourt  &  LRI-CNRS-Orsay              *)
(*   \VV/  *************************************************************)
(*    //   *      This file is distributed under the terms of the      *)
(*         *       GNU Lesser General Public License Version 2.1       *)
(***********************************************************************)

(*i $Id$ i*)

(* Bijections. *)

type ('a,'b) t

val empty : ('a,'b) t
val map : ('a,'b) t -> 'a -> 'b
val pam : ('a,'b) t -> 'b -> 'a
val dom : ('a,'b) t -> 'a list
val rng : ('a,'b) t -> 'b list
val in_dom : ('a,'b) t -> 'a -> bool
val in_rng : ('a,'b) t -> 'b -> bool
val app : ('a -> 'b -> unit) -> ('a,'b) t -> unit
val to_list : ('a,'b) t -> ('a * 'b) list

val add : ('a,'b) t -> 'a * 'b -> ('a,'b) t
val remove : ('a,'b) t -> 'a -> ('a,'b) t