# HG changeset patch # User hoelzl # Date 1323102837 -3600 # Node ID 2d5b1af2426a32133cdc3e8f025835efe356cc1d # Parent 97be233b32ed8e1e16a9bc9e8c52ea01b6e1f412 real is better supported than real_of_nat, use it in the nat => ereal coercion diff -r 97be233b32ed -r 2d5b1af2426a src/HOL/Library/Extended_Real.thy --- a/src/HOL/Library/Extended_Real.thy Mon Dec 05 14:47:01 2011 +0100 +++ b/src/HOL/Library/Extended_Real.thy Mon Dec 05 17:33:57 2011 +0100 @@ -59,7 +59,7 @@ declare [[coercion "ereal :: real \ ereal"]] declare [[coercion "ereal_of_enat :: enat \ ereal"]] -declare [[coercion "(\n. ereal (of_nat n)) :: nat \ ereal"]] +declare [[coercion "(\n. ereal (real n)) :: nat \ ereal"]] lemma ereal_uminus_uminus[simp]: fixes a :: ereal shows "- (- a) = a" diff -r 97be233b32ed -r 2d5b1af2426a src/HOL/Probability/Radon_Nikodym.thy --- a/src/HOL/Probability/Radon_Nikodym.thy Mon Dec 05 14:47:01 2011 +0100 +++ b/src/HOL/Probability/Radon_Nikodym.thy Mon Dec 05 17:33:57 2011 +0100 @@ -1097,7 +1097,7 @@ next case (real r) with less_PInf_Ex_of_nat[of "f x"] obtain n :: nat where "f x < n" by (auto simp: real_eq_of_nat) - then show ?thesis using x real unfolding A_def by (auto intro!: exI[of _ "Suc n"]) + then show ?thesis using x real unfolding A_def by (auto intro!: exI[of _ "Suc n"] simp: real_eq_of_nat) next case MInf with x show ?thesis unfolding A_def by (auto intro!: exI[of _ "Suc 0"]) @@ -1117,7 +1117,7 @@ case (Suc n) then have "(\\<^isup>+x. f x * indicator (A i \ Q j) x \M) \ (\\<^isup>+x. (Suc n :: ereal) * indicator (Q j) x \M)" - by (auto intro!: positive_integral_mono simp: indicator_def A_def) + by (auto intro!: positive_integral_mono simp: indicator_def A_def real_eq_of_nat) also have "\ = Suc n * \ (Q j)" using Q by (auto intro!: positive_integral_cmult_indicator) also have "\ < \"