Section Bijection.
Variable X Y : Type.
(* *      f *   ------> * X         Y *   <------ *      g *)
Definition left_inverse  (f : X -> Y) (g : Y -> X) := forall x : X, g (f x) = x.
Definition right_inverse (f : X -> Y) (g : Y -> X) := forall y : Y, f (g y) = y.
Definition inverse (f : X -> Y) (g : Y -> X) := left_inverse f g /\ right_inverse f g.
Definition injective (f : X -> Y) :=
forall x y, f x = f y -> x = y.
Definition surjective (f : X -> Y) :=
forall y, exists x, f x = y.

Lemma right_inv_surjective f g :
right_inverse f g -> surjective f.