src/HOL/Probability/Conditional_Probability.thy
changeset 46731 5302e932d1e5
parent 43920 cedb5cb948fd
equal deleted inserted replaced
46730:e3b99d0231bc 46731:5302e932d1e5
    23 proof -
    23 proof -
    24   note N(4)[simp]
    24   note N(4)[simp]
    25   interpret P: prob_space N
    25   interpret P: prob_space N
    26     using prob_space_subalgebra[OF N] .
    26     using prob_space_subalgebra[OF N] .
    27 
    27 
    28   let "?f A" = "\<lambda>x. X x * indicator A x"
    28   let ?f = "\<lambda>A x. X x * indicator A x"
    29   let "?Q A" = "integral\<^isup>P M (?f A)"
    29   let ?Q = "\<lambda>A. integral\<^isup>P M (?f A)"
    30 
    30 
    31   from measure_space_density[OF borel]
    31   from measure_space_density[OF borel]
    32   have Q: "measure_space (N\<lparr> measure := ?Q \<rparr>)"
    32   have Q: "measure_space (N\<lparr> measure := ?Q \<rparr>)"
    33     apply (rule measure_space.measure_space_subalgebra[of "M\<lparr> measure := ?Q \<rparr>"])
    33     apply (rule measure_space.measure_space_subalgebra[of "M\<lparr> measure := ?Q \<rparr>"])
    34     using N by (auto intro!: P.sigma_algebra_cong)
    34     using N by (auto intro!: P.sigma_algebra_cong)
   144   with assms have "(\<lambda>x. - Z x) \<in> borel_measurable M"
   144   with assms have "(\<lambda>x. - Z x) \<in> borel_measurable M"
   145     "(\<lambda>x. - Z x) \<in> borel_measurable (M'.vimage_algebra (space M) Y)"
   145     "(\<lambda>x. - Z x) \<in> borel_measurable (M'.vimage_algebra (space M) Y)"
   146     by auto
   146     by auto
   147   from factorize_measurable_function_pos[OF assms(1,2) this] guess n .. note n = this
   147   from factorize_measurable_function_pos[OF assms(1,2) this] guess n .. note n = this
   148   from factorize_measurable_function_pos[OF assms Z] guess p .. note p = this
   148   from factorize_measurable_function_pos[OF assms Z] guess p .. note p = this
   149   let "?g x" = "p x - n x"
   149   let ?g = "\<lambda>x. p x - n x"
   150   show "\<exists>g\<in>borel_measurable M'. \<forall>x\<in>space M. Z x = g (Y x)"
   150   show "\<exists>g\<in>borel_measurable M'. \<forall>x\<in>space M. Z x = g (Y x)"
   151   proof (intro bexI ballI)
   151   proof (intro bexI ballI)
   152     show "?g \<in> borel_measurable M'" using p n by auto
   152     show "?g \<in> borel_measurable M'" using p n by auto
   153     fix x assume "x \<in> space M"
   153     fix x assume "x \<in> space M"
   154     then have "p (Y x) = max 0 (Z x)" "n (Y x) = max 0 (- Z x)"
   154     then have "p (Y x) = max 0 (Z x)" "n (Y x) = max 0 (- Z x)"