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

integration by parts #1266

Merged
merged 8 commits into from
Sep 17, 2024
Merged

Conversation

affeldt-aist
Copy link
Member

@affeldt-aist affeldt-aist commented Jul 23, 2024

Motivation for this change

preliminary usable version of integration by parts

(and "within continuous" version of continuous_FTC2)

NB: we've been trying to "weaken" the hypotheses of lemmas in ftc.v to avoid requiring integrability over the whole set in the hope to ease their applications (this seems to be confirmed by the use of the new version of continuous_FTC1 to prove change-of-variables lemma)

based on PR #1246 (merged)

FYI @IshiguroYoshihiro

Checklist
  • added corresponding entries in CHANGELOG_UNRELEASED.md

- [ ] added corresponding documentation in the headers

Reference: How to document

Reminder to reviewers

@affeldt-aist affeldt-aist added this to the 1.3.0 milestone Jul 23, 2024
@affeldt-aist affeldt-aist added enhancement ✨ This issue/PR is about adding new features enhancing the library experiment 🧪 This issue/PR is very experimental labels Jul 23, 2024
@affeldt-aist affeldt-aist modified the milestones: 1.3.0, 1.4.0 Jul 25, 2024
Copy link
Contributor

@zstone1 zstone1 left a comment

Choose a reason for hiding this comment

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

A few annoying boundary condition issues. If you want, we can weaken those conditions via tietze, or other limiting approaches if the proofs are hard to edit. If you want some guidance on that I'm happy to provide.

theories/ftc.v Outdated Show resolved Hide resolved
theories/ftc.v Outdated Show resolved Hide resolved
@affeldt-aist
Copy link
Member Author

affeldt-aist commented Aug 12, 2024

The last commit weakens the hypotheses from {in _, continuous _} to {within _, continuous _} of the corollary of FTC1 ("FTC2 for continuous functions") and of integration by parts (newly introduced). I went through a weakening of the hypotheses of FTC1 theorems for that purpose: moving from integrability over the whole set to local integrability + integrability over a family of intervals possibly open-ended on the left (the two are redundant when dealing with bounded intervals but not when the interval on which we want to integrate is say ]-oo, x]). By the way, the resulting theorems are used in another branch to prove properties of the beta distribution, so they are usable in practice.

@affeldt-aist affeldt-aist force-pushed the fct_20240723 branch 2 times, most recently from 316e2c8 to c5c04ee Compare August 29, 2024 00:05
@affeldt-aist affeldt-aist marked this pull request as ready for review August 29, 2024 02:19
@affeldt-aist affeldt-aist force-pushed the fct_20240723 branch 2 times, most recently from 00b256f to 9a864bf Compare September 13, 2024 15:38
theories/ftc.v Outdated
Let FTC0 f a : mu.-integrable setT (EFin \o f) ->
let F x := (\int[mu]_(t in [set` Interval a (BRight x)]) f t)%R in
forall x, a < BRight x -> lebesgue_pt f x ->
Let FTC0 f a x (u : R) : (x < u)%R ->
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a little confused by requiring both

  mu.-integrable [set` Interval a (BRight u)] (EFin \o f) ->
  locally_integrable setT (f \_ [set` Interval a (BRight u)]) ->

If I were being optimistic, I would expect that

mu.-integrable [set` Interval a (BRight u)] (EFin \o f)

actually just implies

mu.-integrable setT (EFin \o f \_ [set` Interval a (BRight u))

unconditionally. So the original form of FTC0 applies. I haven't actually tried this, so I'm curious what will go wrong.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me try...

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right, I have visibly been confused, fixing the PR right now.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, glad we could simplify that. My next question is, if you leave the original FTC0 alone, and add a this new statement as FTC0_restricted, can we simplify the proof by just applying FTC0 with the restricted function?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that I have a script that does that, should be pushed by tomorrow.

Copy link
Member Author

Choose a reason for hiding this comment

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

it seems so: see a078951

Copy link
Contributor

@zstone1 zstone1 left a comment

Choose a reason for hiding this comment

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

A few more thoughts on ways to simplify the conditions does these lemmas.

solve [apply: measurable_closed_ball] : core.

Lemma nice_lebesgue_differentiation (f : R -> R) (x : R) :
(\forall r \near 0^'+, locally_integrable setT (f \_ (closed_ball x r))) ->
Copy link
Contributor

Choose a reason for hiding this comment

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

Since R is locally compact, this is the same as

(\forall r \near 0^'+, integrable setT (f \_ (closed_ball x r)))

There is also the powerser_filter_from thing which let's you state it as

(\forall U \near powerset_filter_from (nbhs x),, integrable U f)

Either is fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have reverted to this version:

Lemma nice_lebesgue_differentiation (f : R -> R) :
  locally_integrable setT f -> forall x, lebesgue_pt f x ->
  (fine (mu (E x n)))^-1%:E * \int[mu]_(y in E x n) (f y)%:E
    @[n --> \oo] --> (f x)%:E.

theories/ftc.v Outdated
Let FTC0 f a : mu.-integrable setT (EFin \o f) ->
let F x := (\int[mu]_(t in [set` Interval a (BRight x)]) f t)%R in
forall x, a < BRight x -> lebesgue_pt f x ->
Let FTC0 f a x (u : R) : (x < u)%R ->
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, glad we could simplify that. My next question is, if you leave the original FTC0 alone, and add a this new statement as FTC0_restricted, can we simplify the proof by just applying FTC0 with the restricted function?

theories/ftc.v Outdated Show resolved Hide resolved
theories/ftc.v Outdated Show resolved Hide resolved
@zstone1
Copy link
Contributor

zstone1 commented Sep 15, 2024

Ah, this looks much cleaner now! Thanks for all the updates. There's always more proof linting to do, but I'm not seeing any more structural issues. I'm fine to merge if/when you're happy with the state of the proof scripts.

@affeldt-aist
Copy link
Member Author

I did some more linting and I don't mind if you squash and merge.
There is surely room for improvement but we might come back to
it soon with integration by substitution in the pipeline anyway.

@affeldt-aist affeldt-aist removed the experiment 🧪 This issue/PR is very experimental label Sep 17, 2024
@affeldt-aist affeldt-aist removed the experiment 🧪 This issue/PR is very experimental label Sep 17, 2024
@affeldt-aist affeldt-aist merged commit ad764a4 into math-comp:master Sep 17, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ This issue/PR is about adding new features enhancing the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants