mirror of
https://github.com/AdaCore/why3.git
synced 2026-02-12 12:34:55 -08:00
Clone "with axiom ." or "with goal ." to change the default
("with lemma ." is also accepted, just in case).
34 lines
586 B
Plaintext
34 lines
586 B
Plaintext
module Injective
|
|
|
|
type a
|
|
type v
|
|
function to_ a : v
|
|
function from v : a
|
|
|
|
axiom Inj : forall x : a. from(to_ x) = x
|
|
|
|
goal G1 : forall x y : a. to_(x)=to_(y) -> x = y
|
|
goal G2 : forall y : a. exists x : v. from(x)=y
|
|
|
|
end
|
|
|
|
module Surjective
|
|
|
|
type a
|
|
type v
|
|
function to_ a : v
|
|
function from v : a
|
|
|
|
clone export Injective with type v = a, type a = v,
|
|
function to_ = from, function from = to_, axiom Inj
|
|
|
|
end
|
|
|
|
module Bijective
|
|
|
|
clone export Injective
|
|
clone Surjective as S with type v = v, type a = a,
|
|
function to_ = to_, function from = from, axiom Inj
|
|
|
|
end
|