Skip to content

[Merged by Bors] - chore: use map_continuous or fun_prop instead of .2 which is continuous_toFun - #45600

Closed
j-loreaux wants to merge 4 commits into
leanprover-community:masterfrom
j-loreaux:continuous-toFun-to-coe
Closed

j-loreaux wants to merge 4 commits into
leanprover-community:masterfrom
j-loreaux:continuous-toFun-to-coe

Conversation

@j-loreaux

Copy link
Copy Markdown
Contributor

This is just a bit of code hygiene that arose during the creation of the linter for numeric projections.


AI diclosure: Claude went through and made all the initial changes (according to a list @thorimur had on Zulip), then I looked at them myself.

@j-loreaux j-loreaux added the tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

PR summary 763c08b362

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

No declarations were harmed in the making of this PR! 🐙

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

  • +0 new declarations
  • −0 removed declarations

No declaration differences.


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

Current commit 763c08b362
Reference commit 428aa8288d

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

Comment thread Mathlib/AlgebraicGeometry/Scheme.lean Resolved
instance TopCat.hasForgetToMeasCat : HasForget₂ TopCat.{u} MeasCat.{u} where
forget₂.obj X := @MeasCat.of _ (borel X)
forget₂.map f := ⟨f.1, f.hom.2.borel_measurable⟩
forget₂.map f := ⟨f.1, Continuous.borel_measurable (by fun_prop)⟩

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.

Follow-up question: should Continuous.borel_measurable be tagged fun_prop?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I had this thought, but decided that it should be a separate PR to keep the diff here easy to review.

I'm slightly worried that it would cause slowdowns due to defeq checks in the measurable space instances, but perhaps that concern is unfounded. Nevertheless, it's why I didn't do it here.

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.

Indeed, that's why I said follow-up!

@grunweg grunweg added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Nov 2, 2026
@j-loreaux j-loreaux removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Nov 3, 2026
@grunweg

grunweg commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

!bench

@grunweg

grunweg commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Thanks! This looks reasonable to me. Feel free to merge if CI comes back without surprises:
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 Nov 3, 2026
@mathlib-bors

mathlib-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

✌️ j-loreaux can now approve this pull request until 2026-11-17 16:23 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.

@leanprover-radar

leanprover-radar commented Nov 3, 2026 •

Copy link
Copy Markdown

Benchmark results for 763c08b against 428aa82 are in. No significant results found. @grunweg

  • ✅ build//instructions: -209.7M (-0.00%)

Small changes (4✅, 14🟥)

  • 18 hidden

@j-loreaux

Copy link
Copy Markdown
Contributor Author

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Nov 3, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Nov 3, 2026
…ontinuous_toFun` (#45600)

This is just a bit of code hygiene that arose during the creation of the linter for numeric projections.
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Nov 3, 2026
@mathlib-bors

mathlib-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title chore: use map_continuous or fun_prop instead of .2 which is continuous_toFun [Merged by Bors] - chore: use map_continuous or fun_prop instead of .2 which is continuous_toFun Nov 3, 2026
@mathlib-bors mathlib-bors Bot closed this Nov 3, 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 Nov 3, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Nov 18, 2026
Takes j-loreaux/continuous-toFun-to-coe (#45600) from upstream/master, where it has landed.
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 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.

4 participants