Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A direct proof of univalence from uaβ and uaη #1069

Merged
merged 3 commits into from
Nov 3, 2023

Conversation

phijor
Copy link
Contributor

@phijor phijor commented Oct 23, 2023

While trying to resolve the duplication between uaη and uaTransportη mentioned in this comment, I noticed that together with uaβ this yields a very "cubical" proof of univalenceIso, avoiding induction on paths and equivalences completely. I attempted to code-golf away the use of isoToIsEquiv and prove isEquivPathToEquiv directly, but wasn't able to (at least not more efficiently).

In detail, the commits do the following:

  • 0dcfa97 moves transpEquiv to Cubical.Foundations.Equiv.Base and generalizes it to arbitrary lines of types. Arguably, this should be called isEquivCoei→1 and live in *.CartesianKanOps, but there's a module dependency cycle involving that and *.GroupoidLaws that I'm not sure how to break.
  • 39f61f4 moves the direct proof of uaη via Glue types from *.Transport to *.Univalence, deprecates uaTransportη in the former.
  • cc06407 gives a direct proof of univalenceIso. The 1lab has a similar proof, they note however that uaη "is hard".

I'd like some feedback on these changes, so I'm marking this as a draft for now. In particular, I'm not sure how and where to place things in the module hierarchy, how to deprecate stuff (if at all), and whether the new proof is even better at all. Additionally, the improved proof of uaη is by @dolio originally, and I don't want the attribution to be lost.

Pinging @mortberg who encouraged the cleanup as part of #1017.

@mortberg
Copy link
Collaborator

mortberg commented Nov 2, 2023

I think this looks good. Any opinions @ecavallo ?

@ecavallo
Copy link
Collaborator

ecavallo commented Nov 2, 2023

Seems fine to me.

@mortberg mortberg marked this pull request as ready for review November 2, 2023 12:45
@mortberg
Copy link
Collaborator

mortberg commented Nov 2, 2023

I marked this as ready for review so that I can make a proper review. It's nice to see that uaη has a direct proof, maybe the 1lab should be updated as well

Copy link
Collaborator

@mortberg mortberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion and small request, otherwise very nice contribution!

Cubical/Foundations/Transport.agda Outdated Show resolved Hide resolved
Cubical/Foundations/Univalence.agda Show resolved Hide resolved
@phijor
Copy link
Contributor Author

phijor commented Nov 2, 2023

Thanks, I took care of your requests. Once you're happy with the changes I will rebase and squash my commits.

@phijor
Copy link
Contributor Author

phijor commented Nov 2, 2023

I'm really unhappy having to add transpEquiv to Equiv.Base though. If #1001 gets merged, one could import from CartesianKanOps instead of having to add unrelated definitions to such a core module.

@mortberg
Copy link
Collaborator

mortberg commented Nov 3, 2023

I'm really unhappy having to add transpEquiv to Equiv.Base though. If #1001 gets merged, one could import from CartesianKanOps instead of having to add unrelated definitions to such a core module.

But isn't transpEquiv a very basic equivalence that fits in Equiv.Base? I'd rather have it there than in CartesianKanOps (which was mostly added as proof of concept and at least I did not envision it being used much elsewhere in the library)

@phijor phijor force-pushed the phijor/univalence-from-eta-beta branch from 271cbf6 to 8390161 Compare November 3, 2023 10:50
The computation rules `uaβ` and `uaη` show that `pathToEquiv` and `ua`
define both directions of an isomorphism.  This sidesteps the proof in
module `Univalence`, which is done by induction on paths (`J`) and
equivalences (`EquivJ`).
@phijor phijor force-pushed the phijor/univalence-from-eta-beta branch from 8390161 to cc06407 Compare November 3, 2023 10:51
@phijor
Copy link
Contributor Author

phijor commented Nov 3, 2023

Rebased on current master and squashed.

But isn't transpEquiv a very basic equivalence that fits in Equiv.Base?

Convinced. Let's leave it in Equiv.Base.

I'd rather have it there than in CartesianKanOps (which was mostly added as proof of concept and at least I did not envision it being used much elsewhere in the library)

I see. I think coe etc. could improve readability of some proofs (the 1lab uses it in quite a few places), but that's a discussion for another time.

@mortberg mortberg merged commit f8d6fcf into agda:master Nov 3, 2023
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.

3 participants