Module Ident <: OrderedTypeFull
with Definition t := positive
with Definition lt := Plt
with Definition compare := fun x y => Pcompare x y Eq
with Definition le := Ple.
Definition t := positive.
Definition eq : t -> t -> Prop := @Logic.eq positive.
Definition eq_equiv: Equivalence eq := @eq_equivalence t. (*apply eq_equivalence. Qed.*)
Definition lt : t -> t -> Prop := Plt.
apply Positive_as_OT.lt_compat. Qed.
Definition compare: t -> t -> comparison := fun x y => Pcompare x y Eq.
apply Positive_as_OT.compare_spec. Qed.
Definition eq_dec: forall x y, {eq x y}+{~eq x y} := positive_eq_dec.
Definition le : t -> t -> Prop := Ple.
apply Positive_as_OT.le_lteq. Qed.
End Ident.
Definition minid : Ident.t := xH.
Definition id2pos: Ident.t -> positive := fun x => x.
Ltac id_compare x y :=
destruct (CompSpec2Type (Ident.compare_spec x y)).
Ltac id_comp x y H1 H2 H3 :=
destruct (CompSpec2Type (Ident.compare_spec x y)) as [H1|H2|H3].
introv H; id_comp x y H1 H2 H3; [auto|elimtype False; gen H2|gen H3];
done (tapp Ilt_morphism; rewrite H; tapp Pos.lt_irrefl).
Qed.

Lemma Ilt_irrefl : forall {x}, ~ Ident.lt x x.