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: lift StateM to StateT #476

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JamesGallicchio
Copy link
Collaborator

I feel like this might already exist somewhere, but with a not too old Std/Mathlib imported it does not exist yet.

@JamesGallicchio JamesGallicchio marked this pull request as ready for review December 21, 2023 12:10
@fgdorais fgdorais added the awaiting-review This PR is ready for review; the author thinks it is ready to be merged. label Dec 22, 2023
@fgdorais
Copy link
Collaborator

fgdorais commented Dec 22, 2023

Maybe I'm not thinking about this right, but StateM σ is literally StateT σ Id. Is there a reason why MonadLift doesn't happen automatically in such cases?

Comment on lines +10 to +11
instance [MonadLift m n] : MonadLift (StateT σ m) (StateT σ n) where
monadLift s := fun state => liftM (s state)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this have performance or error message implications? I think MonadLift is intended from outer to inner while this would potentially enable a search process.

@joehendrix joehendrix added awaiting-author Waiting for PR author to address issues and removed awaiting-review This PR is ready for review; the author thinks it is ready to be merged. labels Dec 27, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict This PR has merge conflicts with the `main` branch which must be resolved by the author. label Jan 4, 2024
@fgdorais
Copy link
Collaborator

Heartbeat check: is this PR still active? If it is then just give a thumbs up and I will delete this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-author Waiting for PR author to address issues merge-conflict This PR has merge conflicts with the `main` branch which must be resolved by the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants