equal
deleted
inserted
replaced
121 lemma eval_minus [simp]: |
121 lemma eval_minus [simp]: |
122 "eval (P - Q) = eval P - eval Q" |
122 "eval (P - Q) = eval P - eval Q" |
123 by (simp add: minus_pred_def) |
123 by (simp add: minus_pred_def) |
124 |
124 |
125 instance proof |
125 instance proof |
126 qed (auto intro!: pred_eqI simp add: uminus_apply minus_apply INF_apply SUP_apply) |
126 qed (auto intro!: pred_eqI) |
127 |
127 |
128 end |
128 end |
129 |
129 |
130 definition single :: "'a \<Rightarrow> 'a pred" where |
130 definition single :: "'a \<Rightarrow> 'a pred" where |
131 "single x = Pred ((op =) x)" |
131 "single x = Pred ((op =) x)" |
141 "eval (P \<guillemotright>= f) = eval (SUPR {x. eval P x} f)" |
141 "eval (P \<guillemotright>= f) = eval (SUPR {x. eval P x} f)" |
142 by (simp add: bind_def) |
142 by (simp add: bind_def) |
143 |
143 |
144 lemma bind_bind: |
144 lemma bind_bind: |
145 "(P \<guillemotright>= Q) \<guillemotright>= R = P \<guillemotright>= (\<lambda>x. Q x \<guillemotright>= R)" |
145 "(P \<guillemotright>= Q) \<guillemotright>= R = P \<guillemotright>= (\<lambda>x. Q x \<guillemotright>= R)" |
146 by (rule pred_eqI) (auto simp add: SUP_apply) |
146 by (rule pred_eqI) auto |
147 |
147 |
148 lemma bind_single: |
148 lemma bind_single: |
149 "P \<guillemotright>= single = P" |
149 "P \<guillemotright>= single = P" |
150 by (rule pred_eqI) auto |
150 by (rule pred_eqI) auto |
151 |
151 |
161 "(P \<squnion> Q) \<guillemotright>= R = P \<guillemotright>= R \<squnion> Q \<guillemotright>= R" |
161 "(P \<squnion> Q) \<guillemotright>= R = P \<guillemotright>= R \<squnion> Q \<guillemotright>= R" |
162 by (rule pred_eqI) auto |
162 by (rule pred_eqI) auto |
163 |
163 |
164 lemma Sup_bind: |
164 lemma Sup_bind: |
165 "(\<Squnion>A \<guillemotright>= f) = \<Squnion>((\<lambda>x. x \<guillemotright>= f) ` A)" |
165 "(\<Squnion>A \<guillemotright>= f) = \<Squnion>((\<lambda>x. x \<guillemotright>= f) ` A)" |
166 by (rule pred_eqI) (auto simp add: SUP_apply) |
166 by (rule pred_eqI) auto |
167 |
167 |
168 lemma pred_iffI: |
168 lemma pred_iffI: |
169 assumes "\<And>x. eval A x \<Longrightarrow> eval B x" |
169 assumes "\<And>x. eval A x \<Longrightarrow> eval B x" |
170 and "\<And>x. eval B x \<Longrightarrow> eval A x" |
170 and "\<And>x. eval B x \<Longrightarrow> eval A x" |
171 shows "A = B" |
171 shows "A = B" |