Skip to content

[Merged by Bors] - chore: rename sFinite to sfinite in declaration names - #44292

Closed
Multramate wants to merge 2 commits into
leanprover-community:masterfrom
Multramate:typo/sFinite
Closed

Multramate wants to merge 2 commits into
leanprover-community:masterfrom
Multramate:typo/sFinite

Conversation

@Multramate

@Multramate Multramate commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Rename the declarations spelling the SFinite class as sFinite to use sfinite, following the rule that the whole initial run of capitals is lowercased.


🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

PR summary d6a1a02fba

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ instance _root_.ProbabilityTheory.IsSFiniteKernel.sfinite [IsSFiniteKernel κ] (a : α) :
+ measure_toMeasurable_inter_of_sfinite
+ restrict_toMeasurable_of_sfinite
+ sfinite_of_absolutelyContinuous
- instance _root_.ProbabilityTheory.IsSFiniteKernel.sFinite [IsSFiniteKernel κ] (a : α) :

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 -- stale; merge master and push to refresh)

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

  • +13 new declarations
  • −4 removed declarations
+MeasureTheory.Measure.HaveLebesgueDecomposition.sFinite_of_isFiniteMeasure
+MeasureTheory.Measure.compProd_of_not_sFinite
+MeasureTheory.Measure.instSFiniteConv
+MeasureTheory.Measure.instSFiniteMconv
-MeasureTheory.Measure.sfinite_conv_of_sfinite
-MeasureTheory.Measure.sfinite_mconv_of_sfinite
+MeasureTheory.MeasurePreserving.sFinite
+MeasureTheory.instIsFiniteMeasureSFiniteSeq
-MeasureTheory.isFiniteMeasure_sfiniteSeq
+MeasureTheory.sFiniteSeq
+MeasureTheory.sFiniteSeq.congr_simp
+MeasureTheory.sFiniteSeq_absolutelyContinuous_toFinite
+MeasureTheory.sFiniteSeq_le
+MeasureTheory.sFiniteSeq_zero
+MeasureTheory.sFinite_sum_of_countable
-MeasureTheory.sfiniteSeq.congr_simp
+MeasureTheory.sum_sFiniteSeq

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

Current commit d6a1a02fba
Reference commit ed72f1faae

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

@Multramate

Copy link
Copy Markdown
Collaborator Author

LLM-generated

@github-actions github-actions Bot added the LLM-generated PRs with substantial input from LLMs - review accordingly label Sep 28, 2026
@JovanGerb

Copy link
Copy Markdown
Contributor

Do we have documented somewhere what the rules are around this kind of capitalization? What comes to mind is e.g. sdiff for SDiff instead of sDiff.

@Multramate

Multramate commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

Do we have documented somewhere what the rules are around this kind of capitalization? What comes to mind is e.g. sdiff for SDiff instead of sDiff.

Yeah I don't know. There is an explicit docstring in SDiff saying the correct spelling is sdiff, but none in SFinite. Apparently there are 4 declarations using sFinite already, so there is scope for a change to make this consistent anyway. One argument for why we want sFinite is because it's s-finite, while sdiff is not mathematical jargon.

@themathqueen themathqueen added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Sep 29, 2026
@Multramate Multramate removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Sep 29, 2026

@themathqueen themathqueen 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!

maintainer merge

@github-actions

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown
Member

Thanks!

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Sep 29, 2026
@mathlib-triage mathlib-triage Bot removed the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Sep 29, 2026
@j-loreaux

Copy link
Copy Markdown
Contributor

bors r-

@mathlib-bors

mathlib-bors Bot commented Sep 29, 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 removed the ready-to-merge This PR has been sent to bors. label Sep 29, 2026
@Multramate

Copy link
Copy Markdown
Collaborator Author

Is this still controversial?

@j-loreaux

Copy link
Copy Markdown
Contributor

We discussed this in the reviewers stream. The rule for writing UpperCamelCase declarations in lowerCamelCase when referencing them the names of other declarations is the the entire initial segment of uppercase letters is converted to lowercase. So you get NNReal → nnreal, not nNReal or nnReal. Likewise, AEMeasurable → aemeasurable not aEMeasurable or aeMeasurable. This rule has been around since the port from Lean 3, but admittedly, I can't find it documented in the naming conventions.

@Multramate Multramate changed the title chore: rename sfinite to sFinite in declaration names chore: rename sFinite to sfinite in declaration names Sep 29, 2026
@Multramate

Copy link
Copy Markdown
Collaborator Author

That makes sense, thanks! I've repurposed this to changing sFinite to sfinite then :)

Multramate added a commit to Multramate/mathlib4 that referenced this pull request Sep 29, 2026
`sfinite` for `SFinite` and `fgequiv` for `FGEquiv` are correct (j-loreaux on
leanprover-community#44292), so the flattened-camelCase check no longer reports them, and the four
rows that proposed `sFinite`, `fGEquiv`, `gRewrite` and `pContinuous` are
false positives.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

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

maintainer merge

this time with the right convention :)

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

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

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

@j-loreaux j-loreaux 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.

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Oct 2, 2026
@mathlib-triage mathlib-triage Bot removed the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Oct 2, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Oct 2, 2026
Rename the declarations spelling the `SFinite` class as `sFinite` to use `sfinite`, following the rule that the whole initial run of capitals is lowercased.
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Oct 2, 2026
@mathlib-bors

mathlib-bors Bot commented Oct 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 Oct 2, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Oct 2, 2026
Rename the declarations spelling the `SFinite` class as `sFinite` to use `sfinite`, following the rule that the whole initial run of capitals is lowercased.
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Oct 2, 2026
@mathlib-bors

mathlib-bors Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title chore: rename sFinite to sfinite in declaration names [Merged by Bors] - chore: rename sFinite to sfinite in declaration names Oct 2, 2026
@mathlib-bors mathlib-bors Bot closed this Oct 2, 2026
Multramate added a commit to Multramate/mathlib4 that referenced this pull request Oct 2, 2026
`sfinite` for `SFinite` and `fgequiv` for `FGEquiv` are correct (j-loreaux on
leanprover-community#44292), so the flattened-camelCase check no longer reports them, and the four
rows that proposed `sFinite`, `fGEquiv`, `gRewrite` and `pContinuous` are
false positives.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Multramate added a commit to Multramate/mathlib4 that referenced this pull request Oct 8, 2026
`sfinite` for `SFinite` and `fgequiv` for `FGEquiv` are correct (j-loreaux on
leanprover-community#44292), so the flattened-camelCase check no longer reports them, and the four
rows that proposed `sFinite`, `fGEquiv`, `gRewrite` and `pContinuous` are
false positives.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Multramate added a commit to Multramate/mathlib4 that referenced this pull request Oct 13, 2026
`sfinite` for `SFinite` and `fgequiv` for `FGEquiv` are correct (j-loreaux on
leanprover-community#44292), so the flattened-camelCase check no longer reports them, and the four
rows that proposed `sFinite`, `fGEquiv`, `gRewrite` and `pContinuous` are
false positives.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Multramate added a commit to Multramate/mathlib4 that referenced this pull request Oct 13, 2026
`sfinite` for `SFinite` and `fgequiv` for `FGEquiv` are correct (j-loreaux on
leanprover-community#44292), so the flattened-camelCase check no longer reports them, and the four
rows that proposed `sFinite`, `fGEquiv`, `gRewrite` and `pContinuous` are
false positives.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Multramate
Multramate deleted the typo/sFinite branch October 13, 2026 22:51
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants