Skip to content

Bump 429 (done)#549

Open
lakesare wants to merge 66 commits intofpvandoorn:bump-429from
lakesare:bump-429-evgenia
Open

Bump 429 (done)#549
lakesare wants to merge 66 commits intofpvandoorn:bump-429from
lakesare:bump-429-evgenia

Conversation

@lakesare
Copy link
Copy Markdown
Contributor

@lakesare lakesare commented Apr 2, 2026

Continues with migration to Lean v4.29 (#545)

TODOs:

  • integral_smth (integral_conj, etc.) can be further shortened into _ = (starRingEnd ℂ) (∫ y in _, _)
  • didn't pay attention to n of symbols per line
  • didn't look into preexisting set_option backward.isDefEq.respectTransparency false
  • double-check instance NNReal.MeasureSpace
  • I noticed many lemmas in Calculations.lean can now be shortened into plain simp

@lakesare lakesare mentioned this pull request Apr 2, 2026
@lakesare lakesare marked this pull request as ready for review April 11, 2026 11:34
@lakesare
Copy link
Copy Markdown
Contributor Author

@grunweg, why was the longLine linter disabled, does the project not care about line lengths, is it ok to leave long lines introduced in this PR as is?

@lakesare lakesare changed the title [WIP] Bump 429 (continuing) Bump 429 (done) Apr 11, 2026
Copy link
Copy Markdown
Collaborator

@grunweg grunweg left a comment

Choose a reason for hiding this comment

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

That was a large one - thanks a lot for your help here!

I have a few comments about possible clean-up. All comments inside Carleson are optional.

congr 1; simp_rw [← mul_assoc]
rw [← lintegral_biUnion_finset _ (fun _ _ ↦ measurableSet_E)]
· simp
· simp only [Finset.mem_filter, Finset.mem_univ, true_and]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this change needed? Mathlib style is to actually prefer using plain simp when that works: https://leanprover-community.github.io/contribute/style.html#squeezing-simp-calls
This is inside the Carleson directory, so not critical for merging --- but I guess you'd like to know anyway.

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.

Surprisingly, yes!
simp doesn't work anymore.

Same goes for all similar chages, if I touched it then it was erroring out (didn't touch nonerrory lines to make git diff a bit easier).

https://leanprover-community.github.io/contribute/style.html#squeezing-simp-calls

Thanks, haven't seen it!

exact ⟨⟨hx.1.1, hx.2⟩, lt_trans hQ one_lt_two⟩
simp only [E₂, TileLike.toSet, smul_fst, smul_snd, mem_inter_iff, mem_preimage]
refine ⟨⟨hx.1.1, hx.2⟩, ?_⟩
apply @ball_subset_ball (WithFunctionDistance (𝔠 p) (↑D ^ 𝔰 p / 4)) instPseudoMetricSpaceWithFunctionDistance _ 1 2 (by norm_num)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could gcongr help here? (Otherwise, the WithFunctionDistance details smell like some latent defeq abuse... which could be nice to fix, given infinite time.)

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.

gcongr doesn't help, but slightly refactored it via other means

exact ENNReal.le_coe_iff.mp h2r
exact ENNReal.le_coe_iff.mp h2d
exact ENNReal.le_coe_iff.mp h2c
refine le_iSup₂_of_le p hp ?_
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Much nicer proof, by the way - thanks!

· refine le_iSup₂_of_le p (mem_lowerCubes.mpr ⟨p, hp, le_refl _⟩) ?_
refine le_iSup_of_le (le_refl _) ?_
gcongr
· simp only [NNReal.coe_ofNat, subset_refl]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can this be simp?

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! Changed.

· rw [dist_comm (α := WithFunctionDistance (𝔠 p) (D ^ 𝔰 p / 4)) _ (𝒬 q)]
exact (hex q hq).choose_spec.2
· rw [dist_comm (α := WithFunctionDistance (𝔠 p) (D ^ 𝔰 p / 4)) _ (𝒬 q')]
rw [←hfq, hf, hfq']
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can the two rws be combined?

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, and turns out (α := WithFunctionDistance) can be removed now. Changed.

· refine mem_ae_iff.mpr ?_
rw [NNReal.volume_val]
simp
rw [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This proof is inside ToMathlib --- so it would be good to understand what's going on. Can you at least some a "TODO" or "adaptation note", pointing to the Lean version bump?

exact hx
rw [NNReal.volume_val, this]
simpa only [Real.volume_Ioo, ENNReal.ofReal_eq_ofNat] using by norm_num
rw [NNReal.volume_val]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice clean-up!

simp only [val_eq_coe]
rw [toReal_Iio_eq_Ico, Real.volume_Ico]
simp
change volume (NNReal.toReal '' Set.Iio b) = b
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Though, can you try to figure out to replace the change by something explicit (in all four places in this file)?

Copy link
Copy Markdown
Contributor Author

@lakesare lakesare Apr 12, 2026

Choose a reason for hiding this comment

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

Can be changed into erw (link). Not more explicit, but good it's shorter?

@grunweg
Copy link
Copy Markdown
Collaborator

grunweg commented Apr 12, 2026

@grunweg, why was the longLine linter disabled, does the project not care about line lengths, is it ok to leave long lines introduced in this PR as is?

I would say it was never enabled :-) My best guess is that this project has really two kinds of style, and inside Carleson we don't care much about line length. If you see a natural way to break a long line, you're welcome to, but I won't be strict about it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants