Section SortedListEquality.
Variable A : Type.
Variable ltA : relation A.
Hypothesis ltA_trans : forall x y z, ltA x y -> ltA y z -> ltA x z.
Hypothesis ltA_not_eqA : forall x y, ltA x y -> x <> y.
Hypothesis ltA_eqA : forall x y z, ltA x y -> y = z -> ltA x z.
Hypothesis eqA_ltA : forall x y z, x = y -> ltA y z -> ltA x z.
Hint Resolve ltA_trans : core.
Hint Immediate ltA_eqA eqA_ltA : core.
Notation Inf := (lelistA ltA).
Notation Sort := (sort ltA).

Lemma Sort_In_eq : forall xs ys,
Sort xs ->
Sort ys ->
(forall a, In a xs <-> In a ys) ->
xs = ys.