Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(measure_theory/interval_integral): more versions of FTC-1 #3709

Closed
wants to merge 27 commits into from

Conversation

urkud
Copy link
Member

@urkud urkud commented Aug 6, 2020

Left/right derivative, strict derivative, differentiability in both endpoints.

Other changes:

  • rename filter.tendsto_le_left and filter.tendsto_le_right to filter.tendsto.mono_left and filter.tendsto.mono_right, swap arguments;
  • rename order_top.tendsto_at_top to order_top.tendsto_at_top_nhds;
  • introduce tendsto_Ixx_class instead of is_interval_generated.

Some lemmas assume (l : filter α) [is_interval_generated l] (_ : pure b ≤ l) (l ≤ 𝓝 b).
This is a fancy way to say “l is one of pure b, 𝓝[Iic b] b, 𝓝[Ici b] b, 𝓝 b
in order to prove a lemma for the three non-trivial cases simultaneously.

@urkud urkud added needs-documentation This PR is missing required documentation awaiting-review The author would like community review of the PR WIP Work in progress and removed awaiting-review The author would like community review of the PR labels Aug 6, 2020
@urkud
Copy link
Member Author

urkud commented Aug 7, 2020

While adding docs I found some holes in API. I'll work on this tonight or tomorrow.

@urkud urkud added awaiting-review The author would like community review of the PR and removed WIP Work in progress needs-documentation This PR is missing required documentation labels Aug 8, 2020
@bryangingechen
Copy link
Collaborator

Some lemmas assume (l : filter α) [is_interval_generated l] (_ : pure b ≤ l) (l ≤ 𝓝 b).
This is a fancy way to say “l is one of pure b, 𝓝[Iic b] b, 𝓝[Ici b] b, 𝓝 b
in order to prove a lemma for the three non-trivial cases simultaneously.

Should this be mentioned in a module doc string?

Copy link
Collaborator

@sgouezel sgouezel left a comment

Choose a reason for hiding this comment

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

This is very nice: the formulations of the different versions of the FTC are really neat, and you have been able to factor out the proof part very efficiently. Thanks!

src/data/set/intervals/disjoint.lean Outdated Show resolved Hide resolved
src/measure_theory/interval_integral.lean Outdated Show resolved Hide resolved
src/measure_theory/interval_integral.lean Outdated Show resolved Hide resolved
src/measure_theory/interval_integral.lean Show resolved Hide resolved
src/measure_theory/interval_integral.lean Outdated Show resolved Hide resolved
src/measure_theory/interval_integral.lean Outdated Show resolved Hide resolved
@@ -41,7 +41,6 @@ intervals with the same endpoints for two reasons:
the difference $F_μ(b)-F_μ(a)$, where $F_μ(a)=μ(-∞, a]$ is the
[cumulative distribution function](https://en.wikipedia.org/wiki/Cumulative_distribution_function)
of `μ`.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add comments on the different versions of the FTC you prove, in the file-level docstring?

@sgouezel sgouezel added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Aug 9, 2020
Now `interval_integral` has `#exit` and many outdated docstrings.
@urkud
Copy link
Member Author

urkud commented Aug 12, 2020

While working on the docs I've realized that I have no has_strict_fderiv_at for ∫ x in a..b, f x ∂μ as a function of both a and b. tl;dr: I refactored FTC again (almost done, will finish tomorrow).

@urkud urkud added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Aug 17, 2020
@urkud
Copy link
Member Author

urkud commented Aug 17, 2020

I rewrote large parts of this PR to add differentiability in both endpoints.

Copy link
Collaborator

@sgouezel sgouezel left a comment

Choose a reason for hiding this comment

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

Thanks! In addition to minor comments, my main concern is that the file-level docstring could (should?) be exanded a lot, both in the statements section (can you explain what you prove, maybe not all versions but at least one or two relevant versions), and also in the implementation section (comment on the specific type classes you introduce, and how they are used and how they make it possible to avoid proof duplication).

src/order/filter/basic.lean Show resolved Hide resolved
src/order/filter/interval.lean Outdated Show resolved Hide resolved
src/order/filter/interval.lean Show resolved Hide resolved
src/order/filter/interval.lean Outdated Show resolved Hide resolved
src/measure_theory/interval_integral.lean Outdated Show resolved Hide resolved
src/measure_theory/interval_integral.lean Show resolved Hide resolved
src/measure_theory/interval_integral.lean Outdated Show resolved Hide resolved
src/measure_theory/interval_integral.lean Outdated Show resolved Hide resolved
src/measure_theory/interval_integral.lean Outdated Show resolved Hide resolved
src/measure_theory/interval_integral.lean Outdated Show resolved Hide resolved
@PatrickMassot PatrickMassot added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Aug 19, 2020
@urkud
Copy link
Member Author

urkud commented Aug 20, 2020

@sgouezel I tried to address all your comments.

@urkud urkud added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Aug 20, 2020
@sgouezel
Copy link
Collaborator

bors r+

Thanks!

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Aug 21, 2020
bors bot pushed a commit that referenced this pull request Aug 21, 2020
Left/right derivative, strict derivative, differentiability in both endpoints.

Other changes:

* rename `filter.tendsto_le_left` and `filter.tendsto_le_right` to `filter.tendsto.mono_left` and `filter.tendsto.mono_right`, swap arguments;
* rename `order_top.tendsto_at_top` to `order_top.tendsto_at_top_nhds`;
* introduce `tendsto_Ixx_class` instead of `is_interval_generated`.



Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
@bors
Copy link

bors bot commented Aug 21, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(measure_theory/interval_integral): more versions of FTC-1 [Merged by Bors] - feat(measure_theory/interval_integral): more versions of FTC-1 Aug 21, 2020
@bors bors bot closed this Aug 21, 2020
@bors bors bot deleted the FTC-strict branch August 21, 2020 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants