Carroll Diagram

Author

Eric W. Weisstein
September 1, 2026

This notebook downloaded from https://mathworld.wolfram.com/notebooks/Logic/CarrollDiagram.nb.

For more information, see Eric's MathWorld entry https://mathworld.wolfram.com/CarrollDiagram.html.

©2026 Wolfram Research, Inc. except for portions noted otherwise

Figure

A Carroll diagram classifying a set by properties P and Q.

With[
	{
		ink = LightDarkSwitched[Black, White],
		fill = {RGBColor[0.35, 0.55, 0.85, 0.18], RGBColor[0.95, 0.55, 0.25, 0.18]}
	},
	Graphics[
		{
			EdgeForm[{ink, AbsoluteThickness[1.5]}],
			{FaceForm[fill[[1]]], Rectangle[{0, 1}, {2, 2}]},
			{FaceForm[fill[[2]]], Rectangle[{0, 0}, {2, 1}]},
			Line[{{0, 0}, {2, 0}, {2, 2}, {0, 2}, {0, 0}}],
			Line[{{1, 0}, {1, 2}}],
			Line[{{0, 1}, {2, 1}}],
			MapThread[
				Text[Style[#1, 18, Italic, ink, FontFamily -> "Times"], #2] &,
				{
					{"P", "P'", "Q", "Q'"},
					{{0.5, 2.18}, {1.5, 2.18}, {-0.18, 1.5}, {-0.18, 0.5}}
				}
			],
			MapThread[
				Text[Style[#1, 17, Italic, ink, FontFamily -> "Times"], #2] &,
				{
					{TraditionalForm[HoldForm[Intersection[P, Q]]], TraditionalForm[HoldForm[Intersection[Superscript[P, ′], Q]]], TraditionalForm[HoldForm[Intersection[P, Superscript[Q, ′]]]], TraditionalForm[HoldForm[Intersection[Superscript[P, ′], Superscript[Q, ′]]]]},
					{{0.5, 1.5}, {1.5, 1.5}, {0.5, 0.5}, {1.5, 0.5}}
				}
			]
		}
	]
]