# Visualizing transitive reduction of the Hasse Diagram of the integer subset lattice

I have a list of sets of integers, forming semi-lattice under inclusion relation. I need to visualize transitive reduction of the semi-lattice's Hasse Diagram. What is a good way to do this in Mathematica?

For instance, take these sets

sets = {Range[0, 5], Range[1, 2], Range[2, 3], Range[1, 2],
Range[3, 5]}


The graph should look something like this, minus the dashed lines (those are edge that get removed by transitive reduction)

sets = {Range[0, 5], Range[3], Range[1, 2], Range[2, 3], Range[1, 2],  Range[3, 5]};

vSF = Inset[Framed[NumberLinePlot[Interval[MinMax @ #2],
PlotRange -> {MinMax@sets, All}, Spacings -> 0,
PlotStyle -> Directive[AbsoluteThickness[5], Orange, CapForm["Round"]],
Ticks -> {Range @@ MinMax@sets}], RoundingRadius -> 5], #] &;

TransitiveReductionGraph[
RelationGraph[UnsameQ[##] && SubsetQ[#2, #] &, sets],
VertexShapeFunction -> vSF,
PerformanceGoal -> "Quality"]


• beautiful, thanks! Jan 23 at 6:42