Skip to content

chore: rename Set.mem_singleton - #42551

Open
plp127 wants to merge 34 commits into
leanprover-community:masterfrom
plp127:aliu/mem_singleton_self
Open

plp127 wants to merge 34 commits into
leanprover-community:masterfrom
plp127:aliu/mem_singleton_self

Conversation

@plp127

@plp127 plp127 commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Rename Set.mem_singleton to Set.mem_singleton_self and rename Set.mem_singleton_iff to Set.mem_singleton. Also rename Set.notMem_singleton_self to Set.notMem_singleton. This is consistent with other container types like Finset and List.


Open in Gitpod

@plp127 plp127 added the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

PR summary fbf77d2697

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ mem_singleton_self
+ notMem_singleton

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 fbf77d2).

  • +2 new declarations
  • −0 removed declarations
+Set.mem_singleton_self
+Set.notMem_singleton

No changes to strong technical debt.

No changes to weak technical debt.

Current commit fbf77d2697
Reference commit bc06ce9f87

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.sh 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).

@github-actions github-actions Bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Aug 8, 2026
@Ruben-VandeVelde

Copy link
Copy Markdown
Contributor

For a PR this size, I'd suggest opening a discussion on Zulip first.

Separately, I would personally suggest that you rename Set.mem_singleton to Set.mem_singleton_self, leaving a deprecation in place for (at least) one release cycle, and only then move Set.mem_singleton_iff in its place.

@Ruben-VandeVelde Ruben-VandeVelde added the awaiting-zulip There is a Zulip discussion; the author should await and report/implement the decision reached there label Aug 13, 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
@grunweg grunweg added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Oct 26, 2026
@grunweg

grunweg commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Let me unlabel this with awaiting-zulip as I'm not aware of a Zulip discussion. If there's one, can you link that in the PR description; see e.g. #37346 for a useful format that will be enforced at some point in the future? Thanks!

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-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 merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants