From mathcomp.ssreflect
From mathcomp
From fcsl
From DiSeL
From DiSeL
Set Implicit Arguments.
Unset Strict Implicit.
Definition left_inverse {A B : Type} (op: A -> B) (inv : B -> A) :=
forall x, inv (op x) = x.
Definition fresh_id (xs : seq (nid * nat)) : nat :=
(last 0 (sort oleq (unzip2 xs))).+1.

Lemma fresh_not_in z xs : (z, fresh_id xs) \notin xs.