src/HOL/Library/Coinductive_List.thy
changeset 28856 5e009a80fe6d
parent 28702 4867f2fa0e48
child 30198 922f944f03b2
equal deleted inserted replaced
28855:5d21a3e7303c 28856:5e009a80fe6d
   214 lemma llist_case_LCons [simp, code]: "llist_case c d (LCons M N) = d M N"
   214 lemma llist_case_LCons [simp, code]: "llist_case c d (LCons M N) = d M N"
   215   by (simp add: llist_case_def LCons_def
   215   by (simp add: llist_case_def LCons_def
   216     CONS_type Abs_llist_inverse Rep_llist Rep_llist_inverse inj_Leaf)
   216     CONS_type Abs_llist_inverse Rep_llist Rep_llist_inverse inj_Leaf)
   217 
   217 
   218 lemma llist_case_cert:
   218 lemma llist_case_cert:
   219   fixes meta_conjunction :: "prop => prop => prop"  (infixr "&&" 2)
       
   220   assumes "CASE \<equiv> llist_case c d"
   219   assumes "CASE \<equiv> llist_case c d"
   221   shows "(CASE LNil \<equiv> c) && (CASE (LCons M N) \<equiv> d M N)"
   220   shows "(CASE LNil \<equiv> c) &&& (CASE (LCons M N) \<equiv> d M N)"
   222   using assms by simp_all
   221   using assms by simp_all
   223 
   222 
   224 setup {*
   223 setup {*
   225   Code.add_case @{thm llist_case_cert}
   224   Code.add_case @{thm llist_case_cert}
   226 *}
   225 *}