-
Notifications
You must be signed in to change notification settings - Fork 63
Generalize integration_by_parts #1674
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
base: master
Are you sure you want to change the base?
Generalize integration_by_parts #1674
Conversation
|
Are not all 4 versions the same, the only difference being whether the minus is inside or outside the integral? |
If you said that these lemmas can be proved with one of them, I think it is no. |
949b179 to
0802b9c
Compare
Indeed |
To give a bit of context, these lemmas have been written this way after having been tested to formalize the Gamma function. Maybe their apparent specialization is the result of practical considerations? @IshiguroYoshihiro can you confirm? (Or am I remembering wrong?) |
Tragicus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I am back.
One way to factorize would be to ask for the relevant functions to have constant sign. I was also wondering whether we want to generalize over the interval, instead of [a, +oo[. We would require that the relevant functions are derivable on the interior of the interval and have limits at the boundaries.
@affeldt-aist Some of the following suggestions are quite ugly but save a lot of time, what do you think?
| apply: (@cvg_comp _ _ _ _ (F \* G)%R _ +oo%R); last exact: cvgFG; apply/cvgeryP. | ||
| apply: (@cvge_pinftyP R (fun x => (a + x)%:E) +oo).1; last exact: cvgr_idn. | ||
| by apply/cvgeryP; exact: cvg_addrl. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| apply: (@cvg_comp _ _ _ _ (F \* G)%R _ +oo%R); last exact: cvgFG; apply/cvgeryP. | |
| apply: (@cvge_pinftyP R (fun x => (a + x)%:E) +oo).1; last exact: cvgr_idn. | |
| by apply/cvgeryP; exact: cvg_addrl. | |
| apply: (@cvg_comp _ _ _ _ (F \* G)%R _ +oo%R); last exact: cvgFG. | |
| by apply: cvg_comp; [apply: cvgr_idn|apply: cvg_addrl]. |
| (\int[mu]_(x in seqDU (fun k => `]a, a + k%:R]) i) | ||
| (f x * G x)%:E)%E). | ||
| Proof. | ||
| rewrite big_nat_cond fin_num_sumeN; rewrite -?big_nat_cond//; move=> m _. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| rewrite big_nat_cond fin_num_sumeN; rewrite -?big_nat_cond//; move=> m _. | |
| rewrite big_nat_cond fin_num_sumeN -?big_nat_cond// => m _. |
| apply: integrable_fin_num => //=. | ||
| apply: continuous_compact_integrable; first exact: segment_compact. | ||
| apply: continuous_subspaceW cfG. | ||
| by apply/subset_itv => //; rewrite bnd_simp// lerDl. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| by apply/subset_itv => //; rewrite bnd_simp// lerDl. | |
| by apply: subset_itv; rewrite // bnd_simp// lerDl. |
| apply: measurableT_comp => //. | ||
| apply: measurable_funS mfG => //. | ||
| by apply/subset_itv; rewrite bnd_simp// lerDl. | ||
| apply: measurable_funS mfG => //. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| apply: measurableT_comp => //. | |
| apply: measurable_funS mfG => //. | |
| by apply/subset_itv; rewrite bnd_simp// lerDl. | |
| apply: measurable_funS mfG => //. | |
| - apply: measurableT_comp => //; apply: measurable_funS mfG => //. | |
| by apply/subset_itv; rewrite bnd_simp// lerDl. | |
| - apply: measurable_funS mfG => //. |
| apply: continuous_subspaceW cfG. | ||
| by apply/subset_itv; rewrite bnd_simp// lerDl. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| apply: continuous_subspaceW cfG. | |
| by apply/subset_itv; rewrite bnd_simp// lerDl. | |
| by apply: continuous_subspaceW cfG; apply/subset_itv; rewrite bnd_simp// lerDl. |
| move=> fG0 Fg0. | ||
| rewrite NintNFg//. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| move=> fG0 Fg0. | |
| rewrite NintNFg//. | |
| move=> fG0 Fg0; rewrite NintNFg//. |
| by under eq_integral do rewrite mulNr EFinN. | ||
| - by move=> ?; apply: cvgN; exact: cf. | ||
| - exact: derivable_oy_continuous_bndN. | ||
| - by move=> ? ?; rewrite fctE derive1N ?Ff//; move: Foy => [+ _]; apply. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - by move=> ? ?; rewrite fctE derive1N ?Ff//; move: Foy => [+ _]; apply. | |
| - by move=> ? ?; rewrite fctE derive1N ?Ff => [//|//|]; apply: Foy.1. |
.7s faster
| rewrite (@integration_by_partsy_le0_ge0 R (- F)%R G (- f)%R g a (- FGoo))//. | ||
| - rewrite oppeD; last exact: fin_num_adde_defr. | ||
| rewrite -EFinN opprD 2!opprK mulNr. | ||
| by under eq_integral do rewrite mulNr EFinN oppeK. | ||
| - by move=> ?; apply: cvgN; exact: cf. | ||
| - exact: derivable_oy_continuous_bndN. | ||
| - by move=> ? ?; rewrite fctE derive1N ?Ff//; move: Foy => [+ _]; apply. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| rewrite (@integration_by_partsy_le0_ge0 R (- F)%R G (- f)%R g a (- FGoo))//. | |
| - rewrite oppeD; last exact: fin_num_adde_defr. | |
| rewrite -EFinN opprD 2!opprK mulNr. | |
| by under eq_integral do rewrite mulNr EFinN oppeK. | |
| - by move=> ?; apply: cvgN; exact: cf. | |
| - exact: derivable_oy_continuous_bndN. | |
| - by move=> ? ?; rewrite fctE derive1N ?Ff//; move: Foy => [+ _]; apply. | |
| rewrite (@integration_by_partsy_le0_ge0 R (- F)%R G (- f)%R g a (- FGoo)). | |
| - rewrite oppeD; last exact: fin_num_adde_defr. | |
| rewrite -EFinN opprD 2!opprK mulNr. | |
| by under eq_integral do rewrite mulNr EFinN oppeK. | |
| - by move=> ?; apply: cvgN; exact: cf. | |
| - exact: derivable_oy_continuous_bndN. | |
| - by move=> ? ?; rewrite fctE derive1N ?Ff//; move: Foy => [+ _]; apply. | |
| - by []. | |
| - by []. | |
| - by []. |
1.5s faster
| rewrite (@integration_by_partsy_le0_ge0 R (- F)%R G (- f)%R g a (- FGoo))//. | ||
| - rewrite oppeD; last exact: fin_num_adde_defr. | ||
| rewrite -EFinN opprD 2!opprK mulNr. | ||
| by under eq_integral do rewrite mulNr EFinN oppeK. | ||
| - by move=> ?; apply: cvgN; exact: cf. | ||
| - exact: derivable_oy_continuous_bndN. | ||
| - by move=> ? ?; rewrite fctE derive1N ?Ff//; move: Foy => [+ _]; apply. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| rewrite (@integration_by_partsy_le0_ge0 R (- F)%R G (- f)%R g a (- FGoo))//. | |
| - rewrite oppeD; last exact: fin_num_adde_defr. | |
| rewrite -EFinN opprD 2!opprK mulNr. | |
| by under eq_integral do rewrite mulNr EFinN oppeK. | |
| - by move=> ?; apply: cvgN; exact: cf. | |
| - exact: derivable_oy_continuous_bndN. | |
| - by move=> ? ?; rewrite fctE derive1N ?Ff//; move: Foy => [+ _]; apply. | |
| rewrite (@integration_by_partsy_le0_ge0 R (- F)%R G (- f)%R g a (- FGoo))//. | |
| - rewrite oppeD; last exact: fin_num_adde_defr. | |
| rewrite -EFinN opprD 2!opprK mulNr. | |
| by under eq_integral do rewrite mulNr EFinN oppeK. | |
| - by move=> ?; apply: cvgN; exact: cf. | |
| - exact: derivable_oy_continuous_bndN. | |
| - by move=> ? ?; rewrite fctE derive1N ?Ff => [//|//|]; apply: Foy.1. |
.6s faster
| Lemma derivable_oy_continuous_bndN (f : R -> V) (x : R) : | ||
| derivable_oy_continuous_bnd f x -> derivable_oy_continuous_bnd (- f) x. | ||
| Proof. | ||
| move=> [/= derF Fa]; split; last exact: cvgN. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| move=> [/= derF Fa]; split; last exact: cvgN. | |
| case=> /= derF Fa; split; last exact: cvgN. |
Motivation for this change
Add a part of generalized version of integration by parts for unbound intervals
`[a, +oo[.This PR is over #1656 and #1662.
I don't sure that I should add 4 more lemmas and complete all variation of integration by parts for unbound intervals.
I think that 8 similar lemmas would be a mess. So, I'd like to somehow make them up into one or two lemmas, but I don't have an idea.
Checklist
CHANGELOG_UNRELEASED.mdReference: How to document
Merge policy
As a rule of thumb:
all compile are preferentially merged into master.
Reminder to reviewers