Skip to content

[Merged by Bors] - feat(Topology/Instances/AddCircle): add Ioc analogues of lift and equiv lemmas#37570

Closed
pitmonticone wants to merge 11 commits intoleanprover-community:masterfrom
pitmonticone:carleson/AddCircle-lifts
Closed

[Merged by Bors] - feat(Topology/Instances/AddCircle): add Ioc analogues of lift and equiv lemmas#37570
pitmonticone wants to merge 11 commits intoleanprover-community:masterfrom
pitmonticone:carleson/AddCircle-lifts

Conversation

@pitmonticone
Copy link
Copy Markdown
Member

@pitmonticone pitmonticone commented Apr 2, 2026

Add AddCircle lemmas:

  • liftIoc_eq_liftIco_of_ne: the Ioc and Ico lifts agree away from the basepoint
  • coe_eq_coe_iff_of_mem_Ioc: Ioc analogue of coe_eq_coe_iff_of_mem_Ico
  • eq_coe_Ioc: Ioc analogue of eq_coe_Ico
  • coe_equivIoc: Ioc analogue of coe_equivIco
  • equivIoc_coe_of_mem: if y ∈ Ioc a (a + p), then equivIoc p a y = y

Upstreamed from the Carleson project.

Co-authored-by: James Sundstrom [email protected]
Co-authored-by: Leo Diedering [email protected]


…iv lemmas

Add Ioc analogues of existing AddCircle Ico lemmas:
- `liftIoc_eq_liftIco_of_ne`
- `coe_eq_coe_iff_of_mem_Ioc`
- `eq_coe_Ioc`
- `coe_equivIoc`
- `equivIoc_coe_of_mem`

