Module SSPWEqP := WEqPropertiesOn SetOfSetsOfPairsOfPositiveOrderedType SSP.
Definition exists_witness (f : SSP.elt -> bool) (s : SSP.t) : option SSP.elt :=
SSP.choose (SSP.filter f s).

Lemma exists_witness_ok : forall e f s,
Proper (SP.Equal ==> eq) f ->
exists_witness f s = Some e -> SSP.In e s.