Library Stdlib.Lists.Finite
Functions on finite domains
Main result : for functions
f:A->A with finite
A,
f injective <-> f bijective <-> f surjective.
From Stdlib Require Import List ListDec.
Set Implicit Arguments.
General definitions
Finiteness is defined here via exhaustive list enumeration
In many of the following proofs, it will be convenient to have
list enumerations without duplicates. As soon as we have
decidability of equality (in Prop), this is equivalent
to the previous notion (s. lemma Finite_dec).
Injections characterized in term of lists
Surjection characterized in term of lists
Main result :
An injective and surjective function is bijective.
We need here stronger hypothesis : decidability of equality in Type.
First, we show that a surjective f has an inverse function g such that
f.g = id.
Same, with more knowledge on the inverse function: g.f = f.g = id