Skip to content

chore: don't expose Nat.find or Nat.rfind - #42430

Open
vihdzp wants to merge 6 commits into
leanprover-community:masterfrom
vihdzp:defprop
Open

chore: don't expose Nat.find or Nat.rfind#42430
vihdzp wants to merge 6 commits into
leanprover-community:masterfrom
vihdzp:defprop

Conversation

@vihdzp

@vihdzp vihdzp commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Both have highly bespoke definitions, and are best characterized by the predicate they satisfy.


Open in Gitpod

@github-actions github-actions Bot added the tech debt Tracking cross-cutting technical debt, see e.g. the "Technical debt counters" stream on zulip label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

PR summary 8290d01268

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

--++ wf_lbp

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

Computed after the build finishes.


Decrease in strong tech debt: (relative, absolute) = (3.31, 0.01)
Current number Change Type (strong)
678 -6 backward.privateInPublic
330 -2 backward.privateInPublic.warn
Decrease in weak tech debt: (relative, absolute) = (2.00, 0.00)
Current number Change Type (weak)
5045 -2 exposed public sections

Current commit 8290d01268
Reference commit b2418b0404

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@grunweg grunweg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! Half of the PR is clearly useful, and the other half requires more careful attention from somebody who knows the file better.

Comment thread Mathlib/NumberTheory/Padics/Hensel.lean
Comment thread Mathlib/RingTheory/IsGaloisGroup/Basic.lean Outdated
Comment thread Mathlib/Data/Nat/Find.lean
Comment thread Mathlib/Computability/Partrec.lean
Comment thread Counterexamples/DirectSumIsInternal.lean
@grunweg

grunweg commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Let's hope we can split out the easy half, and then split the rest into separate PRs per file to get eyes on them?

mathlib-bors Bot pushed a commit that referenced this pull request Aug 4, 2026
… (#42433)

This PR was automatically created from PR #42430 by @vihdzp via a [review comment](#42430 (comment)) by @grunweg.

Co-authored-by: vihdzp <65465670+vihdzp@users.noreply.github.com>
mathlib-bors Bot pushed a commit that referenced this pull request Aug 4, 2026
… (#42433)

This PR was automatically created from PR #42430 by @vihdzp via a [review comment](#42430 (comment)) by @grunweg.

Co-authored-by: vihdzp <65465670+vihdzp@users.noreply.github.com>
mathlib-bors Bot pushed a commit that referenced this pull request Aug 4, 2026
…42430 (#42431)

This PR was automatically created from PR #42430 by @vihdzp via a [review comment](#42430 (comment)) by @grunweg.

Co-authored-by: vihdzp <65465670+vihdzp@users.noreply.github.com>
mathlib-bors Bot pushed a commit that referenced this pull request Aug 4, 2026
…42432)

This PR was automatically created from PR #42430 by @vihdzp via a [review comment](#42430 (comment)) by @grunweg.

Co-authored-by: vihdzp <65465670+vihdzp@users.noreply.github.com>
mathlib-bors Bot pushed a commit that referenced this pull request Aug 4, 2026
…42432)

This PR was automatically created from PR #42430 by @vihdzp via a [review comment](#42430 (comment)) by @grunweg.

Co-authored-by: vihdzp <65465670+vihdzp@users.noreply.github.com>
mathlib-bors Bot pushed a commit that referenced this pull request Aug 4, 2026
…42430 (#42431)

This PR was automatically created from PR #42430 by @vihdzp via a [review comment](#42430 (comment)) by @grunweg.

Co-authored-by: vihdzp <65465670+vihdzp@users.noreply.github.com>
@vihdzp vihdzp changed the title chore: fix all instances of linter.defProp chore: don't expose Nat.find or Nat.rfind Aug 5, 2026
@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Aug 5, 2026
@mathlib-dependent-issues

Copy link
Copy Markdown

This PR/issue depends on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) tech debt Tracking cross-cutting technical debt, see e.g. the "Technical debt counters" stream on zulip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants