Skip to content

Commit 529a610

Browse files
committed
chore: add a Repr for Sym2 (#14251)
This matches the approach used by `Multiset`
1 parent e242f1e commit 529a610

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Mathlib/Data/Sym/Sym2.lean

+4
Original file line numberDiff line numberDiff line change
@@ -765,4 +765,8 @@ instance [IsEmpty α] : IsEmpty (Sym2 α) :=
765765
instance [Nontrivial α] : Nontrivial (Sym2 α) :=
766766
diag_injective.nontrivial
767767

768+
-- TODO: use a sort order if available, https://github.com/leanprover-community/mathlib/issues/18166
769+
unsafe instance [Repr α] : Repr (Sym2 α) where
770+
reprPrec s _ := f!"s({repr s.unquot.1}, {repr s.unquot.2})"
771+
768772
end Sym2

0 commit comments

Comments
 (0)