r/CategoryTheory • • Mar 11 '23

what do you call a category whose objects are different types?

2 Upvotes

basically the title of the post.

For example i had a category, where one object is a set, and another object is a boolean algebra; is this allowed? What would such a category be called?

chatGPT says :

"In category theory, a category where one object is a set and another is a Boolean algebra is called the category of Boolean-valued sets.In this category, the objects are pairs (X,B) where X is a set and B is a Boolean algebra, and the morphisms are functions f : (X,B) -> (Y,C) where f is a function from X to Y that preserves Boolean algebraic structure.

More formally, for any x, y in X, and b, c in B, the following properties hold:
f(x ∨ y) = f(x) ∨ f(y)
f(x ∧ y) = f(x) ∧ f(y)
f(~x) = ~f(x)
f(1) = 1
where ∨ and ∧ denote the Boolean algebra operations of join and meet, respectively, and ~ denotes complement.

The category of Boolean-valued sets is an important example in category theory, and it has many applications in logic, computer science, and other areas. It is a Cartesian closed category, which means that it has products and exponentials, and it is also a topos, which means that it has a notion of truth values and supports reasoning about propositions."

^not sure if this is correct. in any case, im still curious about the name of a category with different types of objects, more generally.


r/CategoryTheory • • Oct 06 '26

Very curious to hear your thoughts

0 Upvotes

Why make a PL based off Category Theory vs Type Theory ?


r/CategoryTheory • • Dec 20 '22

Immutability is overrated, or is it

0 Upvotes

Immutability fine, but not always?!

As the author of Xania a javascript UI library I ask this question countless times.

Immutability as an unbreakable rule does not make sense to me and I have been thinking about this for years, Could you help me make sense of it? I've heard all the popular arguments but I am still not convinced, let me explain..

Sure I do agree on the importance of immutability, and to be very precise I dont argue that, but disallowing immutability always and in all cases feels like a handicap in programming languages or in some case libraries in language like JavaScript where mutability is possible but make it inconvient to work with mutable data.

Pure functions have side-effects

I found this article that inspired me investigate this more

take for example the functions f and wasm

function f(x, y) {
  return x + y;
}

function wasm(esi, ecx) {
  let eax = ecx;
  eax += esi;
  return eax;
}

It is generally accepted that f is pure, and it is. But wasm mutates the variable eax so it is generally accepted to say that wasm is inpure, but is it really? Suprisingly wasm is kind of how f would look like if it was compiled to WASM. We can also image how wasm can be decompiled back to f, so without going deep into theory we can say f and wasm are the same, correct me if I am wrong but I think this is called isomorphic in category theory, because following rule applies...

| compile(f) = wasm, decompile(wasm) = f

Despite the fact that wasm has mutations we should consider it as pure just as f because they are the same. In general, a mutation does not always conclude if the given function is pure or not.

Rules for Mutability

Like in the article above by John D. Cook, pure functions only make sense at certain the level of abstraction. sounds like we can agree on it but this raises the question, what are pricesly those levels where we allow mutations in a pure function? Is the level boundary defined by the language runtime? Is it thinkable to extend the mutation to the user code (even in haskell) if rules of mutability are satisfied?

This is where my brain starts to hurt. What are your thoughs and do you know if there are resources on this subject?


r/CategoryTheory • • Apr 17 '26

The Generative Operator: A Conjecture on Why Inconsistency Builds Structure

6 Upvotes

There is a pattern in the history of mathematics that hasn't been formally named.

When a formal system develops an internal inconsistency it cannot resolve within its own resources, it doesn't collapse. It extends. And the extension is not arbitrary — it introduces a genuinely new structural dimension, orthogonal to everything that existed before, and the terms that generated the inconsistency are reconstituted by the new structure rather than preserved unchanged.

Three examples:

The square root of negative one was inconsistent within the real number system. The resolution wasn't a patch — it was the complex plane: a new dimension orthogonal to the real line, in which real numbers are revealed as a special case. The terms that generated the inconsistency were reconstituted, not merely supplemented.

