101010.pl is one of the many independent Mastodon servers you can use to participate in the fediverse.
101010.pl czyli najstarszy polski serwer Mastodon. Posiadamy wpisy do 2048 znaków.

Server stats:

507
active users

#categorytheory

0 posts0 participants0 posts today
Replied in thread

@das_g True. It is certainly magical that there is a programming language which defines a state monad called “IO” (or sometimes “Effect”) which carries around with it a symbol of the entire Real World in order to model the idea that any evaluation of a function of that type of monad may (or may not) create a change somewhere out in the real world, as opposed to “pure” functions which can only ever manipulate the stack.

Formal P-category theory and normalization by evaluation in Rocq. ~ David G. Berry, Marcelo P. Fiore. arxiv.org/abs/2505.07780 #ITP #Rocq #CategoryTheory

arXiv.orgFormal P-Category Theory and Normalization by Evaluation in RocqTraditional category theory is typically based on set-theoretic principles and ideas, which are often non-constructive. An alternative approach to formalizing category theory is to use E-category theory, where hom sets become setoids. Our work reconsiders a third approach - P-category theory - from Čubrić et al. (1998) emphasizing a computational standpoint. We formalize in Rocq a modest library of P-category theory - where homs become subsetoids - and apply it to formalizing algorithms for normalization by evaluation which are purely categorical but, surprisingly, do not use neutral and normal terms. Čubrić et al. (1998) establish only a soundness correctness property by categorical means; here, we extend their work by providing a categorical proof also for a strong completeness property. For this we formalize the full universal property of the free Cartesian-closed category, which is not known to have been performed before. We further formalize a novel universal property of unquotiented simply typed lambda-calculus syntax and apply this to a proof of correctness of a categorical normalization by evaluation algorithm. We pair the overall mathematical development with a formalization in the Rocq proof assistant, following the principle that the formalization exists for practical computation. Indeed, it permits extraction of synthesized normalization programs that compute (long) beta-eta-normal forms of simply typed lambda-terms together with a derivation of beta-eta-conversion.
Continued thread

🧭 Contravariant Peter Principle (a.k.a. The Lizard Scenario)

Now imagine instead that your competence remains fixed, but the job requirements mutate. That’s a contravariant scenario:
Contravariant Responsibility Functor:

Let’s say there's a functor \( G:R^{op}\rightarrow C\)

This maps the changing role structure back into what competence would be needed to perform it.

But if the functor is no longer representable, then the job has moved beyond what your (static) domain supports. You didn't move—the codomain did.

In a sense, the organization pulls back a mutated version of the role, and you’re now the wrong preimage. That’s not your fault—but the target object has changed.

🧠 Categorical Peter Principle

Let’s model the Peter Principle as a (somewhat playful) functor:

Covariant Peter Functor:

Let C be the category of competence levels.

Let R be the category of responsibility levels.

Then a functor F:C→R maps increasing competence to increasing responsibility.

But (here’s the punchline):
This functor preserves structure only up to the breaking point.

At each step, you’re promoted to a position requiring slightly more competence than you currently have. The mapping continues until the functor fails to be faithful—you get promoted past the limits of your competence, and the correspondence breaks.

(by now you know who wrote this)

🧩 Example: Law as a Natural Transformation

Imagine a 2-functor from:

Category of individual acts and desires (personal logic, rights)

To category of socially accepted actions (legal logic, responsibilities)

Then a natural transformation encodes:

How a society translates individual reasoning into enforceable action.

How law binds or restricts certain inferences while preserving structure (naturality condition).

That is, this commutes if η is natural — that is, doing something and then applying law is the same as applying law first and doing the translated thing.

--- oops, ChatGPT doesn't know about asking for permission vs forgiveness; I mean, it *should* commute, except for that pesky time asymmetry where you can't take back what you did. --- more context is needed ---

This models ethics, cultural norms, or constitutional constraints as natural transformations that preserve reasoning across systems.

This is why we need Judges. It's not an easy job, respect them

ChatGPT on categorical logic again.

🧱 Level 1: Morphisms = Proofs, Typed with Validity

You can think of these arrows as typed by a truth value — i.e., each morphism has a color: valid, invalid, plausible, context-sensitive, contradictory-but-derivable, etc.

In this sense, truth is not binary, but becomes a fiber over each morphism: a coloring or modality.

So your category becomes a fibration over a poset of truth values, or a category enriched in truth values — maybe in a Heyting algebra or relevance lattice.

