Skip to content

[Merged by Bors] - refactor: definition and notation for EventuallyEq on Set - #41533

Closed
YaelDillies wants to merge 3 commits into
leanprover-community:masterfrom
YaelDillies:eventually_eq_set
Closed

YaelDillies wants to merge 3 commits into
leanprover-community:masterfrom
YaelDillies:eventually_eq_set

Conversation

@YaelDillies

@YaelDillies YaelDillies commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Introduce definitions EventuallyEqSet, EventuallySubset as the Set versions of EventuallyEq and EventuallyLE. Make the notations x =ᶠ[l] y, x ≤ᶠ[l] y x =ᵐ[μ] y. elaborate to either the Set or functiion version depending on the expected type of the argument.

In mathlib, we currently use the function predicates for sets, which abuses the Set α := α → Prop defeq and which will break once we make Set a one-field structure.

Generated by Claude Opus, reviewed line by line by myself, with a large amount of manual edits and further Claude prompting to polish the angles.

Assisted-by: Claude Opus 4.8


Note that some simp lemmas aren't in simp normal form anymore because (· ∈ someSetConstruction) simplifies already. We might want to make the above into actual definitions instead of notation to avoid this. EDIT: I have done so

We will want to do the same for EventuallyConst, but it is more subtle since it doesn't have notation we could hide the difference in, and I do not know what the correct name for the Set definition would be. EDIT: See #43114

Open in Gitpod

@github-actions

github-actions Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

PR summary e1393eccd3

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ ContinuousWithinAt.extChartAt_symm_preimage_inter_range_eventuallyEqSet
+ EventuallyEqSet
+ EventuallyEqSet.biInter
+ EventuallyEqSet.biUnion
+ EventuallyEqSet.cardinal_bInter
+ EventuallyEqSet.cardinal_bUnion
+ EventuallyEqSet.cardinal_iInter
+ EventuallyEqSet.cardinal_iUnion
+ EventuallyEqSet.countable_bInter
+ EventuallyEqSet.countable_bUnion
+ EventuallyEqSet.countable_iInter
+ EventuallyEqSet.countable_iUnion
+ EventuallyEqSet.iInter
+ EventuallyEqSet.iUnion
+ EventuallyEqSet.mem_iff
+ EventuallySubset
+ EventuallySubset.biInter
+ EventuallySubset.biUnion
+ EventuallySubset.cardinal_bInter
+ EventuallySubset.cardinal_bUnion
+ EventuallySubset.cardinal_iInter
+ EventuallySubset.cardinal_iUnion
+ EventuallySubset.countable_bInter
+ EventuallySubset.countable_bUnion
+ EventuallySubset.countable_iInter
+ EventuallySubset.countable_iUnion
+ EventuallySubset.iInter
+ EventuallySubset.iUnion
+ Filter.EventuallyEqSet.mem_interior
+ Filter.EventuallyEqSet.mem_interior_iff
+ Filter.EventuallyEqSet.of_mulIndicator
+ Filter.EventuallyEqSet.of_mulIndicator_const
+ Filter.EventuallyLE.of_le
+ Filter.EventuallySubset.of_subset
+ LE.le.eventuallySubset
+ _root_.Finset.eventuallyEqSet_iInter
+ _root_.Finset.eventuallyEqSet_iUnion
+ _root_.Finset.eventuallySubset_iInter
+ _root_.Finset.eventuallySubset_iUnion
+ _root_.Set.Finite.eventuallyEqSet_iInter
+ _root_.Set.Finite.eventuallyEqSet_iUnion
+ _root_.Set.Finite.eventuallySubset_iInter
+ _root_.Set.Finite.eventuallySubset_iUnion
+ antisymm
+ congr_left
+ congr_right
+ eventually
+ eventuallyEqSet_comm
+ eventuallyEqSet_empty
+ eventuallyEqSet_iff
+ eventuallyEqSet_iff_inf_principal
+ eventuallyEqSet_insert
+ eventuallyEqSet_univ
+ eventuallySubset_antisymm_iff
+ eventuallySubset_iff_inf_principal_le
+ eventuallySubset_iff_mem_inf_principal
+ extChartAt_target_eventuallyEqSet
+ extChartAt_target_eventuallyEqSet'
+ extChartAt_target_eventuallyEqSet_of_mem
+ extend_symm_preimage_inter_range_eventuallyEqSet
+ extend_target_eventuallyEqSet
+ fderivWithin_fderivWithin_eq_of_eventuallyEqSet
+ instance {l : Filter α} :
+ instance {l : Filter α} : IsTrans (Set α) (· =ᶠ[l] ·)
+ inter_eventuallyEqSet_left
+ inter_eventuallyEqSet_right
+ mem_nhdsWithin_iff_eventuallyEqSet
+ nhdsWithin_eq_iff_eventuallyEqSet
+ of_eq
+ preimage_eventuallyEqSet_target_inter_preimage_inter
+ preimage_extChartAt_eventuallyEqSet_compl_singleton
+ pullbackWithin_lieBracketWithin_of_isSymmSndFDerivWithinAt_of_eventuallyEqSet
+ subset
+ superset
+ symm
+ symmDiff
++ compl
++ diff
++ filter_mono
++ inter
++ refl
++ rfl
++ trans
++ union
- _root_.Finset.eventuallyEq_iInter
- _root_.Finset.eventuallyEq_iUnion
- _root_.Finset.eventuallyLE_iInter
- _root_.Finset.eventuallyLE_iUnion
- _root_.Set.Finite.eventuallyEq_iInter
- _root_.Set.Finite.eventuallyEq_iUnion
- _root_.Set.Finite.eventuallyLE_iInter
- _root_.Set.Finite.eventuallyLE_iUnion

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

  • +113 new declarations
  • −2 removed declarations
+ContinuousWithinAt.extChartAt_symm_preimage_inter_range_eventuallyEqSet
+Filter.EventuallyEqSet
+Filter.EventuallyEqSet.biInter
+Filter.EventuallyEqSet.biUnion
+Filter.EventuallyEqSet.cardinal_bInter
+Filter.EventuallyEqSet.cardinal_bUnion
+Filter.EventuallyEqSet.cardinal_iInter
+Filter.EventuallyEqSet.cardinal_iUnion
+Filter.EventuallyEqSet.compl
+Filter.EventuallyEqSet.congr_left
+Filter.EventuallyEqSet.congr_right
+Filter.EventuallyEqSet.countable_bInter
+Filter.EventuallyEqSet.countable_bUnion
+Filter.EventuallyEqSet.countable_iInter
+Filter.EventuallyEqSet.countable_iUnion
+Filter.EventuallyEqSet.diff
+Filter.EventuallyEqSet.filter_mono
+Filter.EventuallyEqSet.iInter
+Filter.EventuallyEqSet.iUnion
+Filter.EventuallyEqSet.instIsTransSet
+Filter.EventuallyEqSet.inter
+Filter.EventuallyEqSet.measure_eq
+Filter.EventuallyEqSet.mem_iff
+Filter.EventuallyEqSet.mem_interior
+Filter.EventuallyEqSet.mem_interior_iff
+Filter.EventuallyEqSet.of_eq
+Filter.EventuallyEqSet.of_indicator
+Filter.EventuallyEqSet.of_indicator_const
+Filter.EventuallyEqSet.of_mulIndicator
+Filter.EventuallyEqSet.of_mulIndicator_const
+Filter.EventuallyEqSet.refl
+Filter.EventuallyEqSet.rfl
+Filter.EventuallyEqSet.subset
+Filter.EventuallyEqSet.superset
+Filter.EventuallyEqSet.symm
+Filter.EventuallyEqSet.symmDiff
+Filter.EventuallyEqSet.trans
+Filter.EventuallyEqSet.union
+Filter.EventuallyLE.of_le
+Filter.EventuallySubset
+Filter.EventuallySubset.antisymm
+Filter.EventuallySubset.biInter
+Filter.EventuallySubset.biUnion
+Filter.EventuallySubset.cardinal_bInter
+Filter.EventuallySubset.cardinal_bUnion
+Filter.EventuallySubset.cardinal_iInter
+Filter.EventuallySubset.cardinal_iUnion
+Filter.EventuallySubset.compl
+Filter.EventuallySubset.countable_bInter
+Filter.EventuallySubset.countable_bUnion
+Filter.EventuallySubset.countable_iInter
+Filter.EventuallySubset.countable_iUnion
+Filter.EventuallySubset.diff
+Filter.EventuallySubset.eventually
+Filter.EventuallySubset.filter_mono
+Filter.EventuallySubset.iInter
+Filter.EventuallySubset.iUnion
+Filter.EventuallySubset.instTransSet
+Filter.EventuallySubset.inter
+Filter.EventuallySubset.measure_le
+Filter.EventuallySubset.of_subset
+Filter.EventuallySubset.refl
+Filter.EventuallySubset.rfl
+Filter.EventuallySubset.trans
+Filter.EventuallySubset.union
+Filter.elabEventuallyEq
+Filter.elabEventuallyLE
+Filter.elabEventuallyRelSides
+Filter.eventuallyEqSet_comm
+Filter.eventuallyEqSet_empty
+Filter.eventuallyEqSet_iff
+Filter.eventuallyEqSet_iff_inf_principal
+Filter.eventuallyEqSet_univ
+Filter.eventuallyEqStx
+Filter.eventuallyLEStx
+Filter.eventuallySubset_antisymm_iff
+Filter.eventuallySubset_iff_inf_principal_le
+Filter.eventuallySubset_iff_mem_inf_principal
+Filter.inter_eventuallyEqSet_left
+Filter.inter_eventuallyEqSet_right
+Filter.precheckEventuallyEq
+Filter.precheckEventuallyLE
+Filter.unexpandEventuallyEq
+Filter.unexpandEventuallyEqSet
+Filter.unexpandEventuallyLE
+Filter.unexpandEventuallySubset
-Filter.«term_=ᶠ[_]_»
-Filter.«term_≤ᶠ[_]_»
+Finset.eventuallyEqSet_iInter
+Finset.eventuallyEqSet_iUnion
+Finset.eventuallySubset_iInter
+Finset.eventuallySubset_iUnion
+LE.le.eventuallySubset
+MeasureTheory.delabAEEventuallyEq
+MeasureTheory.delabAEEventuallyEqSet
+MeasureTheory.delabAEEventuallyLE
+MeasureTheory.delabAEEventuallySubset
+OpenPartialHomeomorph.extend_symm_preimage_inter_range_eventuallyEqSet
+OpenPartialHomeomorph.extend_target_eventuallyEqSet
+OpenPartialHomeomorph.preimage_eventuallyEqSet_target_inter_preimage_inter
+Set.Finite.eventuallyEqSet_iInter
+Set.Finite.eventuallyEqSet_iUnion
+Set.Finite.eventuallySubset_iInter
+Set.Finite.eventuallySubset_iUnion
+VectorField.pullbackWithin_lieBracketWithin_of_isSymmSndFDerivWithinAt_of_eventuallyEqSet
+delabResidualEventuallyEq
+delabResidualEventuallyEqSet
+eventuallyEqSet_insert
+extChartAt_target_eventuallyEqSet
+extChartAt_target_eventuallyEqSet'
+extChartAt_target_eventuallyEqSet_of_mem
+fderivWithin_fderivWithin_eq_of_eventuallyEqSet
+mem_nhdsWithin_iff_eventuallyEqSet
+nhdsWithin_eq_iff_eventuallyEqSet
+preimage_extChartAt_eventuallyEqSet_compl_singleton

Decrease in strong tech debt: (relative, absolute) = (3.72, 0.00)
Current number Change Type (strong)
backward.isDefEq.respectTransparency 4856 -9
backward.isDefEq.respectTransparency.types 2505 -1
No changes to weak technical debt.

Current commit e1393eccd3
Reference commit 900e11b053

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 added t-topology Topological spaces, uniform spaces, metric spaces, filters t-measure-probability Measure theory / Probability theory LLM-generated PRs with substantial input from LLMs - review accordingly labels Jul 9, 2026
@YaelDillies
YaelDillies requested a review from sgouezel July 9, 2026 14:37
@SnirBroshi

Copy link
Copy Markdown
Collaborator

#mathlib4 > defeq abuse of `Set X = X -> Prop` with `EventuallyEq`

@YaelDillies
YaelDillies force-pushed the eventually_eq_set branch 3 times, most recently from 7751b10 to ae3eb17 Compare July 17, 2026 10:54
@github-actions github-actions 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 Jul 17, 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 Jul 17, 2026
@themathqueen

Copy link
Copy Markdown
Member

Why not use ≤ᶠˢ instead of ⊆ᶠ to match the rest?

@YaelDillies

Copy link
Copy Markdown
Contributor Author

I have reworked the PR to not introduce new notation. WDYT?

@themathqueen

Copy link
Copy Markdown
Member

So nothing really changes, right?

Should we add a meta label since the stuff you're introducing seems that way?

@YaelDillies

Copy link
Copy Markdown
Contributor Author

Indeed, nothing really changes.

I have now checked that all lemmas that should be renamed have been renamed, that no unnecessary diff is left and that I am happy with each line of change.

@EtienneC30 EtienneC30 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! It is very nice to see all those change and type annotations removed. I expect there are several set_option backward.isDefEq.respectTransparency false in that could be removed, but maybe you want to leave this for now. I went through all the files but I cannot comment on the meta code.

Comment thread Mathlib/Order/Filter/Basic.lean Resolved
Comment thread Mathlib/Topology/NhdsWithin.lean Resolved
Comment thread Mathlib/Topology/NhdsWithin.lean Resolved
Comment thread Mathlib/Order/Filter/Finite.lean Resolved
Comment thread Mathlib/Order/Filter/Finite.lean Resolved
Comment thread Mathlib/Order/Filter/Finite.lean Resolved
@EtienneC30 EtienneC30 added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Aug 12, 2026
@YaelDillies YaelDillies removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Aug 14, 2026

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

Except for the meta-code at Mathlib/Order/Filter/Defs.lean, which I don't feel qualified judging, I think everything looks good (and thank you very much for doing this).
Would be good if someone with metaprogramming knowledge has a look
maintainer merge?

@github-actions

Copy link
Copy Markdown

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

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Aug 18, 2026
@ADedecker ADedecker added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Aug 24, 2026
@ADedecker

Copy link
Copy Markdown
Member

Do we ever use EventuallyConst with sets? If yes, then I think we can live with using the membership predicate there instead.

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

Sorry for all the nitpicks I found... Apart from these I have a few last technical questions, and then this should be good to go.

Comment thread Mathlib/MeasureTheory/Group/Action.lean Resolved
Comment thread Mathlib/Order/Filter/Defs.lean Resolved
Comment thread Mathlib/Topology/NhdsWithin.lean Resolved
Comment thread Mathlib/Topology/NhdsWithin.lean Resolved
Comment thread Mathlib/Order/Filter/Basic.lean Resolved
Comment thread Mathlib/Order/Filter/Defs.lean Resolved
@YaelDillies YaelDillies changed the title refactor: notation for EventuallyEq on Set refactor: definition and notation for EventuallyEq on Set Aug 25, 2026
@YaelDillies YaelDillies removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Aug 25, 2026

@ADedecker ADedecker 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 a ton!

bors d+

@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 26, 2026
@mathlib-bors

mathlib-bors Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

✌️ YaelDillies can now approve this pull request until 2026-09-09 11:48 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-triage mathlib-triage Bot removed the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Aug 26, 2026
Introduce notations ``s =ᶠˢ[l] t`, `s ⊆ᶠ[l] t`  `s =ᵐˢ[μ] t`. for `(· ∈ s) =ᶠ[l] (· ∈ t)`, `(· ∈ s) ≤ᶠ[l] (· ∈ t)`, `(· ∈ s) =ᵐ[μ] (· ∈ t)`.

Currently, the latter notations are being used to abuse the `Set α := α → Prop` defeq, which will break once we make `Set` a one-field structure.

Generated by Claude Opus as part of the big refactor and then extracted.

Assisted-by: Claude Opus 4.8
@YaelDillies

Copy link
Copy Markdown
Contributor Author

Thank you Anatole for taking this review on!

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Aug 27, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Aug 27, 2026
Introduce definitions `EventuallyEqSet`, `EventuallySubset` as the `Set` versions of `EventuallyEq` and `EventuallyLE`. Make the notations `x =ᶠ[l] y`, `x ≤ᶠ[l] y`  `x =ᵐ[μ] y`. elaborate to either the `Set` or functiion version depending on the expected type of the argument.

In mathlib, we currently use the function predicates for sets, which abuses the `Set α := α → Prop` defeq and which will break once we make `Set` a one-field structure.

Generated by Claude Opus, reviewed line by line by myself, with a large amount of manual edits and further Claude prompting to polish the angles.

Assisted-by: Claude Opus 4.8
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Aug 27, 2026
@mathlib-bors

mathlib-bors Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title refactor: definition and notation for EventuallyEq on Set [Merged by Bors] - refactor: definition and notation for EventuallyEq on Set Aug 27, 2026
@mathlib-bors mathlib-bors Bot closed this Aug 27, 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 Aug 27, 2026
@YaelDillies
YaelDillies deleted the eventually_eq_set branch August 27, 2026 11:13
artie2000 pushed a commit to artie2000/mathlib4 that referenced this pull request Sep 1, 2026
commit c39c676ae8ca0be49bb7e28add34670123a8e902
Merge: 9f2515783c2 b9c45bd55c8 091c9c5f100
Author: artie2000 <[email protected]>
Date:   Tue Sep 1 18:15:55 2026 +0100

    WIP on master: 9f2515783c2 feat: add Measure.bind_comm (#42908)

commit b9c45bd55c8f9e55a4c7e88c151a2b6db715e851
Author: artie2000 <[email protected]>
Date:   Tue Sep 1 18:15:55 2026 +0100

    index on master: 9f2515783c2 feat: add Measure.bind_comm (#42908)

commit 091c9c5f1005de7b412fc513ef262e983db11008
Author: artie2000 <[email protected]>
Date:   Tue Sep 1 18:15:55 2026 +0100

    untracked files on master: 9f2515783c2 feat: add Measure.bind_comm (#42908)

commit 9f2515783c2252157110d15dbfbbf8dd5795dba8
Author: Etienne Marion <[email protected]>
Date:   Fri Aug 28 12:39:37 2026 +0000

    feat: add Measure.bind_comm (#42908)

    This lemma is primarily intended to replace `PMF.bind_comm` in #42821.

commit b0d5c6b6ebe7442e00229da56bd9ccf6d671a0c3
Author: Luigi Massacci <[email protected]>
Date:   Fri Aug 28 12:39:34 2026 +0000

    feat: implement DLMF attribute (#42899)

    Implement DLMF attribute. This allows users to link Mathlib declarations to DLMF entries.

    The implementation here copies the LMFDB implementation (so in particular only checks that the character set in the ID is valid).

    The DLMF _(NIST Digital Library of Mathematical Functions)_ is a mathematical database for special functions and their applications by the National Institute of Standards and Technology (see [wikipedia](https://en.wikipedia.org/wiki/Digital_Library_of_Mathematical_Functions), and the [DLMF itself](https://dlmf.nist.gov/front/foreword)).

    It is also already linked to by the zbmath API for example.

commit ae451cc93c5dddc062a689434f509960005086ad
Author: Daniel Liao <[email protected]>
Date:   Fri Aug 28 12:39:32 2026 +0000

    feat(Geometry/Euclidean): add the geometric mean theorem (#42674)

    Hello, this PR adds the geometric mean theorem  to
    Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean, with the iff form and
    the leg form, and records it in docs/1000.yaml (Q2226868). Statements use ^ 2
    per review guidance on #42518.

    This PR was written with AI assistance (Claude Code)

commit fbb600138140d06504aab9ad92ad61d713ea0b63
Author: Snir Broshi <[email protected]>
Date:   Fri Aug 28 12:39:29 2026 +0000

    feat(Order/Preorder/Chain): `List.IsChain` implies `IsChain` for transitive relations (#42560)

commit 41136d939401789e406e65f52c3fabb9fdd2e570
Author: Leonid Ryvkin <[email protected]>
Date:   Fri Aug 28 12:39:26 2026 +0000

    feat: semidirect product of Lie algebras - adding simp lemmas for toProd.symm and toProdl.symm (#41890)

    As an `R`-module the semidirect product of two Lie algebras ` K ⋊⁅ψ⁆ L` is isomorphic to ` K × L`.
    The simp lemmas for the reverse direction of this isomorphisms were missing and are added in this PR.

commit 368939de2b212f115d5390ab5458b0632130cb10
Author: Joseph Myers <[email protected]>
Date:   Fri Aug 28 12:39:23 2026 +0000

    feat(Geometry/Euclidean/Sphere/Tangent): characterize `tangentsFrom` (#31893)

    Add lemmas relating tangency to polars, and thereby characterizing `tangentsFrom`: empty for a point inside the sphere, a singleton for a point on the sphere and, in two dimensions, of cardinality two for a point outside the circle.

commit 45fcfcbc1c691caadb486e31fe74335961227234
Author: Kenny Lau <[email protected]>
Date:   Fri Aug 28 12:39:19 2026 +0000

    feat(RingTheory): is localization iff is localization on saturation (#31135)

    In this PR we show that `A` is a localization of `R` on the submonoid `S` iff it is so on the saturation of `S`.
    Crucially, the saturation of `S` is precisely the elements that become a unit in `A`.

commit d6893048e0d784c43f3cf098b61299b3a4b4aed0
Author: Thomas Browning <[email protected]>
Date:   Fri Aug 28 10:45:52 2026 +0000

    feat(GroupTheory/Commutator/Basic): prove `⁅H ⊔ K, N⁆ = ⁅H, N⁆ ⊔ ⁅K, N⁆` for `N` normal (#43167)

    This PR proves distributivity `⁅H ⊔ K, N⁆ = ⁅H, N⁆ ⊔ ⁅K, N⁆` for `N` normal.

    The idea is to compute `⁅H ⊔ K, N⁆` in the quotient `(H ⊔ K ⊔ N) ⧸ (⁅H, N⁆ ⊔ ⁅K, N⁆)`.

    I also moved `normalizer_inf_normalizer_le_normalizer_sup` to an earlier file and renamed it to match `inf_normalizer_le_normalizer_inf`.

    Co-authored-by: tb65536 <[email protected]>

commit 4b4d0e847ef3ab8b7d764bf8289b140768eedabd
Author: Hannah Scholz <[email protected]>
Date:   Fri Aug 28 10:00:30 2026 +0000

    chore(Topology/Order/LocalExtr): rename several theorems (#41865)

    Per the mathlib naming conventions. Also discussed on Zulip [#mathlib4 > Renaming &#96;IsLocalMin.on&#96; and &#96;IsMinOn.localize&#96;](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Renaming.20.60IsLocalMin.2Eon.60.20and.20.60IsMinOn.2Elocalize.60/with/611258354).

commit 99dd738c3765ed2b1316828cfdbe581c7d7f6b3d
Author: Felix Pernegger <[email protected]>
Date:   Fri Aug 28 09:25:29 2026 +0000

    doc(Topology): add docstring to `continuous_apply` (#43180)

    Obviously `continuous_apply` is a very important statement despite its simplicity.

    However, a few days ago I was having an *extremely* hard time finding it with all tools available (I was about to ask on the Zulip channel). I think adding a docstring could help AI tools like LeanSearch finding this easier (with the docstring I added as query, it is currently placed third in LeanSearch and doesnt appear at all in LeanExplore).

    (Of course one can intepret `continuous_apply` to also be about topology of pointwise convergence or whatever, but i think product is by far the most common interpretation)

    Co-authored-by: Batixx <[email protected]>

commit cf56c98b80b99547ec26464e3b2866d9f88e1027
Author: Jack McCarthy <[email protected]>
Date:   Fri Aug 28 08:01:37 2026 +0000

    feat(Geometry/Manifold): add `ModelWithCorners.MfldCat`, the category of `C^n` manifolds on a fixed model (#41109)

    Adds `ModelWithCorners.MfldCat I n`, the category of `C^n` manifolds modeled on a fixed model with corners `I`, together with its forgetful functor to `TopCat`.

    Suggested by @chrisflav. See #38223 and the [Zulip Thread](https://leanprover.zulipchat.com/#narrow/channel/144837-PR-reviews/topic/.2338223.20The.20Category.20of.20C.5En.20Manifolds/with/586321835) for more discussion of why this is necessary.

    Boilerplate based on Yaël Dillies's `Mathlib.Algebra.Category.CommBialgCat`. This PR was prepared with assistance from Claude Code.

commit 5e8d27394eaf15b54d58c2cf7843c3171c81d968
Author: JX-Mo <[email protected]>
Date:   Fri Aug 28 06:51:23 2026 +0000

    feat(RepresentationTheory): add stabilizers of vectors in representations (#40941)

    Add Representation.stabilizer: the subgroup fixing a vector in a representation.

    Provide basic lemmas for zero vectors, scalar multiples, sums, intertwining maps, and conjugations, as a first step toward smooth representations. Make representation-theoretic arguments use this specialized API instead of repeatedly unfolding the fixed-vector condition or routing through the more general MulAction stabilizer API.

commit 7c77f6d6f8e20b1ef18bfa4fcd5837d98a68736c
Author: Violeta Hernández Palacios <[email protected]>
Date:   Fri Aug 28 03:45:24 2026 +0000

    chore(Algebra/Order/Monoid/Unbundled/Basic): golfing + formatting (#38227)

    We make use of `variable`, fix some weird spacing, and golf many proofs.

    The only breaking change is that `mul_lt_iff_lt_one_left'`/`add_lt_iff_neg_left` now takes an explicit argument, matching the theorems surrounding it.

