src/HOL/Library/Tree.thy
changeset 61585 a9599d3d7610
parent 60808 fd26519b1a6a
child 62160 ff20b44b2fc8
equal deleted inserted replaced
61584:f06e5a5a4b46 61585:a9599d3d7610
   144 "heap Leaf = True" |
   144 "heap Leaf = True" |
   145 "heap (Node l m r) =
   145 "heap (Node l m r) =
   146   (heap l \<and> heap r \<and> (\<forall>x \<in> set_tree l \<union> set_tree r. m \<le> x))"
   146   (heap l \<and> heap r \<and> (\<forall>x \<in> set_tree l \<union> set_tree r. m \<le> x))"
   147 
   147 
   148 
   148 
   149 subsection "Function @{text mirror}"
   149 subsection "Function \<open>mirror\<close>"
   150 
   150 
   151 fun mirror :: "'a tree \<Rightarrow> 'a tree" where
   151 fun mirror :: "'a tree \<Rightarrow> 'a tree" where
   152 "mirror \<langle>\<rangle> = Leaf" |
   152 "mirror \<langle>\<rangle> = Leaf" |
   153 "mirror \<langle>l,x,r\<rangle> = \<langle>mirror r, x, mirror l\<rangle>"
   153 "mirror \<langle>l,x,r\<rangle> = \<langle>mirror r, x, mirror l\<rangle>"
   154 
   154