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

feat: allow EStateM to be used polymorphically #3010

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eric-wieser
Copy link
Contributor

@eric-wieser eric-wieser commented Dec 1, 2023

This doesn't change IO or ST, but does enable downstream projects like Mathlib to use EStateM for their own purposes with full universe polymorphism.

The alternative is defining an entire copy of EStateM, which is a lot of boilerplate.

Notably, the generalized EStateM.map can be invoked (in the non-monadic spelling) with ULift.up to move between universes.

Summary

Link to RFC or bug issue: this is a prerequisite for #3011, but may be justified in its own right.

This doesn't change `IO` or `ST`, but does enable downstream projects like `Mathlib` to use `EStateM` for their own purposes with full universe polymorphism.

The alternative is defining an entire copy of EStateM, which is a lot of boilerplate.
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Dec 1, 2023
@leanprover-community-mathlib4-bot
Copy link
Collaborator

  • ❗ Mathlib CI will not be attempted unless you rebase your PR onto the 'nightly' branch. (2023-12-01 21:00:48)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I can tell this is just a permutation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants