Skip to content

Comonoids, duality, and related displayed tech#584

Draft
jajaperson wants to merge 53 commits intothe1lab:mainfrom
jajaperson:monoidal-internalization
Draft

Comonoids, duality, and related displayed tech#584
jajaperson wants to merge 53 commits intothe1lab:mainfrom
jajaperson:monoidal-internalization

Conversation

@jajaperson
Copy link
Contributor

@jajaperson jajaperson commented Jan 16, 2026

WIP

Description

This PR is working up to proving $\mathrm{Mon}(\mathcal C^\mathrm{op})^\mathrm{op}$ and $\mathrm{Comon}(\mathcal C)$ are equivalent as displayed categories. This has involved defining a lot of displayed machinery.

  • Comonoids
  • Total functor of displayed functor
  • Total natural transformation of displayed NT
  • Total adjunction of displayed adjunction
  • Sigma displayed category from Ahrens and Lumsdaine (2017)1 just for fun
  • Displayed category of displayed functors
  • Displayed equivalence
  • Total equivalence of displayed equivalence
  • Displayed equivalence of $\mathrm{Mon}(\mathcal C^\mathrm{op})^\mathrm{op}$ and $\mathrm{Comon}(\mathcal C)$

Checklist

Before submitting a merge request, please check the items below:

  • I've read the contributing guidelines.
  • The imports of new modules have been sorted with support/sort-imports.hs (or nix run --experimental-features nix-command -f . sort-imports).
  • All new code blocks have "agda" as their language.

If your change affects many files without adding substantial content, and
you don't want your name to appear on those pages (for example, treewide
refactorings or reformattings), start the commit message and PR title with chore:.

Footnotes

  1. Ahrens, Benedikt, and Peter LeFanu Lumsdaine. 2017. “Displayed Categories.” In 2nd International Conference on Formal Structures for Computation and Deduction (FSCD 2017), edited by Dale Miller, vol. 84. Leibniz International Proceedings in Informatics (LIPIcs). Schloss Dagstuhl – Leibniz-Zentrum für Informatik. https://doi.org/10.4230/LIPIcs.FSCD.2017.5.

@Lavenza
Copy link
Member

Lavenza commented Jan 16, 2026

ncfavier and others added 24 commits March 10, 2026 16:10
It's not used anywhere and with agda/agda#8318
merged there shouldn't ever be a reason to.
This ensures that `cabal build shake` succeeds without warnings, as a
first step towards making it possible to build the 1Lab without Nix.
Replace the bespoke `mkDerivation` with an equivalent `callCabal2nix`
so that dependencies and other build options are only tracked in one
place.

These changes are made with *four* use cases in mind:

- `nix-build` for building the 1Lab;
- `nix-shell --run '1lab-shake all'` for working on the 1Lab
  interactively;
- `nix-shell -A shakefile --run 'cabal run 1lab-shake -- all'` for
  working on the 1Lab *and the build script* interactively;
- `cabal run 1lab-shake -- all` outside of a Nix shell, after following
  the instructions in the README for setting up dependencies.
Since 9.10 is the default version in nixpkgs, Haskell dependencies are
now available from cache.nixos.org.
`all-pages.agda` is already generated by the shakefile. To build the
1Lab as an Agda library, one can use `agda --build-library`.
Both available mechanisms for determining whether we are in a
nix-shell invocation are currently broken:

- the `inNixShell` argument is not set by nix-direnv;
- the `IN_NIX_SHELL` environment variable is an environment variable,
  so it affects nix-build calls inside nix shells.

So we keep the shells separate instead.
Co-authored-by: Naïm Camille Favier <n@monade.li>
@jajaperson jajaperson force-pushed the monoidal-internalization branch from 143542b to 8b48936 Compare March 10, 2026 08:40
@jajaperson
Copy link
Contributor Author

The functions-over stuff was straying into the realm of centipede type theory, so I have moved the relevant stuff into a different branch where it will stay unless I can find an actual use for it.

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.

5 participants