commit 86a56a326f4467bfed01343a8f8fe90ac040079c
Author: Jack McCarthy <[email protected]>
Date:   Fri Aug 28 02:49:23 2026 +0000

    fix(Util/CountHeartbeats): count heartbeats spent in async theorem bodies (#43148)

    See [#mathlib4 > Behavior of count_heartbeats in](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Behavior.20of.20count_heartbeats.20in/with/619383102) Zulip thread for context.

    MWE — each proof burns ~5000 user-facing heartbeats via `sleep_heartbeats`:

    ```lean
    import Mathlib.Util.CountHeartbeats
    import Mathlib.Util.SleepHeartbeats
    theorem t1 : True := by
      sleep_heartbeats 5000
      trivial
    ```

    | | before | after |
    |---|---|---|
    | `#count_heartbeats in theorem …` | `Used 2 heartbeats` | `Used 5005 heartbeats` |
    | `#count_heartbeats! 3 in theorem …` (2000 hb) | `Min: 1 Max: 2` | `Min: 2005 Max: 2006` |

commit 5ba95124681110751345e9bd360994de8541027c
Author: Marcelo Lynch <[email protected]>
Date:   Fri Aug 28 00:22:35 2026 +0000

    fix(cache): retry transport errors, improve transfer robustness (#43145)

    Since CI cache reads moved to `cache.mathlib.org` (#42777), the transport is HTTP/2: one connection carries many parallel transfers, and a dropped connection fails them all at once with `Send failure: Broken pipe`. curl's `--retry` does not cover transport errors, so a short network fault fails the job. Seven bors runs failed this way in six days ([example](https://github.com/leanprover-community/mathlib4/actions/runs/32578053250/job/97043588851): 14 of 8750 files, one connection); the same step failed zero times in the previous four weeks (429 runs).

    Fix: `--retry 5 --retry-all-errors` on the parallel download path and the upload path (`curlRetryArgs`). curl retries a failed transfer on a fresh connection, with exponential backoff. An HTTP 4xx is not a curl error on these paths, so a 404 miss never retries and the container fallback works as before.

    - The serial download path keeps plain `--retry 5`: it serves curls below 7.71, which reject `--retry-all-errors`. It now drops `--fail` and decides by the written-out status, like the parallel path, so no download path treats a miss as an error.
    - The marker probe keeps no retry flags: it is diagnostic, a false negative is cheap, and retry backoff would stall the up-to-50-probe `cache query` walk against an unreachable endpoint. It adds `--connect-timeout 10 --max-time 30` as time bounds.
    - A retried PUT is safe: a non-overwrite put sends `If-None-Match: *`, and a duplicate answers 409/412, which the upload path already excuses.
    - `validateCurl` raises the parallel-mode floor to curl 7.75: `--retry-all-errors` needs 7.71, and the per-transfer JSON report carries `exitcode` and `errormsg` from 7.75 on. CI runners have 8.5; old Linux curls already fetch a static 7.88.1.

    An outage that outlives the five retries still fails the step.

    This PR also fixes five pre-existing bugs in these paths:

    - A transfer can die after the 200 status arrives: curl reports `http_code: 200` with a nonzero exit code, but the code matched the status alone and renamed the truncated part file into the cache, where only a manual clean removed it. A transfer now counts as delivered only when curl also exits cleanly. The verdict is a pure table with unit tests (`classifyDownload` / `classifyUpload`).
    - An error answer to a PUT carries a body, which landed on stdout and glued to curl's per-transfer JSON report. The report did not parse, so a 409 did not count as a skip and a 403/404/500 did not count as a failure — the upload step passed either way. The put config now discards each response body, so stdout carries only the reports.
    - On a miss, the parallel path left the error body behind as a `.part` file. It now removes the file, like the serial path.
    - A 404 answer to a PUT was excused as a cache miss. It now counts as an upload failure.
    - The marker PUTs carry their credential in the curl argument list, and a failure message echoed that list. Their failure messages now name the command, its exit state, and stderr only. (In CI the token is also masked in logs; this guards local runs and transformed output.)

    Tested with `lake build cache`, the `cache-test` suite, and a forced re-download of 64 files through `cache.mathlib.org`. Against a local server that truncates every body, all 64 transfers fail and no truncated or partial file stays in the cache; against a server that answers 404, misses stay quiet and leave no partial files. For uploads, a put against a local server that answers 409 with an error body skips and exits 0; against a 404 server it reports the failed blob by URL and exits 1. Two `ci_dev` runs built the branch's cache tool in CI: the download path served through `cache.mathlib.org`, and the upload job wrote 3 files to the forks container over OIDC.

commit cc2a4a8ff4c7143b6bdf4faaa418f97721a3efb5
Author: Thomas Browning <[email protected]>
Date:   Thu Aug 27 23:39:22 2026 +0000

    feat(Analysis/Normed/Ring/WithAbs): add `AbsoluteValue.under` (#42566)

    This PR adds `AbsoluteValue.under`. This is in preparation for general ramification theory of absolute values.

    Co-authored-by: tb65536 <[email protected]>

commit 33bca90bdcde97c36db11e9a8fd0eec79bc71d73
Author: Riccardo Brasca <[email protected]>
Date:   Thu Aug 27 22:43:14 2026 +0000

    feat: add ModularForm.qExpansionAlgHom (#42331)

    Replace `ModularForm.qExpansionRingHom` by `ModularForm.qExpansionAlgHom`.

commit f988eda5de1aff03157c116b01178564a2ad1c01
Author: Snir Broshi <[email protected]>
Date:   Thu Aug 27 20:57:01 2026 +0000

    chore(Combinatorics/SimpleGraph/CycleGraph): golf `cycleGraph_isContained_iff` (#42964)

commit 589208471b29b1f0220edd901c62ad81d0b12333
Author: Snir Broshi <[email protected]>
Date:   Thu Aug 27 20:56:59 2026 +0000

    feat(Combinatorics/SimpleGraph/Trails): the support of an Eulerian trail equals the support of the graph (#41632)

commit baa74fbf3951dc5007d840c201f6f3911a9dbfd5
Author: Snir Broshi <[email protected]>
Date:   Thu Aug 27 20:56:57 2026 +0000

    feat(Combinatorics/SimpleGraph/LapMatrix): 0 is always an eigenvalue (#39627)

    and the determinant is always zero, plus a few other small lemmas.

commit b40b7830487aa1477ecf73a9437c45e613292bae
Author: Snir Broshi <[email protected]>
Date:   Thu Aug 27 20:08:31 2026 +0000

    chore(Data/Fin/Basic): avoid importing lattices (#43156)

commit 9b198489cafef0ae46ce9557b9730f5c231e2582
Author: Thomas Krishna Waring <[email protected]>
Date:   Thu Aug 27 19:36:10 2026 +0000

    feat(GroupTheory/Nilpotent): elements with coprime orders commute (#43071)

    In a nilpotent group, elements with (finite) coprime order commute.

    Co-authored-by: twwar <[email protected]>

commit 39c86ed8eb69c9ef854f1f2de1b7b7bd171fef15
Author: Thomas Browning <[email protected]>
Date:   Thu Aug 27 17:33:17 2026 +0000

    feat(NumberTheory/NumberField/AdeleRing): define the idele class group (#40735)

    This PR defines the idele class group and the maps from the completions at finite places. This will be used to define Hecke L-Functions.

    Co-authored-by: tb65536 <[email protected]>

commit a09ee8556b328b3976c273a283e6979a1c1f8ae6
Author: Moritz Doll <[email protected]>
Date:   Thu Aug 27 17:13:34 2026 +0000

    chore(Analysis/LocallyConvex): add missing lemmas (#42848)

    Co-authored-by: Anatole Dedecker <[email protected]>

commit b9d865b99bfd8ca8b6624dd13056fccdc61a531a
Author: Dhruv Gupta <[email protected]>
Date:   Thu Aug 27 16:29:25 2026 +0000

    feat(Combinatorics/SetFamily): Assouad's dual VC bound (#38319)

    Adds the Finset-level form of Assouad's 1983 dual VC bound: if a family
    `𝒜 : Finset (Finset α)` has VC dimension at most `d`, then for any
    ground set `X : Finset α` the dual family
    `{𝒜.filter (· ∋ x) : x ∈ X}` has VC dimension at most `2 ^ (d + 1) - 1`.

    New declarations (in `Finset` namespace):
    - `dualFamily 𝒜 X`: for each `x ∈ X`, the subfamily `{A ∈ 𝒜 | x ∈ A}`
    - `mem_dualFamily` (`@[simp]`): membership characterisation
    - `exists_shatters_of_dualFamily_shatters`: Assouad's bitstring-coding lemma
    - `vcDim_dualFamily_le`: the headline VC bound

    Proof by Assouad's classical bitstring-coding argument. Sits on top of `Finset.shatterer` / `Finset.vcDim` from
    `Mathlib.Combinatorics.SetFamily.Shatter`.

    References:
    - P. Assouad, Densite et dimension, Ann. Inst. Fourier 33(3) (1983), Thm 2.13
    - J. Matousek, Lectures on Discrete Geometry, GTM 212, Springer, 2002, Section 10.3 Lemma 10.3.3

commit 287cf38f7f3366ab5954f0d91c915f26a9adfcb4
Author: Lexa <[email protected]>
Date:   Thu Aug 27 16:10:57 2026 +0000

    feat(NumberTheory/Wilson): explicit square root of -1 modulo a prime (#42326)

    Adds an explicit square root of `-1` in `ZMod p`, together with the half-factorial pairing identity it rests on.

    - `ZMod.factorial_eq_neg_one_pow_mul_half_factorial_sq`: for odd `p`, `(p - 1)! = (-1)^m * (m !)^2` in `ZMod p` with `m = (p - 1) / 2`. Only needs `Odd p`, not primality.
    - `ZMod.half_factorial_sq_eq_neg_one`: for prime `p` with `p % 4 ≠ 3`, `((p - 1) / 2)!` is a square root of `-1`.

    Mathlib has `exists_sq_eq_neg_one_iff` for existence and `mod_four_ne_three_of_sq_eq_neg_one` for the converse, but nothing takes you from the congruence condition to a specific root. I checked all seventeen uses of `IsSquare (-1 : ZMod _)` currently in Mathlib and none of them exhibits a witness.

    A live case: `SumOfTwoSquares/Wilson.lean` in `seewoo5/DifferentProofs` states the pairing identity verbatim in a docstring, though only for `p ≡ 1 mod 4` and assuming primality. I have no consumer for it myself — I hit the gap formalizing something adjacent and it seemed worth contributing rather than keeping local.

    The pairing identity is worth having on its own: it is the core step of the standard Wilson argument and holds for any odd `p`, so it is not really about primes.

    The Lean proofs were drafted with an OpenAI Codex agent orchestrated by Claude Code, and I reviewed the result. I re-ran the duplicate search against current master, CSLib, Batteries, Lean core and by type on Loogle, and ran `lake build` / `runLinter` / `lint-style` by hand.

commit e2147bb9454ffd030794d5545c2f9cd225e5ac49
Author: Seewoo Lee <[email protected]>
Date:   Thu Aug 27 16:10:54 2026 +0000

    feat(ModularForms): Ramanujan formula for derivatives (#42211)

    ...of Eisenstein series. From Sphere packing project; [original code](https://github.com/thefundamentaltheor3m/Sphere-Packing-Lean/blob/main/SpherePacking/ModularForms/RamanujanIdentities.lean) are written with Claude Opus 4.5-4.7, but golfed further with Opus 5 and Fable 5.

    Some of boundedness results are generalized to limit results (e.g. `isZeroAtImInfty_normalizedDerivOfComplex` from `isBoundedAtImInfty_normalizedDerivOfComplex`, now latter is derived from former). Proofs use dimension formula for level 1 modular forms (and weight 4, 6, 8).

    - [ ] depends on: #40764

    Co-authored-by: Johan Commelin <[email protected]>

commit 1f495c611d05d2215058cd77c7897d625bc3b445
Author: Thomas Browning <[email protected]>
Date:   Thu Aug 27 15:44:07 2026 +0000

    feat(Analysis/Normed/Field/WithAbs): algebra structure on `AbsoluteValue.Completion` (#42542)

    This PR defines the algebra structure on `AbsoluteValue.Completion`. This is in preparation for general ramification theory of absolute values.

    Co-authored-by: tb65536 <[email protected]>

commit d9a2cf3a0edf529bcfd6f2f684ca6cbaab5ecdff
Author: Joël Riou <[email protected]>
Date:   Thu Aug 27 14:32:19 2026 +0000

    feat(CategoryTheory/Preadditive): existence of a zero object from coproducts (#43173)

commit b42d4552187a13b5d9dfc793a6d2cb53ced8e88b
Author: Joël Riou <[email protected]>
Date:   Thu Aug 27 14:32:17 2026 +0000

    feat(Topology/MetricSpace): variant of the Lebesgue number lemmas (#43171)

    If `U : ι → Set X` is an open covering of a compact metric space `X`, there exists `ε > 0` such that any subset of `X` of diameter `≤ ε` is containted in some `U i`.

    From https://github.com/joelriou/excision and https://github.com/joelriou/topcat-model-category

commit 1b878ee44e04e5971ec37a53edc9be687080d545
Author: Kim Morrison <[email protected]>
Date:   Thu Aug 27 14:04:58 2026 +0000

    feat(Topology/Covering): introduce Deck transformation group (#40135)

    This PR introduces `deck p`, the subgroup of `E ≃ₜ E` consisting of self-homeomorphisms commuting with a map `p : E → X`. The definition is stated for an arbitrary `p` so the basic group structure and canonical action are available without a covering-map hypothesis; covering-specific theorems (lifting characterisation, the iso with `π₁(X)/p_*π₁(E)`) belong to follow-up files.

    The upstream additions in `Topology/Algebra/ConstMulAction.lean` add the tautological action `MulAction (X ≃ₜ X) X`, its faithfulness, and the matching `ContinuousConstSMul` instance. These parallel `Equiv.Perm.applyMulAction` and unlock the subgroup-action transfers that automatically give `deck p` its `Group`, `MulAction E`, `FaithfulSMul E`, and `ContinuousConstSMul E` instances.

    🤖 Prepared with [Claude Code](https://claude.com/claude-code)

commit aa28759c5b076f5def19d019f7f501215264603b
Author: Joël Riou <[email protected]>
Date:   Thu Aug 27 12:57:19 2026 +0000

    feat(GroupTheory/Perm): another decomposition of permutations of `Fin (n + 2)` (#43168)

    We introduce another decomposition `def Equiv.Perm.decomposeFin' (n : ℕ) : Perm (Fin (n + 2)) ≃ Fin (n + 2) × Perm (Fin (n + 1))`. The inverse map sends `⟨i, σ⟩` (with `i : Fin (n + 2)` and `σ : Perm (Fin (n + 1)`) to the permutation which sends `0` to `i` and `j.succ` to `i.succAbove (σ j)`.

    This shall be used in the study of the subdivision operator on singular chains (which involves an induction on `n`).

    From https://github.com/joelriou/excision

commit b5b6c07984d223ce4413bb764051ce3552b18ce9
Author: Harald Husum <[email protected]>
Date:   Thu Aug 27 12:05:22 2026 +0000

    chore(Util): tidy markdown headers (#43126)

    This PR ensures files in `Mathlib/Util` have one and only one H1 header.

    In the cases where the file did not already have an obvious H1 header candidate, a new header was authored by Claude Opus 5.

commit a835c1cf45531b86d17b382318fd1cb2cfb22eb0
Author: Anatole Dedecker <[email protected]>
Date:   Thu Aug 27 11:42:46 2026 +0000

    feat: the index of Fredholm operators is locally constant (#43085)

    Co-authored-by: Oliver Nash <[email protected]>

commit 41546748443172d634b273da9da143d3d2f22bb2
Author: Wenrong Zou <[email protected]>
Date:   Thu Aug 27 11:15:52 2026 +0000

    feat(FieldTheory/Finite): add variant theorems for `expand_card` (#39219)

    Add `MvPolynomial, MvPowerSeries, PowerSeries` version of `FiniteField.expand_card`, which is only for polynomial.

    Co-authored-by: WenrongZou <[email protected]>

commit e7b8da838099d0bfea089b70a448e3c9b6cdbffd
Author: Yaël Dillies <[email protected]>
Date:   Thu Aug 27 10:24:56 2026 +0000

    refactor: definition and notation for `EventuallyEq` on `Set` (#41533)

    Introduce definitions `EventuallyEqSet`, `EventuallySubset` as the `Set` versions of `EventuallyEq` and `EventuallyLE`. Make the notations `x =ᶠ[l] y`, `x ≤ᶠ[l] y`  `x =ᵐ[μ] y`. elaborate to either the `Set` or functiion version depending on the expected type of the argument.

    In mathlib, we currently use the function predicates for sets, which abuses the `Set α := α → Prop` defeq and which will break once we make `Set` a one-field structure.

    Generated by Claude Opus, reviewed line by line by myself, with a large amount of manual edits and further Claude prompting to polish the angles.

    Assisted-by: Claude Opus 4.8

commit 6adc762378546d91bfc6c56d3f0baa805ffe00a9
Author: Anatole Dedecker <[email protected]>
Date:   Thu Aug 27 10:05:31 2026 +0000

    feat: the set of Fredholm operators between two Banach spaces is open (#42742)

commit 900e11b053a9fddbec281694eadb75a6331e4573
Author: David Loeffler <[email protected]>
Date:   Thu Aug 27 09:46:53 2026 +0000

    feat(NumberTheory/Padics): the Amice transform (#42832)

    Prove the Amice (aka Leopoldt) transform isomorphism, identifying Zp-valued measures on Zp with the power series ring `ℤ_[p]⟦X⟧`.

commit 9791f8f704c10ddd96219f87083f1cf87677ab0a
Author: Joseph Myers <[email protected]>
Date:   Thu Aug 27 09:35:47 2026 +0000

    feat(Geometry/Euclidean/Sphere/PolePolar): poles and polars (#31892)

    Define poles and polars for spheres in Euclidean affine spaces, and set up some basic API, including in particular La Hire's theorem (`p₁` lies on the polar of `p₂` if and only if `p₂` lies on the polar of `p₁`).

    Poles and polars are actually meaningful for any quadric in a projective space over any field, but I think it's reasonable to set up this theory for spheres in the Euclidean context and potentially link it in future to more general projective geometry.

commit c8de5d090adcfc9b5a17fa4610cc8ff9874e83a6
Author: mathlib-update-dependencies[bot] <258990618+mathlib-update-dependencies[bot]@users.noreply.github.com>
Date:   Thu Aug 27 08:40:32 2026 +0000

    chore: update Mathlib dependencies 2026-08-27 (#43164)

    This PR updates the Mathlib dependencies.

commit 89fb8862028fb67d078d483330cbaa7f72c8929e
Author: Seewoo Lee <[email protected]>
Date:   Thu Aug 27 08:29:47 2026 +0000

    feat(NumberTheory/ModularForms): `E₂` is 1-periodic (#42210)

    Add `E2_T_transform`, `E2_T_smul` and `E2_periodic`. Used in Sphere packing project; written with Claude Opus 5.

commit cd5cc699bb5d2f3c75b14d50f03d054cb58150a2
Author: mathlib-splicebot[bot] <261196803+mathlib-splicebot[bot]@users.noreply.github.com>
Date:   Thu Aug 27 08:19:25 2026 +0000

    feat: expand API around LinearMap.index (#43146)

    This PR was automatically created from PR #43085 by @ADedecker via a [review comment](https://github.com/leanprover-community/mathlib4/pull/43085#discussion_r3867324825) by @ADedecker.

    Co-authored-by: ADedecker <[email protected]>

commit 008a61c197c3e2f4bdcc0243eb1821da18f6cfef
Author: Noah Walker <[email protected]>
Date:   Thu Aug 27 07:45:13 2026 +0000

    doc(Algebra): fix typo (#43151)

    Co-authored-by: NoahW314 <[email protected]>

commit d9fa3cd07a7d01f2c23ded95b5e1cbf2a873d933
Author: mathlib-splicebot[bot] <261196803+mathlib-splicebot[bot]@users.noreply.github.com>
Date:   Thu Aug 27 07:45:10 2026 +0000

    chore: variations of `ContinuousLinearEquiv.isOpen` (#43147)

    This PR was automatically created from PR #43085 by @ADedecker via a [review comment](https://github.com/leanprover-community/mathlib4/pull/43085#discussion_r3867372317) by @ADedecker.

    Co-authored-by: ADedecker <[email protected]>

commit 255782940e84802bac227ef6d55521ae9dbe903f
Author: Noah Walker <[email protected]>
Date:   Thu Aug 27 06:58:44 2026 +0000

    chore: card -> length for `List.length` in names (#43155)

    Some theorem names used `card` instead of `length` to refer to `List.length`.

    Co-authored-by: NoahW314 <[email protected]>

commit d9f6d1887c233aeabd725c175bd2ceca6215452a
Author: Moritz Doll <[email protected]>
Date:   Thu Aug 27 05:20:25 2026 +0000

    chore(Analysis): missing normed/inner instances for closed submodules (#43084)

commit f30f4b18d1058ce1879f7254ef066ebaed3515f2
Author: Xavier Roblot <[email protected]>
Date:   Thu Aug 27 00:42:57 2026 +0000

    feat(Algebra/QuadraticAlgebra): injectivity and surjectivity of `lift` (#42439)

    Add API for the algebra map `QuadraticAlgebra.lift`:

    * `range_lift`: its range is the subalgebra generated by `u`;
    * `lift_surjective_iff`: surjective iff `u` generates the algebra;
    * `lift_injective_iff`: injective iff `1` and `u` are linearly independent.

    Also add the basis decomposition `re_smul_add_im_smul` (used to golf `algHom_ext`) and `adjoin_omega_eq_top`.

commit f9314f86ef3bdc9c59ce1ab0e5c014f69a834429
Author: Fabrizio Barroero <[email protected]>
Date:   Thu Aug 27 00:42:54 2026 +0000

    chore(NumberTheory/SiegelsLemma): simplify and golf proofs (#42159)

    Co-authored-by: fbarroero <[email protected]>

commit 13a54b98c4418f7f36b3b585a143a92d9cc2ff4f
Author: Silvère Gangloff <[email protected]>
Date:   Thu Aug 27 00:42:52 2026 +0000

    feat(SymbolicDynamics): prove LanguageOn monotonicity under intersection (#39294)

    In symbolic dynamics.

    This PR proves that taking the language over a finite shape is monotone with respect to intersections of configuration sets:

    ```math
    \mathrm{LanguageOn}(X \cap Y)\, U
    \subseteq
    \mathrm{LanguageOn}\, X\, U \cap \mathrm{LanguageOn}\, Y\, U
    ```

    The proof is a direct unfolding of definitions: a pattern in the language of `X ∩ Y` comes from restricting a configuration `x ∈ X ∩ Y`. Since such an `x` belongs simultaneously to `X` and `Y`, the same restriction witness gives membership both in `LanguageOn X U` and in `LanguageOn Y U`, yielding membership in their intersection.

    Related to issue #39252

    Co-authored-by: Sfgangloff <[email protected]>

commit cd5395f75abc0b1a55348465cfeef26b9d0a6a03
Author: Silvère Gangloff <[email protected]>
Date:   Thu Aug 27 00:42:49 2026 +0000

    feat(SymbolicDynamics): add monotonicity lemma for LanguageOn (#39256)

    In Symbolic dynamics.

    Proof that the language of a set of configurations is monotone with respect to inclusion of configuration sets:

      X ⊆ Y → LanguageOn X U ⊆ LanguageOn Y U

    The proof is a direct unfolding of definitions: a pattern in the language of X comes from restricting some configuration x ∈ X, and inclusion X ⊆ Y allows the same witness to be used for Y.

    Related to issue #39252

    Co-authored-by: Sfgangloff <[email protected]>

commit 412da928587de5a9d95cc848caa6dcbc52172328
Author: Wenrong Zou <[email protected]>
Date:   Thu Aug 27 00:26:11 2026 +0000

    feat(LocalRing): instance `Finite (R / maximalIdeal R ^ n)` (#42994)

    For a noetherian local ring, we prove an instance `Finite (R ⧸ maximalIdeal R ^ n)` if the residue field of `R` is finite.

commit 966cd6726a8bf330640237f3af8658418e9bb57a
Author: Monica Omar <[email protected]>
Date:   Thu Aug 27 00:26:09 2026 +0000

    feat(Analysis/InnerProductSpace/Orthogonal): `y ∈ Kᗮ ↔ ∀ u ∈ K, RCLike.re ⟪u, y⟫ = 0` (#42776)

    A variant of `Submodule.mem_orthogonal`.

commit e310d11de5a2c247a686a9d054fb8526cdd30e06
Author: Snir Broshi <[email protected]>
Date:   Wed Aug 26 23:03:26 2026 +0000

    feat(Order/Bounds/Basic): simp lemmas for `upperBounds univ`, `IsLUB univ`, `Set.Bounded LE.le` (#43031)

commit a49839b4695c40f137b63ea78b8f85662c3442ca
Author: Snir Broshi <[email protected]>
Date:   Wed Aug 26 22:03:57 2026 +0000

    chore(Data/List/Chain): use `IsTrans` instead of `Trans R R R` (#42552)

commit 1146023ec2f27078c95b9a0a3267f1dbc22336d5
Author: Oliver Nash <[email protected]>
Date:   Wed Aug 26 21:10:26 2026 +0000

    feat: further API for Cartan matrices (#43121)

    The lemma `Matrix.isIndecomposable_iff_blockTriangular_const` is unused but I think useful API.

commit 3ed2ddca3d874aa6644072e61ec97bfef3ce8ae3
Author: Thomas Browning <[email protected]>
Date:   Wed Aug 26 20:09:51 2026 +0000

    chore(GroupTheory/Generators): small golfs post-merge (#43131)

    Co-authored-by: tb65536 <[email protected]>

commit fdf85d8020f2c03eb711d9229cb9f60203c2c878
Author: Harald Husum <[email protected]>
Date:   Wed Aug 26 20:09:49 2026 +0000

    chore(MathlibTest): tidy markdown headers (#43127)

    This PR makes sure that the files in `MathlibTest` that do have markdown headers in docstrings do not skip header levels. I have understood this to be a prerequisite for a potential future Verso transition.

commit f932a30b0efd4855a092f755a28e53b11c254049
Author: Thomas Browning <[email protected]>
Date:   Wed Aug 26 20:09:47 2026 +0000

    chore(Analysis/Normed/Unbundled/RingSeminorm): add missing API (#43111)

    This PR adds some missing API in `Analysis/Normed/Unbundled/RingSeminorm`.

    Co-authored-by: tb65536 <[email protected]>

commit 3a806a8a208cfdb9e084f767dd6dbc483c73af55
Author: Justus Springer <[email protected]>
Date:   Wed Aug 26 20:09:45 2026 +0000

    refactor(RingTheory/Polynomial/HilbertPoly): generalize `preHilbertPoly_eq_choose_sub_add` (#43107)

    This lemma also holds for the weaker hypothesis `k ≤ n + d` (where both sides evaluate to zero). Note that the statement needed to be changed slightly to avoid natural number subtraction giving zero.

    Co-authored-by: Anouk Brose <[email protected]>
    Co-authored-by: Santiago Morales <[email protected]>

commit 22f0f012e970cf989ca9b5d51c59a59a9fb0514f
Author: Anatole Dedecker <[email protected]>
Date:   Wed Aug 26 20:09:43 2026 +0000

    feat: characterize Fredholm projections (#42689)

commit ee0911695741f9e46e868873018ab5e0c985b85d
Author: Michael Rothgang <[email protected]>
Date:   Wed Aug 26 20:09:38 2026 +0000

    chore(Archive): convert to the module system (#42242)

    This is just a general good practice these days. Two specific reasons are:
    - the module system makes thing faster, for example by reducing how much stuff has to be imported.
    - In the long run, we want to only support the module system, and not any non-module system uses of mathlib. #41950 signals this. That way, we can use no_expose, without needing to worry about uses without the module system where the definition will be exposed anyways.

    The migration is mostly mechanical, akin to what modulize.lean would do: make all imports public, and add @[expose] public section at the beginning of each file. (In a few cases of files without definitions, omit the expose attribute.)

    Inspired by #36236; re-done by hand. All files omitted there are actually fine to hand-convert.

commit 7088bec68e1808d61c721475a426d4d22def5deb
Author: Yi.Yuan <[email protected]>
Date:   Wed Aug 26 19:19:04 2026 +0000

    feat(RingTheory/AlgebraicIndependent): upgrade polynomial equivalence (#42176)

commit 3bbfc7647bf2f480e5a60e6e09d754dcb589207c
Author: Vlad Tsyrklevich <[email protected]>
Date:   Wed Aug 26 19:19:01 2026 +0000

    feat(FreeGroup): `zpow` lemmas (#42106)

    We already have some lemmas for working with `Nat`-valued powers of FreeGroup elements, add some matching lemmas for working with `Int`-valued powers.

commit 5a71cf863ff2968504547af6b54867f73553cb62
Author: Monica Omar <[email protected]>
Date:   Wed Aug 26 18:49:51 2026 +0000

    chore(LinearAlgebra/PerfectPairing/Basic): generalize to `AddCommMonoid` (#42077)

    There's no reason for `LinearEquiv.flip` to be restricted to `AddCommGroup` over `CommRing`, so we weaken it to `AddCommMonoid` over `CommSemiring`.
    But, while we're here, I just weakened the whole file (excluding the Field section).

commit 66975ef16530c1c9151c26738eb325bb197ba739
Author: Fengyang William Wang <[email protected]>
Date:   Wed Aug 26 18:49:49 2026 +0000

    feat(DiscreteConvolution): add ring convolution definitions and properties (#41734)

    Continuation of PR #34191

    Adds ring convolution and its elementary properties.

    Aligns the API with [Day convolution](https://leanprover-community.github.io/mathlib4_docs/Mathlib/CategoryTheory/Monoidal/DayConvolution.html) structure. Although no idea how to bridge them right now.

    Co-authored-by: Fengyang Wang <[email protected]>
    Co-authored-by: Jireh Loreaux <[email protected]>

commit 1622d048208b8c480adb699cacfec7434d35d4f6
Author: Etienne Marion <[email protected]>
Date:   Wed Aug 26 18:49:46 2026 +0000

    feat: a measurable space structure on the type of continuous maps (#36815)

    Endow the type `C(X, Y)` of continuous maps from `X` to `Y` with the Borel sigma-algebra coming from the compact-open topology and show that, under some assumptions on `X` and `Y`, this is equal to the restriction of the product sigma-algebra over `X → Y`.

    Provide a measurable equivalence between `{f : X → Y // Continuous f}` and `C(X, Y)`.

    Co-authored-by: @RemyDegenne
    Co-authored-by: ADedecker <[email protected]>

commit a28966cc3329381ccdd3b7c388c0841f443f3bf0
Author: Snir Broshi <[email protected]>
Date:   Wed Aug 26 17:51:20 2026 +0000

    feat(Data/List/Basic): lists with equal `tail` and `dropLast` are equal (#41458)

    (except for subsingleton lists), and also lists with equal `head?` and `tail`.

commit ede980847f5703fe32bbdb80d8a98dd817f7a794
Author: Nailin Guan <[email protected]>
Date:   Wed Aug 26 17:51:18 2026 +0000

    feat(LinearAlgebra): lemmas for `exteriorPower.map` (#40926)

    Lemmas for `exteriorPower.map`

commit ce3d573425745258ecc2fbc3de4218dffebed41a
Author: FMLJohn <[email protected]>
Date:   Wed Aug 26 17:51:15 2026 +0000

    feat(Topology/Spectral/ConstructibleTopology): the constructible topology on a compact quasi-separated space `X` equals the topology generated by the constructible subsets of `X` (#40180)

    In this pull request, I have proved that the constructible topology on a compact quasi-separated space `X` equals the topology generated by the constructible subsets of `X`. This holds in particular for spectral spaces.

commit 44573cedc4b606ff1b64fd58f1a0d3d982711901
Author: Yaël Dillies <[email protected]>
Date:   Wed Aug 26 17:51:11 2026 +0000

    chore: create a `Basic` top folder (#39703)

    Move a select few folders from `Logic` to a new `Basic` folder.

    The goal is to finally move the material misplaced in the `Data` and `Logic` folder and to clarify the various expectations of each folder. Ultimately:
    * the `Basic` folder will be about basic predicates on types and basic mathematical types not fitting in any other folder;
    * the `Data` folder will be about data structures, instead of the current mix of data structures and basic mathematical types not fitting in any other folder;
    * the `Logic` folder will be about advanced logic results not fitting in either `ModelTheory` or `SetTheory`, instead of the current mix of basic predicates on types and advanced logic results.

    Many more files (~1000) could be moved, so I will do it in several PRs. Not all files should move to `Basic`. Some files should go to `Algebra.Order` instead (eg `Data.Nat.Lattice`) and some should be straight out deprecated (eg `Data.Analysis`).

    [Zulip discussion](https://leanprover.zulipchat.com/#narrow/channel/345428-mathlib-reviewers/topic/Basic.20folder/with/597151406)

commit 5ce203ecd53f8c3e47ee5530d7c86b94a55f0183
Author: Hang Lu Su <[email protected]>
Date:   Wed Aug 26 11:02:55 2026 +0000

    doc(Analysis/Normed/Group/Seminorm): fix seminorm/norm typo (#43117)

    The docstring describe the `GroupNorm` property as a semi-norm while clearly stating the positive definite property in the code. (Probably copy-paste error.)

commit 13bd10aec8ea0ece47ff9950d2a4347680b2643b
Author: Hang Lu Su <[email protected]>
Date:   Wed Aug 26 10:01:57 2026 +0000

    feat(GroupTheory/Presentation): define group presentations (#41936)

    `Group.Presentation` packages a chosen presentation of a given group `G`: a generating family together with relators (words `r`, each read as `r = 1`) whose generated normal subgroup is exactly the kernel of `FreeGroup.lift val : FreeGroup α →* G`. This the complementary to `PresentedGroup rels`, which constructs the group presented by a set of generators and relations.

commit 0fa18d49e3c34d2b7766fe0cb6016e3bd68cd15a
Author: Etienne Marion <[email protected]>
Date:   Wed Aug 26 08:21:50 2026 +0000

    refactor: change the default value of `Measure.map` to a Dirac mass (#42322)

    [`MeasureTheory.Measure.map`](https://leanprover-community.github.io/mathlib4_docs/Mathlib/MeasureTheory/Measure/Map.html#MeasureTheory.Measure.map)`f µ` is currently defined to be `0` if `f` is not a.e.-measurable. This PR changes it to be an arbitrary Dirac mass (except when `µ = 0`, where it is still defined to be `0` to keep [MeasureTheory.Measure.map_zero](https://leanprover-community.github.io/mathlib4_docs/Mathlib/MeasureTheory/Measure/Map.html#MeasureTheory.Measure.map_zero)).

    This allows to have an instance saying that mapping a probability measure yields a probability measure, which in turns allows to define [MeasureTheory.ProbabilityMeasure.map](https://leanprover-community.github.io/mathlib4_docs/Mathlib/MeasureTheory/Measure/ProbabilityMeasure.html#MeasureTheory.ProbabilityMeasure.map) without requiring a measurability hypothesis while still enjoying [MeasureTheory.ProbabilityMeasure.toMeasure_map](https://leanprover-community.github.io/mathlib4_docs/Mathlib/MeasureTheory/Measure/ProbabilityMeasure.html#MeasureTheory.ProbabilityMeasure.toMeasure_map) as a simp lemma.

    In order to do the change `Measure.dirac` must be available before `Measure.map` in the import chain. To do that we split the current `Measure.Dirac` file in two files, one containing the definition and very basic API in order to prove that it is a probability measure, the other containing the remainder.

    This change also required to add some measurability hypotheses along the way, which is the main part of the diff. The main one is probably [MeasureTheory.Measure.map_smul](https://leanprover-community.github.io/mathlib4_docs/Mathlib/MeasureTheory/Measure/Map.html#MeasureTheory.Measure.map_smul) which now requires measurability of the map. We also replaced the definition of [MeasureTheory.pdf.IsUniform](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Probability/Distributions/Uniform.html#MeasureTheory.pdf.IsUniform) to use `HasLaw`, and added an `aemeasurable` field in `HasGaussianLaw`.

commit 4bb22c3234d9c5e44bd79df480ee7e913348b11c
Author: dean cureton <[email protected]>
Date:   Wed Aug 26 08:11:05 2026 +0000

    feat(MeasureTheory): basic lemmas for absolute continuity (#42992)

    Adds congruence and reflexivity lemmas for `AbsolutelyContinuousOnInterval`. (see `UniformContinuousOn.congr` and `IntervalIntegrable.refl`)

commit c20efc88987935443dae8752a67c7c53e478971a
Author: Kim Morrison <[email protected]>
Date:   Wed Aug 26 08:00:50 2026 +0000

    doc: fix docstrings still using the deprecated name CardinalFilteredPoset (#41579)

    This PR updates the docstrings of `CardinalDirectedPoset.of`, `CardinalDirectedPoset.PropSetWithTop` and `CardinalDirectedPoset.coconeWithTop`, which still referred to the type by its deprecated name `CardinalFilteredPoset κ` after the rename to `CardinalDirectedPoset κ`. The intentional deprecated-alias block is left untouched.

    Follow-up to [#40937 (feat(CategoryTheory/Presentable): sharply smaller regular cardinals)](https://github.com/leanprover-community/mathlib4/pull/40937).

    🤖 Prepared with Claude Code

commit 64fbe722961f672fe20c1b43539821feedd1f36d
Author: teorth <[email protected]>
Date:   Wed Aug 26 04:44:46 2026 +0000

    feat(Analysis/SpecialFunctions/Gamma/Digamma): reflection formula for digamma (#42349)

    Establishes the Euler reflection formula for the digamma function, by taking the log derivative of the corresponding reflection formula for the Gamma function.

    Co-authored-by: Terence Tao <[email protected]>
    Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
    Co-authored-by: Terence Tao <[email protected]>

commit f006b2eec1c31dc47043ca1aff5b670b2d25db0f
Author: Aaron Liu <[email protected]>
Date:   Wed Aug 26 01:37:16 2026 +0000

    perf(Condensed/Light): speedup kernel typechecking of `InternalProjectivityProof.cocone` (#41703)

    Speedup kernel typechecking of `InternalProjectivityProof.cocone` in `Mathlib/Condensed/Light/Sequence.lean`. `Functor.map_comp` for `lightProfiniteToLightCondSet` holds by `rfl`, but rewriting backwards with `Functor.map_comp` explicitly in `simp` makes the subsequent `rfl` faster in the kernel because it doesn't need to unfold as much. See [Zulip](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/kernelbarfing.20in.20mathlib/near/609873490).

    Co-authored-by: Riccardo Brasca <[email protected]>

commit eaf4b68f4bec7b69c28f3e882e3165a93279b579
Author: teorth <[email protected]>
Date:   Wed Aug 26 01:27:12 2026 +0000

    feat(MeasureTheory/Group/Circle): add MeasurableSpace/BorelSpace instances for the circle (#42953)

    A new file `MeasureTheory/Group/Circle` is also created to record `MeasurableSpace` and `BorelSpace` instances for `Circle` (which also autogenerates some other instances such as `MeasurableMul Circle` or `CountablyGenerated Circle`), together with basic measurability API: `Circle.measurable_coe` and `Circle.measurable_iff`.

    Co-authored-by: Terence Tao <[email protected]>
    Co-authored-by: Terence Tao <[email protected]>

commit 5f1813809af7b1fbb3465f2dfcccf2aaa1e390aa
Author: Thomas R. Murrills <[email protected]>
Date:   Tue Aug 25 23:31:39 2026 +0000

    chore: remove some `backward.privateInPublic` by adjusting visibility (#42557)

    This PR removes a batch of `set_option backward.privateInPublic true` by adjusting visibility according to the following rules:

    1. If a theorem is about an already-private definition, it too may as well be private.
    2. We can `@[no_expose]` defs that use private definitions
    3. We can private definitions that have no consumers besides an exposed body

commit d5cdef54629c0399018a892f8b4fd9c584d91682
Author: Yaël Dillies <[email protected]>
Date:   Tue Aug 25 22:22:53 2026 +0000

    feat(Data/Int): computable shortcut instances (#42858)

    This avoids `Preorder ℤ` being found from the noncomputable `ConditionallyCompleteLinearOrder ℤ` .

    From FormalConjectures

commit 2ce3531cf95d9d0113f9ed3fa97ef92dd8e2ccba
Author: Snir Broshi <[email protected]>
Date:   Tue Aug 25 22:22:50 2026 +0000

    feat(Combinatorics/SimpleGraph/Basic): `Infinite V → Infinite (SimpleGraph V)` (#42371)

    Matches the existing `Finite V → Finite (SimpleGraph V)`.

commit bbc52f9636cb2200cf01ae3eb391953f2d05636c
Author: Yaël Dillies <[email protected]>
Date:   Tue Aug 25 21:48:49 2026 +0000

    feat(Data/Sym/Sym2): the first element of `s(x, x)` is `x` (#42980)

    This is useful for simp.

    From FormalConjectures

commit af13bc3e24807977fb8184ad472cf7cadeb2f49c
Author: Hagb (Junyu Guo 郭俊余) <[email protected]>
Date:   Tue Aug 25 21:48:47 2026 +0000

    feat(Order/InititalSeg): `PrincipalSeg` is trichotomous for well orders (#39907)

    For any two well orders, one is a principal segment of the other, or they are isomorphic.

    Suggested by @vihdzp in the review of #39545
    https://github.com/leanprover-community/mathlib4/pull/39545#discussion_r3262466782. It may slightly simplify the proof of `infinite_iff_nonempty_relEmbedding_of_isWellOrder`.

commit 8fa28a029a527159ae5c650ac14adf5514169d72
Author: Snir Broshi <[email protected]>
Date:   Tue Aug 25 21:38:49 2026 +0000

    chore(Tactic/Linter/TextBased/UnicodeLinter): update abbrevations (#42562)

    Ran the script on the latest commit (`5a25e6a`) of `vscode-lean4`, updated the dates and the commit reference.

    https://github.com/leanprover/vscode-lean4/commit/9ca2a826c07ab07ea2a79e0d66105de0b7e33349 added auto-closing abbrevations for existing characters which only caused stuff to shift around. The three new characters are `❰❱` from https://github.com/leanprover/vscode-lean4/commit/7af7fa92a3883aeedb350e79a7925ca78c430658 and `⦂` from https://github.com/leanprover/vscode-lean4/commit/00a05fe2a7076e431cad7af1ad24cd14452145d0.

    Also verified that all 97 chars in `othersInMathlib` are still in use.

commit 79d06eb00c9c3f60538c48a3b1c49c719a2c7a36
Author: Luigi Massacci <[email protected]>
Date:   Tue Aug 25 21:22:40 2026 +0000

    feat: classical distributions induced by a locally integrable function (#41723)

    Analogous to the results for Tempered Distributions.

    Part of a series of PRs about induced distributions.

commit c4e2650f16e75c146e1d65b372673cdae00c1389
Author: dean cureton <[email protected]>
Date:   Tue Aug 25 21:03:38 2026 +0000

    feat(MeasureTheory): absolute continuity preserved by Lipschitz postcomposition (#42996)

    Adds `LipschitzOnWith.comp_absolutelyContinuousOnInterval` and its global `LipschitzWith` specialization.

commit 20b18e7acf0d29a345d2ecd669d88407beae5074
Author: Sebastien Gouezel <[email protected]>
Date:   Tue Aug 25 21:03:34 2026 +0000

    feat: integration by parts for stieltjes vector measures (#39113)

    Consider two bounded variation functions `f` and `g`. We give several versions of the integration by parts formula `∫_a^b f dg = f b * g b - f a * g a - ∫_a^b g df`.

    Note that the formula as written is wrong in case of discontinuities : one should use left limits and right limits, and pay attention as to whether `a` and `b` are included in the integrals.

    Therefore, we give 4 versions, on `Icc` and `Ioc` and `Ico` and `Ioo`. They all follow from a formula on a general set `s`, where the boundary contribution is the integral on `s` of the vector measure associated to the bounded variation function `fg`.

    Co-authored-by: sgouezel <[email protected]>

commit d2dd1594046848e5e093665fc70963b2ddc3a772
Author: Michael Rothgang <[email protected]>
Date:   Tue Aug 25 20:09:30 2026 +0000

    chore(Archive/Imo): convert to the module system (#42962)

    Split out from #42242 to keep the diff at smaller size; same motivations as that PR.

commit 95bdf0e084dd4cc7e816f037f4302f54fd3a588d
Author: M. Winter <[email protected]>
Date:   Tue Aug 25 20:09:27 2026 +0000

    feat(Logic/Function): define predicate for constant function (#42713)

    Adds

    * `Function.IsConst`

    as a canonical way to express that a function is constant without specifying its value.
    Currently, this can be expressed by any of

    * `∀ x y, f x = f y`
    * `∃ b, f = const α b`
    * `∃ b, ∀ x, f x = b`

    We propose to use the first one since it also works for functions where both domain and codomain are empty.

    We also add

    ```lean4
    theorem eq_const_iff {f : α → β} {b : β} : f = const α b ↔ ∀ a : α, f a = b
    ```

    to Function.Basic.lean

    Co-authored-by: Martin Winter <[email protected]>

commit 6899f0c2678525512e1148180a4be74077f936fa
Author: Moritz Firsching <[email protected]>
Date:   Tue Aug 25 20:09:24 2026 +0000

    feat(SetTheory/Cardinal/Arithmetic): properties of `sdiff` (#42678)

    ported from Formal Conjectures ForMathlib original pr:
    https://github.com/google-deepmind/formal-conjectures/pull/1496

    Co-authored-by: Yaël Dillies <[email protected]>

commit 94e2a7918b8111e9b23bbadb60a35ccfb208c215
Author: Joël Riou <[email protected]>
Date:   Tue Aug 25 20:09:22 2026 +0000

    chore(Order/Relseries): cleaning up a proof (#41618)

commit d3a4318ebf2755b321d47e703958c876d0432c67
Author: Snir Broshi <[email protected]>
Date:   Tue Aug 25 20:09:19 2026 +0000

    feat(Order/SuccPred/CompleteLinearOrder): `sSup s < x` iff theorems when we know if `x` is a successor pre-limit or not (#38612)

    Adds the following theorems (along with their duals and indexed versions):
    ```lean
    sSup_lt_iff_of_not_isSuccPrelimit : ¬IsSuccPrelimit x → sSup s < x ↔ ∀ a ∈ s, a < x
    le_sSup_iff_of_not_isSuccPrelimit : ¬IsSuccPrelimit x → x ≤ sSup s ↔ ∃ a ∈ s, x ≤ a
    Order.IsSuccPrelimit.sSup_lt_iff  :  IsSuccPrelimit x → sSup s < x ↔ ∃ a < x, ∀ b ∈ s, b < a
    Order.IsSuccPrelimit.le_sSup_iff  :  IsSuccPrelimit x → x ≤ sSup s ↔ ∀ a < x, ∃ b ∈ s, a ≤ b
    ```

    They are similar to these existing theorems, but not the same:

    ```lean
    sSup_lt_iff                       :                     sSup s < x ↔ ∃ a < x, ∀ b ∈ s, b ≤ a
    le_sSup_iff_forall_lt             :                     x ≤ sSup s ↔ ∀ a < x, ∃ b ∈ s, a < b
    ```

commit 1e5fa86cf6091ef5b80d196527cba5ed19a6cac8
Author: Thomas Browning <[email protected]>
Date:   Tue Aug 25 19:55:44 2026 +0000

    feat(Analysis/Matrix/Normed): norm of block diagonal matrix (#43016)

    This PR computes the norm of a block diagonal matrix.

    Co-authored-by: tb65536 <[email protected]>

commit 119110c22e0aa2a593e559f4818d009e04194933
Author: TJHeeringa <[email protected]>
Date:   Tue Aug 25 17:41:05 2026 +0000

    feat(Analysis/InnerProductSpace/Reproducing): submodule of RKHS is RKHS (#42681)

    This PR adds that the closed subspace of an RKHS is again an RKHS.

    This is the formalization of Theorem 2.5 of Paulsen, Vern I. and Raghupathi, Mrinal, *An introduction to the theory of reproducing kernel Hilbert spaces*.

commit 5ad035e7e49e9ff640d65285b73ea366ad31b949
Author: Xavier Roblot <[email protected]>
Date:   Tue Aug 25 17:41:02 2026 +0000

    feat(NumberTheory/NumberField): congruence for the norm of an unramified prime (#41180)

    Add `torsionOrder_dvd_absNorm_sub_one'`: if a prime `P` of `𝓞 K` is unramified over `ℤ` and the rational prime below it has norm greater than `2`, then `torsionOrder K` divides `absNorm P - 1`. This is a variant of `torsionOrder_dvd_absNorm_sub_one` that replaces the coprimality hypothesis by unramifiedness.

    Also add the helper `pow_torsionOrder_eq_one`.

    Co-authored-by: Ashleigh Ratcliffe
    Co-authored-by: Bryan Hu

commit 1ed09e590c87e07244033185f1d270fefa033ffb
Author: William Coram <[email protected]>
Date:   Tue Aug 25 17:40:58 2026 +0000

    feat: epsilon dense implies dense (#40995)

    We follow BGR - Nonarchimedean analysis and introduce the definition of a subgroup being epsilon dense. Then prove this implies dense (Prop 1.1.4./2)

    Co-authored-by: WilliamCoram <[email protected]>

commit 6a4ae1bc986e14cad435bc101850d12b5b1bf01c
Author: Xavier Roblot <[email protected]>
Date:   Tue Aug 25 16:48:08 2026 +0000

    feat(NumberTheory/FundamentalDiscriminant): fundamental discriminants (#42814)

    An integer `D` is a fundamental discriminant if `D ≡ 0, 1 (mod 4)`, no odd prime square divides it, and it is not `4` times an integer `≡ 0, 1 (mod 4)`. This PR adds `Int.IsFundamentalDiscr` in a new file, together with the squarefree characterisation `Int.isFundamentalDiscr_iff_squarefree` and its specialisations to `4m + 1` and `4m`, and `Int.isFundamentalDiscr_iff_forall_prime`, a statement uniform in the prime `p`.

    It is the arithmetic input of a later PR, showing that `QuadraticAlgebra ℤ a b` is the integral closure of `ℤ` in its fraction ring `QuadraticAlgebra ℚ a b` exactly when `discr a b` is a fundamental discriminant. The uniform form is what that PR rewrites with, so that `p = 2` and the odd primes are handled by the same argument.

    It also adds a few supporting lemmas to existing files.

    Prepared with Claude Code 🤖

commit a358dc46cf14b2c872b011ddd0a33ba27b44936d
Author: Xavier Roblot <[email protected]>
Date:   Tue Aug 25 16:48:05 2026 +0000

    feat(GroupTheory/SpecificGroups/Cyclic): comparison and index of subgroups generated by powers (#42754)

    Add the following results about the subgroups generated by the powers of a fixed element.

    - `Subgroup.zpowers_le_zpowers_iff`: `zpowers (g ^ i) ≤ zpowers (g ^ j) ↔ j.gcd (orderOf g) ∣ i.gcd (orderOf g)`
    - `Subgroup.index_zpowers_zpow`: if `g` generates, then `(zpowers (g ^ i)).index = i.gcd (orderOf g)`
    - `Subgroup.zpowers_eq_zpowers_iff'`: `zpowers (g ^ i) = zpowers (g ^ j) ↔ i.gcd (orderOf g) = j.gcd (orderOf g)`
    - `Subgroup.zpowers_zpow_sup`: `zpowers (g ^ i) ⊔ zpowers (g ^ j) = zpowers (g ^ (i.gcd j : ℤ))`

    Some supporting lemmas are also added along the way.

    Split off from #40597.

    :robot: This PR was extracted from the [SKW project](https://github.com/xroblot/SKW) by Claude.

commit bae1da772d0bc1c3f70374bcc69ecedaa9382028
Author: Bhavik Mehta <[email protected]>
Date:   Tue Aug 25 16:48:01 2026 +0000

    feat(NumberTheory/Padics): add Rat.padicValuation_natCast (#42306)

    A prereq for #42304.

commit 199df143a9c71650435107c3749d983aefe6143d
Author: Lua Viana Reis <[email protected]>
Date:   Tue Aug 25 15:53:01 2026 +0000

    chore(Module/WeakDual): outdated metrizability todos in docstring (#42982)

    `WeakDual.metrizable_of_isCompact` and `WeakDual.isSeqCompact_closedBall` were added in #31656 (the latter appears in the module docstring) but the todos remained.

    While at it, also added a "main result" bullet list for `WeakDual.metrizable_of_isCompact`.

commit e995b77cd2ee968fae9db7ce515eb1d24da01269
Author: Yi.Yuan <[email protected]>
Date:   Tue Aug 25 15:52:58 2026 +0000

    refactor(Data/Multiset): rename map_filter' (#42970)

    The deprecated alias was removed in https://github.com/leanprover-community/mathlib4/pull/21271.

commit ab64d1cdc0e5fd620fe0531593f8725c3cb079c8
Author: Yaël Dillies <[email protected]>
Date:   Tue Aug 25 15:52:55 2026 +0000

    chore: don't inductively define sets (#42171)

    Instead define them as `Set.ofPred` of inductively-defined predicates. This avoids abusing the defeq `Set α := α → Prop`. In cases where the set was barely used, I have inlined the definition instead.

    Generated by Claude Opus, then reviewed and cherry-picked line-by-line by myself.

    Assisted-by: Claude Opus 4.8

commit 0258e251f94ee225ff7549af5b8f5d06050c9afc
Author: Zhao Yuyang 赵雨扬 <[email protected]>
Date:   Tue Aug 25 15:52:53 2026 +0000

    chore(Algebra/Order/GroupWithZero): deprecate unnecessary lemmas (#42168)

    This PR deprecates three lemmas with exactly the same statements as lemmas deprecated in #22353:

    * `mul_lt_one_of_nonneg_of_lt_one_left`
    * `mul_lt_one_of_nonneg_of_lt_one_right`
    * `mul_le_one₀`

    In addition, `mul_le_one₀` only covers the case where the right factor is nonnegative, while there is no corresponding lemma for the case where the left factor is nonnegative. This PR also adds `Bound.mul_le_one` to handle both cases.

commit bc4fc71b371cc8c94239e9f49de5ebad060f2dac
Author: Felix Pernegger <[email protected]>
Date:   Tue Aug 25 15:52:50 2026 +0000

    feat(Topology): small inductive dimension does not increase under inducing maps (#42167)

    The small inductive dimension of a topological space does not increase under inducing maps; in particular, the dimension of a subspace is less or equal to that of the original space and the dimension is preserved by homeomorphisms.

    Story of this PR:
    I originally proved this (entirely by hand) for homeomorphisms, but @plp127 pointed out this can be improved. I then asked Codex (GPT 5.6 Sol high) to prove the generalisation. I reviewed the AI code carefully and golfed it slightly.

    Co-authored-by: Batixx <[email protected]>
    Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
    Co-authored-by: Yongxi (Aaron) Lin <[email protected]>

commit 66e68c55e50ae606609654fde32cd42f9ac0d178
Author: Anne Baanen <[email protected]>
Date:   Tue Aug 25 15:52:47 2026 +0000

    feat(Tactic/Linter): add linter for missing `@[tactic_alt]` tags (#41818)

    This PR adds a `tacticAlt` linter that complains when there are two tactics with the same user-facing name (usually: the first token in their syntax) but they aren't marked as `@[tactic_alt]` to each other. Those situations lead to duplicate entries in doc-gen's tactic overview page.

    You can see example output in the tests file, or in the [build log](https://github.com/leanprover-community/mathlib4/actions/runs/29502419244/job/87654684693).

    The current simple implementation has one limitation: if multiple duplicates are all being linted at once, each of them gets a linter warning. I think this is okay, but we could be a bit stricter and only produce the warning on the tactic that comes later in the environment.

    Co-authored-by: Anne C.A. Baanen <[email protected]>

commit 211ee653418c4d5559c3cd3556e7debd806dcc59
Author: Lua Viana Reis <[email protected]>
Date:   Tue Aug 25 15:52:45 2026 +0000

    feat(EReal): add_eq_top_iff_eq_top_* (#41288)

    Adds `add_eq_top_iff_eq_top_{left,right}` and replaces the proofs of the `ne` versions with `.ne`. `add_ne_top_iff_of_ne_bot_of_ne_top` was duplicated, so I deprecated it.

commit d8b49acbc1f8eb302b19d500db44d443cb2203d5
Author: Michael Rothgang <[email protected]>
Date:   Tue Aug 25 15:04:20 2026 +0000

    fix(autolabel): auto-label PRs touching bors.toml as CI (#42904)

commit c404bb7edd38d35b2d8b8fd3bbf44ebe6b11caff
Author: Moritz Doll <[email protected]>
Date:   Tue Aug 25 15:04:17 2026 +0000

    chore(Analysis/Normed): move `normSeminorm` into new file (#42887)

    Aims to untangle `NormedSpace` and `Seminorm`.

    We also add checks for `GroupSeminorm` not importing `SeminormedGroup` and `Seminorm` not importing `NormedSpace`.

    Copyright goes to Yael for [#11487](https://github.com/leanprover-community/mathlib3/pull/11487) (mathlib3) and Anatole for #5501.

commit d1ea33f085ff5232ae06f2ed4c0fefc7de0e0025
Author: Hang Lu Su <[email protected]>
Date:   Tue Aug 25 15:04:14 2026 +0000

    feat(Order/Monoid/Unbundled/Basic): left multiplication is strictly monotone if and only if it is monotone and left-cancellative (#42845)

    Factored out of #41505.

commit 37876f96d7069323d1e5d1258e0e9dec844decd2
Author: Francesco Chotuck <[email protected]>
Date:   Tue Aug 25 15:04:11 2026 +0000

    chore(Order/Interval): define `Unique (Iic 0)` directly, drop a defeq option in Traj (#42739)

    The instance `Unique (Iic (0 : ℕ))` was defined by `rw [← Nat.bot_eq_zero]; infer_instance`, which hides `default` behind a cast, so `↑(default : Iic 0)` does not reduce to `0`. Defining the instance directly fixes this, and allows to remove the `set_option backward.isDefEq.respectTransparency` in `Mathlib/Probability/Kernel/IonescuTulcea/Traj.lean`.

commit 56143338dd227d81aa43839ac53534ab87dd6568
Author: Kim Morrison <[email protected]>
Date:   Tue Aug 25 15:04:08 2026 +0000

    ci: keep the nightly toolchain when merging master into nightly-testing (#42637)

    This PR restores `lean-toolchain` from `nightly-testing` after the daily merge of `master`, so that a toolchain bump on `master` no longer drags `nightly-testing` onto a stable release.

    Since #40257 the merge resolves conflicts in favour of `master`. That is the right call for source files, but `lean-toolchain` is the one file where `master` must never win: on every day that `master` bumps its toolchain the two sides conflict, and `nightly-testing` silently ends up on the release toolchain. It happened this morning, where the merge replaced `nightly-2026-08-10` with `v4.33.0` and the build then failed with `Unknown identifier ite_eq_right` and friends in `Mathlib/Data/Nat/BinaryRec.lean`:

    https://github.com/leanprover-community/mathlib4-nightly-testing/actions/runs/31447213372

    `nightly_bump_and_merge.yml` puts a nightly back within three hours, so the cost is a wasted CI run and a spurious failure report on Zulip rather than anything lasting, but there is no reason to pay it. The …
attilavjda pushed a commit to attilavjda/mathlib4 that referenced this pull request Sep 5, 2026
…over-community#41533)

Introduce definitions `EventuallyEqSet`, `EventuallySubset` as the `Set` versions of `EventuallyEq` and `EventuallyLE`. Make the notations `x =ᶠ[l] y`, `x ≤ᶠ[l] y`  `x =ᵐ[μ] y`. elaborate to either the `Set` or functiion version depending on the expected type of the argument.

In mathlib, we currently use the function predicates for sets, which abuses the `Set α := α → Prop` defeq and which will break once we make `Set` a one-field structure.

Generated by Claude Opus, reviewed line by line by myself, with a large amount of manual edits and further Claude prompting to polish the angles.

Assisted-by: Claude Opus 4.8
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Sep 5, 2026
…over-community#41533)

Introduce definitions `EventuallyEqSet`, `EventuallySubset` as the `Set` versions of `EventuallyEq` and `EventuallyLE`. Make the notations `x =ᶠ[l] y`, `x ≤ᶠ[l] y`  `x =ᵐ[μ] y`. elaborate to either the `Set` or functiion version depending on the expected type of the argument.

In mathlib, we currently use the function predicates for sets, which abuses the `Set α := α → Prop` defeq and which will break once we make `Set` a one-field structure.

Generated by Claude Opus, reviewed line by line by myself, with a large amount of manual edits and further Claude prompting to polish the angles.

Assisted-by: Claude Opus 4.8
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. LLM-generated PRs with substantial input from LLMs - review accordingly ready-to-merge This PR has been sent to bors. t-measure-probability Measure theory / Probability theory t-topology Topological spaces, uniform spaces, metric spaces, filters 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.

7 participants