relation :: ( Ix a, Ix b ) => ((a,b),(a,b)) -> SAT ( Relation a b ) instance (Ix a, Ix b) => Decode ( Relation a b ) ( Array (a,b) Bool ) ... product :: ( Ix a , Ix b, Enum b, Ix c ) => Relation a b -> Relation b c -> SAT ( Relation a c ) transitive :: ( Enum a, Ix a ) => Relation a a -> SAT Boolean transitive r = do r2 <- product r r implies r2 r