Theory and Application of Diagrams