Module SSWP := WPropertiesOn SetOfSetsOfPositiveOrderedType SS.
Module SSWEqP := WEqPropertiesOn SetOfSetsOfPositiveOrderedType SS.
Module SPWEqP := WEqPropertiesOn SetOfPairsOfPositiveOrderedType SP.
Definition pick_line (s : SS.elt) (sp : SP.t) :=
SP.exists_ (fun p => (S.mem (fstpp p) s) && (S.mem (sndpp p) s)) sp.

(* Specifications: *)
Lemma proper_00 : forall s,
Proper
((fun t1 t2 : SetOfPairsOfPositiveOrderedType.t =>
Pos.eq (fstpp t1) (fstpp t2) /\ Pos.eq (sndpp t1) (sndpp t2)) ==> eq)
(fun p : SP.elt =>
S.mem (fstpp p) s && S.mem (sndpp p) s).
Lemma proper_0 :
Proper (S.Equal ==> eq ==> eq) pick_line.
Lemma proper_1 : forall s1 sp,
Proper (S.Equal ==> eq)
(fun s2 : SS.elt => pick_line (S.inter s1 s2) sp).