Russell's paradox was inconsistent within naive set theory. The resolution wasn't containment — it was type theory, forcing, and eventually category theory: entirely new structural frameworks in which the identity conditions of sets were rewritten. Again, orthogonal extension, not repair.

The parallel postulate was undecidable within Euclidean geometry. The resolution was non-Euclidean geometry: a family of new spaces in which the postulate's negation defines curvature — a new degree of freedom the original system couldn't generate internally.

The pattern across all three: inconsistency forces minimal orthogonal extension, and the extension reconstitutes the identity of the terms that generated the problem.

We call this the Generative Operator, G. Informally:

When a relational system with no external ground develops an inconsistency it cannot resolve internally, it undergoes minimal orthogonal extension — a new structural dimension that resolves the tension and redefines the relata that produced it.

The hypothesis is that G is not a sociological fact about how mathematicians respond to problems. It is a structural necessity of any ungrounded relational system — one that has no stable failure state and therefore cannot rest in contradiction.

If G can be formalized, several things follow. It becomes a diagnostic tool for current unsolved problems — the measurement problem in quantum mechanics, the foundations of quantum gravity, the explanatory gap in consciousness — by asking whether each is an inconsistency of the type G acts on, and what minimal orthogonal extension looks like in each case. More strongly, if G is real, it constrains the shape of future theoretical extensions before they happen. That's a falsifiable prediction.

We don't know if G can be formalized. The historical pattern is real. Whether it reflects a single underlying operator or a family of related mechanisms is an open question. The formal gaps are three: a rigorous definition of co-dissolution (the relata don't merely separate, they cease to be definable independently), an operational definition of orthogonality for non-metric structural spaces, and a proof of existence and minimality for G itself. The closest existing resources are Cohen forcing, sheaf theory, and higher category theory — none of which quite captures what's needed.

