Skip to content

Commit

Permalink
chore: add a Repr for Sym2 (#14251)
Browse files Browse the repository at this point in the history
This matches the approach used by `Multiset`
  • Loading branch information
eric-wieser committed Jul 10, 2024
1 parent e242f1e commit 529a610
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Mathlib/Data/Sym/Sym2.lean
Original file line number Diff line number Diff line change
Expand Up @@ -765,4 +765,8 @@ instance [IsEmpty α] : IsEmpty (Sym2 α) :=
instance [Nontrivial α] : Nontrivial (Sym2 α) :=
diag_injective.nontrivial

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

end Sym2

0 comments on commit 529a610

Please sign in to comment.