Definition msur_0
(U:Type)(F:Ensemble(Ensemble U))(F':sigalg_0 _ F)(F'':sigalg_1 _ F)(F''':
sigalg_2 _ F)(u:forall A,F A->R):=
u(Empty_set _)(sigalg_P1 U F F' F'' F''')=0%R.(*-----------------------------------------------------------------------------
Countable additivity.  C is the countable collection, g is again the injective
proof-irrelevant serial number mapping, and us is a list of the measures of the
sets in the collection (sprinkled with zeroes throughout).
-------------------------------------------------------------------------------
One note that might be interesting is that even though the hypotheses about
'us' 'force' the measure function u to be compatible when dealing with sets
that are actually in C (as opposed to sets in the sigma-algebra F which are not
known for sure if they are in C), one cannot generally prove (I think) that the
measure function u is compatible from the hypotheses given here.  This was kind
of a stumbling block and why I eventually had to add the 'msur_3' axiom below.
-----------------------------------------------------------------------------*)
Definition msur_1
(U:Type)(F:Ensemble(Ensemble U))(F':sigalg_0 _ F)(F'':sigalg_1 _ F)(F''':
sigalg_2 _ F)(u:forall A,F A->R):=
forall C:Ensemble(Ensemble U),
forall C1:Included _ C F,
forall C2:forall c cc,C c->C cc->c<>cc->Disjoint _ c cc,
forall g:forall c,C c->nat,
forall g1:forall c c' c'',g c c'=g c c'',
forall g2:forall c cc c' cc',g c c'=g cc cc'->c=cc,
forall us:nat->R,
(forall c c',us(g c c')=u c(C1 _ c'))->
(forall n:nat,(forall c c',n<>g c c')->us n=0%R)->
forall l,infinit_sum us l->l
=u(unoin _ C)(F''' C C1(cntabl_P1 _ _ g g1 g2)).(*-----------------------------------------------------------------------------
probability spaces have measure 1
-----------------------------------------------------------------------------*)
Definition msur_2
(U:Type)(F:Ensemble(Ensemble U))(F':sigalg_0 _ F)(F'':sigalg_1 _ F)(F''':
sigalg_2 _ F)(u:forall A,F A->R):=
u (Full_set U) (sigalg_P3 U F F' F'' F''')=1%R.Definition msur_3
(U:Type)(F:Ensemble(Ensemble U))(F':sigalg_0 _ F)(F'':sigalg_1 _ F)(F''':
sigalg_2 _ F)(u:forall A,F A->R):=
forall A A' A'',u A A'=u A A''.Definition simple_0(U:Type)(n:nat)(v:nat->R)(w:nat->Ensemble U)
:=forall i j:nat,i<>j->Disjoint _(w i)(w j).Definition simple_1(U:Type)(n:nat)(v:nat->R)(w:nat->Ensemble U)
:=forall x:U,exists i:nat,i<n/\w i x.(*-----------------------------------------------------------------------------
the list of range values for a simple function doesnt HAVE to be injective, but
i thought itd be nice
-----------------------------------------------------------------------------*)
Definition simple_2(U:Type)(n:nat)(v:nat->R)(w:nat->Ensemble U)
:=forall i j:nat,v i=v j->i=j.Definition simple_3(U:Type)(n:nat)(v:nat->R)(w:nat->Ensemble U)
:=forall i:nat,(v i>=0)%R.(*-----------------------------------------------------------------------------
constructive 'get_index_of'-type function
-----------------------------------------------------------------------------*)
Definition simple_P0
(U:Type)(n:nat)(v:nat->R)(w:nat->Ensemble U):simple_0 _ n v w->simple_1 _ n v w
->simple_2 _ n v w->simple_3 _ n v w->
forall x:U,{i:nat|i<n/\w i x/\forall i',w i' x->i'=i}.

Lemma simple_P10: (forall(U:Type)(n:nat)(v:nat->R)(w:nat->Ensemble U)(S0:simple_0 _ n v w)(S1: simple_1 _ n v w)(S2:simple_2 _ n v w)(S3:simple_3 _ n v w), forall c:R,0<c->simple_1 _ n (fun i:nat=>v i*c)w)%R.