Skip to content

feat: add support for match in iprop(...)#525

Merged
MackieLoeffel merged 3 commits into
leanprover-community:masterfrom
alexkeizer:iprop-match
Jul 22, 2026
Merged

feat: add support for match in iprop(...)#525
MackieLoeffel merged 3 commits into
leanprover-community:masterfrom
alexkeizer:iprop-match

Conversation

@alexkeizer

Copy link
Copy Markdown
Contributor

Description

This PR adds a macro expansion, such that in iprop(match ... with ...) the right-hand-side of each match alternative is wrapped with iprop again.

For example, this enables the parsing of the following:

iprop(match p with
  | true => P ∗ Q
  | false => Q ∗ P)

Checklist

  • My code follows the mathlib naming and code style conventions
  • I have added my name to the authors section of any appropriate files

Generative AI Guidelines

This code is 100% human-written

This PR adds a macro expansion, such that in `iprop(match ... with ...)` the right-hand-side of each match alternative is wrapped with `iprop` again.

For example, this enables the parsing of the following:
```lean4
iprop(match p with
  | true => P ∗ Q
  | false => Q ∗ P)
```
Comment thread Iris/Iris/BI/Notation.lean Outdated
Comment thread Iris/Iris/BI/Notation.lean
@markusdemedeiros

Copy link
Copy Markdown
Collaborator

Nice. I'm glad that there's a way to do this without writing our own matching primitive.

@MackieLoeffel MackieLoeffel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great, thanks for the PR! I responded to the comments.

Comment thread Iris/Iris/BI/Notation.lean Outdated
Comment thread Iris/Iris/BI/Notation.lean
@alexkeizer

Copy link
Copy Markdown
Contributor Author

@MackieLoeffel I responded to your comments, could you have another look?

@alexkeizer
alexkeizer requested a review from MackieLoeffel July 21, 2026 22:42

@MackieLoeffel MackieLoeffel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks great now, thank you!

@MackieLoeffel
MackieLoeffel merged commit 4377238 into leanprover-community:master Jul 22, 2026
5 checks passed
@alexkeizer

Copy link
Copy Markdown
Contributor Author

Thanks for the quick reviews!

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