Upstreamed from the [Carleson](https://github.com/fpvandoorn/carleson) project.

Co-authored-by: James Sundstrom <[email protected]>
Co-authored-by: Leo Diedering <[email protected]>
@pitmonticone pitmonticone added carleson part of the ongoing formalization of Carleson's theorem easy < 20s of review time. See the lifecycle page for guidelines. labels Apr 2, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

PR summary 91f509a196

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ coe_eq_coe_iff_of_mem_Ioc
+ coe_equivIco
+ coe_equivIoc
+ eq_coe_Ioc
+ equivIco_coe_of_mem
+ equivIoc_coe_of_mem
+ liftIoc_eq_liftIco_of_ne

You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

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

@github-actions github-actions bot added the t-topology Topological spaces, uniform spaces, metric spaces, filters label Apr 2, 2026
@loefflerd
Copy link
Copy Markdown
Contributor

loefflerd commented Apr 4, 2026

Add Ioc analogues of existing AddCircle Ico lemmas:
liftIoc_eq_liftIco_of_ne
coe_eq_coe_iff_of_mem_Ioc
eq_coe_Ioc
coe_equivIoc
equivIoc_coe_of_mem

I'm a little puzzled by the PR description since of these five lemmas, only three of them seem to have existing Ico counterparts: we have AddCircle.coe_eq_coe_iff_of_mem_Ico, AddCircle.eq_coe_Ico, and AddCircle.coe_equivIco, so it makes perfect sense to add the Ioc counterparts; but the others don't seem to match anything in the library, there is no equivIco_coe_of_mem. (There is a similar lemma docs#AddCircle.equivIco_coe_eq but that has an Ioc analogue already.)

@loefflerd loefflerd added awaiting-author A reviewer has asked the author a question or requested changes. and removed easy < 20s of review time. See the lifecycle page for guidelines. labels Apr 4, 2026
@pitmonticone
Copy link
Copy Markdown
Member Author

Good point, thanks! Updated the PR description. Only coe_eq_coe_iff_of_mem_Ioc, eq_coe_Ioc, and coe_equivIoc are direct Ioc analogues. The other two (liftIoc_eq_liftIco_of_ne and equivIoc_coe_of_mem) are new standalone lemmas.

@pitmonticone pitmonticone removed the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 4, 2026
Comment thread Mathlib/Topology/Instances/AddCircle/Defs.lean
(equivIoc p a y : AddCircle p) = y :=
(equivIoc p a).left_inv y

lemma equivIoc_coe_of_mem {y : 𝕜} (hy : y ∈ Set.Ioc a (a + p)) :
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.

Same for this one: we should have both Ioc and Ico versions (but this one shouldn't get a simp flag).

have x_eq_b : x = ↑b :=
(QuotientAddGroup.equivIcoMod hp.out a).apply_eq_iff_eq_symm_apply.mp rfl
rw [x_eq_b, liftIco_coe_apply b.coe_prop]
exact liftIoc_coe_apply ⟨lt_of_le_of_ne b.coe_prop.1 (x_ne_a <| · ▸ x_eq_b), b.coe_prop.2.le⟩
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.

Suggested change
exact liftIoc_coe_apply ⟨lt_of_le_of_ne b.coe_prop.1 (x_ne_a <| · ▸ x_eq_b), b.coe_prop.2.le⟩
exact liftIoc_coe_apply (by grind)

Comment on lines +368 to +369
have x_eq_b : x = ↑b :=
(QuotientAddGroup.equivIcoMod hp.out a).apply_eq_iff_eq_symm_apply.mp rfl
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.

If you add missing Ico lemma above this becomes just

Suggested change
have x_eq_b : x = ↑b :=
(QuotientAddGroup.equivIcoMod hp.out a).apply_eq_iff_eq_symm_apply.mp rfl
have x_eq_b : x = ↑b := coe_equivIco.symm

Comment thread Mathlib/Topology/Instances/AddCircle/Defs.lean Outdated
(QuotientAddGroup.equivIcoMod hp.out 0).symm_apply_apply a⟩

/-- Ioc version of `eq_coe_Ico`. -/
lemma eq_coe_Ioc (a : AddCircle p) : ∃ b ∈ Set.Ioc 0 p, ↑b = a := by
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.

Suggested change
lemma eq_coe_Ioc (a : AddCircle p) : ∃ b ∈ Set.Ioc 0 p, ↑b = a := by
lemma eq_coe_Ioc (a : AddCircle p) : ∃ b ∈ Ioc 0 p, ↑b = a := by

Comment on lines +365 to +366
theorem liftIoc_eq_liftIco_of_ne (f : 𝕜 → B) {x : AddCircle p}
(x_ne_a : x ≠ a) : liftIoc p a f x = liftIco p a f x := by
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.

f can be implicit (inferrable from either side of the equality)

Suggested change
theorem liftIoc_eq_liftIco_of_ne (f : 𝕜 → B) {x : AddCircle p}
(x_ne_a : x ≠ a) : liftIoc p a f x = liftIco p a f x := by
theorem liftIoc_eq_liftIco_of_ne {f : 𝕜 → B} {x : AddCircle p} (x_ne_a : x ≠ a) :
liftIoc p a f x = liftIco p a f x := by

(equivIoc p a y : AddCircle p) = y :=
(equivIoc p a).left_inv y

lemma equivIoc_coe_of_mem {y : 𝕜} (hy : y ∈ Set.Ioc a (a + p)) :
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.

Suggested change
lemma equivIoc_coe_of_mem {y : 𝕜} (hy : y ∈ Set.Ioc a (a + p)) :
lemma equivIoc_coe_of_mem {y : 𝕜} (hy : y ∈ Ioc a (a + p)) :

(and elsewhere)

@loefflerd loefflerd added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 6, 2026
@pitmonticone
Copy link
Copy Markdown
Member Author

Thank you @loefflerd. I should have addressed all your review comments.

fpvandoorn pushed a commit to fpvandoorn/carleson that referenced this pull request Apr 7, 2026
Update the upstreaming status comments for files that have been PRed to
mathlib:

- `Analysis/MeanInequalitiesPow`
leanprover-community/mathlib4#37547
- `Order/LiminfLimsup`
leanprover-community/mathlib4#37549 (merged)
- `Topology/Order/Basic`
leanprover-community/mathlib4#37550 (moved to
DenselyOrdered)
- `MeasureTheory/Integral/Average`
leanprover-community/mathlib4#37551
- `MeasureTheory/Measure/ENNReal`
leanprover-community/mathlib4#37552 (generalized
to `measurable_iSup_of_lowerSemicontinuous`)
- `MeasureTheory/Integral/Lebesgue`
leanprover-community/mathlib4#37558 (merged)
- `MeasureTheory/Function/LpSpace/Indicator`
leanprover-community/mathlib4#37559
- `MeasureTheory/Function/LpSpace/ContinuousFunctions`
leanprover-community/mathlib4#37560
- `Data/ENNReal`
leanprover-community/mathlib4#37565 (partial)
- `MeasureTheory/Integral/Bochner/ContinuousLinearMap`
leanprover-community/mathlib4#37568 (partial)
- `Topology/Instances/AddCircle/Defs`
leanprover-community/mathlib4#37570 (partial)
- `Discrete/SumEstimates`
leanprover-community/mathlib4#37597

Also notes that `IntegrableAtFilter.congr` and
`integrableOn_of_integrableOn_inter_support` already exist in mathlib.
@pitmonticone pitmonticone removed the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 7, 2026
Copy link
Copy Markdown
Contributor

@loefflerd loefflerd left a comment

Choose a reason for hiding this comment

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

LGTM – just a tiny formatting nit to finish

maintainer delegate

Comment thread Mathlib/Topology/Instances/AddCircle/Defs.lean Outdated
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

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

@mathlib-triage mathlib-triage bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Apr 9, 2026
Copy link
Copy Markdown
Contributor

@faenuccio faenuccio left a comment

Choose a reason for hiding this comment

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

Thanks, I left a couple of stylistic comments, but then you can go.

Comment thread Mathlib/Topology/Instances/AddCircle/Defs.lean Outdated
@faenuccio
Copy link
Copy Markdown
Contributor

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Apr 10, 2026

✌️ pitmonticone can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@mathlib-triage mathlib-triage bot added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Apr 10, 2026
Co-authored-by: Filippo A. E. Nuccio <[email protected]>
@pitmonticone
Copy link
Copy Markdown
Member Author

bora r+

@loefflerd
Copy link
Copy Markdown
Contributor

@pitmonticone I think you may have a typo

@pitmonticone
Copy link
Copy Markdown
Member Author

Ops, thanks!

@pitmonticone
Copy link
Copy Markdown
Member Author

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Apr 10, 2026
…iv lemmas (#37570)

Add AddCircle lemmas:
- `liftIoc_eq_liftIco_of_ne`: the Ioc and Ico lifts agree away from the basepoint
- `coe_eq_coe_iff_of_mem_Ioc`: Ioc analogue of `coe_eq_coe_iff_of_mem_Ico`
- `eq_coe_Ioc`: Ioc analogue of `eq_coe_Ico`
- `coe_equivIoc`: Ioc analogue of `coe_equivIco`
- `equivIoc_coe_of_mem`: if `y ∈ Ioc a (a + p)`, then `equivIoc p a y = y`

Upstreamed from the [Carleson](https://github.com/fpvandoorn/carleson) project.

Co-authored-by: James Sundstrom <[email protected]>
Co-authored-by: Leo Diedering <[email protected]>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Apr 10, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Topology/Instances/AddCircle): add Ioc analogues of lift and equiv lemmas [Merged by Bors] - feat(Topology/Instances/AddCircle): add Ioc analogues of lift and equiv lemmas Apr 10, 2026
@mathlib-bors mathlib-bors bot closed this Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

carleson part of the ongoing formalization of Carleson's theorem delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-topology Topological spaces, uniform spaces, metric spaces, filters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants