Module mathcomp.analysis.normedtype_theory.ereal_normedtype
From HB Require Import structures.From mathcomp Require Import boot order ssralg ssrnum interval
interval_inference.
From mathcomp Require Import boolp classical_sets ereal reals real_interval.
From mathcomp Require Import topology ereal num_normedtype.
Unset SsrOldRewriteGoalsOrder.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import Order.TTheory GRing.Theory Num.Def Num.Theory.
Import numFieldTopology.Exports.
Local Open Scope classical_set_scope.
Local Open Scope ring_scope.
Section limf_esup_einf.
Context { : choiceType} { : filteredType T} { : realFieldType}.
Implicit Types (f : X -> \bar R) (F : set_system X).
Local Open Scope ereal_scope.
Definition
limf_esup : forall {T : choiceType} {X : filteredType T} {R : realFieldType}, (X -> \bar R) -> set_system X -> \bar R limf_esup is not universe polymorphic Arguments limf_esup {T X R} f%_function_scope F limf_esup is transparent Expands to: Constant mathcomp.analysis.normedtype_theory.ereal_normedtype.limf_esup Declared in library mathcomp.analysis.normedtype_theory.ereal_normedtype, line 48, characters 11-20
Source code
Definition
limf_einf : forall {T : choiceType} {X : filteredType T} {R : realFieldType}, (X -> \bar R) -> set_system X -> \bar R limf_einf is not universe polymorphic Arguments limf_einf {T X R} f%_function_scope F limf_einf is transparent Expands to: Constant mathcomp.analysis.normedtype_theory.ereal_normedtype.limf_einf Declared in library mathcomp.analysis.normedtype_theory.ereal_normedtype, line 50, characters 11-20
Source code
Lemma
Source code
limf_esup f F = ereal_inf [set ereal_sup (f @` V) | in F].
Proof.
Lemma
Source code
limf_einf f F = ereal_sup [set ereal_inf (f @` V) | in F].
Proof.
Lemma
Source code
Lemma
Source code
End limf_esup_einf.
Section limf_esup_einf_realType.
Variables ( : choiceType) ( : filteredType T) ( : realType).
Implicit Types (f : X -> \bar R) (F : set_system X).
Local Open Scope ereal_scope.
Lemma
Source code
(forall , 0 <= f x) -> 0 <= limf_esup f F.
Proof.
have [-> /F0//|/set0P[y Ay FA] <-{x}] := eqVneq A set0.
by apply: le_ereal_sup_tmp; exists (f y).
Qed.
End limf_esup_einf_realType.
Section lower_semicontinuous.
Context { : topologicalType} { : numFieldType}.
Implicit Types f : X -> \bar R.
Local Open Scope ereal_scope.
Definition
lower_semicontinuous : forall {X : topologicalType} {R : numFieldType}, (X -> \bar R) -> Prop lower_semicontinuous is not universe polymorphic Arguments lower_semicontinuous {X R} f%_function_scope lower_semicontinuous is transparent Expands to: Constant mathcomp.analysis.normedtype_theory.ereal_normedtype.lower_semicontinuous Declared in library mathcomp.analysis.normedtype_theory.ereal_normedtype, line 92, characters 11-31
Source code
exists2 , nbhs x V & forall , V y -> a%:E < f y.
Lemma
Source code
lower_semicontinuous f <-> forall , open [set | f x > a%:E].
Proof.
End lower_semicontinuous.
#[global] Hint Extern 0 (is_true (_ < ?x)%E) => match goal with
H : x \is_near _ |- _ => solve[near: x; apply: ereal_nbhs_pinfty_gt] end : core.
#[global] Hint Extern 0 (is_true (_ <= ?x)%E) => match goal with
H : x \is_near _ |- _ => solve[near: x; apply: ereal_nbhs_pinfty_ge] end : core.
#[global] Hint Extern 0 (is_true (_ > ?x)%E) => match goal with
H : x \is_near _ |- _ => solve[near: x; apply: ereal_nbhs_ninfty_lt] end : core.
#[global] Hint Extern 0 (is_true (_ >= ?x)%E) => match goal with
H : x \is_near _ |- _ => solve[near: x; apply: ereal_nbhs_ninfty_le] end : core.
#[global] Hint Extern 0 (is_true (fine ?x \is Num.real)) => match goal with
H : x \is_near _ |- _ => solve[near: x; apply: ereal_nbhs_pinfty_real] end : core.
#[global] Hint Extern 0 (is_true (fine ?x \is Num.real)) => match goal with
H : x \is_near _ |- _ => solve[near: x; apply: ereal_nbhs_ninfty_real] end : core.
Section ecvg_infty_numField.
Local Open Scope ereal_scope.
Context { : numFieldType}.
Let
Source code
F --> +oo;
forall , A \is Num.real -> \forall \near F, A%:E <= x;
forall , A \is Num.real -> \forall \near F, A%:E < x;
\forall \near +oo%R, \forall \near F, A%:E < x;
\forall \near +oo%R, \forall \near F, A%:E <= x ].
Proof.
- move=> AF A Areal; near +oo_R => B.
by near do rewrite (@lt_le_trans _ _ B%:E) ?lte_fin//; apply: AF.
- by move=> Foo; near do apply: Foo => //.
- by apply: filterS => ?; apply: filterS => ?; apply: ltW.
case=> [A [AR AF]] P [x [xR Px]]; near +oo_R => B.
by near do [apply: Px; rewrite (@lt_le_trans _ _ B%:E) ?lte_fin//]; apply: AF.
Unshelve. all: end_near. Qed.
Let
Source code
F --> -oo;
forall , A \is Num.real -> \forall \near F, A%:E >= x;
forall , A \is Num.real -> \forall \near F, A%:E > x;
\forall \near -oo%R, \forall \near F, A%:E > x;
\forall \near -oo%R, \forall \near F, A%:E >= x ].
Proof.
- move=> AF A Areal; near -oo_R => B.
by near do rewrite (@le_lt_trans _ _ B%:E) ?lte_fin//; apply: AF.
- by move=> Foo; near do apply: Foo => //.
- by apply: filterS => ?; apply: filterS => ?; apply: ltW.
case=> [A [AR AF]] P [x [xR Px]]; near -oo_R => B.
by near do [apply: Px; rewrite (@le_lt_trans _ _ B%:E) ?lte_fin//]; apply: AF.
Unshelve. all: end_near. Qed.
Context {} { : set_system T} { : Filter F}.
Implicit Types (f : T -> \bar R) (u : T -> R).
Lemma
Source code
f @ F --> +oo <-> forall , A \is Num.real -> \forall \near F, A%:E <= f x.
Proof.
Lemma
Source code
f @ F --> +oo <-> forall , A \is Num.real -> \forall \near F, A%:E < f x.
Proof.
Lemma
Source code
f @ F --> +oo <-> \forall \near +oo%R, \forall \near F, A%:E < f x.
Proof.
Lemma
Source code
f @ F --> +oo <-> \forall \near +oo%R, \forall \near F, A%:E <= f x.
Proof.
Lemma
Source code
f @ F --> -oo <-> forall , A \is Num.real -> \forall \near F, A%:E >= f x.
Proof.
Lemma
Source code
f @ F --> -oo <-> forall , A \is Num.real -> \forall \near F, A%:E > f x.
Proof.
Lemma
Source code
f @ F --> -oo <-> \forall \near -oo%R, \forall \near F, A%:E > f x.
Proof.
Lemma
Source code
f @ F --> -oo <-> \forall \near -oo%R, \forall \near F, A%:E >= f x.
Proof.
Lemma
Source code
f @ F --> +oo -> forall , A \is Num.real -> \forall \near F, A%:E <= f x.
Proof.
Lemma
Source code
f @ F --> +oo -> forall , A \is Num.real -> \forall \near F, A%:E < f x.
Proof.
Lemma
Source code
f @ F --> -oo -> forall , A \is Num.real -> \forall \near F, A%:E >= f x.
Proof.
Lemma
Source code
f @ F --> -oo -> forall , A \is Num.real -> \forall \near F, A%:E > f x.
Proof.
Lemma
Source code
Proof.
by near do rewrite -leeN2 ?oppeK; apply: Foo; rewrite rpredN.
Unshelve. all: end_near. Qed.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
by apply/cvgrNyPler => A Ar; near do rewrite -lee_fin; apply: Foo.
by apply/cvgeNyPler => A Ar; near do rewrite lee_fin; apply: Foo.
Unshelve. all: end_near. Qed.
End ecvg_infty_numField.
Section ecvg_infty_realField.
Local Open Scope ereal_scope.
Context { : realFieldType}.
Context {} { : set_system T} { : Filter F} ( : T -> \bar R).
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
End ecvg_infty_realField.
Section open_closed_sets_ereal.
Variable : realFieldType .
Local Open Scope ereal_scope.
Implicit Types x y : \bar R.
Implicit Types r : R.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
- case: y => [y||//] /= in xy *; last by exists 0%R.
by exists y; rewrite num_real; split => //= x ?.
- case: y => [y||//] /= in xy *.
+ by exists y; rewrite num_real; split => //= x ?.
+ by exists 0%R; split => // x /lt_le_trans; apply; rewrite leey.
Qed.
Lemma
Source code
Proof.
case: y => [y||] //=; do ?by exists 0.
- by exists y; rewrite num_real.
- by move=> _; exists 0%R; split => // x; apply/le_lt_trans; rewrite leNye.
Qed.
Lemma
Source code
Proof.
(* BUG: why doesn't case work? *)
move=> [? | // | ?]; [rewrite /= lte_fin => xy | by exists r].
by move: (@open_ereal_lt r%:E); rewrite openE; apply; rewrite /= lte_fin.
move: x => [ // | | ]; last by move=> []. (* same BUG *)
suff -> : [set | y < +oo] = \bigcup_ [set : \bar R | y < r%:E].
exact: bigcup_open.
rewrite predeqE => -[r | | ]/=.
- rewrite ltry; split => // _.
by exists (r + 1)%R => //=; rewrite lte_fin ltrDl.
- by rewrite ltxx; split => // -[] x /=; rewrite ltNge leey.
- by split => // _; exists 0%R => //=; rewrite ltNye.
Qed.
Lemma
Source code
Proof.
move=> [? | ? | //]; [rewrite /= lte_fin => xy | by exists r].
by move: (@open_ereal_gt r%:E); rewrite openE; apply; rewrite /= lte_fin.
case: x => [ // | | ]; first by move=> [].
suff -> : [set | -oo < y] = \bigcup_ [set : \bar R | r%:E < y].
exact: bigcup_open.
rewrite predeqE => -[r | | ]/=.
- rewrite ltNyr; split => // _.
by exists (r - 1)%R => //=; rewrite lte_fin ltrBlDr ltrDl.
- by split => // _; exists 0%R => //=; rewrite ltey.
- by rewrite ltxx; split => // -[] x _ /=; rewrite ltNge leNye.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
End open_closed_sets_ereal.
Section ereal_is_hausdorff.
Variable : realFieldType.
Implicit Types r : R.
Lemma
Source code
nbhs r X -> nbhs r%:E ((fun => r%:E) @` X).
Lemma
Source code
nbhs r%:E [set | y < (f r)%:E]%E.
Proof.
by split; [apply open_ereal_lt_ereal | rewrite /= lte_fin].
Qed.
Lemma
Source code
nbhs r%:E [set | (f r)%:E < y]%E.
Proof.
by split; [apply open_ereal_gt_ereal | rewrite /= lte_fin].
Qed.
Lemma
Source code
Proof.
by split; [apply open_ereal_gt_ereal | rewrite /= ltry].
Qed.
Lemma
Source code
Proof.
by split; [apply open_ereal_lt_ereal | rewrite /= ltNyr].
Qed.
Lemma
Source code
Proof.
- move=> rr'; congr (_%:E); apply Rhausdorff => /= A B rA r'B.
have [/= z [[r0 ? r0z] [r1 ?]]] :=
rr' _ _ (nbhs_image_EFin rA) (nbhs_image_EFin r'B).
by rewrite -r0z => -[r1r0]; exists r0; split => //; rewrite -r1r0.
- have /(@nbhs_open_ereal_lt _ (fun => x + 1)) loc_r : r < r + 1.
by rewrite ltrDl.
move/(_ _ _ loc_r (nbhs_open_ereal_pinfty (r + 1))) => -[z [zr rz]].
by move: (lt_trans rz zr); rewrite lte_fin ltxx.
- have /(@nbhs_open_ereal_gt _ (fun => x - 1)) loc_r : r - 1 < r.
by rewrite ltrBlDr ltrDl.
move/(_ _ _ loc_r (nbhs_open_ereal_ninfty (r - 1))) => -[z [rz zr]].
by move: (lt_trans zr rz); rewrite ltxx.
- have /(@nbhs_open_ereal_lt _ (fun => x + 1)) loc_r' : r' < r' + 1.
by rewrite ltrDl.
move/(_ _ _ (nbhs_open_ereal_pinfty (r' + 1)) loc_r') => -[z [r'z zr']].
by move: (lt_trans zr' r'z); rewrite ltxx.
- move/(_ _ _ (nbhs_open_ereal_pinfty 0) (nbhs_open_ereal_ninfty 0)).
by move=> -[z [zx xz]]; move: (lt_trans xz zx); rewrite ltxx.
- have /(@nbhs_open_ereal_gt _ (fun => x - 1)) yB : r' - 1 < r'.
by rewrite ltrBlDr ltrDl.
move/(_ _ _ (nbhs_open_ereal_ninfty (r' - 1)) yB) => -[z [zr' r'z]].
by move: (lt_trans r'z zr'); rewrite ltxx.
- move/(_ _ _ (nbhs_open_ereal_ninfty 0) (nbhs_open_ereal_pinfty 0)).
by move=> -[z [zO Oz]]; move: (lt_trans Oz zO); rewrite ltxx.
Qed.
End ereal_is_hausdorff.
#[global]
Hint Extern 0 (hausdorff_space _) => solve[apply: ereal_hausdorff] : core.
Section ProperFilterERealType.
Context { : Type} { : set_system T} { : ProperFilter a} { : realFieldType}.
Local Open Scope ereal_scope.
Implicit Types f g h : T -> \bar R.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
End ProperFilterERealType.
Lemma
Source code
(((f n)%:R : R)%:E @[ --> F] --> +oo%E) <-> (f @ F --> \oo).
Section nbhs_ereal.
Context { : numFieldType} ( : \bar R -> Prop).
Lemma
Source code
Proof.
Lemma
Source code
(\forall \near +oo%E, P x) <-> [/\ P +oo%E & \forall \near +oo, P x%:E].
Proof.
by split; [|exists x; split=> // y xy]; apply: Px.
Qed.
Lemma
Source code
(\forall \near -oo%E, P x) <-> [/\ P -oo%E & \forall \near -oo, P x%:E].
Proof.
by split; [|exists x; split=> // y xy]; apply: Px.
Qed.
Section ereal_OrderNbhs.
Variable : realFieldType.
Let
Source code
nbhs x = filter_from (fun => itv_open_ends i /\ x \in i)
(fun => [set` i]).
Proof.
- rewrite /nbhs/= /ereal_nbhs/=; move: x => [r [e/= e0 reA]||].
+ exists `](r - e)%:E, (r + e)%:E[ => [|[y|/andP[]//|//]]; rewrite ?in_itv/=.
* by rewrite !lte_fin ltrBlDr andbb ltrDl; split => //; right.
* by move/subset_ball_prop_in_itv : reA => /(_ y); rewrite /= !in_itv.
+ case=> M [Mreal MA].
exists `]M%:E, +oo[ => [|y/=]; rewrite in_itv/= andbT ?ltry; last exact: MA.
by split => //; left.
+ case=> M [Mreal MA].
exists `]-oo, M%:E[ => [|y/=]; rewrite in_itv/= ?ltNyr; last exact: MA.
by split => //; left.
- move=> [[ [[]/= r|[]] [[]/= s|[]] ]][]// _.
+ move=> /[dup]/ltgte_fin_num/fineK <-; rewrite in_itv/=.
move=> /andP[rx sx] rsA; apply: (nbhs_interval rx sx) => z rz zs.
by apply: rsA =>/=; rewrite in_itv/= rz.
+ rewrite nbhsE/= => rx rA; exists `]r, +oo[%classic => //.
by split => //; rewrite set_itvE; exact: open_ereal_gt_ereal.
+ rewrite nbhsE/= => xs ?; exists `]-oo, s[%classic => //.
by split => //; rewrite set_itvE; exact: open_ereal_lt_ereal.
+ by rewrite set_itvE/= subTset => _ ->; exact: filter_nbhsT.
Qed.
.
Source code
Source code
Source code
End ereal_OrderNbhs.