Skip to content

Rename helper functions in Yoneda#1299

Merged
maxsnew merged 4 commits intoagda:masterfrom
dancewithheart:yoneda-embedding-split
Mar 18, 2026
Merged

Rename helper functions in Yoneda#1299
maxsnew merged 4 commits intoagda:masterfrom
dancewithheart:yoneda-embedding-split

Conversation

@dancewithheart
Copy link
Copy Markdown
Contributor

@dancewithheart dancewithheart commented Mar 13, 2026

Rename helper functions in Cubical.Categories.Yoneda:

  • yo-yo-yoyonedaToElement
  • no-no-noelementToYoneda

Partially addresses #1285.

@maxsnew
Copy link
Copy Markdown
Collaborator

maxsnew commented Mar 13, 2026

What's the impetus for splitting it into two files?

@dancewithheart
Copy link
Copy Markdown
Contributor Author

dancewithheart commented Mar 13, 2026

Splitting the
core Yoneda lemma (yoneda, yonedaᴾ, yoneda*, yonedaᴾ*) from the
embedding/application material (yo, YO, isFullYO, isFaithfulYO,
isFullyFaithfulYO) felt like a small cleanup in the spirit of #1267 (separating core
constructions from derived/application material).

@dancewithheart
Copy link
Copy Markdown
Contributor Author

I restored the split into two files so this PR focuses only on the renaming cleanup and keeps the diff easier to review.

@dancewithheart dancewithheart changed the title Split Yoneda embedding into separate module and rename helper functions Rename helper functions in Yoneda Mar 16, 2026
@maxsnew
Copy link
Copy Markdown
Collaborator

maxsnew commented Mar 18, 2026

Thanks sorry about the delay. Typically we split files like this into Base which have just the core construction with minimal imports, and then Properties etc that may pull in more imports. So the correct style for this repo if we were to split the files would be to put the core in Cubical.Categories.Yoneda.Base, the other stuff in Cubical.Categories.Yoneda.Properties and then have a module Cubical.Categories.Yoneda that re-exports everything from Base and Properties. This helps to avoid circular dependencies. In this case, since the imports weren't any different between the two modules it doesn't really make much of a difference so I don't think we should bother.

@maxsnew maxsnew merged commit 67a8e70 into agda:master Mar 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants