Skip to content
26 changes: 25 additions & 1 deletion CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@

- in `realfun.v`:
+ instance `is_derive1_sqrt`

- in `mathcomp_extra.v`:
+ lemmas `subrKC`, `sumr_le0`, `card_fset_sum1`

- in `functions.v`:
+ lemmas `fct_prodE`, `prodrfctE`

- in `exp.v:
- in `exp.v`:
+ lemma `norm_expR`

- in `hoelder.v`
+ lemma `hoelder_conj_ge1`

Expand All @@ -35,17 +37,39 @@
+ lemmas `closed_Fsigma`, `Gdelta_measurable`, `Gdelta_subspace_open`,
`irrational_Gdelta`, `not_rational_Gdelta`

- in `constructive_ereal.v`:
+ lemma `expe0`, `mule0n`, `muleS`

- in `exp.v`:
+ lemmas `expeR_eqy`
+ lemmas `lt0_powR1`, `powR_eq1`
+ definition `lne`
+ lemmas `le0_lneNy`, `lne_EFin`, `expeRK`, `lneK`, `lneK_eq`, `lne1`, `lneM`,
`lne_inj`, `lneV`, `lne_div`, `lte_lne`, `lee_lne`, `lneXn`, `le_lne1Dx`,
`lne_sublinear`, `lne_ge0`, `lne_lt0`, `lne_gt0`, `lne_le0`
+ lemma `lne_eq0`

- in `charge.v`:
+ definition `copp`, lemma `cscaleN1`

### Changed

- moved from `pi_irrational.v` to `reals.v` and changed
+ definition `rational`

- in `constructive_ereal.v`:
+ lemma `mulN1e`

### Renamed

- in `lebesgue_stieltjes_measure.v`:
+ `cumulativeNy0` -> `cumulativeNy`
+ `cumulativey1` -> `cumulativey`

- in `exp.v`:
+ `ltr_expeR` -> `lte_expeR`
+ `ler_expeR` -> `lee_expeR`

### Generalized

- in `functions.v`
Expand Down
17 changes: 12 additions & 5 deletions reals/constructive_ereal.v
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,12 @@ Proof. by elim: n => //= n ->. Qed.
Lemma enatmul_ninfty n : -oo *+ n.+1 = -oo :> \bar R.
Proof. by elim: n => //= n ->. Qed.

Lemma mule0n x : x *+ 0 = 0. Proof. by []. Qed.

Lemma mule2n x : x *+ 2 = x + x. Proof. by []. Qed.

Lemma expe0 x : x ^+ 0 = 1. Proof. by []. Qed.

Lemma expe2 x : x ^+ 2 = x * x. Proof. by []. Qed.

Lemma leeN2 : {mono @oppe R : x y /~ x <= y}.
Expand Down Expand Up @@ -862,6 +866,9 @@ Lemma addeC : commutative (S := \bar R) +%E. Proof. exact: addrC. Qed.

Lemma adde0 : right_id (0 : \bar R) +%E. Proof. exact: addr0. Qed.

Lemma muleS x n : x *+ n.+1 = x + x *+ n.
Proof. by case: n => //=; rewrite adde0. Qed.

Lemma add0e : left_id (0 : \bar R) +%E. Proof. exact: add0r. Qed.

Lemma addeA : associative (S := \bar R) +%E. Proof. exact: addrA. Qed.
Expand Down Expand Up @@ -1266,13 +1273,13 @@ Proof. by move=> rreal; rewrite muleC real_mulrNy. Qed.

Definition real_mulr_infty := (real_mulry, real_mulyr, real_mulrNy, real_mulNyr).

Lemma mulN1e x : - 1%E * x = - x.
Lemma mulN1e x : (- 1%E) * x = - x.
Proof.
rewrite -EFinN /mule/=; case: x => [x||];
do ?[by rewrite mulN1r|by rewrite eqe oppr_eq0 oner_eq0 lte_fin ltr0N1].
by case: x => [r| |]/=;
rewrite /mule ?mulN1r// eqe oppr_eq0 oner_eq0/= lte_fin oppr_gt0 ltr10.
Qed.

Lemma muleN1 x : x * - 1%E = - x. Proof. by rewrite muleC mulN1e. Qed.
Lemma muleN1 x : x * (- 1%E) = - x. Proof. by rewrite muleC mulN1e. Qed.

Lemma mule_neq0 x y : x != 0 -> y != 0 -> x * y != 0.
Proof.
Expand All @@ -1284,7 +1291,7 @@ Qed.
Lemma mule_eq0 x y : (x * y == 0) = (x == 0) || (y == 0).
Proof.
apply/idP/idP => [|/orP[] /eqP->]; rewrite ?(mule0, mul0e)//.
by apply: contraTT => /norP[]; apply: mule_neq0.
by apply: contraTT => /norP[]; exact: mule_neq0.
Comment on lines -1287 to +1294
Copy link
Collaborator

Choose a reason for hiding this comment

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

Spurious change?

Copy link
Member Author

Choose a reason for hiding this comment

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

not really, I tend to use exact instead of apply to conclude because we gain the coloring.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I generally agree, but here it is redundant with the by at the beginning of the line, so the color is more distracting than anything.

Qed.

Lemma mule_ge0 x y : 0 <= x -> 0 <= y -> 0 <= x * y.
Expand Down
45 changes: 39 additions & 6 deletions theories/charge.v
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ From mathcomp Require Import lebesgue_measure lebesgue_integral.
(* non-measurable sets *)
(* czero == zero charge *)
(* cscale r nu == charge nu scaled by a factor r : R *)
(* charge_add n1 n2 == the charge corresponding to the sum of *)
(* copp nu == the charge corresponding to the opposite of *)
(* the charges nu *)
(* cadd n1 n2 == the charge corresponding to the sum of *)
(* charges n1 and n2 *)
(* charge_of_finite_measure mu == charge corresponding to a finite measure mu *)
(* ``` *)
Expand Down Expand Up @@ -440,6 +442,38 @@ move=> /negbTE c0 munu E mE /eqP; rewrite /cscale mule_eq0 eqe c0/=.
by move=> /eqP/munu; exact.
Qed.

Section charge_opp.
Local Open Scope ereal_scope.
Context d (T : measurableType d) (R : realType).
Variables (nu : {charge set T -> \bar R}).

Definition copp := \- nu.

Let copp0 : copp set0 = 0.
Proof. by rewrite /copp charge0 oppe0. Qed.

Let copp_finite A : measurable A -> copp A \is a fin_num.
Proof. by move=> mA; rewrite fin_numN fin_num_measure. Qed.

Let copp_sigma_additive : semi_sigma_additive copp.
Proof.
move=> F mF tF mUF; rewrite /copp; under eq_fun.
move=> n; rewrite sumeN; last first.
by move=> p q _ _; rewrite fin_num_adde_defl// fin_num_measure.
over.
exact/cvgeN/charge_semi_sigma_additive.
Qed.

HB.instance Definition _ := isCharge.Build _ _ _ copp
copp0 copp_finite copp_sigma_additive.

End charge_opp.

Lemma cscaleN1 {d} {T : ringOfSetsType d} {R : realFieldType}
(nu : {charge set T -> \bar R}) :
cscale (-1) nu = \- nu.
Proof. by rewrite /cscale/=; apply/funext => x; rewrite mulN1e. Qed.

Section charge_add.
Local Open Scope ereal_scope.
Context d (T : measurableType d) (R : realType).
Expand Down Expand Up @@ -944,7 +978,7 @@ Local Definition cjordan_neg : {charge set T -> \bar R} :=
cscale (-1) (crestr0 nu mN).

Lemma cjordan_negE A : cjordan_neg A = - crestr0 nu mN A.
Proof. by rewrite /= /cscale/= EFinN mulN1e. Qed.
Proof. by rewrite /= cscaleN1. Qed.

Let positive_set_cjordan_neg E : 0 <= cjordan_neg E.
Proof.
Expand All @@ -970,7 +1004,7 @@ Lemma jordan_decomp (A : set T) : measurable A ->
nu A = cadd jordan_pos (cscale (-1) jordan_neg) A.
Proof.
move=> mA.
rewrite /cadd cjordan_posE /= /cscale EFinN mulN1e cjordan_negE oppeK.
rewrite /cadd cjordan_posE/= cscaleN1 cjordan_negE oppeK.
rewrite /crestr0 mem_set// -[in LHS](setIT A).
case: nuPN => _ _ <- PN0; rewrite setIUr chargeU//.
- exact: measurableI.
Expand Down Expand Up @@ -1045,7 +1079,7 @@ Lemma abse_charge_variation d (T : measurableType d) (R : realType)
measurable A -> `|nu A| <= charge_variation PN A.
Proof.
move=> mA.
rewrite (jordan_decomp PN mA) /cadd/= /cscale/= mulN1e /charge_variation.
rewrite (jordan_decomp PN mA) /cadd/= cscaleN1 /charge_variation.
by rewrite (le_trans (lee_abs_sub _ _))// !gee0_abs.
Qed.

Expand Down Expand Up @@ -2034,8 +2068,7 @@ exists (fp \- fn); split; first by move=> x; rewrite fin_numB// fpfin fnfin.
exact: integrableB.
move=> E mE; rewrite [LHS](jordan_decomp nuPN mE)// integralB//;
[|exact: (integrableS measurableT)..].
rewrite -fpE ?inE// -fnE ?inE//= /cadd/= jordan_posE jordan_negE.
by rewrite /cscale EFinN mulN1e.
by rewrite -fpE ?inE// -fnE ?inE//= /cadd/= cscaleN1.
Qed.

Definition Radon_Nikodym : T -> \bar R :=
Expand Down
4 changes: 2 additions & 2 deletions theories/ereal.v
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ Definition lt_expandRL := monoRL_in
Lemma contract_eq0 x : (contract x == 0%R) = (x == 0).
Proof. by rewrite -(can_eq contractK) contract0. Qed.

Lemma contract_eqN1 x : (contract x == -1) = (x == -oo).
Lemma contract_eqN1 x : (contract x == (- 1)%R) = (x == -oo).
Proof. by rewrite -(can_eq contractK). Qed.

Lemma contract_eq1 x : (contract x == 1%R) = (x == +oo).
Expand Down Expand Up @@ -1352,7 +1352,7 @@ move: reN1; rewrite eq_sym neq_lt => /orP[reN1|reN1].
rewrite (@lt_le_trans _ _ 1%R) // ?lerDr//.
by rewrite (le_lt_trans (ler_norm _))// contract_lt1.
have ? : (`|contract r%:E + e%:num| < 1)%R.
rewrite ltr_norml re1 andbT -(addr0 (-1)) ler_ltD //.
rewrite ltr_norml re1 andbT -(addr0 (- 1)%R) ler_ltD //.
by move: (contract_le1 r%:E); rewrite ler_norml => /andP[].
pose e' : R := Num.min
(r - fine (expand (contract r%:E - e%:num)))%R
Expand Down
Loading