(.using [library [lux "*" ["_" test {"+" Test}] [abstract [monad {"+" do}]] [data ["[0]" bit ("[1]#[0]" equivalence)]] [math ["[0]" random {"+" Random}]]]] [\\library ["[0]" / {"+" Equivalence}]]) (def: .public (spec (^open "/#[0]") random) (All (_ a) (-> (Equivalence a) (Random a) Test)) (do random.monad [left random right random] (<| (_.for [/.Equivalence]) ($_ _.and (_.test "Reflexivity" (/#= left left)) (_.test "Symmetry" (bit#= (/#= left right) (/#= right left)))))))