In 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.

Here is a table mapping linear algebra concepts to tensor algebra concepts to make it obvious what I'll be talking about

A vector is written in tensor form like so: vⁱ. The superscript means it has an upper index. Vectors represent capabilities of our network

If vⁱ pairs to a lower index vᵢ it contracts and we get a scalar. When vectors pair, they cancel each other out.

Lower -index values, also called co-vectors, represent requirements of our tensor network.

Using DisCoCat we can model this with natural language
For 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

We model our natural language as tensor products with what's called adjoints

Server: n ← Server is a Noun
Needs: nʳ ⊗ s ⊗ nˡ ← Noun needs a Noun
Database: n ← Database is also a Noun
Data: n

We can model the requirements "Server needs database" and "Database needs data" as the tensor product:

nʳ is the right-adjoint. That means that if it is on the right hand side of a Noun then it will pair with it.

nˡ is the left-adjoint. Same thing just pairs with Nouns when it's on the left of them.

nʳ and nˡ are our co-vectors in the tensor network. They are requirements.

We can expand the tensor product of

to be explicit:

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ˡ ⊗ n ⊗ nʳ 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 (Δ) 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 → n ⊗ n

Server and Data both pair with their adjoints and cancel out leaving us with

We'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?