Skip to content

[Merged by Bors] - feat(Order/Interval/Set): Set.ncard lemmas for LocallyFiniteOrder - #39783

Closed
SnirBroshi wants to merge 5 commits into
leanprover-community:masterfrom
SnirBroshi:feature/locally-finite-order/set-ncard-lemmas
Closed

SnirBroshi wants to merge 5 commits into
leanprover-community:masterfrom
SnirBroshi:feature/locally-finite-order/set-ncard-lemmas

Conversation

@SnirBroshi

@SnirBroshi SnirBroshi commented May 24, 2026 •

Copy link
Copy Markdown
Collaborator

Followup to #39414 which untagged Fintype.card_I?? as @[simp].

Adds Cardinal.mk/Set.encard/Set.ncard lemmas for the 8 interval sets Set.I?? (= 24 lemmas),
that convert them to Finset.card over the corresponding Finset.I?? from a LocallyFiniteOrder instance.


simp? I think it's a bit strange since the LocallyFiniteOrder instance could have crazy definitions for the finset intervals which aren't "simpler", though the instances we currently have are simple.

Open in Gitpod

@github-actions

github-actions Bot commented May 24, 2026 •

Copy link
Copy Markdown

PR summary f90c861bfc

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Order.Interval.Set.Card (new file) 781

Declarations diff (regex)

+ Set.cardinalMk_Icc
+ Set.cardinalMk_Ici
+ Set.cardinalMk_Ico
+ Set.cardinalMk_Ioi
+ Set.cardinalMk_Ioo
+ Set.cardinalMk_uIcc
+ Set.encard_Icc
+ Set.encard_Ici
+ Set.encard_Ico
+ Set.encard_Ioi
+ Set.encard_Ioo
+ Set.encard_uIcc
+ Set.ncard_Icc
+ Set.ncard_Ici
+ Set.ncard_Ico
+ Set.ncard_Ioi
+ Set.ncard_Ioo
+ Set.ncard_uIcc

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

  • +27 new declarations
  • −0 removed declarations
+Set.cardinalMk_Icc
+Set.cardinalMk_Ici
+Set.cardinalMk_Ico
+Set.cardinalMk_Iic
+Set.cardinalMk_Iio
+Set.cardinalMk_Ioc
+Set.cardinalMk_Ioi
+Set.cardinalMk_Ioo
+Set.cardinalMk_uIcc
+Set.encard_Icc
+Set.encard_Ici
+Set.encard_Ico
+Set.encard_Iic
+Set.encard_Iio
+Set.encard_Ioc
+Set.encard_Ioi
+Set.encard_Ioo
+Set.encard_uIcc
+Set.ncard_Icc
+Set.ncard_Ici
+Set.ncard_Ico
+Set.ncard_Iic
+Set.ncard_Iio
+Set.ncard_Ioc
+Set.ncard_Ioi
+Set.ncard_Ioo
+Set.ncard_uIcc

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

Current commit f90c861bfc
Reference commit df0e53b719

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

@YaelDillies YaelDillies 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.

Thanks!

maintainer delegate

Comment thread Mathlib/Order/Interval/Set/Card.lean Resolved
@YaelDillies YaelDillies removed their assignment Aug 31, 2026
@github-actions

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Aug 31, 2026

@jcommelin jcommelin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Aug 31, 2026
@jcommelin

Copy link
Copy Markdown
Member

Whoops

bors r-

bors d+

@mathlib-triage mathlib-triage Bot removed the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Aug 31, 2026
@mathlib-bors mathlib-bors Bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Aug 31, 2026
@mathlib-bors

mathlib-bors Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Bors build canceled.

Address comments or fix if necessary, and then someone with permission can run bors r+.

@mathlib-bors

mathlib-bors Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

✌️ SnirBroshi can now approve this pull request until 2026-09-14 09:15 UTC (in 2 weeks). To approve and merge, reply with bors r+. More detailed instructions are available here.

⚠️ This delegation only covers changes within Archive/**, Counterexamples/**, docs/**, DownstreamTest/**, Mathlib/**, MathlibTest/**, Wanted/**, widget/**, Archive.lean, Counterexamples.lean, docs.lean, Mathlib.lean, Wanted.lean; an author commit touching anything else will revoke it. Bors also revokes it if a later push changes too many files for it to check the full list — even if it stays within scope.

@mathlib-bors mathlib-bors Bot removed the ready-to-merge This PR has been sent to bors. label Aug 31, 2026
@SnirBroshi SnirBroshi changed the title feat(Order/Interval/Finset): Set.ncard lemmas for LocallyFiniteOrder feat(Order/Interval/Set): Set.ncard lemmas for LocallyFiniteOrder Sep 1, 2026

@jcommelin jcommelin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Sep 2, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Sep 2, 2026
…#39783)

Followup to #39414 which untagged `Fintype.card_I??` as `@[simp]`.

Adds `Cardinal.mk`/`Set.encard`/`Set.ncard` lemmas for the 8 interval sets `Set.I??` (= 24 lemmas),
that convert them to `Finset.card` over the corresponding `Finset.I??` from a `LocallyFiniteOrder` instance.
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Sep 2, 2026
@mathlib-bors

mathlib-bors Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Build failed (retrying...):

@mathlib-bors mathlib-bors Bot removed the bors-staging This PR is currently being built by bors on the staging branch. label Sep 2, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Sep 2, 2026
…#39783)

Followup to #39414 which untagged `Fintype.card_I??` as `@[simp]`.

Adds `Cardinal.mk`/`Set.encard`/`Set.ncard` lemmas for the 8 interval sets `Set.I??` (= 24 lemmas),
that convert them to `Finset.card` over the corresponding `Finset.I??` from a `LocallyFiniteOrder` instance.
mathlib-bors Bot pushed a commit that referenced this pull request Sep 2, 2026
…#39783)

Followup to #39414 which untagged `Fintype.card_I??` as `@[simp]`.

Adds `Cardinal.mk`/`Set.encard`/`Set.ncard` lemmas for the 8 interval sets `Set.I??` (= 24 lemmas),
that convert them to `Finset.card` over the corresponding `Finset.I??` from a `LocallyFiniteOrder` instance.
@bryangingechen

Copy link
Copy Markdown
Contributor

bors r+

mathlib-bors Bot pushed a commit that referenced this pull request Sep 2, 2026
…#39783)

Followup to #39414 which untagged `Fintype.card_I??` as `@[simp]`.

Adds `Cardinal.mk`/`Set.encard`/`Set.ncard` lemmas for the 8 interval sets `Set.I??` (= 24 lemmas),
that convert them to `Finset.card` over the corresponding `Finset.I??` from a `LocallyFiniteOrder` instance.
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Sep 2, 2026
@mathlib-bors

mathlib-bors Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(Order/Interval/Set): Set.ncard lemmas for LocallyFiniteOrder [Merged by Bors] - feat(Order/Interval/Set): Set.ncard lemmas for LocallyFiniteOrder Sep 2, 2026
@mathlib-bors mathlib-bors Bot closed this Sep 2, 2026
@mathlib-bors mathlib-bors Bot removed the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Sep 2, 2026
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Sep 5, 2026
…leanprover-community#39783)

Followup to leanprover-community#39414 which untagged `Fintype.card_I??` as `@[simp]`.

Adds `Cardinal.mk`/`Set.encard`/`Set.ncard` lemmas for the 8 interval sets `Set.I??` (= 24 lemmas),
that convert them to `Finset.card` over the corresponding `Finset.I??` from a `LocallyFiniteOrder` instance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. ready-to-merge This PR has been sent to bors. t-order Order theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants