equal
deleted
inserted
replaced
2361 "\<lbrakk> 0 \<le> r; r \<le> 1; 0 \<le> r'; r' \<le> 1 \<rbrakk> |
2361 "\<lbrakk> 0 \<le> r; r \<le> 1; 0 \<le> r'; r' \<le> 1 \<rbrakk> |
2362 \<Longrightarrow> scale_spmf r (scale_spmf r' p) = scale_spmf (r * r') p" |
2362 \<Longrightarrow> scale_spmf r (scale_spmf r' p) = scale_spmf (r * r') p" |
2363 apply(cases "weight_spmf p > 0") |
2363 apply(cases "weight_spmf p > 0") |
2364 apply(auto simp add: scale_scale_spmf min_def max_def field_simps not_le weight_spmf_lt_0 weight_spmf_eq_0 not_less weight_spmf_le_0) |
2364 apply(auto simp add: scale_scale_spmf min_def max_def field_simps not_le weight_spmf_lt_0 weight_spmf_eq_0 not_less weight_spmf_le_0) |
2365 apply(subgoal_tac "1 = r'") |
2365 apply(subgoal_tac "1 = r'") |
2366 apply (metis (no_types) divide_1 eq_iff measure_spmf.subprob_measure_le_1 mult.commute mult_cancel_right1) |
2366 apply (metis (no_types) div_by_1 eq_iff measure_spmf.subprob_measure_le_1 mult.commute mult_cancel_right1) |
2367 apply(meson eq_iff le_divide_eq_1_pos measure_spmf.subprob_measure_le_1 mult_imp_div_pos_le order.trans) |
2367 apply(meson eq_iff le_divide_eq_1_pos measure_spmf.subprob_measure_le_1 mult_imp_div_pos_le order.trans) |
2368 done |
2368 done |
2369 |
2369 |
2370 lemma scale_spmf_eq_same: "scale_spmf r p = p \<longleftrightarrow> weight_spmf p = 0 \<or> r = 1 \<or> r \<ge> 1 \<and> weight_spmf p = 1" |
2370 lemma scale_spmf_eq_same: "scale_spmf r p = p \<longleftrightarrow> weight_spmf p = 0 \<or> r = 1 \<or> r \<ge> 1 \<and> weight_spmf p = 1" |
2371 (is "?lhs \<longleftrightarrow> ?rhs") |
2371 (is "?lhs \<longleftrightarrow> ?rhs") |