Skip to content

[Merged by Bors] - chore: fix some ENat-related instances of backward.isDefEq.respectTransparency#41515

Closed
vlad902 wants to merge 2 commits into
leanprover-community:masterfrom
vlad902:respect-transparency5
Closed

[Merged by Bors] - chore: fix some ENat-related instances of backward.isDefEq.respectTransparency#41515
vlad902 wants to merge 2 commits into
leanprover-community:masterfrom
vlad902:respect-transparency5

Conversation

@vlad902

@vlad902 vlad902 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

I went through and found a few remaining instances of ENat/WithTop Nat defeq abuse that were easy to fix.

Open in Gitpod

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

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

PR summary a9cf1d2b14

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ add_eq_top

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

  • +1 new declarations
  • −0 removed declarations
+ENat.add_eq_top

Decrease in strong tech debt: (relative, absolute) = (5.00, 0.00)
Current number Change Type (strong)
5622 -5 backward.isDefEq.respectTransparency
No changes to weak technical debt.

Current commit a9cf1d2b14
Reference commit 1c3e8f34a8

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

| ⊤, _ => exact tendsto_nhds_top_mono' continuousAt_fst fun p ↦ le_add_right le_rfl
| (a : ℕ), ⊤ => exact tendsto_nhds_top_mono' continuousAt_snd fun p ↦ le_add_left le_rfl
| (a : ℕ), (b : ℕ) => simp [ContinuousAt, nhds_prod_eq, tendsto_pure_nhds]
| (a : ℕ), (b : ℕ) => simp [ContinuousAt, nhds_prod_eq]

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No longer required since add_eq_top above is @[simp]

@grunweg

grunweg commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for doing this!
bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Jul 9, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Jul 9, 2026
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Jul 9, 2026
@mathlib-bors

mathlib-bors Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title chore: fix some ENat-related instances of backward.isDefEq.respectTransparency [Merged by Bors] - chore: fix some ENat-related instances of backward.isDefEq.respectTransparency Jul 9, 2026
@mathlib-bors mathlib-bors Bot closed this Jul 9, 2026
michaellee94 pushed a commit to michaellee94/mathlib4 that referenced this pull request Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. ready-to-merge This PR has been sent to bors. 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