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

minor generalizations, additions, fixes #974

Merged
merged 1 commit into from
Jul 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
- in file `lebesgue_integral.v`,
+ new lemma `approximation_sfun_integrable`.

- in `classical_sets.v`:
+ lemmas `properW`, `properxx`

### Changed

- moved from `lebesgue_measure.v` to `real_interval.v`:
Expand Down Expand Up @@ -119,6 +122,15 @@
+ `powere_posM` -> `poweRM`
+ `powere12_sqrt` -> `poweR12_sqrt`

- in `lebesgue_integral.v`:
+ `ge0_integralM_EFin` -> `ge0_integralZl_EFin`
+ `ge0_integralM` -> `ge0_integralZl`
+ `integralM_indic` -> `integralZl_indic`
+ `integralM_indic_nnsfun` -> `integralZl_indic_nnsfun`
+ `integrablerM` -> `integrableZl`
+ `integrableMr` -> `integrableZr`
+ `integralM` -> `integralZl`

### Generalized

- in `exp.v`:
Expand All @@ -128,6 +140,11 @@
+ lemma `ln_power_pos`
- in file `lebesgue_integral.v`, updated `le_approx`.

- in `sequences.v`:
+ lemmas `is_cvg_nneseries_cond`, `is_cvg_npeseries_cond`
+ lemmas `is_cvg_nneseries`, `is_cvg_npeseries`
+ lemmas `nneseries_ge0`, `npeseries_le0`

### Deprecated

### Removed
Expand Down
5 changes: 5 additions & 0 deletions classical/classical_sets.v
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ From mathcomp Require Import mathcomp_extra boolp.
(* \bigcap_i F == same as before with T left implicit. *)
(* smallest C G := \bigcap_(A in [set M | C M /\ G `<=` M]) A *)
(* A `<=` B <-> A is included in B. *)
(* A `<` B := A `<=` B /\ ~ (B `<=` A) *)
(* A `<=>` B <-> double inclusion A `<=` B and B `<=` A. *)
(* f @^-1` A == preimage of A by f. *)
(* f @` A == image of A by f. Notation for `image A f`. *)
Expand Down Expand Up @@ -530,6 +531,10 @@ Proof. by move=> sAB sBC ? ?; apply/sBC/sAB. Qed.

Lemma sub0set A : set0 `<=` A. Proof. by []. Qed.

Lemma properW A B : A `<` B -> A `<=` B. Proof. by case. Qed.

Lemma properxx A : ~ A `<` A. Proof. by move=> [?]; apply. Qed.

Lemma setC0 : ~` set0 = setT :> set T.
Proof. by rewrite predeqE; split => ?. Qed.

Expand Down
15 changes: 15 additions & 0 deletions classical/mathcomp_extra.v
Original file line number Diff line number Diff line change
Expand Up @@ -1377,3 +1377,18 @@ Reserved Notation "f \min g" (at level 50, left associativity).
Definition min_fun T (R : numDomainType) (f g : T -> R) x := Num.min (f x) (g x).
Notation "f \min g" := (min_fun f g) : ring_scope.
Arguments min_fun {T R} _ _ _ /.

(* NB: Coq 8.17.0 generalizes dependent_choice from Set to Type
making the following lemma redundant *)
Section dependent_choice_Type.
Context X (R : X -> X -> Prop).

Lemma dependent_choice_Type : (forall x, {y | R x y}) ->
forall x0, {f | f 0%N = x0 /\ forall n, R (f n) (f n.+1)}.
Proof.
move=> h x0.
set (f := fix f n := if n is n'.+1 then proj1_sig (h (f n')) else x0).
exists f; split => //.
intro n; induction n; simpl; apply: proj2_sig.
Qed.
End dependent_choice_Type.
17 changes: 1 addition & 16 deletions theories/charge.v
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,6 @@ Unset Printing Implicit Defensive.
Import Order.TTheory GRing.Theory Num.Def Num.Theory.
Import numFieldTopology.Exports.

(* NB: in the next releases of Coq, dependent_choice will be
generalized from Set to Type making the following lemma redundant *)
Section dependent_choice_Type.
Context X (R : X -> X -> Prop).

Lemma dependent_choice_Type : (forall x, {y | R x y}) ->
forall x0, {f | f 0 = x0 /\ forall n, R (f n) (f n.+1)}.
Proof.
move=> h x0.
set (f := fix f n := if n is n'.+1 then proj1_sig (h (f n')) else x0).
exists f; split => //.
intro n; induction n; simpl; apply: proj2_sig.
Qed.
End dependent_choice_Type.

Local Open Scope ring_scope.
Local Open Scope classical_set_scope.
Local Open Scope ereal_scope.
Expand Down Expand Up @@ -727,7 +712,7 @@ move=> /cvg_ex[[l| |]]; first last.
have : nu N <= -oo by rewrite -limNoo// nuN.
by rewrite leNgt => /negP; apply; rewrite ltNye_eq fin_num_measure.
- move/cvg_lim => limoo.
have := @npeseries_le0 _ (fun n => maxe (z_ (v n) * 2^-1%:E) (- 1%E)) xpredT.
have := @npeseries_le0 _ (fun n => maxe (z_ (v n) * 2^-1%:E) (- 1%E)) xpredT 0.
by rewrite limoo// leNgt => /(_ (fun n _ => max_le0 n))/negP; apply.
move/fine_cvgP => [Hfin cvgl].
have : cvg (series (fun n => fine (maxe (z_ (v n) * 2^-1%:E) (- 1%E)))).
Expand Down
Loading