{
"path": "/mo9cam6lls1hs6",
"site": "at://did:plc:ngokl2gnmpbvuvrfckja3g7p/site.standard.publication/3m3frizuz2c2v",
"$type": "site.standard.document",
"title": "capability based tensor network",
"content": {
"$type": "pub.leaflet.content",
"pages": [
{
"id": "3a48d4c0-bb92-4e8f-a080-b28c7f27595f",
"$type": "pub.leaflet.pages.linearDocument",
"blocks": [
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"plaintext": "lIn order to assemble an application stack, I'm building what I'm calling a \"capability based tensor network\". Tensor algebra is essentially linear algebra's older brother. In linear algebra, you have concepts like scalars and vectors. In tensor algebra you just have tensors. "
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"plaintext": "Here is a table mapping linear algebra concepts to tensor algebra concepts to make it obvious what I'll be talking about"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"tex": "\\def\\arraystretch{1.3}\n\\begin{array}{|l|l|}\n\\hline\nLinear Algebra & Tensor Algebra \\\\\n\\hline\nScalar & Rank-0 \\\\\n\\hline\nVector & Rank-1 \\\\\n\\hline\n\\end{array}",
"$type": "pub.leaflet.blocks.math"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"$type": "pub.leaflet.richtext.facet",
"index": {
"byteEnd": 88,
"byteStart": 83
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#italic"
}
]
}
],
"plaintext": "A vector is written in tensor form like so: $v^i$. The superscript means it has an upper index. Vectors represent capabilities of our network"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"$type": "pub.leaflet.richtext.facet",
"index": {
"byteEnd": 26,
"byteStart": 21
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#italic"
}
]
}
],
"plaintext": " If $v^i$ pairs to a lower index $v_i$ it contracts and we get a scalar. When vectors pair, they cancel each other out."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"$type": "pub.leaflet.richtext.facet",
"index": {
"byteEnd": 5,
"byteStart": 0
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#italic"
}
]
}
],
"plaintext": "Lower-index values, also called co-vectors, represent requirements of our tensor network."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"$type": "pub.leaflet.richtext.facet",
"index": {
"byteEnd": 97,
"byteStart": 93
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#bold"
}
]
},
{
"$type": "pub.leaflet.richtext.facet",
"index": {
"byteEnd": 118,
"byteStart": 110
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#bold"
}
]
}
],
"plaintext": "Using [[DisCoCat]] we can model this with natural language\nFor our lexicon let's use $n$ for Noun and $s$ for Sentence (standard [[DisCoCat]] naming convention). They represent the vectors in our network. They are capabilities"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"plaintext": "We model our natural language as tensor products with what's called [[adjoints]]"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"$type": "pub.leaflet.richtext.facet",
"index": {
"byteEnd": 43,
"byteStart": 39
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#bold"
}
]
},
{
"$type": "pub.leaflet.richtext.facet",
"index": {
"byteEnd": 98,
"byteStart": 94
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#bold"
}
]
},
{
"$type": "pub.leaflet.richtext.facet",
"index": {
"byteEnd": 111,
"byteStart": 107
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#bold"
}
]
},
{
"$type": "pub.leaflet.richtext.facet",
"index": {
"byteEnd": 162,
"byteStart": 158
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#bold"
}
]
}
],
"plaintext": "$Server$: $n$ $\\leftarrow$ Server is a Noun\n$Needs$: $n^r \\otimes s \\otimes n^l$ $\\leftarrow$ Noun needs a Noun\n$Database$: $n \\leftarrow$ Database is also a Noun\n$Data$: $n$"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"plaintext": "We can model the requirements \"Server needs database\" and \"Database needs data\" as the tensor product:"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"tex": "Server \\otimes Needs \\otimes Database \\otimes Needs \\otimes Data",
"$type": "pub.leaflet.blocks.math"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"$type": "pub.leaflet.richtext.facet",
"index": {
"byteEnd": 26,
"byteStart": 13
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#italic"
}
]
},
{
"$type": "pub.leaflet.richtext.facet",
"index": {
"byteEnd": 85,
"byteStart": 81
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#bold"
}
]
}
],
"plaintext": "$n^r$ is the right-adjoint. That means that if it is on the right hand side of a Noun then it will pair with it. "
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"$type": "pub.leaflet.richtext.facet",
"index": {
"byteEnd": 59,
"byteStart": 54
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#bold"
}
]
}
],
"plaintext": "$n^l$ is the left-adjoint. Same thing just pairs with Nouns when it's on the left of them."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"plaintext": "$n^r$ and $n^l$ are our co-vectors in the tensor network. They are requirements."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"plaintext": "We can expand the tensor product of $$Server \\otimes Needs \\otimes Database \\otimes Needs \\otimes Data$$ to be explicit:\n$$n \\otimes (n^r \\otimes s \\otimes n^l) \\otimes n \\otimes (n^r \\otimes s \\otimes n^l) \\otimes n$$"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"plaintext": "Let's start with $Database$. Since it has a left-adjoint on the left, and a right-adjoint on the right, that entire term $n^l \\otimes n \\otimes n^r$ pairs and cancels out. The astute reader might say \"Hey, wait a minute! There are two co-vectors and only one vector! What gives?!\" [[frobenius algebra]] says that we can use the [[comultiplication map]] ($\\Delta$) to make as many copies of a vector as we need because we are talking about the concept of a database, not an actual instance of a database. $n \\rightarrow n \\otimes n$"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"plaintext": "$Server$ and $Data$ both pair with their adjoints and cancel out leaving us with \n$$s \\otimes s$$\nWe've just used the [[Curry-Howard Isomorphism]] as a mathematical proof that our $Server$ is related to our $Data$ through quantum entanglement. How's that for system requirements?"
}
}
]
}
]
},
"updatedAt": "2026-04-22T09:35:34.279Z",
"publishedAt": "2026-04-22T09:35:34.276Z"
}