Merge branch 'rac-incomplete-better-trace' into 'master'
[why3.git] / stdlib / function.mlw
blob0f324866421595d122bacdf2ab7a293b49be020f
2 (** {1 Injections, surjections and bijections} *)
4 module Injective
6   type a
7   type v
8   function to_ a : v
9   function from v : a
11   axiom Inj : forall x : a. from(to_ x) = x
13   goal G1 : forall x y : a. to_(x)=to_(y) -> x = y
14   goal G2 : forall y : a. exists x : v. from(x)=y
16 end
18 module Surjective
20   type a
21   type v
22   function to_ a : v
23   function from v : a
25   clone export Injective with type v = a, type a = v,
26     function to_ = from, function from = to_, axiom Inj
28 end
30 module Bijective
32   clone export Injective
33   clone Surjective as S with type v = v, type a = a,
34     function to_ = to_, function from = from, axiom Inj
36 end