diff -r 1a20fd9cf281 -r eb4ddd18d635 src/HOL/Probability/Nonnegative_Lebesgue_Integration.thy --- a/src/HOL/Probability/Nonnegative_Lebesgue_Integration.thy Sun Apr 24 21:31:14 2016 +0200 +++ b/src/HOL/Probability/Nonnegative_Lebesgue_Integration.thy Mon Apr 25 16:09:26 2016 +0200 @@ -210,7 +210,8 @@ assumes u[measurable]: "u \ borel_measurable M" shows "\f. incseq f \ (\i. (\x. f i x < top) \ simple_function M (f i)) \ u = (SUP i. f i)" proof - - def f \ "\i x. real_of_int (floor (enn2real (min i (u x)) * 2^i)) / 2^i" + define f where [abs_def]: + "f i x = real_of_int (floor (enn2real (min i (u x)) * 2^i)) / 2^i" for i x have [simp]: "0 \ f i x" for i x by (auto simp: f_def intro!: divide_nonneg_nonneg mult_nonneg_nonneg enn2real_nonneg) @@ -424,7 +425,8 @@ assumes sf: "simple_function M f" "simple_function M g" and A: "A \ space M \ sets M" shows "simple_function M (\x. if x \ A then f x else g x)" (is "simple_function M ?IF") proof - - def F \ "\x. f -` {x} \ space M" and G \ "\x. g -` {x} \ space M" + define F where "F x = f -` {x} \ space M" for x + define G where "G x = g -` {x} \ space M" for x show ?thesis unfolding simple_function_def proof safe have "?IF ` space M \ f ` space M \ g ` space M" by auto @@ -1452,7 +1454,7 @@ assumes "f \ measurable M (count_space UNIV)" shows "(\\<^sup>+x. of_nat (f x) \M) = (\t. emeasure M {x\space M. t < f x})" proof - - def F \ "\i. {x\space M. i < f x}" + define F where "F i = {x\space M. i < f x}" for i with assms have [measurable]: "\i. F i \ sets M" by auto @@ -1637,7 +1639,7 @@ assumes f: "f \ measurable M (count_space UNIV)" shows "(\\<^sup>+ x. ennreal_of_enat (f x) \M) = (\t. emeasure M {x \ space M. t < f x})" proof - - def F \ "\i::nat. {x\space M. i < f x}" + define F where "F i = {x\space M. i < f x}" for i :: nat with assms have [measurable]: "\i. F i \ sets M" by auto