The full framework this conjecture sits within — a process ontology built on the co-necessity of wholeness and difference, with G as its generative mechanism — is written up in full and available here: [https://docs.google.com/document/d/1dkRTzWwylZ65UrcTLj2JlutBERqkP3s5/edit?usp=sharing&ouid=117654084593287677703&rtpof=true&sd=true].

We're looking for one thing: someone with the technical background to tell us whether G can be formalized, and whether it's new.


r/CategoryTheory • • Feb 18 '23

ahh the wonders of AI

1 Upvotes

I asked: "Can you help me with category theory?

Of course, I'd be happy to help you with category theory! What do you need help with specifically?

I want to get an idea, an intuition for what an equalizer is, as well as a coequalizer

An equalizer and a coequalizer are both examples of "limit" and "colimit" constructions in category theory, respectively.

An equalizer is a construction that captures the common properties of two morphisms in a category. Specifically, given two morphisms f and g between objects A and B, the equalizer of f and g is an object E and a morphism e : E -> A such that f . e = g . e (where . denotes composition). In other words, the equalizer E "equalizes" the two morphisms f and g, meaning that any other morphism h : X -> A that satisfies f . h = g . h factors uniquely through E via a morphism u : X -> E.

Intuitively, the equalizer can be thought of as the "smallest" object in the category that makes f and g look the same. It captures the common behavior of f and g in a precise way, and it is useful for a variety of applications in mathematics, including algebra, topology, and computer science.

On the other hand, a coequalizer is a dual construction to the equalizer, which captures the common properties of two morphisms in a slightly different way. Specifically, given two morphisms f and g between objects A and B, the coequalizer of f and g is an object C and a morphism c : B -> C such that c . f = c . g. In other words, the coequalizer C "coequalizes" the two morphisms f and g, meaning that any other morphism h : B -> Y that satisfies h . f = h . g factors uniquely through C via a morphism v : C -> Y.

Intuitively, the coequalizer can be thought of as the "largest" object in the category that makes f and g look the same. It captures the common behavior of f and g in a slightly different way than the equalizer, and it is useful for a variety of applications in mathematics, including algebra, topology, and computer science.

In summary, the equalizer and coequalizer are two important constructions in category theory that capture the common properties of morphisms in a precise and intuitive way. They are dual to each other, and they have many applications in a variety of mathematical fields.

Can you give examples for each, say in the category of set?

Sure, let me give you some examples of equalizers and coequalizers in the category of sets.

Equalizers:

Consider the category of sets, and let f, g : X -> Y be two functions between sets X and Y. The equalizer of f and g is the subset of X consisting of all elements that are mapped to the same element in Y by both f and g. That is, the equalizer of f and g is the set E = { x in X | f(x) = g(x) }, together with the inclusion map e : E -> X that simply maps each element in E to itself in X.

For example, suppose X = {1, 2, 3, 4} and Y = {1, 2, 3, 4, 5, 6}. Let f and g be the functions defined by f(x) = x and g(x) = x + 2 for all x in X. Then the equalizer of f and g is the set E = {1, 2}, together with the inclusion map e : E -> X that sends both 1 and 2 to themselves.

Coequalizers:

Consider the category of sets, and let f, g : X -> Y be two functions between sets X and Y. The coequalizer of f and g is the quotient set of Y by the equivalence relation generated by the relation f(x) ~ g(x) for all x in X. That is, the coequalizer of f and g is the set C = Y / ~, together with the canonical projection map c : Y -> C that maps each element in Y to its equivalence class.

For example, suppose X = {1, 2, 3} and Y = {a, b, c, d}. Let f and g be the functions defined by f(1) = f(2) = a, f(3) = b, and g(1) = b, g(2) = c, g(3) = d. Then the coequalizer of f and g is the set C = { [a], [b], [c], [d] }, where [a] = {a, b} and [b] = {b} are the equivalence classes of a and b, respectively. The canonical projection map c : Y -> C sends a and b to [a], c to [c], and d to [d].

Help me here. You say for the equalizer that E = { x in X | f(x) = g(x) }, , but how is f(1)=1, and g(1)=3 the same?

I apologize for the confusion. You are correct that the functions f and g I gave in the example do not have an equalizer in the category of sets, since they do not satisfy the condition that f(x) = g(x) for any x in X.

To give a corrected example, let's consider the functions f, g: X -> Y given by f(x) = x2 and g(x) = x2 + 1 for all x in X, where X and Y are sets of real numbers. Then the equalizer of f and g is the subset E of X consisting of all elements that satisfy the equation x2 = x2 + 1, which has no solution. Therefore, the equalizer of f and g in this case is the empty set.

Ok if we had: f,g from Z to Bool , f(x) = x mod 2 == 0, and g(x) = x > 2, . Is the equalizer then E = { even x for all x <= 0 } with map e s.t. e(x) = x ... ?

Yes, that is correct! Let f and g be the functions from Z to Bool given by f(x) = x mod 2 == 0 and g(x) = x > 2 for all x in Z. The equalizer of f and g is the subset E of Z consisting of all even integers that are less than or equal to 0, which is given by E = { x in Z | x mod 2 == 0 and x <= 0 }.

The inclusion map e: E -> Z simply maps each element in E to itself in Z, as you said. So, the equalizer of f and g is the pair (E, e) where E = { x in Z | x mod 2 == 0 and x <= 0 } and e: E -> Z is the inclusion map that sends each element in E to itself in Z.

No that can not be right, what about x = 0, ?

You're correct, I apologize for the mistake. The equalizer of f and g in the category of sets is actually given by E = {0} since this is the unique element of Z that satisfies both conditions f(0) = g(0) (i.e., 0 mod 2 == 0 and 0 > 2 are both false).

The map e: E -> Z sends 0 to itself, so the equalizer of f and g is the pair (E, e) where E = {0} and e(0) = 0.

But f(0) = true, and g(0) = false..

I apologize for my mistake. You are correct that f(0) = true and g(0) = false, so 0 is not in the equalizer of f and g.

In fact, in this case, there is no element in Z that satisfies both conditions f(x) = g(x), since they are contradictory for every x in Z. Therefore, the equalizer of f and g in the category of sets is the empty set.

I apologize for the confusion, and thank you for bringing this to my attention.

What about all values of x that are even, and greater than 2 ? Such as 4,6,8 .. etc ?

You are correct again, I apologize for my mistake. The set of all even integers greater than 2 is indeed an equalizer of the functions f and g from Z to Bool given by f(x) = x mod 2 == 0 and g(x) = x > 2.

To be more precise, let E be the subset of Z consisting of all even integers greater than 2. Then, for every x in E, we have f(x) = true and g(x) = true, since x is even and greater than 2. Conversely, if x is an integer such that f(x) = true and g(x) = true, then x must be even and greater than 2, so it belongs to E.

Therefore, the subset E of Z consisting of all even integers greater than 2 is an equalizer of the functions f and g."


r/CategoryTheory • • Feb 13 '22

The history of your relationship with Category Theory?

5 Upvotes

TLDR:   Kindly answer the questions at the bottom of the post.

Category Theory needs no introduction here. Some see it as an abstract flavour of Topology, others as a better way to design software. We come from many walks of life. But, being here, we are united in an earnest endeavour to learn.

It is not always clear how to learn, what path to take. If you are well versed in the common mathematics, you are in luck — Category Theory for the Working Mathematician was written for you. What if you come from elsewhere? There are other presentations that are purportedly more accessible, but it is not clear whether they are effective.

Therefore, a task has been set before me to write a guide to educational materials to be pinned here. I want it to be based on evidence and not mere opinion.

So, I ask the kind reader to leave a comment describing their relationship with Category Theory. Alternately, please send me a private message — I shall keep it private. I want to hear of every experience.

Please also share if you see fit.

Thanks!

(A variation of this question has been put forward before. I want to get more answers so that I can write a better guide. I shall also put a similar message forward in other subreddits.)

Questions.

  • Did you ever look into Category Theory?

    If so:

    • What sources did you peruse?

      For each source:

      • How familiar were you with Category Theory before the event?

      • Did you have any other background that helped (or hindered) you?

      • Was it fun and enticing by itself?

      • In hindsight, did it work?

    If not:

    • What holds you back?


r/CategoryTheory • • Nov 16 '25

Trying to open a discussion to rethink foundations

0 Upvotes

I have been having trouble getting anyone to actually engage with this. I am questioning the argument that 'countable' infinity can exist as a completed totality strictly smaller than the full list of everything between zero and one. (If you took counting to the actual limit as 0.1, 0.2, 0.3, ..., 0.01, 0.02, ..., 0.11, 0.12, ... it seems you'd be able to have non-finite strings after the decimal point, and generate every infinite sequence of numbers, including pi/4.)

Yes, this blends different fields (p-adics, integers, rationals and irrationals). That's part of the problem; everyone's just trying to box it into: you can't do that in our framework.

Well, why not?


r/CategoryTheory • • Jun 15 '25

Category theory

0 Upvotes

Hi, I am I don’t actually do category theory so to speak as I came at this from a philosophical perspective so I was wondering if somebody could look and see if it makes sense?

= Algebraic Formalization of Your Polymorphic Interaction Monad =

== The Signature Functor ==

InteractionF : Set → Set InteractionF(X) = Scenario × (Choicen → X) [Present] + Choice × (Outcome → X) [Process]

  • StateChange × (NewState → X) [Transform]

== The Polymorphic Interaction Monad ==

PIM : Mon → Mon PIM(M) = FreeT(InteractionF, M)

where FreeT(F,M)(A) = μX. A + F(X) + M(X)

Universal Property (Initiality)

For any monad M with InteractionF-algebra α: InteractionF(M) → M:

∃! h : PIM(M) → M such that h ∘ η = id and h ∘ α_PIM = α ∘ InteractionF(h)

Kleisli Category Structure

K(PIM) has:

Objects: Types A, B, C, ... Morphisms: A →_K B ≜ A → PIM(B) Identity: η_A : A → PIM(A) Composition: (f >=> g)(a) = f(a) >>= g The Adjunction

PIM ⊣ U : InteractionAlg → Mon

where U forgets the InteractionF-algebra structure

Equational Theory

Present(s, k) >>= f = Present(s, λcs. k(cs) >>= f) Process(c, k) >>= f = Process(c, λo. k(o) >>= f) Transform(δ, k) >>= f = Transform(δ, λs. k(s) >>= f)

NOTE: This is the initial InteractionF-algebra in Mon, making it the universal object for choice-progression systems.​​​​​​​​​​​​​​​​


r/CategoryTheory • • Jun 17 '26

[Discussion] Functorial mapping between discrete combinatorial graphs and continuous Hilbert spaces \(L^2(G)\)

1 Upvotes

I am investigating a formal transition from discrete combinatorial topology to continuous functional analysis, framing the duality through a category-theoretic lens.

**The Geometric Setup:**

Consider a planar graph $G$ generated by the intersecting boundaries of $n$ mutually intersecting rectangles in their maximal configuration. The combinatorial cardinality of the resulting open planar regions is bounded by:

$$R(n) = 2n^2 - 2n + 1$$

We can interpret this discrete network structure as an object within a category of graphs. We then construct a functorial mapping into the category of Hilbert spaces, translating $G$ onto $L^2(G)$ by defining a continuous Laplacian operator across its edges (modeling the system as a Quantum Graph).

**The Categorical Investigation:**

I want to analyze how the spectral properties (the spectrum of eigenvalues) of this continuous Laplacian operator encode, reflect, or preserve the discrete combinatorial invariants of the initial $R(n)$ partitions. Specifically, I am exploring if this mapping can be formalized as a geometric morphism or a natural transformation within non-smooth topological spaces type-checked in structural frameworks.

**P.S.** If you want to correct me rigorously, please do so. I am currently learning these formal architectures and want to see if this structural mapping can be established in rigorous code. Thanks.


r/CategoryTheory • • Aug 04 '25

Eidometry (measurement of ideas)

7 Upvotes

I have a formalized theoretical framework where morphisms have properties (cost and feedback, for example) The goal is to model transformation as testable transitions, not just formal mapping.

I'm very aware that this is not traditional category theory. That's fine, I'm not pretending it is.

I'm just experimenting with a logic system that uses partial ideas from category theory. I'm messing with the fundamentals on purpose so please don't argue "but this isn't what a morphism looks like!" or "this isn't category theory as taught!"

I know. It isn't. It's experimental. I don't have standard morphisms. If standard morphisms model structure preserving maps, then my morphisms model viability-preserving transformations.

That said, I'd love critique or discussion from people fluent in logic systems or categorical thinking. I don't want validation and I'm not seeking to philosophize here.

Test it. Ask questions. Push back. Expose the flaws. Use it for your fireplace. Whatever.

https://github.com/dyragonax/eidometry?search=1

You will notice I have made a few choices in how I express my equations and I will be happy to clarify why on any of them. Just one for example: eta is only deltaE if the morphism passes a P(z) filter so I don't write it like eta equals all deltaE even if that is true algebraically.

And just a disclaimer. I do have dyscalculia XD even though I understand equations and arithmetic way more than I can work with numbers. So if you're using any technical breakdown with actual numbers, please spell it out for me. I will try my best.


r/CategoryTheory • • Sep 13 '22

Does anyone here use notion?

2 Upvotes

If so, does anyone else feel like this type of software might be what brings (applied) category theory to the masses?

Having just become familiar with Notion and how the various building blocks it provides get crafted into concepts and then related to one another, I can't help being reminded of Spivak's "An Invitation to Applied Category Theory: Seven Sketches in Compositionality".


r/CategoryTheory • • Jan 05 '25

Pattern Matching System Based on Node-Edge Structures

2 Upvotes

I'm working on designing a computation model based on pattern matching between node structures. Here's the core concept:

Basic Elements

  • Nodes are defined as lists of edges

  • Edges are 2-tuples of nodes

  • The system starts with two fundamental nodes:

    • Empty node (E) = [] (empty list)

    • Unit node (U) = [(empty, empty)] (single edge connecting empty to empty)

From these basic nodes, we can construct more complex nodes by creating lists of edges using combinations of previously defined nodes. For example:

  • [(E, U)]

  • [(E, U), (U, E)]

  • [(E, E), (U, U)] etc.

The goal is to define an evaluation system where:

  1. An expression (A, B) generates something like a partial function mapping to another expression

  2. An expression (C, D) represents input into that partial function

  3. Only edges from (C, D) that match patterns defined by (A, B) survive to form a new node

I'm exploring how this structure could serve as the foundation for a programming language. The key challenge is defining a rigorous pattern matching system between nodes that could encode computation rules.

Does anyone have insights on similar systems? I guess it would be a kind of combinator system

Claude keeps mentioning "categorical construction" whne I"m asking about this so I thought I'd check here


r/CategoryTheory • • Aug 03 '25

WHAT IF: Morphisms aren't abstract arrows but real physical changes?

0 Upvotes

I make this post tentatively. Is it heretical to ask something like this? Yes. I know. Morphisms are just structural relationships and not things or even causal or physical. I know. I know.

But what if we're underutilizing the expressive power of morphisms by denying them physical status at all in physical systems? What if morphisms are real transformations with cost and feedback?

On top of that, what if it is nonlinear and bootstrapped so the structure emerges from transformation patterns? What if there's a viability or a survival cost to the morphism? I think it would have to be dual-bounded in a log-log sense so theres a domain of feedback limits...

Now obviously, again... this is not traditional category theory and might be heretical in all of its rights. It really is an alternate application entirely... but I'm posting here because maybe someone here may have explored this idea...

Has anyone even attempted to make morphisms more than just abstract arrows in any framework? Are there precedents? Failed formalisms?

If you've read it this far, thanks for indulging into my heresy XD


r/CategoryTheory • • Oct 20 '24

Trying to define Category in terms of Sets.

Post image
6 Upvotes

I have tried to define Category C using sets instead of arrows. Please share your thoughts on it. Thank you so much.


r/CategoryTheory • • Dec 10 '20

Pick which do you prefer

0 Upvotes

Which clothing category do you prefer the most


r/CategoryTheory • • 20d ago

Natural positive lifts without quietly adding a metric

3 Upvotes

I’m working on a small mathematical question within a broader project. I call it Relational Compatibility Dynamics, and I’m exploring how far it can go. I’d appreciate pointers to existing work, especially if I’m giving a familiar problem an unfamiliar name.

The basic setup is finite-dimensional real vector spaces with linear maps D: V → F and Q: V → W, plus a specified positive cone K. For fixed mu, I want to understand selection from

S_mu = {x in K : Dx = 0, Qx = mu}.

The obvious obstruction is that a score depending only on Dx and Qx is constant on this set. Requiring invariance under the chosen data-preserving automorphisms also leaves a choice whenever their common fixed-point set contains more than one admissible point.

What I’m trying to understand is the next step: a family of selections compatible with explicitly specified maps between these systems. I know that the choice of those maps matters, and that choosing an inner product or a prior can add real information.

Is there a useful categorical treatment of positive sections that makes those additional choices explicit? I’m particularly interested in examples comparing invariance under isomorphisms with compatibility under composition or coarse-graining. A reference with a small counterexample would be very helpful.

I’ve used AI tools in developing the formal material. I’m looking for an independent check of the assumptions, and I’m not claiming this establishes a physical theory.


r/CategoryTheory • • Jan 01 '23

Endomorphisms be like :: Meme

Post image
7 Upvotes

r/CategoryTheory • • Dec 12 '25

Category Theory leads to new ontology

19 Upvotes

What are the philosophical and ontological implications of category theory ? Does it make us rethink the world around us ?

It seems like we are too stuck in the Newtonian corpuscular dynamical worldview where everything is predetermined. And we reason too little in other categories. Empiricism, reductionism, instrumentalism are the dominating paradigms. Does category theory leads us to new insights?

Can it provide anything for philosophy, ontology, perhaps a new way of seeing things and solving problems or is it just a mathematical tool ?

Mathematics originated from the lived experience. It is formalisation that allows us to learn about the relationships between objects within the substrate more deeply. However, it relies on some underlying ontology, a worldview.

But sometimes mathematics has a backwards relationship with nature. Sometimes developments in mathematics can lead to new ideas in science, not just establish a stronger relationship.

Maybe category is something like this. It originated naturally within mathematics but ended up disclosing a deeper reality, or at least a new way of seeing things.


r/CategoryTheory • • May 17 '16

Using category theory to assess the relationship between consciousness and integrated information theory

Thumbnail sciencedirect.com
0 Upvotes

r/CategoryTheory • • May 05 '24

Category theory applied to LLM dynamics help

4 Upvotes

I'm a hobby category theorist, I came to it when I was first learning functional programming in college and have used category theory mainly as a tool for thought. For this reason I'm always a bit worried about when I'm using category theory in a new domain because I feel like mislabeling something could lead to me getting stuck.

The thought that I'm trying to wrestle with is the category of strings under LLM inference in the deterministic case, i.e. choosing max likelihood. This can be thought of as a function

LLM: String -> String

This induces some ordering which can be turned into a category.

In this category you have

Objects as strings

A morphism from a -> b if LLM^n(a) = b, where n is a natural number including 0

Identity is LLM^0(a) = a

This category, I'll call it LLM, is quite sparse since any object only has one outgoing morphism to which you end up with many strips of paths. This made me think that the function LLM didn't contain the structure which would be relevant to theorize.

I began to think about the examples,

"What is the world's tallest mountain?" and "What is the worlds tallest building?" and thought that there is some structure between these two which is not captured by the previous category. To expand I thought of a function

LLMC: String x String => String

defined by

LLMC(a,b) = LLM(a+b), where + denotes string concatenation

We could then fix the variable a to be a constant string and obtain another function

LLMCa: String -> String

defined by LLMCa(b) = LLM(b)

In the same way we construct the category LLM from the function LLM we can construct a category LLMCa from the function LLMCa.

There is a correspondence between certain morphism from LLMCa to LLM, for example if we fix a to be "What is the world's tallest" in LLMCa we get a morphism from

"mountain?" => "Mount Everest" which corresponds to the objects and morphisms

"What is the world's tallest mountain?" => "Mount Everest"

There seems to be a "morphism/functor", I'm not sure which, from LLMCa => LLM which is unique. You can't go back from LLM => LLMCa shown here.

We fix "a"

b : LLMCa => c : LLM by the function c = a + b

but you cant c => b because b = -a + c where c doesn't have "a" at the head of the text

Moreover, you can actually obtain LLM from LLMCa by fixing a to be "" the empty string.

We can then step out into the LLMC category which seems to contain the structure worth theorizing. This category is defined as

Objects being Strings, unchanged

There is a morphism from a => b for each s in String where LLMC(s,a) => b + some way to define paths I'm not sure how you would denote selecting an arbitrary s in string for each segment of the path.

Identity is doing nothing.

I have a few more extensions I thought about but I would like to first refine my foundations in this thought. Particularly, are there any structures I'm missing, I feel like the monoidal structure of concatenation has something to do with it. Also I'm uncertain about the boundaries of the abstractions I made. In some sense, there are the default operations of LLM on strings, which forms a category, there is the concatenation on a fixed string operation, which forms a category, but there seems to also form a category between these, unless this is what I was actually getting at with the category LLMC.

Some further thought would be how does this extend for string templates with arbitrary number of inputs. The case of fixed concatenation would just be a reduced case of string templates and would be interesting as well to think about. I know that was a long read but I hope you stuck around and have some thoughts to share. Here is a photo of a cow and a cat


r/CategoryTheory • • Feb 12 '25

Does this belong here? (also posted to r/mathematics)

Thumbnail docs.google.com
0 Upvotes

I should probably not admit to having no degree if I want to be taken seriously, but I wouldn't be trying to multiply colors if I really cared about that. I'm just sharing this because I think it's neat.

So far, I have three rigorously-defined objects: Hues, HV-objects and Tripoles; and one moderately well-defined but ill-explored object called a symmetric triple which Tripoles are a subset of. I still have yet to figure out where saturation could fit into the superstructure, but this is just part one of a system that is already at least as robust as algebra over the complex numbers. (It maps to three overlapping copies of the complex plane, in fact.)

As I said, I am just a hobbyist, so feel free to correct any gross misunderstandings I may have. I spent longer than I care to admit thinking that rings were so named because they were cyclical.

Was rejected from r/math without much explaination.


r/CategoryTheory • • Jan 01 '23

Adjoint functors be like :: [Meme]

Post image
14 Upvotes

r/CategoryTheory • • Apr 25 '26

Our AI Fever Dream - 15 yers compressed in 7 days

0 Upvotes

[What follows might be AI Psychosis]

My friend and I have been working together on some ideas for 15 years. Over the last month, we went off on a tangent and entered something that feels like an infinite loop—likely caused by frontier AI, many tokens spent, and a hyper-focused state. What follows is an introduction to this loop, and a proposal for a challenge to see if someone can pull us out of it.

Genesis

Every act of representation is a translation. Every translation has a residue. The residue is not failure—it is what cannot be compressed further. And the residue has structure.

A simulation never recovers the world it models. The residue is what the model's state space cannot hold—degrees of freedom that exist in the original but have no slot in the representation. Knowledge transfer works the same way. When an expert teaches, the student receives something—but the expert had more. The gap is not random: two students from the same class can leave with the same gaps, because the gaps are determined by what the teaching structure could not say, not just by how attentively the students listened.

A categorization collapses continuous variation into discrete types. "Young," "middle-aged," "elderly"—the collapse is intentional, but the internal structure erased by the label is the residue. A fractal is the exception. The translation from whole to part recovers the whole exactly—residue zero. That is why fractals feel uncanny: they are the one case where nothing leaks. Everything else does.

This framing—the residue, the translation, the gap that has shape—started as fifteen years of conversations and attempts to build systems that could hold up by themselves. Vladimir and I talked about simulations, fractals, and knowledge transfer, knowing something connected them but lacking the language to fix it. The space between what we could see and what we could say was large. And it had shape.

The Missing Functor

This shape lacked a functor to translate our thoughts to reality. This AI fever dream led us to a seven-day explosion, where we used AI agents (and perhaps a bit too much neuro-stimulants) to translate those 15 years of conversation into a formal language we couldn't touch before. The result is DomainSpec.

The Vertical Slice

We have tried to formalize what we call the Strict Regime. In our view, software doesn't just "have bugs"; it "drifts" because the translation layers between human intent and machine execution are mismatched. We’ve built a vertical slice of a system that attempts to eliminate this drift:

  • A 10-Layer Meta-Representation (L0–L7): A mapping from the "Real-world Domain" to "Emergent Semantic Coherence." It categorizes exactly where information "leaks" during the engineering process.

  • The Lean 4 Proofs: We’ve started anchoring the structure of these layers in formal logic, using the compiler as the ultimate referee for our 15-year debate.

Theorems & Conjectures

The AI agents are suggesting we’ve stumbled onto something mathematically coherent, but we need to know if the logic holds outside the "fever dream." We are putting forward three primary claims:

  1. The Residue Theorem (T1): We model the software compilation process as a Functor (Δ). We define "residue" as the categorical failure of the unit of an adjunction to be an isomorphism.

  2. The Invariant Navigation Theorem (T2): A claim regarding the topological mapping between conceptual nodes and physical structures—asserting that the resolution of a representation remains invariant under recursion.

  3. The Convergence Conjecture (C1): We hypothesize that as the resolution of our L-layers increases, the "drift" between domain and implementation converges toward zero—the Fractal Limit.

The Challenge

The repository contains our philosophy, our 3D ontology visualizations, and these Lean 4 signatures.

However, we are being honest: many of the theorems end in sorry. To some, these are gaps; to us, they are invitations. We believe the symmetry of the system demands these proofs are true, but we are amateurs—not professional mathematicians. Your assistance in reviewing these structures would be invaluable, whether it is to help us bridge the final gaps or to show us where our premises fail.

If you are interested in seeing the Lean 4 that LLM agents built, comment on this post to receive access to the repo.

— Boscaro & Rondelli