Added preliminary version of transitive_reduction. This has no test or documentation, and needs to be thoroughly reviewed.