Skip to content

refactor: unify Set.mem_ofPred_eq into Set.mem_ofPred - #42692

Open
Parcly-Taxel wants to merge 68 commits into
leanprover-community:masterfrom
Parcly-Taxel:mem_ofPred
Open

Parcly-Taxel wants to merge 68 commits into
leanprover-community:masterfrom
Parcly-Taxel:mem_ofPred

Conversation

@Parcly-Taxel

@Parcly-Taxel Parcly-Taxel commented Aug 12, 2026 •

Copy link
Copy Markdown
Collaborator

Before:

@[simp, mfld_simps, push]
theorem mem_ofPred_eq {x : α} {p : α → Prop} : (x ∈ {y | p y}) = p x := rfl

theorem mem_ofPred {a : α} {p : α → Prop} : a ∈ { x | p x } ↔ p a := Iff.rfl

After:

@[simp, mfld_simps, push]
theorem mem_ofPred {x : α} {p : α → Prop} : (x ∈ {y | p y}) = p x := rfl

@[deprecated (since := "2026-08-12")] alias mem_ofPred_eq := mem_ofPred

Note that the lemma with iff is unusable by dsimp.


@github-actions

github-actions Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

PR summary c57e5df72a

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ _root_.Membership.mem.out

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit c57e5df).

  • +0 new declarations
  • −0 removed declarations

No declaration differences.


No changes to strong technical debt.
No changes to weak technical debt.

Current commit c57e5df72a
Reference commit 8fe7ce475b

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@eric-wieser

Copy link
Copy Markdown
Member

Can you make clear in the description what the statements before and after this change are? The diff is full of replacements that obscure that.

@Parcly-Taxel

Copy link
Copy Markdown
Collaborator Author

Can you make clear in the description what the statements before and after this change are? The diff is full of replacements that obscure that.

Done.

@eric-wieser

Copy link
Copy Markdown
Member

Done.

Could you make it a little clearer, and repeat the exact statement (and deprecations) of the lemmas before and after this change?

A Zulip poll suggested removing Set.mem_ofPred_eq.

I don't think the zulip poll was voting to remove the Iff version; or equivalently, the vote did not makes clear that the names were being swapped around.

@eric-wieser eric-wieser added awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. awaiting-zulip There is a Zulip discussion; the author should await and report/implement the decision reached there labels Aug 14, 2026
@Parcly-Taxel Parcly-Taxel removed awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. awaiting-zulip There is a Zulip discussion; the author should await and report/implement the decision reached there labels Aug 14, 2026
@Parcly-Taxel

Copy link
Copy Markdown
Collaborator Author

I don't think the zulip poll was voting to remove the Iff version; or equivalently, the vote did not makes clear that the names were being swapped around.

I made another poll to see what the name of the remaining lemma should be.

@Parcly-Taxel Parcly-Taxel added the awaiting-zulip There is a Zulip discussion; the author should await and report/implement the decision reached there label Aug 14, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 14, 2026
@github-actions github-actions Bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 15, 2026
@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 15, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@github-actions github-actions Bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 15, 2026
@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 15, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@github-actions github-actions Bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 16, 2026
@Parcly-Taxel Parcly-Taxel added tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip and removed awaiting-zulip There is a Zulip discussion; the author should await and report/implement the decision reached there labels Aug 16, 2026
@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 17, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@Parcly-Taxel Parcly-Taxel removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 17, 2026
@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 18, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@github-actions github-actions Bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 19, 2026
@Parcly-Taxel
Parcly-Taxel requested a review from JovanGerb August 19, 2026 02:51
@grunweg grunweg added the awaiting-zulip There is a Zulip discussion; the author should await and report/implement the decision reached there label Aug 19, 2026
@grunweg

grunweg commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This topic is actively being discussed on Zulip: let's have that discussion converge first :-)

@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-zulip There is a Zulip discussion; the author should await and report/implement the decision reached there tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants