Live data from Hacker News

Quiver: A Modern Commutative Diagram Editor

github.com

1–10 of 40 posts

Re: Quiver: A Modern Commutative Diagram Editor

#3

Can anyone explain what "commutative and pasting diagrams" are to a humble (and not very good) software writer? The Wikipedia page was too abstract for me to understand at a basic level [0]. [0]: https://en.wikipedia.org/wiki/Commutative_diagram

Its a way of demonstrating that two paths through a diagram are in some sense equal. The dots in the corners are objects and the arrows are morphisms.

To keep this simple just imagine the objects are types and the arrows are functions between those types.

You start out in the upper left corner and walk through the two paths checking the types as you go along. If the diagram typechecks correctly then it is said to commute and the two paths are in some sense equivalent. The specific sense depends on a bunch of details elided here.

Re: Quiver: A Modern Commutative Diagram Editor

#4

Can anyone explain what "commutative and pasting diagrams" are to a humble (and not very good) software writer? The Wikipedia page was too abstract for me to understand at a basic level [0]. [0]: https://en.wikipedia.org/wiki/Commutative_diagram

A commutative diagram is just a collection of nodes and directed edges between nodes (aka, a directed graph), but it's a directed graph along with the claim that any two paths in this graph which start at the same node and end at the same node are to be considered equivalent, in some sense.

In general, a directed (multi)graph along with an account of which of its paths are and are not to be considered equivalent to each other (where this equivalence relation satisfies some basic nice properties) is known as a "category". This concept comes up ubiquitously in math/abstract logic/etc. Commutative diagrams are useful for quickly visually reasoning about equivalences of paths in such contexts.

Re: Quiver: A Modern Commutative Diagram Editor

#5

Can anyone explain what "commutative and pasting diagrams" are to a humble (and not very good) software writer? The Wikipedia page was too abstract for me to understand at a basic level [0]. [0]: https://en.wikipedia.org/wiki/Commutative_diagram

They're just a nice way of writing equations between functions (or other things that compose like functions).

This is a picture of a function f that takes inputs from A and produces outputs in B

    f
  A → B
and this diagram

    f
  A → B
    ↘ ↓ g
   h  C
just means g ∘ f = h, ie. doing f then g is the same as doing h. Since you write the domain and codomain of each function, it makes it easier to see when the functions can compose (ie. when it type checks).

Because paths through a diagram themselves compose like functions do, this notation turns out to be very natural. For example, associativity is inherent in the notation: A→B→C→D is the only way to express the composition of three functions, you can't even write the difference between (f∘g)∘h and f∘(g∘h).

Re: Quiver: A Modern Commutative Diagram Editor

#7
post #4

Can anyone explain what "commutative and pasting diagrams" are to a humble (and not very good) software writer? The Wikipedia page was too abstract for me to understand at a basic level [0]. [0]: https://en.wikipedia.org/wiki/Commutative_diagram

A commutative diagram is just a collection of nodes and directed edges between nodes (aka, a directed graph), but it's a directed graph along with the claim that any two paths in this graph which start at the same node and end at the same node are to be considered equivalent, in some sense. In general, a directed (multi)graph along with an account of which of its paths are and are not to be considered equivalent to e…

Note that Quiver isn't really a tool just for drawing "commutative diagrams". It's a tool for drawing any labeled system of nodes and edges/arrows between nodes, whether or not this is to be interpreted as a commutative diagram. (It also allows drawing arrows which start or end at other arrows, rather than at nodes).

It has various features to control and adjust these diagrams to be visually pleasing, by changing sizing/spacing/curviness/arrow style/etc of the elements within these diagrams. This is all much more convenient in its WYSIWYG interface than manually planning and coding these figures in LaTeX, as had previously been the standard way to create them for mathematical papers.

Re: Quiver: A Modern Commutative Diagram Editor

#9
This tool is fantastic! I was able to generate a Fourier-Poisson cube [0] in about 10 minutes, and the UI is incredibly intuitive.

The focus on commutative diagrams, rather than a free-form canvas, is a brilliant design choice that keeps it clean and easy to use. I wish I'd had this during my thesis; it would have saved so much time.

[0] https://q.uiver.app/#q=WzAsOCxbMCwxLCJnIFxcdGV4dHsgb24gfVxcb...

Re: Quiver: A Modern Commutative Diagram Editor

#10

Can anyone explain what "commutative and pasting diagrams" are to a humble (and not very good) software writer? The Wikipedia page was too abstract for me to understand at a basic level [0]. [0]: https://en.wikipedia.org/wiki/Commutative_diagram

It would help if you read the definition of a category. It is very abstract but also pretty simple with just a couple of axioms.

An example of a category is the "sets and functions" category. In that category, every conceivable set lives as an object (node) and every conceivable function between any two sets lives as an arrow between these two sets.

So, you can take an arrow from A to B and one from B to C and compose them like you would do with functions to get a function from A to C.

A commutative diagram would then be a subset of the whole category, where following all depicted paths between two sets X and Y would yield the same function if for each path you composed all the arrows belonging to it.

I haven't read anything on higher categories so I am not sure about pasting diagrams, but they are probably something along these lines, generalized in some way.

Post reply on HN