Skip to content

[Merged by Bors] - feat(Algebra): add mem_closure_iff_of_fintype and mem_closure_finset' - #29793

Closed
staroperator wants to merge 4 commits into
leanprover-community:masterfrom
staroperator:mem_closure_fintype
Closed

staroperator wants to merge 4 commits into
leanprover-community:masterfrom
staroperator:mem_closure_fintype

Conversation

@staroperator

@staroperator staroperator commented Sep 19, 2025 •

Copy link
Copy Markdown
Collaborator

mem_closure_iff_of_fintype is a corollary of mem_closure_range_iff_of_fintype, when we have a s : Set M with a Fintype s instance on it. mem_closure_finset' is a special case of mem_closure_iff_of_fintype when we have a Finset.

Also add mem_span_iff_of_fintype for Submodule.

Thanks for the discussion in Zulip.


Open in Gitpod

@github-actions github-actions Bot added the t-algebra Algebra (groups, rings, fields, etc) label Sep 19, 2025
@github-actions

github-actions Bot commented Sep 19, 2025 •

Copy link
Copy Markdown

PR summary 47146f098b

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ Submodule.mem_span_iff_of_fintype
+ mem_closure_finset'
++ mem_closure_iff_of_fintype
+-+- exists_of_mem_closure_range

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/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).

@Ruben-VandeVelde Ruben-VandeVelde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maintainer merge

@github-actions

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde.

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Sep 20, 2025
@riccardobrasca

Copy link
Copy Markdown
Member

Can you check how much the current version is used? I suspect your version could be useful to golf some proofs, but maybe not.

@staroperator

staroperator commented Sep 21, 2025 •

Copy link
Copy Markdown
Collaborator Author

Can you check how much the current version is used? I suspect your version could be useful to golf some proofs, but maybe not.

Thanks, the only usage of mem_closure_finset is in IsLinearSet.isProperSemilinearSet introduced by myself 😄

But I find mem_closure_finset' is actually a simple corollary of existing mem_closure_range_iff_of_fintype.

@staroperator staroperator changed the title feat(Algebra): add mem_closure_finset' and mem_closure_fintype feat(Algebra): add mem_closure_iff_of_fintype and mem_closure_finset' Sep 21, 2025
@riccardobrasca

Copy link
Copy Markdown
Member

Do we have something similar for the span in a module?

@staroperator

Copy link
Copy Markdown
Collaborator Author

Do we have something similar for the span in a module?

We have Submodule.mem_span_finset and Submodule.mem_span_finset'. (No mem_span_iff_of_fintype yet, but it is an easy corollary of Fintype.mem_span_image_iff_exists_fun.)

@riccardobrasca

Copy link
Copy Markdown
Member

Would you mind adding it?

@staroperator

Copy link
Copy Markdown
Collaborator Author

Would you mind adding it?

Added!

@riccardobrasca

Copy link
Copy Markdown
Member

Thanks!

bors d+

@mathlib-bors

mathlib-bors Bot commented Sep 21, 2025

Copy link
Copy Markdown
Contributor

✌️ staroperator can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Sep 21, 2025
@staroperator

Copy link
Copy Markdown
Collaborator Author

bors r+

mathlib-bors Bot pushed a commit that referenced this pull request Sep 21, 2025
…et'` (#29793)

`mem_closure_iff_of_fintype` is a corollary of `mem_closure_range_iff_of_fintype`, when we have a `s : Set M` with a `Fintype s` instance on it. `mem_closure_finset'` is a special case of `mem_closure_iff_of_fintype` when we have a `Finset`.

Also add `mem_span_iff_of_fintype` for `Submodule`.

Thanks for the [discussion in Zulip](https://leanprover.zulipchat.com/#narrow/channel/217875-Is-there-code-for-X.3F/topic/.60Finset.2Euniv_eq_attach.60.20for.20.60Set.2EtoFinset.60).
@mathlib-bors

mathlib-bors Bot commented Sep 21, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(Algebra): add mem_closure_iff_of_fintype and mem_closure_finset' [Merged by Bors] - feat(Algebra): add mem_closure_iff_of_fintype and mem_closure_finset' Sep 21, 2025
@mathlib-bors mathlib-bors Bot closed this Sep 21, 2025
jcreinhold pushed a commit to jcreinhold/mathlib4 that referenced this pull request Sep 22, 2025
…et'` (leanprover-community#29793)

`mem_closure_iff_of_fintype` is a corollary of `mem_closure_range_iff_of_fintype`, when we have a `s : Set M` with a `Fintype s` instance on it. `mem_closure_finset'` is a special case of `mem_closure_iff_of_fintype` when we have a `Finset`.

Also add `mem_span_iff_of_fintype` for `Submodule`.

Thanks for the [discussion in Zulip](https://leanprover.zulipchat.com/#narrow/channel/217875-Is-there-code-for-X.3F/topic/.60Finset.2Euniv_eq_attach.60.20for.20.60Set.2EtoFinset.60).
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Oct 2, 2025
…et'` (leanprover-community#29793)

`mem_closure_iff_of_fintype` is a corollary of `mem_closure_range_iff_of_fintype`, when we have a `s : Set M` with a `Fintype s` instance on it. `mem_closure_finset'` is a special case of `mem_closure_iff_of_fintype` when we have a `Finset`.

Also add `mem_span_iff_of_fintype` for `Submodule`.

Thanks for the [discussion in Zulip](https://leanprover.zulipchat.com/#narrow/channel/217875-Is-there-code-for-X.3F/topic/.60Finset.2Euniv_eq_attach.60.20for.20.60Set.2EtoFinset.60).
zhuyizheng pushed a commit to zhuyizheng/mathlib4 that referenced this pull request Oct 2, 2025
…et'` (leanprover-community#29793)

`mem_closure_iff_of_fintype` is a corollary of `mem_closure_range_iff_of_fintype`, when we have a `s : Set M` with a `Fintype s` instance on it. `mem_closure_finset'` is a special case of `mem_closure_iff_of_fintype` when we have a `Finset`.

Also add `mem_span_iff_of_fintype` for `Submodule`.

Thanks for the [discussion in Zulip](https://leanprover.zulipchat.com/#narrow/channel/217875-Is-there-code-for-X.3F/topic/.60Finset.2Euniv_eq_attach.60.20for.20.60Set.2EtoFinset.60).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants