equal
deleted
inserted
replaced
518 match_FF :: "tr \<rightarrow> 'c maybe \<rightarrow> 'c maybe" |
518 match_FF :: "tr \<rightarrow> 'c maybe \<rightarrow> 'c maybe" |
519 where |
519 where |
520 "match_FF = (\<Lambda> x k. If x then fail else k fi)" |
520 "match_FF = (\<Lambda> x k. If x then fail else k fi)" |
521 |
521 |
522 lemma match_UU_simps [simp]: |
522 lemma match_UU_simps [simp]: |
523 "match_UU\<cdot>x\<cdot>k = (if x = \<bottom> then \<bottom> else fail)" |
523 "match_UU\<cdot>\<bottom>\<cdot>k = \<bottom>" |
524 by (simp add: match_UU_def) |
524 "x \<noteq> \<bottom> \<Longrightarrow> match_UU\<cdot>x\<cdot>k = fail" |
|
525 by (simp_all add: match_UU_def) |
525 |
526 |
526 lemma match_cpair_simps [simp]: |
527 lemma match_cpair_simps [simp]: |
527 "match_cpair\<cdot>\<langle>x, y\<rangle>\<cdot>k = k\<cdot>x\<cdot>y" |
528 "match_cpair\<cdot>\<langle>x, y\<rangle>\<cdot>k = k\<cdot>x\<cdot>y" |
528 by (simp add: match_cpair_def) |
529 by (simp add: match_cpair_def) |
529 |
530 |
601 (@{const_name sinr}, @{const_name match_sinr}), |
602 (@{const_name sinr}, @{const_name match_sinr}), |
602 (@{const_name spair}, @{const_name match_spair}), |
603 (@{const_name spair}, @{const_name match_spair}), |
603 (@{const_name cpair}, @{const_name match_cpair}), |
604 (@{const_name cpair}, @{const_name match_cpair}), |
604 (@{const_name ONE}, @{const_name match_ONE}), |
605 (@{const_name ONE}, @{const_name match_ONE}), |
605 (@{const_name TT}, @{const_name match_TT}), |
606 (@{const_name TT}, @{const_name match_TT}), |
606 (@{const_name FF}, @{const_name match_FF}) ] |
607 (@{const_name FF}, @{const_name match_FF}), |
|
608 (@{const_name UU}, @{const_name match_UU}) ] |
607 *} |
609 *} |
608 |
610 |
609 hide (open) const return bind fail run cases |
611 hide (open) const return bind fail run cases |
610 |
612 |
611 end |
613 end |