Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Applied category theory
The emerging science of compositionality @KenScambler
Category theory
From “Seven Sketches of Compositionality”
Fong & Spivak (2018)
Applied category theory
prepare lemon meringue pie
make
lem...
Applied category theory
• Emerging field!
• Explosion of papers, research, development in last 5 years
• Builds a common v...
Brand new ACT Journal
Brand new ACT Book
ACT Topics & papers
Q: Is functional programming applied
category theory?
Q: Is functional programming applied
category theory?
A: Yes! (…arguably)
Plan
• I want to put applied category theory on your roadmap
• The big idea: compositionality
• Case study: Complex adapti...
Compositionality
The meaning of a complex expression is determined by:
1. The meaning of the constituent parts
2. The rules for how those p...
Making big things
Compositionality lets us
Making big things
out of little things
Compositionality lets us
Compositionality lets us
Making big things
out of little things
preserving guarantees
Compositionality applied
• Little programs that work
BIG programs that work?
• Little electric circuits that work
BIG elec...
Compositionality distilled - monoids
c d
e
f
h
j
a
b
i
g
a b
a b
Compose any two
ab
Associativity – no need for brackets
a b c
Associativity – no need for brackets
a b c
Associativity – no need for brackets
a b c
Associativity – no need for brackets
a b c
Associativity – no need for brackets
abc
With associativity
abc = a b c
Just the sum of
its parts with
Without associativity
+ orabc = a b c
Uh-oh! We need
external data
Identity – doesn’t do anything when you
compose
a
Identity – doesn’t do anything when you
compose
a
Identity – doesn’t do anything when you
compose
a
Compositionality distilled - categories
c d
e
f
h
j
a
b
i
g
a b
The building
blocks are called
morphisms
The colours are
called objects
a b
Can only
compose when
the colours match
ab
The middle bit
disappears
a b
Associativity – no need for brackets
c
a b
Associativity – no need for brackets
c
a b
Associativity – no need for brackets
c
a b
Associativity – no need for brackets
c
abc
Associativity – no need for brackets
a
Identities – don’t do anything when you
compose
a
Identities – don’t do anything when you
compose
a
Identities – don’t do anything when you
compose
Case study: Complex Adaptive System Design
from
“Complex Adaptive System Design” blog posts by John C. Baez
(2016-2019)
“N...
Military research: search & rescue
• Systems of systems
• Many different kinds of networks
• Complex realtime behaviour
• ...
Helo
1
Target
1Port
1
Helicopter knows
the target and
home base
In comms
range
In comms
range
My port
Intent to rescue
Helo
1
UAV
1
Target
1
UAV knows the
target, and the
helicopter as a
home base
In comms
range
Intent to rescue
My port
Overlay the
networks
We now have a
bigger network
working together
Helo
1
Target
1Port
1
My port
Intent to rescue
UAV
1
My...
Helo
network
UAV
network
Overlaying is monoidal; you
can always overlay
Helo
network
UAV
network
Overlaying is monoidal; you
can always overlay
over
lay
Combined
network
Overlaying is monoidal; you
can always overlay
How to sew together unrelated networks?
Helo
1
UAV
1
Target
1
UAV
2
UAV
3
UAV
5
Rescue-Scene
UAV
4
In comms
range
In comms...
1 2
3
4 5
6 7
8
9
How to sew together unrelated networks?
“Take 3 networks of 3, 4
and 2 vertices; return a
network of 9 v...
Helo
1
UAV
1
Target
1
UAV
2
UAV
3
UAV
5
UAV
4
In comms
range
In comms
rangeHelo
2
In comms
range
Intent to
rescue
My port
...
Is that a category?
Network-1 Network-2 Network-3
Nope!
You can’t compose the
networks themselves.
Network-1 Network-2 Network-3
Morphisms with lots of inputs?
The ”type” is the number
of vertices expected in
subnetworks
“Take 3 networks of 3, 4 and
2...
Compositionality distilled – operads
a
c
b
d
a
cb
a
cb
a
cb
a
cb
abc
a
a
a
a
Obvious example: types & functions
receiveInvoice
User
Invoice
Signature
Receipt
storeReceipt
Receipt
Shoebox
Shoebox
logi...
receiveInvoiceInvoice
Signature
storeReceipt
Shoebox
Shoebox
login
Username
Password
Invoice
Signature
fullInvoiceFlow
Shoebox
Shoebox
Username
Password
def fullInvoiceFlow(username,
password,
invoice,
signa...
Mapping it to reality
Helicopter
Port
UAV
Target
my port
Intent to rescue
Comms channel
Havana
Rescue-Scene
UAV-Search-Net...
Mapping it to reality
Helicopter
Port
UAV
Target
my port
Intent to rescue
Comms channel
Havana Rescue-Scene := ...
UAV-Sea...
From “Seven Sketches of Compositionality”
Fong & Spivak (2018)
String diagrams
prepare lemon meringue pie
make
lemon
filli...
prepare lemon meringue pie
make
lemon
filling
fill crust
make
meringue
separate egg
prepared crust
lemon
butter
sugar
yolk...
prepare lemon meringue pie
make
lemon
filling
fill crust
make
meringue
separate egg
prepared crust
lemon
butter
sugar
yolk...
prepare lemon meringue pie
make
lemon
filling
fill crust
make
meringue
separate egg
prepared crust
lemon
butter
sugar
egg
...
prepare lemon meringue pie
make
lemon
filling
fill crust
make
meringue
separate egg
prepared crust
lemon
butter
sugar
yolk...
Tensoring forms a monoid
(up to isomorphism)
lemon butter sugar
make
lemon filling
… on the objects of the category
lemon ...
Monoidal categories
Category C
Tensor operation
⨂ : (object, object) -> object
such that (a ⨂ b) ⨂ c ≃ a ⨂ (b ⨂ c)
Unit ob...
Monoidal categories
f g
x y y z
f g
x y z
f
g
x y
y z
x y
y z
f ⨂ g=
Horizontal composition Vertical composition
x ⨂ y
f ⨂...
Diagrams inside diagrams
prepare lemon meringue pie
make
lemon
filling
fill crust
make
meringue
separate egg
prepared crus...
Diagrams inside diagrams
prepare lemon meringue pie
fill crust
make
meringue
separate egg
prepared crust
lemon
butter
suga...
oven
unbaked
pie
baked pie
oven
prepare lemon meringue pie
bake pie
prepare lemon meringue pie
oven
unbaked
pie
baked pie
oven
bake pie
Surprise! It’s another operad
Lemon Meringue Pie operad
prepare lemon
meringue pie
sugar ⨂ white  meringue
prepared crust ⨂ lemon ⨂ butter ⨂
sugar ⨂ eg...
From “Seven Sketches of Compositionality”
Fong & Spivak (2018)
String diagrams in software architecture
• Fantastic for software design
• I’ve used them for years to train junior & seni...
Simon Brown
Level 1
Level 1
Level 2
Level 1
Level 2
Level 3
Level 1
Level 2
Level 3
Level 4
Operad! (maybe)
Operad of wiring diagrams
from
“The operad of wiring diagrams: formalizing a graphical
language for databases, recursion a...
Inputs x1, x2, x3
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....
SELECT L.student, L.address
FROM attends a1, gender g1, attends a2, gender g2, lives L
WHERE a1.student=g1.student AND a2....
SELECT L.student, L.address
FROM attends a1, gender g1, attends a2, gender g2, lives L
WHERE a1.student=g1.student AND a2....
SELECT L.student, L.address
FROM attends a1, gender g1, attends a2, gender g2, lives L
WHERE a1.student=g1.student AND a2....
SELECT L.student, L.address
FROM attends a1, gender g1, attends a2, gender g2, lives L
WHERE a1.student=g1.student AND a2....
In conclusion
• Applied category theory is an exciting new field that seeks to mine
the benefits of compositionality where...
The future
• Anything where “making big things out of little things” is an
important part
• So far: category theorists dis...
People to follow on Twitter
John C. Baez
@johncarlosbaez
Jules Hedges
@_julesh_
Dr. Eugenia Cheng
@DrEugeniaCheng
Jade Mas...
Further reading
• “Seven Sketches of Compositionality” by Brendan Fong, David I. Spivak (2018)
• “Applied category theory ...
Applied category theory: the emerging science of compositionality
Applied category theory: the emerging science of compositionality
Upcoming SlideShare
Loading in …5
×

of

Applied category theory: the emerging science of compositionality Slide 1 Applied category theory: the emerging science of compositionality Slide 2 Applied category theory: the emerging science of compositionality Slide 3 Applied category theory: the emerging science of compositionality Slide 4 Applied category theory: the emerging science of compositionality Slide 5 Applied category theory: the emerging science of compositionality Slide 6 Applied category theory: the emerging science of compositionality Slide 7 Applied category theory: the emerging science of compositionality Slide 8 Applied category theory: the emerging science of compositionality Slide 9 Applied category theory: the emerging science of compositionality Slide 10 Applied category theory: the emerging science of compositionality Slide 11 Applied category theory: the emerging science of compositionality Slide 12 Applied category theory: the emerging science of compositionality Slide 13 Applied category theory: the emerging science of compositionality Slide 14 Applied category theory: the emerging science of compositionality Slide 15 Applied category theory: the emerging science of compositionality Slide 16 Applied category theory: the emerging science of compositionality Slide 17 Applied category theory: the emerging science of compositionality Slide 18 Applied category theory: the emerging science of compositionality Slide 19 Applied category theory: the emerging science of compositionality Slide 20 Applied category theory: the emerging science of compositionality Slide 21 Applied category theory: the emerging science of compositionality Slide 22 Applied category theory: the emerging science of compositionality Slide 23 Applied category theory: the emerging science of compositionality Slide 24 Applied category theory: the emerging science of compositionality Slide 25 Applied category theory: the emerging science of compositionality Slide 26 Applied category theory: the emerging science of compositionality Slide 27 Applied category theory: the emerging science of compositionality Slide 28 Applied category theory: the emerging science of compositionality Slide 29 Applied category theory: the emerging science of compositionality Slide 30 Applied category theory: the emerging science of compositionality Slide 31 Applied category theory: the emerging science of compositionality Slide 32 Applied category theory: the emerging science of compositionality Slide 33 Applied category theory: the emerging science of compositionality Slide 34 Applied category theory: the emerging science of compositionality Slide 35 Applied category theory: the emerging science of compositionality Slide 36 Applied category theory: the emerging science of compositionality Slide 37 Applied category theory: the emerging science of compositionality Slide 38 Applied category theory: the emerging science of compositionality Slide 39 Applied category theory: the emerging science of compositionality Slide 40 Applied category theory: the emerging science of compositionality Slide 41 Applied category theory: the emerging science of compositionality Slide 42 Applied category theory: the emerging science of compositionality Slide 43 Applied category theory: the emerging science of compositionality Slide 44 Applied category theory: the emerging science of compositionality Slide 45 Applied category theory: the emerging science of compositionality Slide 46 Applied category theory: the emerging science of compositionality Slide 47 Applied category theory: the emerging science of compositionality Slide 48 Applied category theory: the emerging science of compositionality Slide 49 Applied category theory: the emerging science of compositionality Slide 50 Applied category theory: the emerging science of compositionality Slide 51 Applied category theory: the emerging science of compositionality Slide 52 Applied category theory: the emerging science of compositionality Slide 53 Applied category theory: the emerging science of compositionality Slide 54 Applied category theory: the emerging science of compositionality Slide 55 Applied category theory: the emerging science of compositionality Slide 56 Applied category theory: the emerging science of compositionality Slide 57 Applied category theory: the emerging science of compositionality Slide 58 Applied category theory: the emerging science of compositionality Slide 59 Applied category theory: the emerging science of compositionality Slide 60 Applied category theory: the emerging science of compositionality Slide 61 Applied category theory: the emerging science of compositionality Slide 62 Applied category theory: the emerging science of compositionality Slide 63 Applied category theory: the emerging science of compositionality Slide 64 Applied category theory: the emerging science of compositionality Slide 65 Applied category theory: the emerging science of compositionality Slide 66 Applied category theory: the emerging science of compositionality Slide 67 Applied category theory: the emerging science of compositionality Slide 68 Applied category theory: the emerging science of compositionality Slide 69 Applied category theory: the emerging science of compositionality Slide 70 Applied category theory: the emerging science of compositionality Slide 71 Applied category theory: the emerging science of compositionality Slide 72 Applied category theory: the emerging science of compositionality Slide 73 Applied category theory: the emerging science of compositionality Slide 74 Applied category theory: the emerging science of compositionality Slide 75 Applied category theory: the emerging science of compositionality Slide 76 Applied category theory: the emerging science of compositionality Slide 77 Applied category theory: the emerging science of compositionality Slide 78 Applied category theory: the emerging science of compositionality Slide 79 Applied category theory: the emerging science of compositionality Slide 80 Applied category theory: the emerging science of compositionality Slide 81 Applied category theory: the emerging science of compositionality Slide 82 Applied category theory: the emerging science of compositionality Slide 83 Applied category theory: the emerging science of compositionality Slide 84 Applied category theory: the emerging science of compositionality Slide 85 Applied category theory: the emerging science of compositionality Slide 86 Applied category theory: the emerging science of compositionality Slide 87 Applied category theory: the emerging science of compositionality Slide 88 Applied category theory: the emerging science of compositionality Slide 89 Applied category theory: the emerging science of compositionality Slide 90 Applied category theory: the emerging science of compositionality Slide 91 Applied category theory: the emerging science of compositionality Slide 92 Applied category theory: the emerging science of compositionality Slide 93 Applied category theory: the emerging science of compositionality Slide 94 Applied category theory: the emerging science of compositionality Slide 95 Applied category theory: the emerging science of compositionality Slide 96 Applied category theory: the emerging science of compositionality Slide 97 Applied category theory: the emerging science of compositionality Slide 98 Applied category theory: the emerging science of compositionality Slide 99 Applied category theory: the emerging science of compositionality Slide 100 Applied category theory: the emerging science of compositionality Slide 101 Applied category theory: the emerging science of compositionality Slide 102 Applied category theory: the emerging science of compositionality Slide 103 Applied category theory: the emerging science of compositionality Slide 104 Applied category theory: the emerging science of compositionality Slide 105
Upcoming SlideShare
What to Upload to SlideShare
Next
Download to read offline and view in fullscreen.

4 Likes

Share

Download to read offline

Applied category theory: the emerging science of compositionality

Download to read offline

What do programming, quantum physics, chemistry, neuroscience, systems biology, natural language parsing, causality, network theory, game theory, dynamical systems and database theory have in common?

As functional programmers, we know how useful category theory can be for our work - or perhaps how abstruse and distant it can seem. What is less well known is that applying category theory to the real world is an exciting field of study that has really taken off in just the last few years. It turns out that we share something big with other fields and industries - we want to make big things out of little things without everything going to hell! The key is compositionality, the central idea of category theory.

This talk will introduce the emerging field of applied category theory, with the aims of:
- Giving attendees a broad overview of cutting-edge applications of category theory
- Building an understanding of a small number of the most important core concepts
- Getting attendees excited, inspired to learn more, and equipped to apply some basic concepts to their work

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Applied category theory: the emerging science of compositionality

  1. 1. Applied category theory The emerging science of compositionality @KenScambler
  2. 2. Category theory
  3. 3. From “Seven Sketches of Compositionality” Fong & Spivak (2018) Applied category theory prepare lemon meringue pie make lemon filling fill crust make meringue separate egg prepared crust lemon butter sugar yolk egg white sugar meringue lemon filling unbaked lemon pie unbaked pieadd meringue
  4. 4. Applied category theory • Emerging field! • Explosion of papers, research, development in last 5 years • Builds a common vocabulary of composition across disciplines • Enables intuitive, precise visual representations
  5. 5. Brand new ACT Journal
  6. 6. Brand new ACT Book
  7. 7. ACT Topics & papers
  8. 8. Q: Is functional programming applied category theory?
  9. 9. Q: Is functional programming applied category theory? A: Yes! (…arguably)
  10. 10. Plan • I want to put applied category theory on your roadmap • The big idea: compositionality • Case study: Complex adaptive system design: military search & rescue • Four concepts of composition: • Monoids • Categories • Operads • Monoidal categories • Two graphical languages: • String diagrams • Wiring diagrams
  11. 11. Compositionality
  12. 12. The meaning of a complex expression is determined by: 1. The meaning of the constituent parts 2. The rules for how those parts are combined Frege’s Principle of Compositionality
  13. 13. Making big things Compositionality lets us
  14. 14. Making big things out of little things Compositionality lets us
  15. 15. Compositionality lets us Making big things out of little things preserving guarantees
  16. 16. Compositionality applied • Little programs that work BIG programs that work? • Little electric circuits that work BIG electric circuits that work? • Little Feynman diagrams that describe real physics BIG Feynman diagrams that describe real physics? • Little resource plans that are feasible BIG resource plans that are feasible? • Little networks of agents that can solve problems BIG networks of agents that can solve problems?
  17. 17. Compositionality distilled - monoids c d e f h j a b i g
  18. 18. a b
  19. 19. a b Compose any two
  20. 20. ab
  21. 21. Associativity – no need for brackets a b c
  22. 22. Associativity – no need for brackets a b c
  23. 23. Associativity – no need for brackets a b c
  24. 24. Associativity – no need for brackets a b c
  25. 25. Associativity – no need for brackets abc
  26. 26. With associativity abc = a b c Just the sum of its parts with
  27. 27. Without associativity + orabc = a b c Uh-oh! We need external data
  28. 28. Identity – doesn’t do anything when you compose a
  29. 29. Identity – doesn’t do anything when you compose a
  30. 30. Identity – doesn’t do anything when you compose a
  31. 31. Compositionality distilled - categories c d e f h j a b i g
  32. 32. a b The building blocks are called morphisms The colours are called objects
  33. 33. a b Can only compose when the colours match
  34. 34. ab The middle bit disappears
  35. 35. a b Associativity – no need for brackets c
  36. 36. a b Associativity – no need for brackets c
  37. 37. a b Associativity – no need for brackets c
  38. 38. a b Associativity – no need for brackets c
  39. 39. abc Associativity – no need for brackets
  40. 40. a Identities – don’t do anything when you compose
  41. 41. a Identities – don’t do anything when you compose
  42. 42. a Identities – don’t do anything when you compose
  43. 43. Case study: Complex Adaptive System Design from “Complex Adaptive System Design” blog posts by John C. Baez (2016-2019) “Network Models” by Baez, Foley, Moeller, Pollard (2017)
  44. 44. Military research: search & rescue • Systems of systems • Many different kinds of networks • Complex realtime behaviour • How to connect them all?
  45. 45. Helo 1 Target 1Port 1 Helicopter knows the target and home base In comms range In comms range My port Intent to rescue
  46. 46. Helo 1 UAV 1 Target 1 UAV knows the target, and the helicopter as a home base In comms range Intent to rescue My port
  47. 47. Overlay the networks We now have a bigger network working together Helo 1 Target 1Port 1 My port Intent to rescue UAV 1 My port In comms range In comms range In comms range Intent to rescue
  48. 48. Helo network UAV network Overlaying is monoidal; you can always overlay
  49. 49. Helo network UAV network Overlaying is monoidal; you can always overlay over lay
  50. 50. Combined network Overlaying is monoidal; you can always overlay
  51. 51. How to sew together unrelated networks? Helo 1 UAV 1 Target 1 UAV 2 UAV 3 UAV 5 Rescue-Scene UAV 4 In comms range In comms range UAV-Search-Net Helo 2 Homebase Intent to rescue My port Havana
  52. 52. 1 2 3 4 5 6 7 8 9 How to sew together unrelated networks? “Take 3 networks of 3, 4 and 2 vertices; return a network of 9 vertices” Intent to rescue
  53. 53. Helo 1 UAV 1 Target 1 UAV 2 UAV 3 UAV 5 UAV 4 In comms range In comms rangeHelo 2 In comms range Intent to rescue My port Intent to rescue Havana
  54. 54. Is that a category? Network-1 Network-2 Network-3
  55. 55. Nope! You can’t compose the networks themselves. Network-1 Network-2 Network-3
  56. 56. Morphisms with lots of inputs? The ”type” is the number of vertices expected in subnetworks “Take 3 networks of 3, 4 and 2 vertices; return a network of 9 vertices” 3 4 2 9
  57. 57. Compositionality distilled – operads a c b d
  58. 58. a cb
  59. 59. a cb
  60. 60. a cb
  61. 61. a cb
  62. 62. abc
  63. 63. a
  64. 64. a
  65. 65. a
  66. 66. a
  67. 67. Obvious example: types & functions receiveInvoice User Invoice Signature Receipt storeReceipt Receipt Shoebox Shoebox login Username Password User
  68. 68. receiveInvoiceInvoice Signature storeReceipt Shoebox Shoebox login Username Password
  69. 69. Invoice Signature fullInvoiceFlow Shoebox Shoebox Username Password def fullInvoiceFlow(username, password, invoice, signature, shoebox) { user = login(username, password) receipt = receiveInvoice(user, invoice, signature) return storeReceipt(receipt, shoebox) }
  70. 70. Mapping it to reality Helicopter Port UAV Target my port Intent to rescue Comms channel Havana Rescue-Scene UAV-Search-Net Homebase
  71. 71. Mapping it to reality Helicopter Port UAV Target my port Intent to rescue Comms channel Havana Rescue-Scene := ... UAV-Search-Net := ... Homebase := ... joinNetworks(Rescue-Scene, UAV-Search-Net, Homebase) To actually use an operad, translate it to the operad of sets & functions, preserving composition & identity
  72. 72. From “Seven Sketches of Compositionality” Fong & Spivak (2018) String diagrams prepare lemon meringue pie make lemon filling fill crust make meringue separate egg prepared crust lemon butter sugar yolk egg white sugar meringue lemon filling unbaked lemon pie unbaked pieadd meringue
  73. 73. prepare lemon meringue pie make lemon filling fill crust make meringue separate egg prepared crust lemon butter sugar yolk egg white sugar meringue lemon filling unbaked lemon pie unbaked pieadd meringue morphisms
  74. 74. prepare lemon meringue pie make lemon filling fill crust make meringue separate egg prepared crust lemon butter sugar yolk egg white sugar meringue lemon filling unbaked lemon pie unbaked pieadd meringue objects
  75. 75. prepare lemon meringue pie make lemon filling fill crust make meringue separate egg prepared crust lemon butter sugar egg sugar unbaked pieadd meringue composition
  76. 76. prepare lemon meringue pie make lemon filling fill crust make meringue separate egg prepared crust lemon butter sugar yolk egg white sugar meringue lemon filling unbaked lemon pie unbaked pieadd meringue tensoring
  77. 77. Tensoring forms a monoid (up to isomorphism) lemon butter sugar make lemon filling … on the objects of the category lemon ⨂ butter ⨂ sugar lemon filling
  78. 78. Monoidal categories Category C Tensor operation ⨂ : (object, object) -> object such that (a ⨂ b) ⨂ c ≃ a ⨂ (b ⨂ c) Unit object I : object such that a ⨂ I ≃ I ⨂ a ≃ a
  79. 79. Monoidal categories f g x y y z f g x y z f g x y y z x y y z f ⨂ g= Horizontal composition Vertical composition x ⨂ y f ⨂ g= y ⨂ z
  80. 80. Diagrams inside diagrams prepare lemon meringue pie make lemon filling fill crust make meringue separate egg prepared crust lemon butter sugar yolk egg white sugar meringue lemon filling unbaked lemon pie unbaked pieadd meringue Make lemon filling lemon butter sugar Blend yolk Beat Combine lemon filling
  81. 81. Diagrams inside diagrams prepare lemon meringue pie fill crust make meringue separate egg prepared crust lemon butter sugar yolk egg white sugar meringue lemon filling unbaked lemon pie unbaked pieadd meringue Blend Beat Combine
  82. 82. oven unbaked pie baked pie oven prepare lemon meringue pie bake pie prepare lemon meringue pie
  83. 83. oven unbaked pie baked pie oven bake pie Surprise! It’s another operad
  84. 84. Lemon Meringue Pie operad prepare lemon meringue pie sugar ⨂ white  meringue prepared crust ⨂ lemon ⨂ butter ⨂ sugar ⨂ egg ⨂ sugar  unbaked pie egg  yolk ⨂ white lemon ⨂ butter ⨂ sugar ⨂ yolk  lemon filling prepared crust ⨂ lemon filling  unbaked lemon pie unbaked lemon pie ⨂ meringue  unbaked pie
  85. 85. From “Seven Sketches of Compositionality” Fong & Spivak (2018)
  86. 86. String diagrams in software architecture • Fantastic for software design • I’ve used them for years to train junior & senior developers • Modularity, boundaries
  87. 87. Simon Brown
  88. 88. Level 1
  89. 89. Level 1 Level 2
  90. 90. Level 1 Level 2 Level 3
  91. 91. Level 1 Level 2 Level 3 Level 4 Operad! (maybe)
  92. 92. 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)
  93. 93. Inputs x1, x2, x3
  94. 94. Input types {s,r,t} {w, x, y, z} {u, v} Output type {a,b,c,d,e}
  95. 95. 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’
  96. 96. 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’
  97. 97. 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’ TablesConstants
  98. 98. 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
  99. 99. 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)
  100. 100. In conclusion • Applied category theory is an exciting new field that seeks to mine the benefits of compositionality wherever they may be found • Supports marvelous graphical languages • Early days! • Watch this space
  101. 101. The future • Anything where “making big things out of little things” is an important part • So far: category theorists discovering applications and promoting • Industry might eventually begin to lead the charge • Computer science & programming will be at the forefront: software has eaten the world • Functional programming will be at the forefront: we are early adopters
  102. 102. People to follow on Twitter John C. Baez @johncarlosbaez Jules Hedges @_julesh_ Dr. Eugenia Cheng @DrEugeniaCheng Jade Master @JadeMasterMath Tai-Danae Bradley @math3ma Joe Moeller @CreeepyJoe Statebox @statebox Jelle Herold @wires_wires Fabrizio Remano Genovese @fabgenovese
  103. 103. Further reading • “Seven Sketches of Compositionality” by Brendan Fong, David I. Spivak (2018) • “Applied category theory course” by John C. Baez (2018) • “What is applied category theory?” by Tai-Danae Bradley (2018) • “Network models” by Baez, Foley, Moeller, Pollard (2017) • “The operad of wiring diagrams: formalizing a graphical language for databases, recursion and plug-and-play circuits” by David I. Spivak (2013)
  • MingwayHuang1

    Apr. 24, 2020
  • OlafBey

    Sep. 18, 2019
  • Jens

    Aug. 5, 2019
  • ariostonjaerger

    Aug. 3, 2019

What do programming, quantum physics, chemistry, neuroscience, systems biology, natural language parsing, causality, network theory, game theory, dynamical systems and database theory have in common? As functional programmers, we know how useful category theory can be for our work - or perhaps how abstruse and distant it can seem. What is less well known is that applying category theory to the real world is an exciting field of study that has really taken off in just the last few years. It turns out that we share something big with other fields and industries - we want to make big things out of little things without everything going to hell! The key is compositionality, the central idea of category theory. This talk will introduce the emerging field of applied category theory, with the aims of: - Giving attendees a broad overview of cutting-edge applications of category theory - Building an understanding of a small number of the most important core concepts - Getting attendees excited, inspired to learn more, and equipped to apply some basic concepts to their work

Views

Total views

3,258

On Slideshare

0

From embeds

0

Number of embeds

40

Actions

Downloads

74

Shares

0

Comments

0

Likes

4

×