Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

feat(measure_theory/interval_integral): derivative of an integral#1944

Closed
aceg00 wants to merge 20 commits intoleanprover-community:masterfrom
aceg00:interval_integral
Closed

feat(measure_theory/interval_integral): derivative of an integral#1944
aceg00 wants to merge 20 commits intoleanprover-community:masterfrom
aceg00:interval_integral

Conversation

@aceg00
Copy link
Copy Markdown
Collaborator

@aceg00 aceg00 commented Feb 3, 2020

This PR proves one of the fundamental theorems of calculus. I'll PR the other one after this one gets merged.

To help with the review, I made all commits meaningful. But perhaps this PR is still too big. If so, I'll split it.

TO CONTRIBUTORS:

Make sure you have:

  • reviewed and applied the coding style: coding, naming
  • reviewed and applied the documentation requirements
  • for tactics:
  • make sure definitions and lemmas are put in the right files
  • make sure definitions and lemmas are not redundant

If this PR is related to a discussion on Zulip, please include a link in the discussion.

For reviewers: code review check list

lemma indicator_eq_zero_ae (h : volume s = 0) : ∀ₘ a, indicator s f a = 0 :=
begin
rw [all_ae_iff],
have : {a : α | ¬indicator s f a = 0} ⊆ s,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not_imp_comm.1 (λ h, indicator_of_not_mem h f)?

@urkud
Copy link
Copy Markdown
Member

urkud commented Feb 3, 2020

I think it would be easier to review if you split this into 3 PRs: (1) changes outside of measure_theory; (2) refactoring of measure_theory; (3) completely new code in measure_theory.

@urkud
Copy link
Copy Markdown
Member

urkud commented Feb 3, 2020

BTW, do you need intervals for types other than real? If not, you can use segment from convex/basic.

end

lemma norm_integral_le_abs (a b : ℝ) (f : ℝ → β):
∥(∫ x in a...b, f x)∥ ≤ abs (∫ x in a...b, ∥f x∥) :=
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you prove ∥(∫ x in a...b, f x)∥ ≤ ∫ x in a..b, ∥f x∥ as well (and equality of these RHSs)?

Copy link
Copy Markdown
Member

@urkud urkud Feb 3, 2020

Choose a reason for hiding this comment

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

It will be easier to prove trivial parts of some of these theorems if you have abs (∫ x in a...b, f x) = ∫ x in a..b, f x whenever f x ≥ 0 a.e. on a..b.

(hgm : measurable_on a..b g) (hgi : integrable_on a..b g) :
abs (∫ x in a...b, f x) ≤ abs (∫ x in a...b, g x) :=
begin
by_cases H : measurable_on a..b f ∧ integrable_on a..b f,
Copy link
Copy Markdown
Member

@urkud urkud Feb 3, 2020

Choose a reason for hiding this comment

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

Probably not for this PR: does it make sense to deal with integrable but not measurable functions? If not, I propose to redefine integrable = measurable ∧ old_integrable.

begin
by_cases H : measurable_on a..b f ∧ integrable_on a..b f,
{ have H1 := H.1, have H2 := H.2,
split_ifs,
Copy link
Copy Markdown
Member

@urkud urkud Feb 3, 2020

Choose a reason for hiding this comment

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

Please explicitly name the variable.

{ apply integral_on_le_integral_on_ae, assumption' },
{ filter_upwards [hf, hfg] λ a hf hfg h, le_trans (hf h) (hfg h) },
{ filter_upwards [hf] λ a hf, hf } },
{ simp only [interval_of_le' (le_of_not_ge h)] at *,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AFAIR, you have interval_of_not_ge

refine integral_Icc_combine ba ac _ _ acm aci,
rwa [interval_swap], rwa [interval_swap] },
{ have := le_trans ac (le_of_not_ge bc), contradiction }, },
show (∫ x in a...b, f x) + (∫ x in b...c, f x) = ∫ x in a...c, f x,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The rest of the proof should be either indented with 2 spaces or should be inside { ... }.

@sgouezel sgouezel added the awaiting-author A reviewer has asked the author a question or requested changes label Feb 3, 2020
@urkud
Copy link
Copy Markdown
Member

urkud commented Feb 3, 2020

Another optional idea: if you use integrals over Ico (min a b) (max a b), then you don't have to deal with singletons here and there. Not sure if this is worth refactoring.

@aceg00
Copy link
Copy Markdown
Collaborator Author

aceg00 commented Feb 3, 2020

Thanks for the suggestion. I think I'll try to refactor using Icc (min a b) (max a b). Continuous functions are always integrable over Icc,but not necessarily integrable over Ico. So I think Icc is better.

Currently singleton is not an issue, only three lines in interval_integral.lean are dealing with singletons.

@urkud
Copy link
Copy Markdown
Member

urkud commented Mar 9, 2020

@aceg00 Please tag me or replace changes-requested with request-review once this PR will be ready for review again.

@PatrickMassot
Copy link
Copy Markdown
Member

@aceg00 what happened to this PR? Do you need help? It would be a really nice milestone to have this in mathlib.

@urkud
Copy link
Copy Markdown
Member

urkud commented Mar 29, 2020

@aceg00 Are you going to come back to this PR? I really want to have it merged, so if you're not going to work on it in the next few weeks, I'd take over it.

@kim-em
Copy link
Copy Markdown
Collaborator

kim-em commented Jul 28, 2020

Is this still salvageable? The merge conflicts with master look pretty dire.

@urkud
Copy link
Copy Markdown
Member

urkud commented Aug 8, 2020

It seems that parts of this PR was merged into master, and the rest is superseded by #3640 and #3709.

@urkud urkud closed this Aug 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

awaiting-author A reviewer has asked the author a question or requested changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants