@@ -9,7 +9,7 @@ From mathcomp Require Import all_ssreflect all_algebra archimedean finmap.
99From mathcomp Require Import boolp classical_sets functions.
1010From mathcomp Require Import fsbigop cardinality set_interval.
1111From mathcomp Require Import reals interval_inference topology.
12- From mathcomp Require Export constructive_ereal.
12+ From mathcomp Require Export constructive_ereal unstable .
1313
1414(**md************************************************************************* *)
1515(* # Extended real numbers, classical part ($\overline{\mathbb{R}}$) *)
@@ -463,6 +463,21 @@ rewrite lteNl => /ereal_sup_gt[_ [y Sy <-]].
463463by rewrite lteNl oppeK => xlty; exists y.
464464Qed .
465465
466+ Lemma ereal_infEN S : ereal_inf S = - ereal_sup [set - x | x in S].
467+ Proof . by []. Qed .
468+
469+ Lemma ereal_supN S : ereal_sup [set - x | x in S] = - ereal_inf S.
470+ Proof . by rewrite oppeK. Qed .
471+
472+ Lemma ereal_infN S : ereal_inf [set - x | x in S] = - ereal_sup S.
473+ Proof .
474+ rewrite /ereal_inf; congr (- ereal_sup _) => /=.
475+ by rewrite image_comp/=; under eq_imagel do rewrite /= oppeK; rewrite image_id.
476+ Qed .
477+
478+ Lemma ereal_supEN S : ereal_sup S = - ereal_inf [set - x | x in S].
479+ Proof . by rewrite ereal_infN oppeK. Qed .
480+
466481End ereal_supremum.
467482
468483Section ereal_supremum_realType.
@@ -523,7 +538,7 @@ Proof.
523538by move=> Soo; apply/eqP; rewrite eq_le leey/=; exact: ereal_sup_ubound.
524539Qed .
525540
526- Lemma ereal_sup_le S x : (exists2 y, S y & x <= y) -> x <= ereal_sup S.
541+ Lemma ereal_sup_ge S x : (exists2 y, S y & x <= y) -> x <= ereal_sup S.
527542Proof . by move=> [y Sy] /le_trans; apply; exact: ereal_sup_ubound. Qed .
528543
529544Lemma ereal_sup_ninfty S : ereal_sup S = -oo <-> S `<=` [set -oo].
@@ -591,11 +606,84 @@ rewrite -ereal_sup_EFin; [|exact/has_lb_ubN|exact/nonemptyN].
591606by rewrite !image_comp.
592607Qed .
593608
609+ Lemma ereal_supP S x :
610+ reflect (forall y : \bar R, S y -> y <= x) (ereal_sup S <= x).
611+ Proof .
612+ apply/(iffP idP) => [+ y Sy|].
613+ by move=> /(le_trans _)->//; rewrite ereal_sup_ge//; exists y.
614+ apply: contraPP => /negP; rewrite -ltNge -existsPNP.
615+ by move=> /ereal_sup_gt[y Sy ltyx]; exists y => //; rewrite lt_geF.
616+ Qed .
617+
618+ Lemma ereal_infP S x :
619+ reflect (forall y : \bar R, S y -> x <= y) (x <= ereal_inf S).
620+ Proof .
621+ rewrite leeNr; apply/(equivP (ereal_supP _ _)); setoid_rewrite leeNr.
622+ split=> [ge_x y Sy|ge_x _ [y Sy <-]]; rewrite ?oppeK// ?ge_x//.
623+ by rewrite -[y]oppeK ge_x//; exists y.
624+ Qed .
625+
626+ Lemma ereal_sup_gtP S x :
627+ reflect (exists2 y : \bar R, S y & x < y) (x < ereal_sup S).
628+ Proof .
629+ rewrite ltNge; apply/(equivP negP); rewrite -(rwP (ereal_supP _ _)) -existsPNP.
630+ by apply/eq_exists2r => y; rewrite (rwP2 negP idP) -ltNge.
631+ Qed .
632+
633+ Lemma ereal_inf_ltP S x :
634+ reflect (exists2 y : \bar R, S y & y < x) (ereal_inf S < x).
635+ Proof .
636+ rewrite ltNge; apply/(equivP negP); rewrite -(rwP (ereal_infP _ _)) -existsPNP.
637+ by apply/eq_exists2r => y; rewrite (rwP2 negP idP) -ltNge.
638+ Qed .
639+
640+ Lemma ereal_inf_leP S x : S (ereal_inf S) ->
641+ reflect (exists2 y : \bar R, S y & y <= x) (ereal_inf S <= x).
642+ Proof .
643+ move=> Sinf; apply: (iffP idP); last exact: ereal_inf_le.
644+ by move=> Sx; exists (ereal_inf S).
645+ Qed .
646+
647+ Lemma ereal_sup_geP S x : S (ereal_sup S) ->
648+ reflect (exists2 y : \bar R, S y & x <= y) (x <= ereal_sup S).
649+ Proof .
650+ move=> Ssup; apply: (iffP idP); last exact: ereal_sup_ge.
651+ by move=> Sx; exists (ereal_sup S).
652+ Qed .
653+
654+ Lemma lb_ereal_infNy_adherent S e :
655+ ereal_inf S = -oo -> exists2 x : \bar R, S x & x < e%:E.
656+ Proof . by move=> infNy; apply/ereal_inf_ltP; rewrite infNy ltNyr. Qed .
657+
658+ Lemma ereal_sup_real : @ereal_sup R (range EFin) = +oo.
659+ Proof .
660+ rewrite hasNub_ereal_sup//; last by exists 0%R.
661+ by apply/has_ubPn => x; exists (x+1)%R => //; rewrite ltrDl.
662+ Qed .
663+
664+ Lemma ereal_inf_real : @ereal_inf R (range EFin) = -oo.
665+ Proof .
666+ rewrite /ereal_inf [X in ereal_sup X](_ : _ = range EFin); last first.
667+ apply/seteqP; split => x/=[y].
668+ by move=> [z] _ <- <-; exists (-z)%R.
669+ by move=> _ <-; exists (-y%:E); first (by exists (-y)%R); rewrite oppeK.
670+ by rewrite ereal_sup_real.
671+ Qed .
672+
594673End ereal_supremum_realType.
595674#[deprecated(since="mathcomp-analysis 1.3.0", note="Renamed `ereal_sup_ubound`.")]
596675Notation ereal_sup_ub := ereal_sup_ubound (only parsing).
597676#[deprecated(since="mathcomp-analysis 1.3.0", note="Renamed `ereal_inf_lbound`.")]
598677Notation ereal_inf_lb := ereal_inf_lbound (only parsing).
678+ #[deprecated(since="mathcomp-analysis 1.10.0", note="Renamed `ereal_sup_ge`.")]
679+ Notation ereal_sup_le := ereal_sup_ge.
680+
681+ Arguments ereal_supP {R S x}.
682+ Arguments ereal_infP {R S x}.
683+ Arguments ereal_sup_gtP {R S x}.
684+ Arguments ereal_inf_ltP {R S x}.
685+ Arguments ereal_sup_geP {R S x}.
686+ Arguments ereal_inf_leP {R S x}.
599687
600688Lemma restrict_abse T (R : numDomainType) (f : T -> \bar R) (D : set T) :
601689 (abse \o f) \_ D = abse \o (f \_ D).
0 commit comments