Zulip Chat Archive

Stream: general

Topic: My Yoneda Lemma


Luc Duponcheel (Sep 26 2025 at 17:02):

Hello folks,

Here I am again with a technical question.

I have, temporarily, put my PSBP work "on hold".

FYI, I will be presenting it during the ITP 2025 lean workshop.

I have two other GitHub projects (yoneda and timeHybrids) that I want to convert to Lean.

They are more mathematics related than programming related.

I hope that, one day, they will be part of the famous MathLib project.

I am already preparing a "quick and dirty", "very low profile" version of my yoneda project in Lean.

Of course, the idea is to, eventually, use MathLib definitions instead of my own definitions.

I hope that I will have time to show it to some interested persons at the workshop.

See https://github.com/LucDuponcheelAtGitHub/yoneda for the project (in Scala).

The timeHybrids project is more challenging.

That being said (thx for keeping on reading) ... .

I encountered yet another "beginner issue".

It is related to the line in comments in the code below.

I define (on line 231) class PreFunctionalCategory.
It has a member ν (on line 247) that corresponds member ν (on line 134) of class PreTriple.

My question is:

can I avoid the error message

Parent type mismatch: has type
  Functor morphism morphism (GlobalElement morphism)
but is expected to have type
  Functor function morphism Id

when (on line 235) I want to extend PreTriple morphism (GlobalElement morphism) ?

Agreed, there are two Functors involved, but, there must be some way out, no?

Code listing

Luc Duponcheel (Sep 26 2025 at 21:31):

FYI

For arbitrary categories, the Yoneda lemma deals with functors from (arbitrary category) morphisms to (Set category) functions. The Yoneda lemma is pointful (i.e. deals with elements of sets).

The idea behind my "lemma" is the following.

What I call functional categories, are categories for which there exists a functor from (Set category) functions to (functional category) morphisms.

Composing a functor from (functional category) morphisms to (Set category) functions with that functor from (Set category) functions to (functional category) morphisms yields an endofunctor from (functional category) morphisms to (functional category) morphisms.

My "lemma" is a pointfree Yoneda-like lemma for such endofunctors.


Last updated: Dec 20 2025 at 21:32 UTC