Skip to content

chore: make trivial definitions unfold - #525

Merged
chenson2018 merged 2 commits into
leanprover:mainfrom
eric-wieser:effects-abbrev
Apr 30, 2026
Merged

chore: make trivial definitions unfold#525
chenson2018 merged 2 commits into
leanprover:mainfrom
eric-wieser:effects-abbrev

Conversation

@eric-wieser

@eric-wieser eric-wieser commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

This changes function like toStateM to be abbrevs since they are only a shorthand for liftM stateInterp. It also marks stateInterp and similar as @[simp], since we want these to reduce when applied to a concrete query.

This also fixes contInterp to include the missing cast functions, so that the simp equation lemma is not ill-formed.

Split from #417, to minimize distractions from the actual change in that PR.

This changes function like `toStateM` to be `abbrev`s since they are only a shorthand for `liftM stateInterp`.
It also marks `stateInterp` and similar as `@[simp]`, since we want these to reduce when applied to a concrete query.
@chenson2018
chenson2018 added this pull request to the merge queue Apr 30, 2026
Merged via the queue into leanprover:main with commit fd066e6 Apr 30, 2026
3 checks passed
quangvdao pushed a commit to quangvdao/cslib that referenced this pull request May 28, 2026
This declares `liftBind` an implementation detail, encouraging users to
work with `lift` and `bind` separately instead.

In particular:
* `>>=` is now the simp-normal form of `FreeM.bind`
* `<$>` is now the simp-normal form of `FreeM.map`
* `Pure.pure` is now the simp-normal form of `FreeM.pure`

Note that due to a failing in the design of monads in Lean around
universes, it is not always possible to use the notation.
The advantage of using it when it _is_ available is that standard lemmas
about lawful monads can apply.

---

Depends on:
* leanprover#439
* leanprover#490
* leanprover#525
benbrastmckie pushed a commit to benbrastmckie/cslib that referenced this pull request Jun 14, 2026
This changes function like `toStateM` to be `abbrev`s since they are
only a shorthand for `liftM stateInterp`. It also marks `stateInterp`
and similar as `@[simp]`, since we want these to reduce when applied to
a concrete query.

This also fixes `contInterp` to include the missing cast functions, so
that the `simp` equation lemma is not ill-formed.

Split from leanprover#417, to minimize distractions from the actual change in that
PR.
benbrastmckie pushed a commit to benbrastmckie/cslib that referenced this pull request Jun 14, 2026
This declares `liftBind` an implementation detail, encouraging users to
work with `lift` and `bind` separately instead.

In particular:
* `>>=` is now the simp-normal form of `FreeM.bind`
* `<$>` is now the simp-normal form of `FreeM.map`
* `Pure.pure` is now the simp-normal form of `FreeM.pure`

Note that due to a failing in the design of monads in Lean around
universes, it is not always possible to use the notation.
The advantage of using it when it _is_ available is that standard lemmas
about lawful monads can apply.

---

Depends on:
* leanprover#439
* leanprover#490
* leanprover#525
benbrastmckie added a commit to benbrastmckie/cslib that referenced this pull request Jul 18, 2026
Spawned leanprover#524 (new KB5-specific full-cluster propagation rule + soundness)
and leanprover#525 (KB5 completeness proof + Decidable (kb5Valid), depends on 524).
Parent leanprover#515 now [BLOCKED] on 524, 525.

Session: sess_1784327380_e6aeac
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.

2 participants