String diagram: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
→‎Algebraically: control character error msg
Edit intro. Add List of applications.
Line 1: Line 1:
'''String diagrams''' are a formal graphical language for representing [[morphisms]] in [[monoidal categories]], or more generally 2-cells in [[2-categories]].
'''String diagrams''' are a formal graphical language for representing [[morphisms]] in [[monoidal categories]], or more generally 2-cells in [[2-categories]]. They are a prominent tool in [[applied category theory]]. When interpreted in the monoidal category of [[vector spaces]] and [[Linear map|linear maps]] with the [[tensor product]], string diagrams are called [[Tensor network|tensor networks]] or [[Penrose graphical notation]]. This has led to the development of [[categorical quantum mechanics]] where the axioms of quantum theory are expressed in the language of monoidal categories.

When interpreted in the monoidal category of [[vector spaces]] and [[Linear map|linear maps]] with the [[tensor product]], string diagrams are called [[Tensor network|tensor networks]] or [[Penrose graphical notation]].


== History ==
== History ==
Line 141: Line 139:


Morphisms in [[monoidal category|monoidal categories]] can also be drawn as string diagrams <ref>{{Cite journal| doi = 10.1016/0001-8708(91)90003-P| issn = 0001-8708| volume = 88| issue = 1| pages = 55–112| last1 = Joyal| first1 = André| last2 = Street| first2 = Ross| title = The geometry of tensor calculus, I| journal = [[Advances in Mathematics]]| year = 1991|url=https://core.ac.uk/download/pdf/82659437.pdf| doi-access = free}}</ref> since a strict monoidal category can be seen as a [[2-category]] with only one object (there will therefore be only one type of planar region) and Mac Lane's strictification theorem states that any monoidal category is monoidally equivalent to a strict one. The graphical language of string diagrams for monoidal categories may be extended to represent expressions in categories with other structure, such as [[braided monoidal categories]], [[dagger categories]],<ref>{{Cite book| publisher = Springer Berlin Heidelberg| isbn = 978-3-642-12820-2| pages = 289–355|editor1= Bob Coecke | last = Selinger| first = P.| title = New Structures for Physics| volume = 813| chapter = A Survey of Graphical Languages for Monoidal Categories| series = Lecture Notes in Physics| date = 2010|arxiv=0908.3347| bibcode = 2009arXiv0908.3347S| doi = 10.1007/978-3-642-12821-9_4|chapter-url=https://core.ac.uk/download/pdf/21747055.pdf}}</ref> etc. and is related to geometric presentations for [[braided monoidal categories]]<ref>{{Cite journal| doi = 10.1006/aima.1993.1055| issn = 0001-8708| volume = 102| issue = 1| pages = 20–78| last1 = Joyal| first1 = A.| last2 = Street| first2 = R.| title = Braided Tensor Categories| journal = [[Advances in Mathematics]]| year = 1993| doi-access = free}}</ref> and [[Braided monoidal categories#Ribbon categories|ribbon categories]].<ref>{{Cite journal| doi = 10.1016/0022-4049(92)00039-T| issn = 0022-4049| volume = 93| issue = 1| pages = 57–110| last = Shum| first = Mei Chee| title = Tortile tensor categories| journal = Journal of Pure and Applied Algebra| date = 1994-04-11| doi-access = free}}</ref> In [[quantum computing]], there are several diagrammatic languages based on string diagrams for reasoning about linear maps between [[qubit]]s, the most well-known of which is the [[ZX-calculus]].
Morphisms in [[monoidal category|monoidal categories]] can also be drawn as string diagrams <ref>{{Cite journal| doi = 10.1016/0001-8708(91)90003-P| issn = 0001-8708| volume = 88| issue = 1| pages = 55–112| last1 = Joyal| first1 = André| last2 = Street| first2 = Ross| title = The geometry of tensor calculus, I| journal = [[Advances in Mathematics]]| year = 1991|url=https://core.ac.uk/download/pdf/82659437.pdf| doi-access = free}}</ref> since a strict monoidal category can be seen as a [[2-category]] with only one object (there will therefore be only one type of planar region) and Mac Lane's strictification theorem states that any monoidal category is monoidally equivalent to a strict one. The graphical language of string diagrams for monoidal categories may be extended to represent expressions in categories with other structure, such as [[braided monoidal categories]], [[dagger categories]],<ref>{{Cite book| publisher = Springer Berlin Heidelberg| isbn = 978-3-642-12820-2| pages = 289–355|editor1= Bob Coecke | last = Selinger| first = P.| title = New Structures for Physics| volume = 813| chapter = A Survey of Graphical Languages for Monoidal Categories| series = Lecture Notes in Physics| date = 2010|arxiv=0908.3347| bibcode = 2009arXiv0908.3347S| doi = 10.1007/978-3-642-12821-9_4|chapter-url=https://core.ac.uk/download/pdf/21747055.pdf}}</ref> etc. and is related to geometric presentations for [[braided monoidal categories]]<ref>{{Cite journal| doi = 10.1006/aima.1993.1055| issn = 0001-8708| volume = 102| issue = 1| pages = 20–78| last1 = Joyal| first1 = A.| last2 = Street| first2 = R.| title = Braided Tensor Categories| journal = [[Advances in Mathematics]]| year = 1993| doi-access = free}}</ref> and [[Braided monoidal categories#Ribbon categories|ribbon categories]].<ref>{{Cite journal| doi = 10.1016/0022-4049(92)00039-T| issn = 0022-4049| volume = 93| issue = 1| pages = 57–110| last = Shum| first = Mei Chee| title = Tortile tensor categories| journal = Journal of Pure and Applied Algebra| date = 1994-04-11| doi-access = free}}</ref> In [[quantum computing]], there are several diagrammatic languages based on string diagrams for reasoning about linear maps between [[qubit]]s, the most well-known of which is the [[ZX-calculus]].

== List of applications ==
String diagrams have been used to formalise the following objects of study.

* [[Artificial neural networks]]<ref>{{Cite journal |last=Fong |first=Brendan |last2=Spivak |first2=David I. |last3=Tuyéras |first3=Rémy |date=2019-05-01 |title=Backprop as Functor: A compositional perspective on supervised learning |url=http://arxiv.org/abs/1711.10455 |journal=arXiv:1711.10455 [cs, math]}}</ref>
* [[Game theory]]<ref>{{Cite journal |last=Ghani |first=Neil |last2=Hedges |first2=Jules |last3=Winschel |first3=Viktor |last4=Zahn |first4=Philipp |date=2018 |title=Compositional game theory |url=https://scholar.googleusercontent.com/scholar.bib?q=info:LGUG3U6Bp-kJ:scholar.google.com/&output=citation&scisdr=CgUx7uJgEJT6uf13NIw:AAGBfm0AAAAAY2txLIzGMVUpg6_ihwN2dU8PIuIpMG-4&scisig=AAGBfm0AAAAAY2txLO2TG0gZXx2xxpt2AfWUrr5KIziD&scisf=4&ct=citation&cd=-1&hl=en |journal=Proceedings of the 33rd annual ACM/IEEE symposium on logic in computer science |pages=472–481}}</ref>
* [[Markov kernel|Markov kernels]]<ref>{{Cite journal |last=Fritz |first=Tobias |date=2020-08 |title=A synthetic approach to Markov kernels, conditional independence and theorems on sufficient statistics |url=http://arxiv.org/abs/1908.07021 |journal=Advances in Mathematics |volume=370 |pages=107239 |doi=10.1016/j.aim.2020.107239}}</ref>
* [[Signal-flow graph|Signal-flow graphs]]<ref>{{Cite journal |last=Bonchi |first=Filippo |last2=Sobociński |first2=Pawel |last3=Zanasi |first3=Fabio |date=2014-09 |title=A Categorical Semantics of Signal Flow Graphs |url=https://hal.archives-ouvertes.fr/hal-02134182 |journal=CONCUR 2014 - Concurrency Theory - 25th International Conference |location=Rome, Italy |volume=CONCUR 2014 - Concurrency Theory - 25th International Conference}}</ref>
* [[Conjunctive query|Conjunctive queries]]<ref>{{Cite journal |last=Bonchi |first=Filippo |last2=Seeber |first2=Jens |last3=Sobocinski |first3=Pawel |date=2018-04-20 |title=Graphical Conjunctive Queries |url=http://arxiv.org/abs/1804.07626 |journal=arXiv:1804.07626 [cs]}}</ref>
* [[Bidirectional transformation|Bidirectional transformations]]<ref>{{Cite journal |last=Riley |first=Mitchell |date=2018 |title=Categories of optics |url=https://scholar.googleusercontent.com/scholar.bib?q=info:SSwG6oPucOgJ:scholar.google.com/&output=citation&scisdr=CgUx7uJgEJT6uf113uI:AAGBfm0AAAAAY2tzxuIKxdPNKUcUCAzqaLqvgD4yhf4X&scisig=AAGBfm0AAAAAY2tzxo0oD9W4TwOx6iadXr1KyGzErG3-&scisf=4&ct=citation&cd=-1&hl=en |journal=arXiv preprint arXiv:1809.00738}}</ref>
* [[Quantum circuit|Quantum circuits]], [[measurement-based quantum computing]] and [[quantum error correction]], see [[ZX-calculus]]
* [[Natural language processing]] and [[Draft:Quantum natural language processing|quantum natural language processing]], see [[Draft:DisCoCat|DisCoCat]]


== External links ==
== External links ==

Revision as of 09:28, 9 November 2022

String diagrams are a formal graphical language for representing morphisms in monoidal categories, or more generally 2-cells in 2-categories. They are a prominent tool in applied category theory. When interpreted in the monoidal category of vector spaces and linear maps with the tensor product, string diagrams are called tensor networks or Penrose graphical notation. This has led to the development of categorical quantum mechanics where the axioms of quantum theory are expressed in the language of monoidal categories.

History

Günter Hotz gave the first mathematical definition of string diagrams in order to formalise electronic circuits,[1] but the article remained confidential because of the absence of an English translation. The invention of string diagrams is usually credited to Roger Penrose[2] with Feynman diagrams also described as a precursor.[3] They were later characterised as the arrows of free monoidal categories in a seminal article by André Joyal and Ross Street.[4] While the diagrams in these first articles were hand-drawn, the advent of typesetting software such as LaTeX and PGF/TikZ made the publication of string diagrams more wide-spread.[5]

The existential graphs of Charles Sanders Peirce are arguably the oldest form of string diagrams, they are interpreted in the monoidal category of finite sets and relations with the Cartesian product.[6] The lines of identity of Peirce's existential graphs can be axiomatised as a Frobenius algebra, the cuts are unary operators on homsets that axiomatise logical negation. This makes string diagrams a sound and complete two-dimensional deduction system for first-order logic,[7] invented independently from the one-dimensional syntax of Gottlob Frege's Begriffsschrift.

Definition

Algebraically

Let the Kleene star denote the free monoid, i.e. the set of lists with elements in a set . A monoidal signature is given by:

  • a set of generating objects, the lists of generating objects in are also called types,
  • a set of generating arrows, also called boxes,
  • a pair of functions which assign a domain and codomain to each box, i.e. the input and output types.

A morphism of monoidal signature is a pair of functions and which is compatible with the domain and codomain, i.e. such that and . Thus we get the category of monoidal signatures and their morphisms.

There is a forgetful functor which sends a monoidal category to its underlying signature and a monoidal functor to its underlying morphism of signatures, i.e. it forgets the identity, composition and tensor. The free functor , i.e. the left adjoint to the forgetful functor, sends a monoidal signature to the free monoidal category it generates. String diagrams are arrows in this free monoidal category.[8]

Geometrically

A topological graph, also called a one-dimensional cell complex, is a tuple of a Hausdorff space , a closed discrete subset of nodes and a set of connected components called edges, each homeomorphic to an open interval with boundary in and such that .

A planar graph between two real numbers with is a finite topological graph embedded in such that every point is also a node and belongs to the closure of exactly one edge in . Such points are called outer nodes, they define the domain and codomain of the string diagram, i.e. the list of edges that are connected to the left and right boundary.

A planar graph is progressive, also called recumbent, when the first projection is injective for every edge . Intuitively, the edges in a progressive planar graph go from left to right without bending backward. The points are called inner nodes, they also have a domain and codomain given by the list of edges that have the node as boundary.

A progressive planar graph is labeled by a monoidal signature if it comes equipped with a pair of functions and which are compatible with domain and codomain.

A deformation of planar graphs is a continuous map such that

  • the image of defines a planar graph for all ,
  • for all , if is an inner node for some it is inner for all .

A deformation is progressive if is progressive for all . Deformations induce an equivalence relation with if and only if there is some with and . String diagrams are equivalence classes of labeled progressive planar graphs.

Extension to 2-categories

The idea is to represent structures of dimension d by structures of dimension 2-d, using Poincaré duality. Thus,

  • an object is represented by a portion of plane,
  • a 1-cell is represented by a vertical segment—called a string—separating the plane in two (the right part corresponding to A and the left one to B),
  • a 2-cell is represented by an intersection of strings (the strings corresponding to f above the link, the strings corresponding to g below the link).

The parallel composition of 2-cells corresponds to the horizontal juxtaposition of diagrams and the sequential composition to the vertical juxtaposition of diagrams.

Duality between commutative diagrams and string diagrams.
Duality between commutative diagrams (on the left hand side) and string diagrams (on the right hand side)

Example

Consider an adjunction between two categories and where is left adjoint of and the natural transformations and are respectively the unit and the counit. The string diagrams corresponding to these natural transformations are:

String diagram of the unit
String diagram of the unit
String diagram of the counit
String diagram of the counit
String diagram of the identity 2-cell
String diagram of the identity

The string corresponding to the identity functor is drawn as a dotted line and can be omitted. The definition of an adjunction requires the following equalities:

The first one is depicted as

Diagrammatic representation of the equality
Diagrammatic representation of the equality

Other diagrammatic languages

Morphisms in monoidal categories can also be drawn as string diagrams [9] since a strict monoidal category can be seen as a 2-category with only one object (there will therefore be only one type of planar region) and Mac Lane's strictification theorem states that any monoidal category is monoidally equivalent to a strict one. The graphical language of string diagrams for monoidal categories may be extended to represent expressions in categories with other structure, such as braided monoidal categories, dagger categories,[10] etc. and is related to geometric presentations for braided monoidal categories[11] and ribbon categories.[12] In quantum computing, there are several diagrammatic languages based on string diagrams for reasoning about linear maps between qubits, the most well-known of which is the ZX-calculus.

List of applications

String diagrams have been used to formalise the following objects of study.

External links

  • TheCatsters (2007). String diagrams 1 (streamed video). Youtube. Archived from the original on 2021-12-19.
  • String diagrams at the nLab

References

  1. ^ Hotz, Günter (1965). "Eine Algebraisierung des Syntheseproblems von Schaltkreisen I." Elektronische Informationsverarbeitung und Kybernetik. 1 (3): 185–205.
  2. ^ Penrose, Roger (1971). "Applications of negative dimensional tensors". Combinatorial mathematics and its applications. 1: 221–244.
  3. ^ Baez, J.; Stay, M. (2011), Coecke, Bob (ed.), "Physics, Topology, Logic and Computation: A Rosetta Stone", New Structures for Physics, Berlin, Heidelberg: Springer, pp. 95–172, doi:10.1007/978-3-642-12821-9_2, ISBN 978-3-642-12821-9, retrieved 2022-11-08
  4. ^ Joyal, André; Street, Ross (1991). "The geometry of tensor calculus, I". Advances in mathematics. 88 (1): 55–112.
  5. ^ Selinger, Peter (2010), "A survey of graphical languages for monoidal categories", New structures for physics, Springer, pp. 289–355, retrieved 2022-11-08
  6. ^ Brady, Geraldine; Trimble, Todd H (2000). "A categorical interpretation of CS Peirce's propositional logic Alpha". Journal of Pure and Applied Algebra. 149 (3): 213–239.
  7. ^ Haydon, Nathan; Sobociński, Pawe\l (2020). "Compositional diagrammatic first-order logic". International Conference on Theory and Application of Diagrams. Springer: 402–418.
  8. ^ Joyal, André; Street, Ross (1988). "Planar diagrams and tensor algebra". Unpublished manuscript, available from Ross Street's website.
  9. ^ Joyal, André; Street, Ross (1991). "The geometry of tensor calculus, I" (PDF). Advances in Mathematics. 88 (1): 55–112. doi:10.1016/0001-8708(91)90003-P. ISSN 0001-8708.
  10. ^ Selinger, P. (2010). "A Survey of Graphical Languages for Monoidal Categories" (PDF). In Bob Coecke (ed.). New Structures for Physics. Lecture Notes in Physics. Vol. 813. Springer Berlin Heidelberg. pp. 289–355. arXiv:0908.3347. Bibcode:2009arXiv0908.3347S. doi:10.1007/978-3-642-12821-9_4. ISBN 978-3-642-12820-2.
  11. ^ Joyal, A.; Street, R. (1993). "Braided Tensor Categories". Advances in Mathematics. 102 (1): 20–78. doi:10.1006/aima.1993.1055. ISSN 0001-8708.
  12. ^ Shum, Mei Chee (1994-04-11). "Tortile tensor categories". Journal of Pure and Applied Algebra. 93 (1): 57–110. doi:10.1016/0022-4049(92)00039-T. ISSN 0022-4049.
  13. ^ Fong, Brendan; Spivak, David I.; Tuyéras, Rémy (2019-05-01). "Backprop as Functor: A compositional perspective on supervised learning". arXiv:1711.10455 [cs, math].
  14. ^ Ghani, Neil; Hedges, Jules; Winschel, Viktor; Zahn, Philipp (2018). "Compositional game theory". Proceedings of the 33rd annual ACM/IEEE symposium on logic in computer science: 472–481.
  15. ^ Fritz, Tobias (2020-08). "A synthetic approach to Markov kernels, conditional independence and theorems on sufficient statistics". Advances in Mathematics. 370: 107239. doi:10.1016/j.aim.2020.107239. {{cite journal}}: Check date values in: |date= (help)
  16. ^ Bonchi, Filippo; Sobociński, Pawel; Zanasi, Fabio (2014-09). "A Categorical Semantics of Signal Flow Graphs". CONCUR 2014 - Concurrency Theory - 25th International Conference. CONCUR 2014 - Concurrency Theory - 25th International Conference. Rome, Italy. {{cite journal}}: Check date values in: |date= (help)
  17. ^ Bonchi, Filippo; Seeber, Jens; Sobocinski, Pawel (2018-04-20). "Graphical Conjunctive Queries". arXiv:1804.07626 [cs].
  18. ^ Riley, Mitchell (2018). "Categories of optics". arXiv preprint arXiv:1809.00738.

External links