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.

(* Specifications: *)
Lemma zip_in2 (A B : eqType) (a : A) (b : B) xs:
(a, b) \in xs -> b \in unzip2 xs.
Lemma fresh_not_in z xs : (z, fresh_id xs) \notin xs.
Module QueryProtocol.