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

Continuation modalities and Lawvere–Tierney topologies #1157

Merged
merged 24 commits into from
Nov 5, 2024

Conversation

fredrik-bakke
Copy link
Collaborator

@fredrik-bakke fredrik-bakke commented Jul 6, 2024

Defines continuation modalities as a generalization of the double negation modality, and shows they define Lavwere–Tierney topologies on types. It also improves term usage in the file about reflective subuniverses.

@fredrik-bakke
Copy link
Collaborator Author

With the addition of Lawvere–Tierney topologies, I wonder if this PR is relevant to #930.

@fredrik-bakke fredrik-bakke marked this pull request as draft July 7, 2024 11:11
@fredrik-bakke fredrik-bakke marked this pull request as ready for review July 10, 2024 13:57
@fredrik-bakke fredrik-bakke changed the title Continuation modalities Continuation modalities and Lawvere–Tierney topologies Aug 10, 2024
Copy link
Collaborator

@EgbertRijke EgbertRijke left a comment

Choose a reason for hiding this comment

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

Awesome pull request! Sorry that it took so long to get this PR reviewed, but the Lawvere-Tierney stuff is great!

I had some minor comments.

src/foundation/continuations.lagda.md Outdated Show resolved Hide resolved
src/foundation/continuations.lagda.md Outdated Show resolved Hide resolved
src/foundation/continuations.lagda.md Outdated Show resolved Hide resolved
src/foundation/continuations.lagda.md Outdated Show resolved Hide resolved
@fredrik-bakke
Copy link
Collaborator Author

Thanks for the review, and for catching the less-than-ideal phrasing!

After looking closer, I cannot find a good source for how to speak about the continuation monad either. If I understand correctly, it is the A → R in (A → R) → R that is the "continuation". The total expression should be read as "if we can compute R from A, then we can compute R", or "from a continuation on A we have a computation of R". And the act of using the continuation monad in programming can be referred to as "programming in continuation passing style".

In the context of the double negation modality, we should read it as "if A is empty, then we can deduce a contradiction." But, I am not an apprentice in the field of computability theory, and I don't know enough about the subject to give a satisfactory expository explanation. If I recall correctly, the reason I formalized continuations was mainly for the spurious connection I saw to the double negation modality.

I've reworded most of what I can find to refer to "the continuation monad" rather than "continuations". Let me know if this is satisfactory.

@EgbertRijke
Copy link
Collaborator

Thank you!

@EgbertRijke EgbertRijke merged commit 3ca79e6 into UniMath:master Nov 5, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants