equal
deleted
inserted
replaced
211 |
211 |
212 theorem exI_realizer: |
212 theorem exI_realizer: |
213 "P y x \<Longrightarrow> P (snd (x, y)) (fst (x, y))" by simp |
213 "P y x \<Longrightarrow> P (snd (x, y)) (fst (x, y))" by simp |
214 |
214 |
215 theorem exE_realizer: "P (snd p) (fst p) \<Longrightarrow> |
215 theorem exE_realizer: "P (snd p) (fst p) \<Longrightarrow> |
216 (\<And>x y. P y x \<Longrightarrow> Q (f x y)) \<Longrightarrow> Q (case p of (x, y) \<Rightarrow> f x y)" |
216 (\<And>x y. P y x \<Longrightarrow> Q (f x y)) \<Longrightarrow> Q (let (x, y) = p in f x y)" |
217 by (cases p) simp |
217 by (cases p) (simp add: Let_def) |
218 |
218 |
219 theorem exE_realizer': "P (snd p) (fst p) \<Longrightarrow> |
219 theorem exE_realizer': "P (snd p) (fst p) \<Longrightarrow> |
220 (\<And>x y. P y x \<Longrightarrow> Q) \<Longrightarrow> Q" by (cases p) simp |
220 (\<And>x y. P y x \<Longrightarrow> Q) \<Longrightarrow> Q" by (cases p) simp |
221 |
221 |
222 realizers |
222 realizers |
250 |
250 |
251 exI (P): "\<lambda>x p. (x, p)" "\<Lambda> P x p. exI_realizer \<cdot> P \<cdot> p \<cdot> x" |
251 exI (P): "\<lambda>x p. (x, p)" "\<Lambda> P x p. exI_realizer \<cdot> P \<cdot> p \<cdot> x" |
252 |
252 |
253 exI: "\<lambda>x. x" "\<Lambda> P x (h: _). h" |
253 exI: "\<lambda>x. x" "\<Lambda> P x (h: _). h" |
254 |
254 |
255 exE (P, Q): "\<lambda>p pq. case p of (x, y) \<Rightarrow> pq x y" |
255 exE (P, Q): "\<lambda>p pq. let (x, y) = p in pq x y" |
256 "\<Lambda> P Q p (h: _) pq. exE_realizer \<cdot> P \<cdot> p \<cdot> Q \<cdot> pq \<bullet> h" |
256 "\<Lambda> P Q p (h: _) pq. exE_realizer \<cdot> P \<cdot> p \<cdot> Q \<cdot> pq \<bullet> h" |
257 |
257 |
258 exE (P): "Null" |
258 exE (P): "Null" |
259 "\<Lambda> P Q p. exE_realizer' \<cdot> _ \<cdot> _ \<cdot> _" |
259 "\<Lambda> P Q p. exE_realizer' \<cdot> _ \<cdot> _ \<cdot> _" |
260 |
260 |