🧱 Level 2: 2-Cells = Laws, Derivations, Transformations

Now we raise it to a 2-category:

0-cells: Propositions (types)

1-cells: Deductions / proof structures f:A→B

2-cells: Proofs of equivalence between proofs (e.g., natural transformations, rewrite rules, context substitution, modality shifts)

This is where natural transformations live: between two different "routes" from A to B. They express meta-logical structure: laws, policies, meanings.

Let’s say you have:

One arrow f:A→B defined in deontic logic (permission-based)

Another arrow g:A→B in alethic logic (necessity-based)

A natural transformation η:f⇒g might be a social contract or legal interpretation that maps from a space of permitted inferences to necessary ones — or vice versa.

🔹 “Natural” Rights and Naturality

The Founders talked about “natural rights” in the Lockean sense (self-evident, god-given, not granted by governments), but modern naturality—in the categorical sense—is about structure-preserving transformations, functors and natural transformations that respect the relationships between objects.

So here's the kicker:

The “natural” rights the Founders described were not truly natural transformations —

They didn’t define the morphisms between citizens, societies, and responsibilities.

They intuited that something was preserved under moral "structure", but without the machinery to make this precise.

💡 Maybe what the Constitution lacks is a natural transformation from Rights to Responsibilities.

I couldn't have put it better myself, which is why I posted ChatGPT's version. I know it still sounds a little like nonsense, but

Rights and Responsibilities are really two sides of the same coin, you can't have one without the other (you can drive a car, buy a gun, etc., but you have to learn how to use it first, and get a license, etc.)

ChatGPT has a new sister called Monday. I will let you find out about that. Meanwhile here is what ChatGPT says about using enriched categories to model relevance logic:

An Example Sketch

Let V=Pos be a poset-enriched monoidal category where each hom-object is a set of “proofs” or “derivations,” ordered by resource usage.

Then C(A,B) is itself an object in Pos, i.e., a poset of ways to prove B from A.

The product ⊗ inside C does not come with free projections, so there is no arrow from (A⊗B) to B in general.

If someone claims “Surely, we can discard A and prove B anyway,” the poset of proofs for C(A⊗B,B) is _empty_, or has no minimal element if your ordering demands using all resources.

Thus, the absence of a projection morphism is encoded in the structure of the hom-object: it simply does not contain a suitable proof.

--
here 'resource usage' is 'relevant stuff'

You can write (A⊗B) -> B, in a diagram. But that arrow is "False", so it doesn't really "exist". Enriched categories capture this concept.

Category theory using Haskell (An introduction with Moggi and Yoneda). ~ Shuichi Yukita. books.google.com/books?id=4Xc2 #CategoryTheory #Math #Haskell #FunctionalProgramming

Google BooksCategory Theory Using HaskellThis unique book offers an introductory course on category theory, which became a working language in algebraic geometry and number theory in the 1950s and began to spread to logic and computer science soon after it was created. Offering excellent use of helpful examples in Haskell, the work covers (among other things) concepts of functors, natural transformations, monads, adjoints, universality, category equivalence, and many others. The main goal is to understand the Yoneda lemma, which can be used to reverse-engineer the implementation of a function. Later chapters offer more insights into computer science, including computation with output, nondeterministic computation, and continuation passing. Topics and features: Contains rigorous mathematical arguments to support the theory Provides numerous Haskell code-implementing examples Engages with plentiful diagram chasing, with special emphasis on the design patterns for constructing a large diagram out of basic small pieces Offers insights into category theory to quantum computing and the foundation of computing discipline Serves as a preparatory course for monoidal categories and higher categories The work will be useful to undergraduate students in computer science who have enough background in college mathematics such as linear algebra and basics in Haskell polymorphic functions. Further, it will appeal to graduate students and researchers in computing disciplines who want to newly acquire serious knowledge of category theory.

ChatGPT's thought processes:

I'm tying together the rich tapestry of philosophical insights and category theory, exploring how enriched categories, with their hom-sets as objects in a monoidal category, aid in managing complexity, partial orders, or metrics, moving beyond conventional morphism sets.

I'm starting to see how enriched categories with hom-sets as partially ordered sets can capture complexity, cost, or transformation intricacies through preorders, partial orders, metrics, or probabilities.

I’m piecing together how enriched categories can reveal more about morphisms by incorporating structures like complexity, cost, or probability, allowing short and long morphisms to be systematically compared.

... and then it crashed, without producing a response. This is very similar to my experience with this material, yes, quite human-like