src/HOL/Quickcheck_Examples/Quickcheck_Narrowing_Examples.thy
changeset 58310 91ea607a34d8
parent 58148 9764b994a421
child 58889 5b7a9633cfa8
equal deleted inserted replaced
58309:a09ec6daaa19 58310:91ea607a34d8
   130 oops
   130 oops
   131 
   131 
   132 
   132 
   133 subsection {* AVL Trees *}
   133 subsection {* AVL Trees *}
   134 
   134 
   135 datatype_new 'a tree = ET |  MKT 'a "'a tree" "'a tree" nat
   135 datatype 'a tree = ET |  MKT 'a "'a tree" "'a tree" nat
   136 
   136 
   137 primrec set_of :: "'a tree \<Rightarrow> 'a set"
   137 primrec set_of :: "'a tree \<Rightarrow> 'a set"
   138 where
   138 where
   139 "set_of ET = {}" |
   139 "set_of ET = {}" |
   140 "set_of (MKT n l r h) = insert n (set_of l \<union> set_of r)"
   140 "set_of (MKT n l r h) = insert n (set_of l \<union> set_of r)"