
At IDEMS, we often say that our work is deeply mathematical, or innovative at the mathematical level, but we’ve not been good at the very basic maths skill of “showing our working”. Our team largely consists of mathematical scientists, but because we’re so busy applying maths to real-world impact, we don’t produce much research-level maths, and nor does our technology implement mathematical constructions explicitly. This article aims to explore what IDEMS’ relationship with mathematics actually is.
At IDEMS, the main focus of our innovation is CommonTech, our technology programme for harnessing the complexity of impact-enabling digital interventions. CommonTech includes work such as our open educational resource systems [16], part of our Education stream, and psymple [11], our complexity modelling engine which is part of our Biodiversity stream. More recently, CommonTech has been highlighted through ParentApp, part of our Public Health stream, which has been the driver of the astounding successes published recently in The Lancet [17].
For quite some time, we’ve been thinking through the observation that, while the things we’re building under CommonTech look very different, there is a core common structure that underlies everything: a data cycle between collectively-maintained, expert knowledge and locally-owned implementations.
The idea is that impact programmes work best when they are based on good, long-standing “expert” evidence: research, resources, quality software, tech prototypes. But these require the people who understand the specificity of the “local” area of implementation – how to teach, how to maintain engagement, how to construct a model – need to be able to transform that into something they know will work. Succinctly, we need to tie local innovation to core impact programme knowledge.
These data cycles consist of highly heterogeneous data that, by standard definitions of interoperability [16], cannot readily be brought into coherence, for example, because standards are rigid or data would need coercing into unnatural formats. Our breakthrough was working out that we need deeper levels of both semantic and structural interoperability, in which we can talk about piecing together data at a more universal level, before talking about particular standards or computerised data formats.
Being a team of mathematicians, we realised this is really a mathematical problem. More concretely, universal representations, and the ideas of gluing things together are the mathematics of category theory: the area of maths concerned with structure and relationships [1,7]. Luckily for us, a huge amount of foundational work already exists, and we’ve worked through not necessarily the maths itself (although more on that later), but how it should guide how we think about and build CommonTech.
Holding data mathematically
So, what do we know? Category theory gives us a way of describing data at a fundamental level using structures called -sets. Given a small category (or for practical purposes one that is finitely presented), a -set is a copresheaf , that is, a -valued covariant functor on . The category can be thought of as a data schema, while a -set is its instantiation as, for example, a database [3,5].
To explore this a bit deeper, we’ll use ParentApp as a driving example, and the CommonTech technology that built it: OpenAppBuilder. In this view, a simplified schematic of an app collection in OpenAppBuilder might look something like:
A -set, an instance of this schema, can be represented in a simplified table format:
| ⋮ | ⋮ | ⋮ |
Of course, this isn’t the only way of representing this data, and that’s the key point. Once the data is held in a -set, we can make a choice of how to visualise it, or more importantly how to store and manipulate it on a computer.
We do need slightly more structure first, because while -sets help to organise data at a fundamental level, it’s difficult to shoehorn in the necessary metadata we need into these structures. The right object for this is an attributed -set, or -set. Informally, this structure simply allows objects to be given attributes, or “tagged” in some way [3,4]. This allows us to formally write down additional tables such as:
| e51df3e7 | Irene | |
| 1426c19a | Michael | |
| ⋮ | ⋮ | ⋮ |
Our deepest thinking has ultimately been how to understand the data we work with through the lens of -sets. The benefit of this is that we can understand how to manipulate that data at a mathematical level, not a technological one, since -sets are serialisable as derivatives of familiar data formats such as JSON [9] or XML. You’ll see all our programmes defined, at some point, using one of these formats – such as PreTeXt, an additional XML vocabulary [10], for our textbooks – and this is a big reason why.
Distributed ownership and gluing data
There are many things you can do once you have a fundamental language to describe data systems. Spivak describes a categorical method for functorial data migration, generalising the operations for restricting, grouping and joining data [5]. These are all interesting in their own right, but we’ll look into grouping in a bit more detail, because that’s how we can start to describe what it means to actually build something like an app from separated data sources.
This gets us to a very broad concept called compositionality: the study of the rules that describe how complex things can be assembled out of smaller parts, and how local changes can have predictable global effects [2,7]. The -sets we’ve been studying, and their attributed equivalents, are key structures for achieving compositionality. To see why, let’s continue our example and suppose we have three separate schemas within our app. First, we define , describing how the app functions, is navigated through, and how components are organised onto pages with specific roles such as text, buttons, videos, and so on:
Next, we define , describing how the components are authored, such as being filled with actual text and videos:
And finally we define , describing how those textboxes, buttons and videos are styled:
It should be quite easy to imagine what composing all these together means: all components are filled with their content, and all role elements are styled accordingly. The interesting thing comes from the mathematical detail glossed over here: what if the instance over contains components that are not given content by instances over ? Before actually gluing these things together, we pass -sets over these schemas through a left pushforward functor [5], and we can define this precisely to surface those missing definitions to users .
As should be apparent, this compositional behaviour – being able to separate out the schemas , , and , work on them individually, and recombine them later – is exactly one of the things we need to have distributed ownership, because -sets over them can be viewed as distinct objects. The mathematical machinery of gluing them together is called taking colimits: constructions that describe how to combine overlapping or related structures consistently [3,6,7]. To set colimits up properly requires a bit more work, something for a later article, but the interesting thing is how much of that work is easily realisable in sensible structures for impactful technology. Colimits broadly require three ingredients to define properly:
- an idea of how components interface with one-another. In practical applications, this means objects need to formally specify what data they consume or output [7,8]. But because this is the responsibility of objects to set their standards, it allows a system of multi-layered standards to exist. This is exactly what’s needed for a sensible system of separation of data.
- a notion of what gluing means: the ambient categorical structures in which composition takes place [2,7]. This is equivalent to specifying the composition rules, whether its how to patch a version together out of artifacts and history, join data pipelines together, or substitute functions in a dynamic model. All this is groundwork that is done at the start, and allows for non-technical creation and maintenance of systems.
- a diagram, or formal structure, to be actioned over, like that given by our three schemas above. Our friends at the Topos Institute are pioneering the idea, that we fully subscribe to, that ultimately formal modelling of systems is precisely what enables collaboration. It gives a source of truth of total structure (syntax), which can be interpreted into domain-specific languages, logics and contexts (semantics) on-demand [2,8].
The work in setting up these structures is also equivalent to the work of identifying other barriers to composition, allowing these to be surfaced and dealt with systematically. In addition to identifying missing elements, this machinery can also expose orphaned elements, for example elements defined over not used in the app, and conflicts to merging, for example if two authoring sources both try to fill the same content over .
IDEMS, mathematics and the future
As said at the start, readers will notice that IDEMS doesn’t actually produce a lot of mathematical research, particularly not in category theory, and nor do we have actual mathematical engines powering our data systems. There are two reasons for this. The first is simply about time and resources: research and research engineering are intensive, and our mission at IDEMS is to build and deploy innovative technology that directly contributes to improving people’s lives. The two don’t always interact so well.
The second reason is slightly more subtle. Our claim is that we can be just as effective, and actually more efficient, by not working with the actual mathematical structures, so long as what we’re doing always remains compatible with them. As an example, coming from a technologist’s viewpoint, we know that semi-structured formats like JSON and XML are “nice”, in the sense that they are broadly modular and “glue together” nicely. The mathematical perspective we’ve gained now helps us to explain why this is no accident, and moreover how to use these formats systematically by defining the structures, relationships and composition rules they represent.
Understanding the mathematical structures gives us an architectural discipline for technology, but it also opens up what we think is a particularly novel way of sorting at the intersection of mathematics and impact technology. Established mathematics gives structures and principles, and those can even be implemented in practical systems. But exactly what practicality those systems serve is something that can only be answered by knowing how real-world implementations need to look. More often than not, this will specify where the underlying maths needs to go next, and the cycle can repeat.
Ultimately, however, we do want all these things to be one and the same. The way we see real progress being made is by working on, and expanding on, the mathematics itself. This is something we’re involved in, for example, psymple [11], as well as our patent-pending variant system which powers our open educational resources [12,15]. Doing this at the scale of CommonTech itself, however, means rising to a scale much larger than where we’re at right now, and growing our collaborative efforts to undertake the deep foundational research required. Until then, we have genuine ideas and things we’re pursuing:
- Formal languages for systems. We call these “semantic languages” in our market-facing writing, but writing down the schemas, migration functors and composition rules for systems like OpenAppBuilder in mathematical language would be a big step towards systemic coherence. It would be similar work, in a more complex setting, to the language we developed for psymple in our modelling biodiversity work [11]. We’re also working through, with our friends at the Topos Institute, how psymple structures are realisable in double categorical systems theory (DCST).
- AI-assisted authoring. Once you have a formal language underneath everything stemming from -sets, AI systems can be built to work within its rules, meaning people can interact at higher semantic levels. There’s also a deeper mathematical connection to AI here, since DCST gives a natural place to define -sets [3,13], and the Topos Institute are exploring how DCST can underpin explainable, auditable and safeguarded AI systems [14].
- Interconnected variants. IDEMS is pioneering a patent-pending system of variants: adaptations of apps specific to a local context which enable true distributed ownership [12,15]. A variant is more than a fork, comprising a dynamic set of transformations written in formal language from one or more upstream sources. This is the true enabler of CommonTech, allowing interventions to be combined with, and kept in sync with, local adaptations, and ultimately it’s based on mathematical innovations which need to be explored much more deeply.
More things will come, of course, but it is clear that everything above has come out of knowing what the right structures to build to achieve impact are. So IDEMS will continue, both building the things that are life-changing for people, and in our relationship with mathematics: understanding what needs to be built, how mathematics can make that better, and be a driver of the deep research and innovation that connects it all together.
References
[1] S. Breiner, E. Subrahmanian, and R. D. Sriram, “Category Theory,” in Handbook of Model-Based Systems Engineering, A. M. Madni, N. Augustine, and M. Sievers, Eds. Cham: Springer, 2023, pp. 1259–1299. doi: 10.1007/978-3-030-93582-5_85.
[2] J. C. Baez, X. Li, S. Libkind, N. D. Osgood, and E. Redekopp, “A categorical framework for modeling with stock and flow diagrams,” in Mathematics of Public Health, Fields Institute Communications, vol. 88. Cham: Springer, 2023, pp. 175–207. doi: 10.1007/978-3-031-40805-2_8.
[3] E. Patterson, O. Lynch, and J. Fairbanks, “Categorical data structures for technical computing,” Compositionality, vol. 4, art. 5, 2022. doi: 10.32408/compositionality-4-5.
[4] P. Schultz, D. I. Spivak, C. Vasilakopoulou, and R. Wisnesky, “Algebraic databases,” Theory and Applications of Categories, vol. 32, no. 16, pp. 547–619, 2017. doi: 10.70930/tac/lf9k6awo.
[5] D. I. Spivak, “Functorial data migration,” Information and Computation, vol. 217, pp. 31–51, 2012. doi: 10.1016/j.ic.2012.05.001.
[6] K. Brown, E. Patterson, T. Hanks, and J. Fairbanks, “Computational category-theoretic rewriting,” Journal of Logical and Algebraic Methods in Programming, vol. 134, art. 100888, 2023. doi: 10.1016/j.jlamp.2023.100888.
[7] J. C. Baez and K. Courser, “Structured cospans,” Theory and Applications of Categories, vol. 35, no. 48, pp. 1771–1822, 2020. doi: 10.70930/tac/dca3obx4.
[8] D. J. Myers, Categorical Systems Theory, unpublished book draft, version dated Sept. 3, 2023. [Online]. Available: https://www.davidjaz.com/Papers/DynamicalBook.pdf (accessed Nov. 17, 2026).
[9] AlgebraicJulia, “Serializing acsets as JSON,” ACSets.jl documentation. [Online]. Available: https://algebraicjulia.github.io/ACSets.jl/stable/generated/json_serialization/ (accessed Nov. 17, 2026).
[10] PreTeXt, “Documentation,” PreTeXt project website. [Online]. Available: https://pretextbook.org/documentation.html (accessed Nov. 17, 2026).
[11] G. Simmons, D. Stern, G. Osang, L. Ponti, A. P. Gutierrez, C. Facciolà, and T. Hosgood, “Psymple: A Python package for complex systems modelling,” Journal of Open Source Software, vol. 10, no. 109, art. 7364, 2025. doi: 10.21105/joss.07364.
[12] IDEMS International, “Fundraising,” IDEMS International website. [Online]. Available: https://www.idems.international/fundraising/ (accessed Nov. 17, 2026).
[13] O. Lynch, “The categorical scoop on attributed C-sets,” AlgebraicJulia blog, Oct. 5, 2020. [Online]. Available: https://blog.algebraicjulia.org/post/2020/10/acset-theory/ (accessed Nov. 17, 2026).
[14] Advanced Research and Invention Agency (ARIA), “Funded projects,” Safeguarded AI programme. [Online]. Available: https://aria.org.uk/opportunity-spaces/trust-everything-everywhere/safeguarded-ai/funded-projects (accessed Nov. 17, 2026).
[15] IDEMS International, “Innovation,” Open, Adaptive Digital Textbooks. [Online]. Available: https://statsbooks.idems.international/innovation/ (accessed Nov. 17, 2026).
[16] M. D. Wilkinson et al., “The FAIR Guiding Principles for scientific data management and stewardship,” Scientific Data, vol. 3, art. 160018, 2016. doi: 10.1038/sdata.2016.18.
[17] L. D. Cluver et al., “A blended digital parenting intervention for the prevention of sexual violence, exploitative sex, and maltreatment of children at scale in Tanzania: a cluster-randomised, controlled trial,” The Lancet, published online November 10, 2026. https://doi.org/10.1016/S0140-6736(26)01819-2.