Diagrams inside diagrams prepare lemon meringue pie prepared crust fill crust lemon Blend unbaked butter lemon pie Combine lemon unbaked filling sugar add pie Beat yolk meringue separate egg egg white make meringue sugar meringue
prepare lemon meringue pie unbaked prepare lemon meringue pie pie baked pie bake pie oven oven
Surprise! It’s another operad unbaked pie baked pie bake pie oven oven
Lemon Meringue Pie operad sugar ⨂ white � meringue egg � yolk ⨂ white lemon ⨂ butter ⨂ sugar ⨂ prepared crust ⨂ lemon ⨂ butter prepare lemon yolk � lemon filling ⨂ sugar ⨂ egg ⨂ sugar � meringue pie unbaked pie prepared crust ⨂ lemon filling � unbaked lemon pie unbaked lemon pie ⨂ meringue � unbaked pie
String diagrams in software architecture • Fantastic for software design • I’ve used them for years to train junior & senior developers • Modularity, boundaries
Simon Brown
Level 1
Level 1 Level 2
Level 1 Level 2 Level 3
Level 1 Level 2 Level 4 Level 3 Operad! (maybe)
Operad of wiring diagrams from “The operad of wiring diagrams: formalizing a graphical language for databases, recursion and plug-and-play circuits” by David I. Spivak (2013)
Inputs x 1 , x 2 , x 3
Input types {s,r,t} {w, x, y, z} {u, v} Output type {a,b,c,d,e}
Compositional SQL queries SELECT L.student, L.address FROM attends a1, gender g1, attends a2, gender g2, lives L WHERE a1.student=g1.student AND a2.student=g2.student AND L.student=g1.student AND a1.course=a2.course AND g1.gender=‘male’ AND g2.gender=‘female’
SELECT L.student, L.address FROM attends a1, gender g1, attends a2, gender g2, lives L WHERE a1.student=g1.student AND a2.student=g2.student AND L.student=g1.student AND a1.course=a2.course AND g1.gender=‘male’ AND g2.gender=‘female’
SELECT L.student, L.address FROM attends a1, gender g1, attends a2, gender g2, lives L WHERE a1.student=g1.student AND a2.student=g2.student AND L.student=g1.student AND a1.course=a2.course AND g1.gender=‘male’ AND g2.gender=‘female’ Constants Tables
SELECT L.student, L.address FROM attends a1, gender g1, attends a2, gender g2, lives L WHERE a1.student=g1.student AND a2.student=g2.student AND L.student=g1.student AND a1.course=a2.course AND g1.gender=‘male’ AND g2.gender=‘female’ SELECT
SELECT L.student, L.address FROM attends a1, gender g1, attends a2, gender g2, lives L WHERE a1.student=g1.student AND a2.student=g2.student AND L.student=g1.student AND a1.course=a2.course AND g1.gender=‘male’ AND g2.gender=‘female’ WHERE (wiring)
Recommend
More recommend