equal
deleted
inserted
replaced
1685 |
1685 |
1686 code_datatype Trueprop "prop" |
1686 code_datatype Trueprop "prop" |
1687 |
1687 |
1688 code_datatype "TYPE('a)" |
1688 code_datatype "TYPE('a)" |
1689 |
1689 |
|
1690 lemma Let_case_cert: |
|
1691 assumes "CASE \<equiv> (\<lambda>x. Let x f)" |
|
1692 shows "CASE x \<equiv> f x" |
|
1693 using assms by simp_all |
|
1694 |
|
1695 lemma If_case_cert: |
|
1696 includes meta_conjunction_syntax |
|
1697 assumes "CASE \<equiv> (\<lambda>b. If b f g)" |
|
1698 shows "(CASE True \<equiv> f) && (CASE False \<equiv> g)" |
|
1699 using assms by simp_all |
|
1700 |
|
1701 setup {* |
|
1702 Code.add_case @{thm Let_case_cert} |
|
1703 #> Code.add_case @{thm If_case_cert} |
|
1704 #> Code.add_undefined @{const_name undefined} |
|
1705 *} |
|
1706 |
1690 |
1707 |
1691 subsection {* Legacy tactics and ML bindings *} |
1708 subsection {* Legacy tactics and ML bindings *} |
1692 |
1709 |
1693 ML {* |
1710 ML {* |
1694 fun strip_tac i = REPEAT (resolve_tac [impI, allI] i); |
1711 fun strip_tac i = REPEAT (resolve_tac [impI, allI] i); |