--- Test Cases
r1 = add (1,2) (add (2,3) (add (3,4) emptyBinaryRelation))
putStrLn (toString r1)
r2 = addMultiple [(1,2),(2,3),(3,4),(4,5)] emptyBinaryRelation
putStrLn (toString r2)
r3 = addMultiple [(1,2),(2,3),(3,4),(4,5),(5,6)] emptyBinaryRelation
subRelation r2 r3
subRelation r3 r2
equal r2 r2
equal r2 r3
r4 = addMultiple [(n,n) | n <- [0..bound]] emptyBinaryRelation
reflexive r3
reflexive r4
putStrLn (toString r1)
putStrLn (toString r2)
putStrLn (toString (r1 `union` r2))
putStrLn (toString r1)
putStrLn (toString r2)
putStrLn (toString (inverse r1))
putStrLn (toString (inverse r2))
putStrLn (toString r1)
symmetric r1
symmetric (addMultiple [(2,1),(3,2),(4,3)] r1)
putStrLn (toString r1)
antiSymmetric r1
antiSymmetric (add (3,2) r1)
putStrLn (toString r1)
transitive r1
transitive (addMultiple [(1,3),(2,4),(1,4)] r1)
putStrLn (toString (reflexiveClosure r1))
putStrLn (toString r1)
putStrLn (toString (symmetricClosure r1))
putStrLn (toString r1)
putStrLn (toString (selfJoin r1))
putStrLn (toString r1)
putStrLn (toString (transitiveClosure r1))