Open epatters opened 3 years ago
Would something like this be helpful to implement?
CSetTransformation with elements V = 3↦2, E = 2↦3
┌────┬──────┬───┐
│ V │ refl │ → │
├────┼──────┼───┤
│ 1 │ 1 │ 2 │
│ 2 │ 3 │ 2 │
│ 3 │ 2 │ 1 │
├────┼──────┼───┤
│ 1 │ 2 │ * │
│ 2 │ 3 │ * │
└────┴──────┴───┘
┌────┬─────┬─────┬───┐
│ E │ src │ tgt │ → │
├────┼─────┼─────┤───┤
│ 1 │ 1 │ 1 │ 3 │
│ 2 │ 2 │ 2 │ 2 │
│ 3 │ 3 │ 3 │ 3 │
│ 4 │ 2 │ 1 │ 1 │
├────┼─────┼─────┤───┤
│ 1 │ 1 │ 2 │ * │
│ 2 │ 1 │ 1 │ * │
│ 3 │ 2 │ 2 │ * │
└────┴─────┴─────┴───┘
That's an interesting idea. I was thinking that for the default show
method, we would have a short and simple display mirroring the constructor, something like
ACSetTransformation((V=[...], E=[...]), [dom], [codom])
where [dom]
and [codom]
are some abbreviated representations of the domain and codomain ACSets, perhaps just showing their sizes.
But then we could also have a show
method for MIME type text/plain
with a richer, tabular display, possibly along the lines you suggest.
This would agree with the conventions on the show
method for ACSets themselves (see CSetDataStructures
).
The PR above resolves the most immediate problem but I'll this issue open because I like the idea of having a show
method for MIME type text/plain
along the lines that Kris suggests.
The default
show
method dumps all the type information and is therefore very unreadable.