Skip to content

Commit 3cced76

Browse files
integral of (1 + x^2)^-1 over [0, +oo[
Co-authored-by: IshiguroYoshihiro <[email protected]>
1 parent f1d91e5 commit 3cced76

File tree

3 files changed

+71
-44
lines changed

3 files changed

+71
-44
lines changed

CHANGELOG_UNRELEASED.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,17 @@
44

55
### Added
66

7+
- in `trigo.v`:
8+
+ lemma `integral0oo_atan`
9+
710
### Changed
811

12+
- moved from `gauss_integral` to `trigo.v`:
13+
+ `oneDsqr`, `oneDsqr_ge1`, `oneDsqr_inum`, `oneDsqrV_le1`,
14+
`continuous_oneDsqr`, `continuous_oneDsqr`
15+
- moved, generalized, and renamed from `gauss_integral` to `trigo.v`:
16+
+ `integral01_oneDsqr` -> `integral0_oneDsqr`
17+
918
### Renamed
1019

1120
### Generalized

theories/gauss_integral.v

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -21,48 +21,6 @@ Import numFieldNormedType.Exports.
2121
Local Open Scope classical_set_scope.
2222
Local Open Scope ring_scope.
2323

24-
(* NB: move to trigo.v? *)
25-
Section oneDsqr.
26-
Context {R : realType}.
27-
Implicit Type x : R.
28-
29-
Definition oneDsqr x : R := 1 + x ^+ 2.
30-
31-
Lemma oneDsqr_ge1 x : 1 <= oneDsqr x :> R.
32-
Proof. by rewrite lerDl sqr_ge0. Qed.
33-
34-
#[local]
35-
Hint Extern 0 (is_true (1 <= oneDsqr _)) => solve[apply: oneDsqr_ge1] : core.
36-
37-
Canonical oneDsqr_inum x : {itv R & `[1, +oo[} := @ItvReal R (oneDsqr x)
38-
(BLeft 1%Z) (BInfty _ false) (oneDsqr_ge1 x) erefl.
39-
40-
Lemma oneDsqrV_le1 x : oneDsqr\^-1 x <= 1. Proof. by rewrite invf_le1. Qed.
41-
42-
Lemma continuous_oneDsqr : continuous oneDsqr.
43-
Proof. by move=> x; apply: cvgD; [exact: cvg_cst|exact: exprn_continuous]. Qed.
44-
45-
Lemma continuous_oneDsqrV : continuous (oneDsqr\^-1).
46-
Proof. by move=> x; apply: cvgV => //; exact: continuous_oneDsqr. Qed.
47-
48-
Lemma integral01_oneDsqr :
49-
\int[@lebesgue_measure R]_(x in `[0, 1]) (oneDsqr x)^-1 = atan 1.
50-
Proof.
51-
rewrite /Rintegral (@continuous_FTC2 _ _ atan)//.
52-
- by rewrite atan0 sube0.
53-
- by apply: continuous_in_subspaceT => x ?; exact: continuous_oneDsqrV.
54-
- split.
55-
+ by move=> x _; exact: derivable_atan.
56-
+ by apply: cvg_at_right_filter; exact: continuous_atan.
57-
+ by apply: cvg_at_left_filter; exact: continuous_atan.
58-
- move=> x x01.
59-
by rewrite derive1_atan// mul1r.
60-
Qed.
61-
62-
End oneDsqr.
63-
#[global]
64-
Hint Extern 0 (is_true (1 <= oneDsqr _)) => solve [apply: oneDsqr_ge1] : core.
65-
6624
Section gauss_fun.
6725
Context {R : realType}.
6826
Local Open Scope ring_scope.
@@ -316,7 +274,7 @@ Proof.
316274
rewrite /h /integral0_gauss set_itv1 Rintegral_set1 expr0n addr0.
317275
rewrite -atan1 /integral01_u.
318276
under eq_Rintegral do rewrite /u expr0n/= oppr0 mul0r expR0 mul1r.
319-
exact: integral01_oneDsqr.
277+
exact: integral0_oneDsqr.
320278
Qed.
321279

322280
Let u_gauss_fun t x : u x t <= gauss_fun x.

theories/trigo.v

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ From mathcomp Require Import interval rat.
55
From mathcomp Require Import mathcomp_extra boolp classical_sets functions.
66
From mathcomp Require Import reals ereal nsatz_realtype interval_inference.
77
From mathcomp Require Import topology normedtype landau sequences derive.
8-
From mathcomp Require Import realfun exp.
8+
From mathcomp Require Import realfun exp measure lebesgue_measure.
9+
From mathcomp Require Import lebesgue_integral ftc.
910

1011
(**md**************************************************************************)
1112
(* # Theory of trigonometric functions *)
@@ -1083,6 +1084,33 @@ HB.lock Definition atan {R : realType} (x : R) : R :=
10831084
get [set y | -(pi / 2) < y < pi / 2 /\ tan y = x].
10841085
Canonical locked_atan := Unlockable atan.unlock.
10851086

1087+
Section oneDsqr.
1088+
Context {R : realType}.
1089+
Implicit Type x : R.
1090+
1091+
Definition oneDsqr x : R := 1 + x ^+ 2.
1092+
1093+
Lemma oneDsqr_ge1 x : 1 <= oneDsqr x :> R.
1094+
Proof. by rewrite lerDl sqr_ge0. Qed.
1095+
1096+
#[local]
1097+
Hint Extern 0 (is_true (1 <= oneDsqr _)) => solve[apply: oneDsqr_ge1] : core.
1098+
1099+
Canonical oneDsqr_inum x : {itv R & `[1, +oo[} := @ItvReal R (oneDsqr x)
1100+
(BLeft 1%Z) (BInfty _ false) (oneDsqr_ge1 x) erefl.
1101+
1102+
Lemma oneDsqrV_le1 x : oneDsqr\^-1 x <= 1. Proof. by rewrite invf_le1. Qed.
1103+
1104+
Lemma continuous_oneDsqr : continuous oneDsqr.
1105+
Proof. by move=> x; apply: cvgD; [exact: cvg_cst|exact: exprn_continuous]. Qed.
1106+
1107+
Lemma continuous_oneDsqrV : continuous (oneDsqr\^-1).
1108+
Proof. by move=> x; apply: cvgV => //; exact: continuous_oneDsqr. Qed.
1109+
1110+
End oneDsqr.
1111+
#[global]
1112+
Hint Extern 0 (is_true (1 <= oneDsqr _)) => solve [apply: oneDsqr_ge1] : core.
1113+
10861114
Section Atan.
10871115
Variable R : realType.
10881116
Implicit Type x : R.
@@ -1230,4 +1258,36 @@ rewrite tanK// in_itv/= xpi2 andbT (lt_le_trans _ x0)//.
12301258
by rewrite ltrNl oppr0 divr_gt0// pi_gt0.
12311259
Qed.
12321260

1261+
Let mu := @lebesgue_measure R.
1262+
1263+
Lemma integral0_oneDsqr b : 0 <= b ->
1264+
\int[mu]_(x in `[0, b]) (oneDsqr x)^-1 = atan b.
1265+
Proof.
1266+
rewrite le_eqVlt => /predU1P[<-|b0].
1267+
by rewrite set_itv1 Rintegral_set1 atan0.
1268+
rewrite /Rintegral (@continuous_FTC2 _ _ atan)//.
1269+
- by rewrite atan0 sube0.
1270+
- by apply: continuous_in_subspaceT => x ?; exact: continuous_oneDsqrV.
1271+
- split.
1272+
+ by move=> x _; exact: derivable_atan.
1273+
+ by apply: cvg_at_right_filter; exact: continuous_atan.
1274+
+ by apply: cvg_at_left_filter; exact: continuous_atan.
1275+
- move=> x x01.
1276+
by rewrite derive1_atan// mul1r.
1277+
Qed.
1278+
1279+
Lemma integral0y_oneDsqr :
1280+
(\int[mu]_(x in `[0%R, +oo[) (oneDsqr x)^-1%:E = (pi / 2)%:E)%E.
1281+
Proof.
1282+
rewrite (ge0_continuous_FTC2y _ _ cvgy_atan)/=.
1283+
- by rewrite atan0 oppr0 addr0.
1284+
- by move=> x _; rewrite invr_ge0.
1285+
- apply/continuous_within_itvcyP; split.
1286+
by move=> x x0; apply: continuous_oneDsqrV.
1287+
by apply: cvg_at_right_filter; exact: continuous_oneDsqrV.
1288+
- move=> x x0; apply: ex_derive.
1289+
- by apply: cvg_at_right_filter; exact: continuous_atan.
1290+
- by move=> x _; rewrite derive1E; exact: derive_val.
1291+
Qed.
1292+
12331293
End Atan.

0 commit comments

Comments
 (0)