Module infotheo.probability.necset
From HB Require Import structures.From mathcomp Require Import all_ssreflect ssralg ssrnum interval_inference.
From mathcomp Require Import finmap.
From mathcomp Require Import unstable mathcomp_extra boolp classical_sets reals.
Require Import realType_ext classical_sets_ext fdist fsdist convex.
Declare Scope latt_scope.
Reserved Notation "x %:ne" (at level 1, format "x %:ne").
Reserved Notation "x <| p |>: Y" (format "x <| p |>: Y", at level 49).
Reserved Notation "X :<| p |>: Y" (format "X :<| p |>: Y", at level 49).
Reserved Notation "x [+] y" (format "x [+] y", at level 50).
Reserved Notation "'|_|' f" (at level 36, f at level 36, format "|_| f").
Reserved Notation "{ 'necset' T }" (at level 0, format "{ 'necset' T }").
Reserved Notation "{ 'Biglub_morph' T '->' R }"
(at level 0, T, R at next level, format "{ 'Biglub_morph' T '->' R }").
Reserved Notation "{ 'Biglub_affine' T '->' R }"
(at level 0, T, R at next level, format "{ 'Biglub_affine' T '->' R }").
Set Implicit Arguments.
Set SsrOldRewriteGoalsOrder.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Local Open Scope ring_scope.
Local Open Scope reals_ext_scope.
Local Open Scope fdist_scope.
Local Open Scope convex_scope.
HB.mixin Record isNESet (T : Type) (X : set T) := { is_nonempty : X != set0 }.
#[short(type=neset)]
HB.structure Definition NESet T := { X of isNESet T X }.
Notation "s %:ne" := ((s : neset _)%classic).
Section neset_canonical.
Variable A : Type.
Canonical
neset_predType not a defined object.
Eval hnf in PredType (fun t : neset A => (fun x => x \in (t : set _))).
NESet_type__canonical__eqtype_Equality not a defined object.
NESet_type__canonical__eqtype_Equality not a defined object.
NESet_type__canonical__eqtype_Equality not a defined object.
NESet_type__canonical__eqtype_Equality not a defined object.
NESet_type__canonical__eqtype_Equality not a defined object.
NESet_type__canonical__eqtype_Equality not a defined object.
NESet_type__canonical__choice_Choice not a defined object.
NESet_type__canonical__choice_Choice not a defined object.
NESet_type__canonical__choice_Choice not a defined object.
NESet_type__canonical__choice_Choice not a defined object.
NESet_type__canonical__choice_Choice not a defined object.
NESet_type__canonical__choice_Choice not a defined object.
End neset_canonical.
Section NESet_interface.
Variables (A : Type).
Lemma neset_neq0 (a : neset A) : a != set0 :> set _.
Proof.
Proof.
congr NESet.Pack; congr NESet.Class; f_equal; exact/Prop_irrelevance.
Qed.
Section neset_lemmas.
Local Open Scope classical_set_scope.
Lemma set1_neq0 A (a : A) : [set a] != set0.
Proof.
Definition
neset_repr not a defined object.
Proof.
Lemma repr_in_neset A (X : neset A) : (X : set A) (neset_repr X).
Proof.
Global Opaque neset_repr.
Local Hint Resolve repr_in_neset : core.
Lemma image_const A B (X : neset A) (b : B) : (fun _ => b) @` X = [set b].
Proof.
Lemma neset_bigsetU_neq0 A B (X : neset A) (F : A -> neset B) :
\bigcup_(i in X) F i != set0.
Proof.
Lemma neset_image_neq0 A B (f : A -> B) (X : neset A) : f @` X != set0.
Lemma neset_setU_neq0 A (X Y : neset A) : X `|` Y != set0.
Proof.
classical_sets_set1__canonical__necset_NESet not a defined object.
classical_sets_set1__canonical__necset_NESet not a defined object.
classical_sets_set1__canonical__necset_NESet not a defined object.
classical_sets_set1__canonical__necset_NESet not a defined object.
classical_sets_set1__canonical__necset_NESet not a defined object.
classical_sets_set1__canonical__necset_NESet not a defined object.
classical_sets_set1__canonical__necset_NESet not a defined object.
classical_sets_set1__canonical__necset_NESet not a defined object.
classical_sets_bigcup__canonical__necset_NESet not a defined object.
classical_sets_bigcup__canonical__necset_NESet not a defined object.
classical_sets_bigcup__canonical__necset_NESet not a defined object.
classical_sets_bigcup__canonical__necset_NESet not a defined object.
classical_sets_bigcup__canonical__necset_NESet not a defined object.
classical_sets_bigcup__canonical__necset_NESet not a defined object.
classical_sets_bigcup__canonical__necset_NESet not a defined object.
classical_sets_bigcup__canonical__necset_NESet not a defined object.
classical_sets_bigcup__canonical__necset_NESet not a defined object.
isNESet.Build _ _ (neset_bigsetU_neq0 S F).
classical_sets_image__canonical__necset_NESet not a defined object.
classical_sets_image__canonical__necset_NESet not a defined object.
classical_sets_image__canonical__necset_NESet not a defined object.
classical_sets_image__canonical__necset_NESet not a defined object.
classical_sets_image__canonical__necset_NESet not a defined object.
classical_sets_image__canonical__necset_NESet not a defined object.
classical_sets_image__canonical__necset_NESet not a defined object.
classical_sets_image__canonical__necset_NESet not a defined object.
classical_sets_image__canonical__necset_NESet not a defined object.
isNESet.Build _ _ (neset_image_neq0 f X).
classical_sets_setU__canonical__necset_NESet not a defined object.
classical_sets_setU__canonical__necset_NESet not a defined object.
classical_sets_setU__canonical__necset_NESet not a defined object.
classical_sets_setU__canonical__necset_NESet not a defined object.
classical_sets_setU__canonical__necset_NESet not a defined object.
classical_sets_setU__canonical__necset_NESet not a defined object.
classical_sets_setU__canonical__necset_NESet not a defined object.
classical_sets_setU__canonical__necset_NESet not a defined object.
classical_sets_setU__canonical__necset_NESet not a defined object.
isNESet.Build _ _ (neset_setU_neq0 X Y).
Lemma neset_hull_neq0 {R : realType} (T : convType R) (F : neset T) : hull F != set0.
Proof.
convex_hull__canonical__necset_NESet not a defined object.
convex_hull__canonical__necset_NESet not a defined object.
convex_hull__canonical__necset_NESet not a defined object.
convex_hull__canonical__necset_NESet not a defined object.
convex_hull__canonical__necset_NESet not a defined object.
convex_hull__canonical__necset_NESet not a defined object.
convex_hull__canonical__necset_NESet not a defined object.
isNESet.Build _ _ (neset_hull_neq0 F).
End neset_lemmas.
Local Hint Resolve repr_in_neset : core.
#[short(type=necset)]
HB.structure Definition NECSet {R : realType} (A : convType R) :=
{X of @isConvexSet R A X & @isNESet A X}.
Section conv_set_def.
Local Open Scope classical_set_scope.
Context {R : realType}.
Variable L : convType R.
Definition
conv_pt_set not a defined object.
locked (fun y => x <| p |> y) @` Y.
Local Notation "x <| p |>: Y" := (conv_pt_set p x Y).
Lemma conv_pt_setE p x Y : x <| p |>: Y = (fun y => x <| p |> y) @` Y.
Proof.
Definition
conv_set not a defined object.
End conv_set_def.
Notation "x <| p |>: Y" := (conv_pt_set p x Y) : convex_scope.
Notation "X :<| p |>: Y" := (conv_set p X Y) : convex_scope.
Section conv_set_lemmas.
Local Open Scope classical_set_scope.
Context {R : realType}.
Variables A : convType R.
Lemma conv_setE p (X Y : set A) :
X :<| p |>: Y = \bigcup_(x in X) (x <| p |>: Y).
Proof.
Lemma conv_in_conv_pt_set p (Y : set A) x y :
Y y -> (x <| p |>: Y) (x <| p |> y).
Proof.
Lemma conv_in_conv_set p (X Y : set A) x y :
X x -> Y y -> (X :<| p |>: Y) (x <| p |> y).
Proof.
Lemma conv_in_conv_set' p (X Y : set A) u :
(X :<| p |>: Y) u -> exists x y, X x /\ Y y /\ u = x <| p |> y.
Proof.
Lemma convC_set p (X Y : set A) : X :<| p |>: Y = Y :<| p%:num.~%:i01 |>: X.
Proof.
rewrite conv_pt_setE => -[] y Yy <-;
exists y => //; rewrite conv_pt_setE; exists x => //; rewrite -convC.
Qed.
Lemma convA_pt_set p q x (Y Z : set A) :
x <|p|>: (Y :<|q|>: Z) = (x <|[r_of p, q]|>: Y) :<|[s_of p, q]|>: Z.
Proof.
- case=> yz [] y Yy; rewrite conv_pt_setE=> -[] z Zz <- <-.
by rewrite convA; apply: conv_in_conv_set=> //; apply: conv_in_conv_pt_set.
- case=> xy [] y Yy <-; rewrite conv_pt_setE; case=> z Zz <-.
by rewrite -convA; apply: conv_in_conv_pt_set=> //; apply: conv_in_conv_set.
Qed.
Lemma convA_set p q (X Y Z : set A) :
X :<|p|>: (Y :<|q|>: Z) = (X :<|[r_of p, q]|>: Y) :<|[s_of p, q]|>: Z.
Proof.
- by case=> x Xx; rewrite convA_pt_set=> -[] xy xYxy; exists xy=> //; exists x.
- by case=> xy -[] x Xx xYxy; exists x=> //; rewrite convA_pt_set; exists xy.
Qed.
Lemma conv_cset1 (p : {prob R}) (x y : A) :
[set x] :<|p|>: [set y] = [set x <|p|> y].
Proof.
by case/conv_in_conv_set'=> x' [] y' [] -> [] -> ->.
Qed.
Lemma conv1_pt_set x (Y : neset A) : x <| 1%:i01 |>: Y = [set x].
Proof.
- by case => y _; rewrite conv1.
- by move=> ->; eexists => //; rewrite conv1.
Qed.
Lemma conv0_pt_set x (Y : set A) : x <| 0%:i01 |>: Y = Y.
Proof.
- by case=> y Yy <-; rewrite conv0.
- by move=> Yu; exists u=> //; rewrite conv0.
Qed.
Lemma conv1_set X (Y : neset A) : X :<| 1%:i01 |>: Y = X.
Proof.
by apply: eq_bigcupr => x; rewrite conv1_pt_set.
Qed.
Lemma conv0_set (X : neset A) Y : X :<| 0%:i01 |>: Y = Y.
Proof.
Definition
probset not a defined object.
Definition
natset not a defined object.
Definition
oplus_conv_set not a defined object.
\bigcup_(p in probset) (X :<| p |>: Y).
Lemma conv_in_oplus_conv_set p (X Y : set A) x y :
X x -> Y y -> (oplus_conv_set X Y) (x <|p|> y).
Proof.
Fixpoint
iter_conv_set not a defined object.
match n with
| O => X
| S n' => oplus_conv_set X (iter_conv_set X n')
end.
Lemma iter0_conv_set (X : set A) : iter_conv_set X 0 = X.
Proof.
Lemma iterS_conv_set (X : set A) (n : nat) :
iter_conv_set X (S n) = oplus_conv_set X (iter_conv_set X n).
Proof.
Lemma probset_neq0 : probset != set0.
Lemma natset_neq0 : natset != set0.
Lemma conv_pt_set_neq0 p (x : A) (Y : neset A) : x <| p |>: Y != set0.
Proof.
Lemma conv_set_neq0 p (X Y : neset A) : X :<| p |>: Y != set0.
Proof.
Lemma oplus_conv_set_neq0 (X Y : neset A) : oplus_conv_set X Y != set0.
Fixpoint
iter_conv_set_neq0 not a defined object.
iter_conv_set X n != set0 :=
if n is n'.+1 then
oplus_conv_set_neq0 X (NESet.Pack (NESet.Class (isNESet.Build _ _ (iter_conv_set_neq0 X n'))))
else neset_neq0 X.
necset_probset__canonical__necset_NESet not a defined object.
necset_probset__canonical__necset_NESet not a defined object.
necset_probset__canonical__necset_NESet not a defined object.
necset_probset__canonical__necset_NESet not a defined object.
necset_probset__canonical__necset_NESet not a defined object.
necset_probset__canonical__necset_NESet not a defined object.
necset_natset__canonical__necset_NESet not a defined object.
necset_natset__canonical__necset_NESet not a defined object.
necset_natset__canonical__necset_NESet not a defined object.
necset_natset__canonical__necset_NESet not a defined object.
necset_natset__canonical__necset_NESet not a defined object.
necset_natset__canonical__necset_NESet not a defined object.
necset_conv_pt_set__canonical__necset_NESet not a defined object.
necset_conv_pt_set__canonical__necset_NESet not a defined object.
necset_conv_pt_set__canonical__necset_NESet not a defined object.
necset_conv_pt_set__canonical__necset_NESet not a defined object.
necset_conv_pt_set__canonical__necset_NESet not a defined object.
necset_conv_pt_set__canonical__necset_NESet not a defined object.
necset_conv_pt_set__canonical__necset_NESet not a defined object.
isNESet.Build _ _ (conv_pt_set_neq0 p x Y).
necset_conv_set__canonical__necset_NESet not a defined object.
necset_conv_set__canonical__necset_NESet not a defined object.
necset_conv_set__canonical__necset_NESet not a defined object.
necset_conv_set__canonical__necset_NESet not a defined object.
necset_conv_set__canonical__necset_NESet not a defined object.
necset_conv_set__canonical__necset_NESet not a defined object.
necset_conv_set__canonical__necset_NESet not a defined object.
isNESet.Build _ _ (conv_set_neq0 p X Y).
necset_oplus_conv_set__canonical__necset_NESet not a defined object.
necset_oplus_conv_set__canonical__necset_NESet not a defined object.
necset_oplus_conv_set__canonical__necset_NESet not a defined object.
necset_oplus_conv_set__canonical__necset_NESet not a defined object.
necset_oplus_conv_set__canonical__necset_NESet not a defined object.
necset_oplus_conv_set__canonical__necset_NESet not a defined object.
necset_oplus_conv_set__canonical__necset_NESet not a defined object.
necset_oplus_conv_set__canonical__necset_NESet not a defined object.
isNESet.Build _ _ (oplus_conv_set_neq0 X Y).
necset_iter_conv_set__canonical__necset_NESet not a defined object.
necset_iter_conv_set__canonical__necset_NESet not a defined object.
necset_iter_conv_set__canonical__necset_NESet not a defined object.
necset_iter_conv_set__canonical__necset_NESet not a defined object.
necset_iter_conv_set__canonical__necset_NESet not a defined object.
necset_iter_conv_set__canonical__necset_NESet not a defined object.
necset_iter_conv_set__canonical__necset_NESet not a defined object.
isNESet.Build _ _ (iter_conv_set_neq0 X n).
Let conv_pt_cset_is_convex (p : {prob R}) (x : A) (Y : {convex_set A}) :
is_convex_set (conv_pt_set p x Y).
Proof.
rewrite conv_pt_setE /= => -[y0 Yy0 <-] [y1 Yy1 <-].
rewrite -convDr; apply/imageP.
by move/asboolP: (convex_setP Y); apply.
Qed.
necset_conv_pt_set__canonical__convex_ConvexSet not a defined object.
necset_conv_pt_set__canonical__convex_ConvexSet not a defined object.
necset_conv_pt_set__canonical__convex_ConvexSet not a defined object.
necset_conv_pt_set__canonical__convex_ConvexSet not a defined object.
necset_conv_pt_set__canonical__convex_ConvexSet not a defined object.
necset_conv_pt_set__canonical__convex_ConvexSet not a defined object.
necset_conv_pt_set__canonical__convex_ConvexSet not a defined object.
isConvexSet.Build R _ _ (conv_pt_cset_is_convex p x Y).
Lemma conv_cset_is_convex (p : {prob R}) (X Y : {convex_set A}) :
is_convex_set (conv_set p X Y).
Proof.
case/conv_in_conv_set'=> x0 [] y0 [] ? [] ? ->.
case/conv_in_conv_set'=> x1 [] y1 [] ? [] ? ->.
by rewrite convACA; apply/conv_in_conv_set;
[move/asboolP: (convex_setP X); apply | move/asboolP: (convex_setP Y); apply].
Qed.
necset_conv_set__canonical__convex_ConvexSet not a defined object.
necset_conv_set__canonical__convex_ConvexSet not a defined object.
necset_conv_set__canonical__convex_ConvexSet not a defined object.
necset_conv_set__canonical__convex_ConvexSet not a defined object.
necset_conv_set__canonical__convex_ConvexSet not a defined object.
necset_conv_set__canonical__convex_ConvexSet not a defined object.
necset_conv_set__canonical__convex_ConvexSet not a defined object.
isConvexSet.Build R _ _ (conv_cset_is_convex p X Y).
Lemma oplus_conv_cset_is_convex (X Y : {convex_set A}) :
is_convex_set (oplus_conv_set X Y).
Proof.
case=> q _ [] xu Xxu; rewrite conv_pt_setE=> -[] yu Yyu <-.
case=> r _ [] xv Xxv; rewrite conv_pt_setE=> -[] yv Yyv <-.
pattern p; apply: (prob_trichotomy' p); rewrite ?conv0 ?conv1;
[exact: conv_in_oplus_conv_set | exact: conv_in_oplus_conv_set | move=> op].
pattern q; apply: (prob_trichotomy' q) => [| |oq].
- rewrite conv0 (convC r) convA convC; apply: conv_in_oplus_conv_set=> //.
by move/asboolP: (convex_setP Y); apply.
- rewrite conv1 convA; apply: conv_in_oplus_conv_set=> //.
by move/asboolP: (convex_setP X); apply.
- pattern r; apply: (prob_trichotomy' r) => [| |or].
+ rewrite conv0 -convA' ?oprob_neq1 //; apply: conv_in_oplus_conv_set=> //.
by move/asboolP: (convex_setP Y); apply.
+ rewrite conv1 convC convA; apply: conv_in_oplus_conv_set=> //.
by move/asboolP: (convex_setP X); apply.
+ case: (convACA' xu yu xv yv (OProb.p oq) (OProb.p op) (OProb.p or)(*TODO: oprob coercions broken*))=> q' [] p' [] r' ->.
by apply: conv_in_oplus_conv_set; [move/asboolP: (convex_setP X); apply |
move/asboolP: (convex_setP Y); apply].
Qed.
necset_oplus_conv_set__canonical__convex_ConvexSet not a defined object.
necset_oplus_conv_set__canonical__convex_ConvexSet not a defined object.
necset_oplus_conv_set__canonical__convex_ConvexSet not a defined object.
necset_oplus_conv_set__canonical__convex_ConvexSet not a defined object.
necset_oplus_conv_set__canonical__convex_ConvexSet not a defined object.
necset_oplus_conv_set__canonical__convex_ConvexSet not a defined object.
necset_oplus_conv_set__canonical__convex_ConvexSet not a defined object.
necset_oplus_conv_set__canonical__convex_ConvexSet not a defined object.
isConvexSet.Build _ _ _ (oplus_conv_cset_is_convex X Y).
Fixpoint
iter_conv_cset_is_convex not a defined object.
is_convex_set (iter_conv_set X n) :=
match n with
| 0 => convex_setP X
| n'.+1 => oplus_conv_cset_is_convex
X (ConvexSet.Pack
(ConvexSet.Class
(isConvexSet.Build R _ _ (iter_conv_cset_is_convex X n'))))
end.
necset_iter_conv_set__canonical__convex_ConvexSet not a defined object.
necset_iter_conv_set__canonical__convex_ConvexSet not a defined object.
necset_iter_conv_set__canonical__convex_ConvexSet not a defined object.
necset_iter_conv_set__canonical__convex_ConvexSet not a defined object.
necset_iter_conv_set__canonical__convex_ConvexSet not a defined object.
necset_iter_conv_set__canonical__convex_ConvexSet not a defined object.
necset_iter_conv_set__canonical__convex_ConvexSet not a defined object.
isConvexSet.Build R _ _ (iter_conv_cset_is_convex X n).
Lemma conv_pt_set_monotone (p : {prob R}) (x : A) (Y Y' : set A) :
Y `<=` Y' -> x <| p |>: Y `<=` x <| p |>: Y'.
Proof.
Lemma conv_set_monotone (p : {prob R}) (X Y Y' : set A) :
Y `<=` Y' -> X :<| p |>: Y `<=` X :<| p |>: Y'.
Proof.
Lemma oplus_conv_set_monotone (X Y Y' : set A) :
Y `<=` Y' -> oplus_conv_set X Y `<=` oplus_conv_set X Y'.
Proof.
Lemma iter_monotone_conv_set (X : neset A) (m : nat) :
forall n, (m <= n)%N -> iter_conv_set X m `<=` iter_conv_set X n.
Proof.
- case: n => // n.
rewrite iter0_conv_set iterS_conv_set.
by exists 1%:i01 => //; rewrite conv1_set.
- case => // n /(IHm _) mn.
rewrite iterS_conv_set=> a [] p _ H.
exists p => //.
by move: (@conv_set_monotone p X _ _ mn) => /(_ a); apply.
Qed.
Lemma iter_bigcup_conv_set (X : neset A) (n : nat) :
iter_conv_set X n `<=` \bigcup_(i in natset) iter_conv_set X i.
Proof.
Lemma iter_conv_set_superset (X : neset A) n : X `<=` iter_conv_set X n .
Proof.
by exists 1%:i01 => //; rewrite conv1_set.
Qed.
Lemma Convn_iter_conv_set (n : nat) :
forall (g : 'I_n -> A) (d : R.-fdist 'I_n) (X : set A),
g @` setT `<=` X -> iter_conv_set X n (<|>_d g).
Proof.
have [->|Xneq0 gX] := eqVneq X set0.
by move=> /(_ (g ord0)) H; exfalso; apply/H/imageP.
set X' := NESet.Pack (NESet.Class (isNESet.Build _ _ Xneq0)).
have gXi : forall i : 'I_n.+1, X (g i).
by move=> i; move/subset_image : gX; apply.
have [d01|d0n1] := eqVneq (d ord0) 1.
- suff : X (<|>_d g) by move/(@iter_conv_set_superset X' n.+1 (<|>_d g)).
by rewrite (Convn_proj g d01); exact/gX/imageP.
- rewrite ConvnIE //; exists (probfdist d ord0) => //; exists (g ord0) => //.
rewrite conv_pt_setE.
exists (<|>_(fdist_del d0n1) (fun x : 'I_n => g (fdist_del_idx ord0 x))) => //.
by apply: IHn => u [] i _ <-; exact/gX/imageP.
Qed.
Lemma oplus_convC_set (X Y : set A) : oplus_conv_set X Y = oplus_conv_set Y X.
Proof.
Lemma convmm_cset (p : {prob R}) (X : {convex_set A}) : X :<| p |>: X = X.
Proof.
- by move=> x0 [] x1 [] ? [] ? ->; move/asboolP : (convex_setP X); apply.
- by rewrite -(convmm p x); apply: conv_in_conv_set.
Qed.
Lemma oplus_convmm_cset (X : {convex_set A}) : oplus_conv_set X X = X.
Proof.
- by rewrite convmm_cset.
- by exists 0%:i01 => //; rewrite convmm_cset.
Qed.
Lemma oplus_convmm_set_hull (X : set A) :
oplus_conv_set (hull X) (hull X) = hull X.
Proof.
Lemma hull_iter_conv_set (X : set A) :
hull X = \bigcup_(i in natset) iter_conv_set X i.
Proof.
by move=> x [] n [] g [] d [] gX ->; exists n => //; apply: Convn_iter_conv_set.
apply/bigsubsetU.
elim => [_|n IHn _]; first exact/subset_hull.
have H : iter_conv_set X n.+1 `<=` oplus_conv_set X (hull X).
exact/oplus_conv_set_monotone/IHn.
apply: (subset_trans H); rewrite oplus_convC_set.
have : oplus_conv_set (hull X) X `<=` oplus_conv_set (hull X) (hull X).
exact/oplus_conv_set_monotone/subset_hull.
by move/subset_trans; apply; rewrite oplus_convmm_set_hull.
Qed.
Lemma hull_conv_set_strr (p : {prob R}) (X Y : set A) :
hull (X :<| p |>: hull Y) = hull (X :<| p |>: Y).
Proof.
- case=> x Xx; rewrite conv_pt_setE=> -[] y [] n [] g [] d [] gY yg <-.
exists n, (fun i => x <|p|> g i), d; rewrite -ConvnDr yg; split=> //.
by move=> v [] i _ <-; exists x=> //; apply/conv_in_conv_pt_set/gY/imageP.
- case=> x Xx [] y Yy <-; apply/subset_hull.
by exists x=> //; exists y=> //; exact/subset_hull.
Qed.
End conv_set_lemmas.
Lemma affine_image_conv_set {R : realType} (A B : convType R)
(f : {affine A -> B}) p (X Y : set A) :
(f @` (X :<| p |>: Y) = f @` X :<| p |>: f @` Y)%classic.
Proof.
- move=> /conv_in_conv_set' [] x [] y [] Xx [] Yy ->; rewrite affine_conv=> <-.
by apply: conv_in_conv_set; apply: imageP.
- case/conv_in_conv_set'=> x [] y [] [] x0 Xx0 <- [] [] y0 Yy0 <- ->.
by rewrite -affine_conv; apply/imageP/conv_in_conv_set.
Qed.
HB.mixin Record isSemiLattice (T : Type) of Choice T := {
lub : T -> T -> T ;
lubC : commutative lub;
lubA : associative lub;
lubxx : idempotent_op lub }.
#[short(type=semiLattType)]
HB.structure Definition SemiLattice := { T of isSemiLattice T & }.
Notation "x [+] y" := (lub x y) : latt_scope.
Local Open Scope latt_scope.
Section semilattice_lemmas.
Variable L : semiLattType.
Local Notation lub := (@lub L).
Lemma lubAC : right_commutative lub.
Lemma lubCA : left_commutative lub.
Lemma lubACA : interchange lub lub.
Lemma lubKU (y x : L) : x [+] (x [+] y) = x [+] y.
Lemma lubUK (y x : L) : (x [+] y) [+] y = x [+] y.
Lemma lubKUC (y x : L) : x [+] (y [+] x) = x [+] y.
Lemma lubUKC (y x : L) : y [+] x [+] y = x [+] y.
End semilattice_lemmas.
HB.mixin Record isSemiCompSemiLatt T of isSemiLattice T & Choice T := {
biglub : neset T -> T ;
biglub1 : forall x : T, biglub [set x]%:ne = x ;
biglub_bignesetU : forall I (s : neset I) (f : I -> neset T),
biglub (\bigcup_(i in s) f i)%:ne = biglub (biglub @` (f @` s))%:ne ;
lubE : forall x y, x [+] y = biglub [set x; y]%:ne }.
#[short(type=semiCompSemiLattType)]
HB.structure Definition SemiCompSemiLatt := { T of @isSemiCompSemiLatt T & }.
Notation "|_| f" := (biglub f) : latt_scope.
Local Open Scope latt_scope.
Section semicompsemilatt_lemmas.
Local Open Scope classical_set_scope.
Variable L : semiCompSemiLattType.
Lemma biglub_bigcup (I : Type) (S : neset I) (F : I -> neset L) :
|_| (\bigcup_(i in S) F i)%:ne = |_| (biglub @` (F @` S))%:ne.
Proof.
Lemma nesetU_bigcup T (I J : neset T) :
(I `|` J)%:ne = (\bigcup_(i in [set I; J]) idfun i)%:ne.
Proof.
Lemma biglub_setU (I J : neset L) :
|_| (I `|` J)%:ne = |_| [set |_| I; |_| J]%:ne.
Proof.
by rewrite image_id /= image_setU !image_set1.
Qed.
Lemma biglub_flatten (F : neset (neset L)) :
|_| (biglub @` F)%:ne = |_| (\bigcup_(i in F) idfun i)%:ne.
Proof.
Let lub_binary (x y : L) := |_| [set x; y]%:ne.
Let lub_binaryC : commutative lub_binary.
Proof.
Let lub_binaryA : associative lub_binary.
Proof.
Let lub_binaryxx : idempotent_op lub_binary.
Proof.
End semicompsemilatt_lemmas.
Definition
biglubmorph not a defined object.
forall (X : neset U), f (|_| X) = |_| (f @` X)%:ne.
HB.mixin Record isBiglubMorph (U V : semiCompSemiLattType) (f : U -> V) := {
biglub_morph : biglubmorph f }.
HB.structure Definition BiglubMorph (U V : semiCompSemiLattType) :=
{f of isBiglubMorph U V f}.
Notation "{ 'Biglub_morph' T '->' R }" := (BiglubMorph.type T R) : convex_scope.
Section biglub_morph.
Variables (L M : semiCompSemiLattType).
Local Open Scope classical_set_scope.
Local Open Scope latt_scope.
Definition
lub_morph not a defined object.
forall (x y : L), f (x [+] y) = f x [+] f y.
Lemma biglub_lub_morph (f : {Biglub_morph L -> M}) : lub_morph f.
Proof.
congr (|_| _%:ne); apply/neset_ext => /=.
by rewrite image_setU !image_set1.
Qed.
End biglub_morph.
Local Open Scope convex_scope.
Local Open Scope latt_scope.
Local Open Scope classical_set_scope.
HB.mixin Record isSemiLattConv {R : realType} L of ConvexSpace R L & SemiLattice L := {
lubDr : forall (p : {prob R}) (x y z : L),
conv p x (y [+] z) = (conv p x y) [+] (conv p x z) }.
#[short(type=semiLattConvType)]
HB.structure Definition SemiLattConv {R : realType} :=
{L of isSemiLattConv R L & ConvexSpace R L & SemiLattice L}.
Section semilattconvtype_lemmas.
Local Open Scope latt_scope.
Local Open Scope convex_scope.
Context {R : realType}.
Variable L : semiLattConvType R.
Lemma lubDl p : left_distributive (fun x y => x <|p|> y) (@lub L).
Lemma lub_absorbs_conv (x y : L) p : x [+] y = x [+] y [+] x <|p|> y.
Proof.
rewrite -[in LHS](convmm p (x [+] y)) lubDl 2!lubDr 2!convmm lubCA lubC.
by rewrite (lubAC x).
rewrite {1}H.
have {2}<- : x [+] y [+] (x [+] y [+] x <|p|> y) = x [+] y [+] x <|p|> y
by rewrite lubA lubxx.
rewrite [in RHS]lubC.
have <- : x [+] y [+] x <|p|> y [+] (x [+] y [+] x <|p|> y [+] y <|p|> x) =
x [+] y [+] x <|p|> y [+] y <|p|> x
by rewrite lubA lubxx.
by rewrite -H.
Qed.
Local Notation "\lub_ ( i < n ) F" := False
(at level 41, F at level 41, i, n at level 50,
format "'[' \lub_ ( i < n ) '/ ' F ']'").
Fail Lemma lub_absorbs_convn (n : nat) (d : {fdist 'I_n}) (f : 'I_n -> L) :
\lub_(i < n) f i = (\lub_(i < n) f i) [+] (<|>_d f).
End semilattconvtype_lemmas.
HB.mixin Record isSemiCompSemiLattConv {R : realType} L of SemiCompSemiLatt L &
ConvexSpace R L := {
biglubDr : forall (p : {prob R}) (x : L) (I : neset L),
conv p x (|_| I) = |_| ((conv p x) @` I)%:ne
}.
#[short(type=semiCompSemiLattConvType)]
HB.structure Definition SemiCompSemiLattConv {R : realType} :=
{ L of isSemiCompSemiLattConv R L & SemiCompSemiLatt L & ConvexSpace R L &
isSemiLattConv R L}.
HB.structure Definition BiglubAffine {R : realType} (U V : semiCompSemiLattConvType R) :=
{f of @isAffine R U V f & isBiglubMorph U V f}.
Notation "{ 'Biglub_affine' T '->' R }" :=
(BiglubAffine.type T R) : convex_scope.
Section biglub_affine_functor_laws.
Variables (R' : realType) (R S T : semiCompSemiLattConvType R')
(f : {Biglub_affine S -> T}) (g : {Biglub_affine R -> S}).
Let biglubmorph_idfun : biglubmorph (@idfun R).
ssrfun_idfun__canonical__necset_BiglubAffine not a defined object.
ssrfun_idfun__canonical__necset_BiglubAffine not a defined object.
ssrfun_idfun__canonical__necset_BiglubAffine not a defined object.
ssrfun_idfun__canonical__necset_BiglubAffine not a defined object.
ssrfun_idfun__canonical__necset_BiglubAffine not a defined object.
ssrfun_idfun__canonical__necset_BiglubAffine not a defined object.
Let biglubmorph_comp : biglubmorph (f \o g).
Proof.
by congr (|_| _); apply: neset_ext => /=; rewrite image_comp.
Qed.
ssrfun_comp__canonical__necset_BiglubAffine not a defined object.
ssrfun_comp__canonical__necset_BiglubAffine not a defined object.
ssrfun_comp__canonical__necset_BiglubAffine not a defined object.
ssrfun_comp__canonical__necset_BiglubAffine not a defined object.
ssrfun_comp__canonical__necset_BiglubAffine not a defined object.
ssrfun_comp__canonical__necset_BiglubAffine not a defined object.
End biglub_affine_functor_laws.
Section semicompsemilattconvtype_lemmas.
Local Open Scope latt_scope.
Local Open Scope convex_scope.
Local Open Scope classical_set_scope.
Context {R : realType}.
Variable L : semiCompSemiLattConvType R.
Lemma biglubDl (p : {prob R}) (X : neset L) (y : L) :
|_| X <|p|> y = |_| ((fun x => x <|p|> y) @` X)%:ne.
Proof.
Lemma biglub_conv_pt_setE p x (Y : neset L) :
|_| (x <| p |>: Y)%:ne = |_| ((conv p x) @` Y)%:ne.
Proof.
Lemma biglub_conv_pt_setD p x (Y : neset L) :
|_| (x <| p |>: Y)%:ne = x <|p|> |_| Y.
Proof.
Lemma biglub_conv_setE p (X Y : neset L) :
|_| (X :<| p |>: Y)%:ne = |_| ((fun x => x <|p|> |_| Y) @` X)%:ne.
Proof.
Lemma biglub_conv_setD p (X Y : neset L) :
|_| (X :<| p |>: Y)%:ne = |_| X <|p|> |_| Y.
Proof.
Lemma biglub_oplus_conv_setE (X Y : neset L) :
|_| (oplus_conv_set X Y)%:ne =
|_| ((fun p => |_| X <|p|> |_| Y) @` probset)%:ne.
Proof.
Lemma biglub_iter_conv_set (X : neset L) (n : nat) :
|_| (iter_conv_set X n)%:ne = |_| X.
Proof.
rewrite (biglub_oplus_conv_setE _ (iter_conv_set X n)%:ne).
transitivity (|_| [set |_| X]%:ne); last by rewrite biglub1.
congr (|_| _%:ne); apply/neset_ext => /=.
transitivity ((fun _ => |_| X) @` @probset R); last by rewrite image_const.
by congr image; apply: funext=> p; rewrite IHn convmm.
Qed.
Lemma biglub_hull (X : neset L) : |_| (hull X)%:ne = |_| X.
Proof.
first by congr (|_| _); apply: neset_ext; rewrite /= hull_iter_conv_set.
rewrite biglub_bignesetU /= -[in RHS](biglub1 (|_| X)).
transitivity (|_| ((fun _ => |_| X) @` natset)%:ne); last first.
by congr (|_| _); apply/neset_ext/image_const.
congr (|_| _%:ne); apply/neset_ext => /=.
rewrite image_comp; congr image; apply: funext => n /=.
by rewrite biglub_iter_conv_set.
Qed.
Let lubDr p : right_distributive (fun x y => x <|p|> y) (@lub L).
Proof.
congr (|_| _%:ne); apply/neset_ext => /=.
by rewrite image_setU !image_set1.
Qed.
End semicompsemilattconvtype_lemmas.
Section necset_canonical.
Context {R : realType}.
Variable (A : convType R).
Canonical
necset_predType not a defined object.
Eval hnf in PredType (fun t : necset A => (fun x => x \in (t : set _))).
NECSet_type__canonical__eqtype_Equality not a defined object.
NECSet_type__canonical__eqtype_Equality not a defined object.
NECSet_type__canonical__eqtype_Equality not a defined object.
NECSet_type__canonical__eqtype_Equality not a defined object.
NECSet_type__canonical__eqtype_Equality not a defined object.
NECSet_type__canonical__eqtype_Equality not a defined object.
NECSet_type__canonical__choice_Choice not a defined object.
NECSet_type__canonical__choice_Choice not a defined object.
NECSet_type__canonical__choice_Choice not a defined object.
NECSet_type__canonical__choice_Choice not a defined object.
NECSet_type__canonical__choice_Choice not a defined object.
NECSet_type__canonical__choice_Choice not a defined object.
End necset_canonical.
Section necset_lemmas.
Context {R : realType}.
Variable A : convType R.
Lemma necset_ext (a b : necset A) : a = b :> set _ -> a = b.
Proof.
congr NECSet.Pack; congr NECSet.Class; f_equal; exact/Prop_irrelevance.
Qed.
convex_hull__canonical__necset_NECSet not a defined object.
convex_hull__canonical__necset_NECSet not a defined object.
convex_hull__canonical__necset_NECSet not a defined object.
convex_hull__canonical__necset_NECSet not a defined object.
convex_hull__canonical__necset_NECSet not a defined object.
convex_hull__canonical__necset_NECSet not a defined object.
convex_hull__canonical__necset_NECSet not a defined object.
isConvexSet.Build R _ _ (hull_is_convex F).
necset_isNESet__to__necset_isNESet not a defined object.
necset_isNESet__to__necset_isNESet not a defined object.
necset_isNESet__to__necset_isNESet not a defined object.
necset_isNESet__to__necset_isNESet not a defined object.
necset_isNESet__to__necset_isNESet not a defined object.
necset_isNESet__to__necset_isNESet not a defined object.
necset_isNESet__to__necset_isNESet not a defined object.
isNESet.Build _ _ (neset_hull_neq0 F).
classical_sets_set1__canonical__necset_NECSet not a defined object.
classical_sets_set1__canonical__necset_NECSet not a defined object.
classical_sets_set1__canonical__necset_NECSet not a defined object.
classical_sets_set1__canonical__necset_NECSet not a defined object.
classical_sets_set1__canonical__necset_NECSet not a defined object.
classical_sets_set1__canonical__necset_NECSet not a defined object.
classical_sets_set1__canonical__necset_NECSet not a defined object.
isConvexSet.Build R _ _ (is_convex_set1 x).
necset_isNESet__to__necset_isNESet__68 not a defined object.
necset_isNESet__to__necset_isNESet__68 not a defined object.
necset_isNESet__to__necset_isNESet__68 not a defined object.
necset_isNESet__to__necset_isNESet__68 not a defined object.
necset_isNESet__to__necset_isNESet__68 not a defined object.
necset_isNESet__to__necset_isNESet__68 not a defined object.
necset_isNESet__to__necset_isNESet__68 not a defined object.
isNESet.Build _ _ (set1_neq0 x).
End necset_lemmas.
Definition
necset_convType_conv not a defined object.
X :<|p|>: Y.
necset_necset_convType_conv__canonical__necset_NESet not a defined object.
necset_necset_convType_conv__canonical__necset_NESet not a defined object.
necset_necset_convType_conv__canonical__necset_NESet not a defined object.
necset_necset_convType_conv__canonical__necset_NESet not a defined object.
necset_necset_convType_conv__canonical__necset_NESet not a defined object.
necset_necset_convType_conv__canonical__necset_NESet not a defined object.
necset_necset_convType_conv__canonical__necset_NESet not a defined object.
NESet.on (necset_convType_conv p X Y).
necset_necset_convType_conv__canonical__necset_NECSet not a defined object.
necset_necset_convType_conv__canonical__necset_NECSet not a defined object.
necset_necset_convType_conv__canonical__necset_NECSet not a defined object.
necset_necset_convType_conv__canonical__necset_NECSet not a defined object.
necset_necset_convType_conv__canonical__necset_NECSet not a defined object.
necset_necset_convType_conv__canonical__necset_NECSet not a defined object.
necset_necset_convType_conv__canonical__necset_NECSet not a defined object.
ConvexSet.on (necset_convType_conv p X Y).
necset_conv_set__canonical__necset_NECSet not a defined object.
necset_conv_set__canonical__necset_NECSet not a defined object.
necset_conv_set__canonical__necset_NECSet not a defined object.
necset_conv_set__canonical__necset_NECSet not a defined object.
necset_conv_set__canonical__necset_NECSet not a defined object.
necset_conv_set__canonical__necset_NECSet not a defined object.
necset_conv_set__canonical__necset_NECSet not a defined object.
isNESet.Build _ _ (conv_set_neq0 p X Y).
Module necset_convType.
Section def.
Context {R : realType}.
Variable A : convType R.
Definition
necset_convType.conv not a defined object.
Lemma convE p (X Y : necset A) : conv p X Y = conv_set p X Y :> set A.
Proof.
Lemma conv1 X Y : conv 1%:i01 X Y = X.
Proof.
Lemma convmm p X : conv p X X = X.
Proof.
Lemma convC p X Y : conv p X Y = conv p%:num.~%:i01 Y X.
Proof.
Lemma convA p q X Y Z :
conv p X (conv q Y Z) = conv [s_of p, q] (conv [r_of p, q] X Y) Z.
Proof.
End def.
Section lemmas.
Local Open Scope classical_set_scope.
Context {R : realType}.
Variable A : convType R.
Lemma conv_conv_set p X Y : conv p X Y = X :<| p |>: Y :> set A.
Proof.
End lemmas.
End necset_convType.
NECSet_type__canonical__convex_ConvexSpace not a defined object.
NECSet_type__canonical__convex_ConvexSpace not a defined object.
NECSet_type__canonical__convex_ConvexSpace not a defined object.
NECSet_type__canonical__convex_ConvexSpace not a defined object.
NECSet_type__canonical__convex_ConvexSpace not a defined object.
NECSet_type__canonical__convex_ConvexSpace not a defined object.
NECSet_type__canonical__convex_ConvexSpace not a defined object.
@isConvexSpace.Build R (necset A)
(@necset_convType.conv R A)
(@necset_convType.conv1 R A)
(@necset_convType.convmm R A)
(@necset_convType.convC R A)
(@necset_convType.convA R A).
Definition
Necset_to_convType not a defined object.
fun phT : phant (Choice.sort A) => necset A.
Local Notation "{ 'necset' T }" := (Necset_to_convType (Phant T)).
Module necset_semiCompSemiLattType.
Section def.
Local Open Scope classical_set_scope.
Context {R : realType}.
Variable (A : convType R).
Definition
necset_semiCompSemiLattType.pre_op not a defined object.
hull (\bigcup_(i in X) idfun i)%:ne.
Lemma pre_op_neq0 X : pre_op X != set0 :> set _.
Proof.
Definition
necset_semiCompSemiLattType.biglub_necset not a defined object.
hull (\bigcup_(i in X) idfun i)%:ne.
Lemma biglub_necset1 x : biglub_necset [set x]%:ne = x.
Proof.
Lemma biglub_necset_bigsetU (I : Type) (S : neset I) (F : I -> neset (necset A)) :
biglub_necset (\bigcup_(i in S) F i) = biglub_necset (biglub_necset @` (F @` S))%:ne.
Proof.
apply: hull_eqEsubset => a.
- case => x [] i Si Fix xa.
exists 1, (fun _ => a), (fdist1 ord0).
split; last by rewrite ConvnI1E.
move=> a0 [] zero _ <-.
exists (biglub_necset (F i)); first by do 2 apply: imageP.
by apply/subset_hull; exists x.
- case => x [] u [] i Si Fiu <-.
case => n [] g [] d [] /= gx ag.
exists n, g, d; split => //.
apply: (subset_trans gx).
move => a0 [] x0 ux0 x0a0.
exists x0 => //; exists i => //.
by rewrite Fiu.
Qed.
Let lub_ (x y : necset A) : necset A := biglub_necset [set x; y]%:ne.
Let lub_E (x y : necset A) : lub_ x y = hull (x `|` y)%:ne.
Proof.
Let lub_C : commutative lub_.
Proof.
Let lub_A : associative lub_.
Proof.
Let lub_xx : idempotent_op lub_.
Proof.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiLattice not a defined object.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiLattice not a defined object.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiLattice not a defined object.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiLattice not a defined object.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiLattice not a defined object.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiLattice not a defined object.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiLattice not a defined object.
lub_ lub_C lub_A lub_xx.
Let lub_E' : forall x y, lub_ x y = biglub_necset [set x; y]%:ne.
Proof.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiCompSemiLatt not a defined object.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiCompSemiLatt not a defined object.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiCompSemiLatt not a defined object.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiCompSemiLatt not a defined object.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiCompSemiLatt not a defined object.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiCompSemiLatt not a defined object.
necset_semiCompSemiLattType.NECSet_type__canonical__necset_SemiCompSemiLatt not a defined object.
biglub_necset biglub_necset1 biglub_necset_bigsetU lub_E'.
End def.
End necset_semiCompSemiLattType.
HB.export necset_semiCompSemiLattType.
Module necset_semiCompSemiLattConvType.
Section def.
Context {R : realType}.
Variable A : convType R.
Let L := necset A.
Let biglubDr' (p : {prob R}) (X : L) (I : neset L) :
necset_convType.conv p X (|_| I) = |_| ((necset_convType.conv p X) @` I)%:ne.
Proof.
rewrite -[LHS]hull_cset/=.
rewrite [X in hull X = _]necset_convType.conv_conv_set /=.
rewrite hull_conv_set_strr.
congr hull; rewrite eqEsubset; split=> u /=.
- case=> x Xx [] y []Y IY Yy <-.
exists (necset_convType.conv p X Y); first by exists Y.
rewrite necset_convType.conv_conv_set.
by exists x=> //; exists y.
- case=> _ [] Y IY <-; rewrite necset_convType.convE.
rewrite convC_set [in X in _ -> X]convC_set.
by case=> y Yy yXu; exists y=> //; exists Y.
Qed.
Let lubDr' (p : {prob R}) (x y z : L) :
x <|p|> (y [+] z) = (x <|p|> y) [+] (x <|p|> z).
Proof.
by apply/neset_ext => /=; rewrite image_setU !image_set1.
Qed.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiLattConv not a defined object.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiLattConv not a defined object.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiLattConv not a defined object.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiLattConv not a defined object.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiLattConv not a defined object.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiLattConv not a defined object.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiLattConv not a defined object.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiCompSemiLattConv not a defined object.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiCompSemiLattConv not a defined object.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiCompSemiLattConv not a defined object.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiCompSemiLattConv not a defined object.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiCompSemiLattConv not a defined object.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiCompSemiLattConv not a defined object.
necset_semiCompSemiLattConvType.NECSet_type__canonical__necset_SemiCompSemiLattConv not a defined object.
End def.
End necset_semiCompSemiLattConvType.
HB.export necset_semiCompSemiLattConvType.
Definition
Necset_to_semiCompSemiLattConvType not a defined object.
fun phT : phant (Choice.sort A) => [the semiCompSemiLattConvType R of necset A].
Notation "{ 'necset' T }" :=
(Necset_to_semiCompSemiLattConvType (Phant T)) : convex_scope.
Module necset_join.
Section def.
Variable R : realType.
Local Open Scope classical_set_scope.
Local Open Scope proba_scope.
Definition
necset_join.F not a defined object.
Variable T : Type.
Definition
necset_join.L not a defined object.
Definition
necset_join.FFT not a defined object.
Definition
necset_join.F1join0' not a defined object.
Lemma F1join0'_convex X : is_convex_set (F1join0' X).
Proof.
exists (dx <|p|>dy); first by move/asboolP: (convex_setP X); apply.
by rewrite Convn_of_fsdist_affine.
Qed.
Lemma F1join0'_neq0 X : (F1join0' X) != set0.
Proof.
case/set0P: (neset_neq0 X) => x Xx.
by exists (Convn_of_fsdist (x : R.-dist (F T))), x.
Qed.
Definition
necset_join.L' not a defined object.
Definition
necset_join.F1join0 not a defined object.
(isConvexSet.Build R _ _ (F1join0'_convex X)) (isNESet.Build _ _ (F1join0'_neq0 X))).
Definition
necset_join.join1' not a defined object.
: {convex_set [the convType R of R.-dist {classic T}]} :=
ConvexSet.Pack (ConvexSet.Class (isConvexSet.Build R _ _ (hull_is_convex
(\bigcup_(i in X) if i \in X then (i : set _) else set0)))).
Lemma join1'_neq0 (X : L') : join1' X != set0 :> set _.
Proof.
case/set0P: (neset_neq0 X) => y.
case/set0P: (neset_neq0 y) => x yx sy.
exists x; exists y => //.
rewrite -in_setE in sy.
by rewrite sy.
Qed.
Definition
necset_join.join1 not a defined object.
NECSet.Pack (NECSet.Class (isConvexSet.Build R _ _ (hull_is_convex _))
(isNESet.Build _ _ (join1'_neq0 X))).
Definition
necset_join.join not a defined object.
End def.
Module Exports.
Definition
necset_join.Exports.necset_join not a defined object.
End Exports.
End necset_join.
Export necset_join.Exports.
Section necset_bind.
Local Open Scope classical_set_scope.
Local Open Scope proba_scope.
Local Notation M := (necset_join.F).
Section ret.
Variable R : realType.
Variable a : Type.
Definition
necset_ret not a defined object.
End ret.
Section fmap.
Variables (R : realType) (a b : Type) (f : a -> b).
Let necset_fmap' (ma : M R a) :=
(fsdistmap (f : {classic_ a} -> {classic b})) @` ma.
Lemma necset_fmap'_convex ma : is_convex_set (necset_fmap' ma).
Proof.
exists (dx <| p |> dy); last by rewrite affine_conv.
by move/asboolP: (convex_setP ma); apply.
Qed.
Lemma necset_fmap'_neq0 ma : (necset_fmap' ma) != set0.
Proof.
Definition
necset_fmap not a defined object.
NECSet.Pack (NECSet.Class (isConvexSet.Build R _ _ (necset_fmap'_convex ma))
(isNESet.Build _ _ (necset_fmap'_neq0 ma))).
End fmap.
Section bind.
Variables (R : realType) (a b : Type).
Definition
necset_bind not a defined object.
necset_join (necset_fmap f ma).
End bind.
End necset_bind.
Section technical_corollaries.
Variable R : realType.
Variable L : semiCompSemiLattConvType R.
Corollary Varacca_Winskel_Lemma_5_6 (Y Z : neset L) :
hull Y = hull Z -> |_| Y = |_| Z.
Proof.
by congr (|_| _); apply: neset_ext.
Qed.
Corollary Beaulieu_technical_equality (x y : L):
x [+] y = |_| ((fun p => x <| p |> y) @` probset)%:ne.
Proof.
rewrite eqEsubset; split=> i /=.
- have /set0P x0 := set1_neq0 x.
have /set0P y0 := set1_neq0 y.
move/(@hull_setU R _ _ (set1 x) (set1 y) x0 y0).
by move=> [a /asboolP ->] [b /asboolP ->] [p ->]; exists p.
- by case=> p ? <-; exact/mem_hull_setU.
Qed.
End technical_corollaries.