diff --git a/grudge/symbolic/primitives.py b/grudge/symbolic/primitives.py
index 4f50b636aed4af53406add1d7237b73137dec466..0e57fcef6da395dbd147292624c028f5fc15451f 100644
--- a/grudge/symbolic/primitives.py
+++ b/grudge/symbolic/primitives.py
@@ -124,6 +124,18 @@ class DTAG_BOUNDARY:  # noqa
     def __init__(self, tag):
         self.tag = tag
 
+    def __eq__(self, other):
+        return isinstance(other, DTAG_BOUNDARY) and self.tag == other.tag
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __hash__(self):
+        return hash(type(self)) ^ hash(self.tag)
+
+    def __repr__(self):
+        return "<%s(%s)>" % (type(self).__name__, repr(self.tag))
+
 
 class QTAG_NONE:  # noqa
     pass